|
libzpc 1.5
IBM Z Protected-key Crypto library
|
AES-CMAC API. More...
Go to the source code of this file.
Functions | |
| int | zpc_aes_cmac_alloc (struct zpc_aes_cmac **ctx) |
| int | zpc_aes_cmac_set_key (struct zpc_aes_cmac *ctx, struct zpc_aes_key *key) |
| int | zpc_aes_cmac_sign (struct zpc_aes_cmac *ctx, unsigned char *mac, size_t maclen, const unsigned char *msg, size_t msglen) |
| int | zpc_aes_cmac_verify (struct zpc_aes_cmac *ctx, const unsigned char *mac, size_t maclen, const unsigned char *msg, size_t msglen) |
| void | zpc_aes_cmac_free (struct zpc_aes_cmac **ctx) |
AES-CMAC API.
Message authentication API for the Cipher-based Message Authentication Code (CMAC) [3] based on the Advanced Encryption Standard (AES) block cipher [1] .
Definition in file aes_cmac.h.
| int zpc_aes_cmac_alloc | ( | struct zpc_aes_cmac ** | ctx | ) |
Allocate a new context for an AES-CMAC operation.
| [in,out] | ctx | AES-CMAC context |
| int zpc_aes_cmac_set_key | ( | struct zpc_aes_cmac * | ctx, |
| struct zpc_aes_key * | key ) |
Set the key to be used in the context of an AES-CMAC operation.
| [in,out] | ctx | AES-CMAC context |
| [in] | key | AES key |
| int zpc_aes_cmac_sign | ( | struct zpc_aes_cmac * | ctx, |
| unsigned char * | mac, | ||
| size_t | maclen, | ||
| const unsigned char * | msg, | ||
| size_t | msglen ) |
Do an AES-CMAC signing operation.
| [in,out] | ctx | AES-CMAC context |
| [out] | mac | message authentication code |
| [in] | maclen | message authentication code length [bytes] |
| [in] | msg | message |
| [in] | msglen | message length [bytes] |
| int zpc_aes_cmac_verify | ( | struct zpc_aes_cmac * | ctx, |
| const unsigned char * | mac, | ||
| size_t | maclen, | ||
| const unsigned char * | msg, | ||
| size_t | msglen ) |
Do an AES-CMAC verify operation.
| [in,out] | ctx | AES-CMAC context |
| [in] | mac | message authentication code |
| [in] | maclen | message authentication code length [bytes] |
| [in] | msg | message |
| [in] | msglen | message length [bytes] |
| void zpc_aes_cmac_free | ( | struct zpc_aes_cmac ** | ctx | ) |
Free an AES-CMAC context.
| [in,out] | ctx | AES-CMAC context |