|
libzpc 1.5
IBM Z Protected-key Crypto library
|
AES-XTS API. More...
Go to the source code of this file.
Functions | |
| int | zpc_aes_xts_alloc (struct zpc_aes_xts **ctx) |
| int | zpc_aes_xts_set_key (struct zpc_aes_xts *ctx, struct zpc_aes_key *key1, struct zpc_aes_key *key2) |
| int | zpc_aes_xts_set_iv (struct zpc_aes_xts *ctx, const unsigned char *iv) |
| int | zpc_aes_xts_get_intermediate_iv (struct zpc_aes_xts *ctx, unsigned char iv[16]) |
| int | zpc_aes_xts_set_intermediate_iv (struct zpc_aes_xts *ctx, const unsigned char iv[16]) |
| int | zpc_aes_xts_encrypt (struct zpc_aes_xts *ctx, unsigned char *ct, const unsigned char *pt, size_t ptlen) |
| int | zpc_aes_xts_decrypt (struct zpc_aes_xts *ctx, unsigned char *pt, const unsigned char *ct, size_t ctlen) |
| void | zpc_aes_xts_free (struct zpc_aes_xts **ctx) |
AES-XTS API.
Encryption API for the Advanced Encryption Standard (AES) block cipher [1] in XEX-based Tweaked-codebook mode with ciphertext Stealing (XTS) mode of operation [9] .
Definition in file aes_xts.h.
| int zpc_aes_xts_alloc | ( | struct zpc_aes_xts ** | ctx | ) |
Allocate a new context for an AES-XTS operation.
| [in,out] | ctx | AES-XTS context |
| int zpc_aes_xts_set_key | ( | struct zpc_aes_xts * | ctx, |
| struct zpc_aes_key * | key1, | ||
| struct zpc_aes_key * | key2 ) |
Set the key to be used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-XTS context |
| [in] | key1 | first AES key |
| [in] | key2 | second AES key |
| int zpc_aes_xts_set_iv | ( | struct zpc_aes_xts * | ctx, |
| const unsigned char * | iv ) |
Set the initialization vector to be used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-XTS context |
| [in] | iv | 16 byte initialization vector |
| int zpc_aes_xts_get_intermediate_iv | ( | struct zpc_aes_xts * | ctx, |
| unsigned char | iv[16] ) |
Get the intermediate initialization vector to be used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-XTS context |
| [out] | iv | application provided buffer with 16 bytes size to receive the 16 byte intermediate iv |
| int zpc_aes_xts_set_intermediate_iv | ( | struct zpc_aes_xts * | ctx, |
| const unsigned char | iv[16] ) |
Set the intermediate initialization vector to be used in the context of an AES-XTS operation. An initial iv must be set before via zpc_aes_xts_set_iv.
| [in,out] | ctx | AES-XTS context |
| [in] | iv | 16 byte intermediate iv |
| int zpc_aes_xts_encrypt | ( | struct zpc_aes_xts * | ctx, |
| unsigned char * | ct, | ||
| const unsigned char * | pt, | ||
| size_t | ptlen ) |
Do an AES-XTS encryption operation.
| [in,out] | ctx | AES-XTS context |
| [out] | ct | ciphertext |
| [in] | pt | plaintext |
| [in] | ptlen | plaintext length [bytes] |
| int zpc_aes_xts_decrypt | ( | struct zpc_aes_xts * | ctx, |
| unsigned char * | pt, | ||
| const unsigned char * | ct, | ||
| size_t | ctlen ) |
Do an AES-XTS decryption operation.
| [in,out] | ctx | AES-XTS context |
| [out] | pt | plaintext |
| [in] | ct | ciphertext |
| [in] | ctlen | ciphertext length [bytes] |
| void zpc_aes_xts_free | ( | struct zpc_aes_xts ** | ctx | ) |
Free an AES-XTS context.
| [in,out] | ctx | AES-XTS context |