|
MODA
1.0.1
ModularAES
|
Interface to the block cipher defined in FIPS-197.
Functions | |
| void | MODA_AES_Init (struct aes_ctxt *aes, enum aes_key_size keySize, const uint8_t *key) |
| Initialise an AES block cipher by expanding a key. More... | |
| void | MODA_AES_Encrypt (const struct aes_ctxt *aes, uint8_t *s) |
| Encrypt a block of memory called state. More... | |
| void | MODA_AES_Decrypt (const struct aes_ctxt *aes, uint8_t *s) |
| Decrypt a block of memory called state. More... | |
Data Structures | |
| struct | aes_ctxt |
| Stores the expanded key. More... | |
Macros | |
| #define | AES_BLOCK_SIZE 16U |
| block cipher block size in bytes | |
Enumerations | |
| enum | aes_key_size { AES_KEY_128 = 16U, AES_KEY_192 = 24U, AES_KEY_256 = 32U } |
| Supported key sizes. More... | |
| struct aes_ctxt |
Stores the expanded key.
| Data Fields | ||
|---|---|---|
| uint8_t | k[240U] | expanded key |
| uint8_t | r | number of rounds |
| enum aes_key_size |
| void MODA_AES_Decrypt | ( | const struct aes_ctxt * | aes, |
| uint8_t * | s | ||
| ) |
Decrypt a block of memory called state.
| [in] | aes | expanded key |
| [in] | s | pointer to AES_BLOCK_SIZE bytes of state (any alignment) |
| void MODA_AES_Encrypt | ( | const struct aes_ctxt * | aes, |
| uint8_t * | s | ||
| ) |
Encrypt a block of memory called state.
| [in] | aes | expanded key |
| [in] | s | pointer to AES_BLOCK_SIZE bytes of state (any alignment) |
| void MODA_AES_Init | ( | struct aes_ctxt * | aes, |
| enum aes_key_size | keySize, | ||
| const uint8_t * | key | ||
| ) |
Initialise an AES block cipher by expanding a key.
| [in] | aes | expanded key |
| [in] | keySize | enumerated size of key |
| [in] | key | pointer to the key (any alignment) |