|
libzpc 1.5
IBM Z Protected-key Crypto library
|
AES-XTS-FULL API. More...
Go to the source code of this file.
Functions | |
| int | zpc_aes_xts_full_alloc (struct zpc_aes_xts_full **ctx) |
| int | zpc_aes_xts_full_set_key (struct zpc_aes_xts_full *ctx, struct zpc_aes_xts_key *key) |
| int | zpc_aes_xts_full_set_iv (struct zpc_aes_xts_full *ctx, const unsigned char *iv) |
| int | zpc_aes_xts_full_export (struct zpc_aes_xts_full *ctx, unsigned char state[32]) |
| int | zpc_aes_xts_full_import (struct zpc_aes_xts_full *ctx, const unsigned char state[32]) |
| int | zpc_aes_xts_full_encrypt (struct zpc_aes_xts_full *ctx, unsigned char *ct, const unsigned char *pt, size_t ptlen) |
| int | zpc_aes_xts_full_decrypt (struct zpc_aes_xts_full *ctx, unsigned char *pt, const unsigned char *ct, size_t ctlen) |
| void | zpc_aes_xts_full_free (struct zpc_aes_xts_full **ctx) |
AES-XTS-FULL 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] .
In contrast to the AES-XTS API, the AES-XTS-FULL API uses full-xts protected keys containing two single AES keys in one single protected key. This feature requires MSA 10.
Definition in file aes_xts_full.h.
| int zpc_aes_xts_full_alloc | ( | struct zpc_aes_xts_full ** | ctx | ) |
Allocate a new context for an AES-XTS operation to be used with an AES full-xts key object..
| [in,out] | ctx | AES-FULL-XTS context |
| int zpc_aes_xts_full_set_key | ( | struct zpc_aes_xts_full * | ctx, |
| struct zpc_aes_xts_key * | key ) |
Set the AES full-xts key to be used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-FULL-XTS context |
| [in] | key | full-xts key |
| int zpc_aes_xts_full_set_iv | ( | struct zpc_aes_xts_full * | ctx, |
| const unsigned char * | iv ) |
Set the initialization vector to be used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-FULL-XTS context |
| [in] | iv | 16 byte initialization vector |
| int zpc_aes_xts_full_export | ( | struct zpc_aes_xts_full * | ctx, |
| unsigned char | state[32] ) |
Get the intermediate state information used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-FULL-XTS context |
| [out] | state | application provided buffer with 32 bytes size to receive the 32 byte intermediate state information. |
| int zpc_aes_xts_full_import | ( | struct zpc_aes_xts_full * | ctx, |
| const unsigned char | state[32] ) |
Set the intermediate state information to be used in the context of an AES-XTS operation.
| [in,out] | ctx | AES-FULL-XTS context |
| [in] | state | 32 byte intermediate state information as obtained via zpc_aes_xts_full_export(). |
| int zpc_aes_xts_full_encrypt | ( | struct zpc_aes_xts_full * | ctx, |
| unsigned char * | ct, | ||
| const unsigned char * | pt, | ||
| size_t | ptlen ) |
Do an AES-XTS encryption operation.
| [in,out] | ctx | AES-FULL-XTS context |
| [out] | ct | ciphertext |
| [in] | pt | plaintext |
| [in] | ptlen | plaintext length [bytes] |
| int zpc_aes_xts_full_decrypt | ( | struct zpc_aes_xts_full * | ctx, |
| unsigned char * | pt, | ||
| const unsigned char * | ct, | ||
| size_t | ctlen ) |
Do an AES-XTS decryption operation.
| [in,out] | ctx | AES-FULL-XTS context |
| [out] | pt | plaintext |
| [in] | ct | ciphertext |
| [in] | ctlen | ciphertext length [bytes] |
| void zpc_aes_xts_full_free | ( | struct zpc_aes_xts_full ** | ctx | ) |
Free an AES-FULL-XTS context.
| [in,out] | ctx | AES-FULL-XTS context |