Defines | |
| #define | C4E_AES128_CTX_SIZE |
| #define | C4E_AES192_CTX_SIZE |
| #define | C4E_AES256_CTX_SIZE |
| #define | C4E_AES_MAX_CTX_SIZE |
| #define | C4E_AES128_KEY_SIZE |
| #define | C4E_AES192_KEY_SIZE |
| #define | C4E_AES256_KEY_SIZE |
| #define | C4E_AES_BLOCK_SIZE |
Typedefs | |
| typedef C4eArchUint8 | C4eAesState |
| AES state element. | |
Functions | |
| void | c4e_aes_setup (C4eCipherId algo, C4E_CONST C4eArchUint8 *key, C4eAesState *ctx) |
| KeyExpansion primitive according to FIPS 197, 5.2 | |
| void | c4e_aes_encrypt (C4eCipherId algo, C4eAesState *C4E_RESTRICT ctx, C4E_CONST C4eArchUint8 *C4E_RESTRICT plain, C4eArchUint8 *C4E_RESTRICT cipher) |
| AES encryption algorithm according to FIPS 197. | |
| void | c4e_aes_decrypt (C4eCipherId algo, C4eAesState *C4E_RESTRICT ctx, C4E_CONST C4eArchUint8 *C4E_RESTRICT cipher, C4eArchUint8 *C4E_RESTRICT plain) |
| AES decryption algorithm according to FIPS 197. | |
| #define C4E_AES128_CTX_SIZE |
AES-128 context size in C4eAesState elements.
| #define C4E_AES192_CTX_SIZE |
AES-192 context size in C4eAesState elements.
| #define C4E_AES256_CTX_SIZE |
AES-256 context size in C4eAesState elements.
| #define C4E_AES_MAX_CTX_SIZE |
| void c4e_aes_setup | ( | C4eCipherId | algo, | |
| C4E_CONST C4eArchUint8 * | key, | |||
| C4eAesState * | ctx | |||
| ) |
KeyExpansion primitive according to FIPS 197, 5.2
| [in] | algo | AES algorithm type (with respect to key length) |
| [in] | key | Key, with implicit length:
|
| [out] | ctx | Context to be supplied to c4e_aes_encrypt() or c4e_aes_decrypt(). |
| void c4e_aes_encrypt | ( | C4eCipherId | algo, | |
| C4eAesState *C4E_RESTRICT | ctx, | |||
| C4E_CONST C4eArchUint8 *C4E_RESTRICT | plain, | |||
| C4eArchUint8 *C4E_RESTRICT | cipher | |||
| ) |
AES encryption algorithm according to FIPS 197.
| [in] | algo | One of the AES algorithm identifiers. |
| [in,out] | ctx | Context as prepared by c4e_aes_setup() |
| [in] | plain | Pointer to plaintext block of C4E_AES_BLOCK_SIZE bytes |
| [out] | cipher | Pointer to memory buffer of C4E_AES_BLOCK_SIZE bytes, which gets the ciphertext block. |
| void c4e_aes_decrypt | ( | C4eCipherId | algo, | |
| C4eAesState *C4E_RESTRICT | ctx, | |||
| C4E_CONST C4eArchUint8 *C4E_RESTRICT | cipher, | |||
| C4eArchUint8 *C4E_RESTRICT | plain | |||
| ) |
AES decryption algorithm according to FIPS 197.
| [in] | algo | One of the AES algorithm identifiers. |
| [in,out] | ctx | Context as prepared by c4e_aes_setup() |
| [in] | cipher | Pointer to ciphertext block of C4E_AES_BLOCK_SIZE bytes |
| [out] | plain | Pointer to memory buffer of C4E_AES_BLOCK_SIZE bytes, which gets the plaintext block. |
1.6.1