10 #define AES_BLOCK_SIZE 0x10
12 #ifndef AES_128_KEY_SIZE
13 #define AES_128_KEY_SIZE 0x10
15 #ifndef AES_128_U32_PER_KEY
16 #define AES_128_U32_PER_KEY (AES_128_KEY_SIZE / sizeof(u32))
18 #ifndef AES_128_NUM_ROUNDS
19 #define AES_128_NUM_ROUNDS 10
21 #ifndef AES_192_KEY_SIZE
22 #define AES_192_KEY_SIZE 0x18
24 #ifndef AES_192_U32_PER_KEY
25 #define AES_192_U32_PER_KEY (AES_192_KEY_SIZE / sizeof(u32))
27 #ifndef AES_192_NUM_ROUNDS
28 #define AES_192_NUM_ROUNDS 12
30 #ifndef AES_256_KEY_SIZE
31 #define AES_256_KEY_SIZE 0x20
33 #ifndef AES_256_U32_PER_KEY
34 #define AES_256_U32_PER_KEY (AES_256_KEY_SIZE / sizeof(u32))
36 #ifndef AES_256_NUM_ROUNDS
37 #define AES_256_NUM_ROUNDS 14
42 u8 round_keys[AES_128_NUM_ROUNDS+1][AES_BLOCK_SIZE];
47 u8 round_keys[AES_192_NUM_ROUNDS+1][AES_BLOCK_SIZE];
52 u8 round_keys[AES_256_NUM_ROUNDS+1][AES_BLOCK_SIZE];
void aes128EncryptBlock(const Aes128Context *ctx, void *dst, const void *src)
Encrypt using an AES context (Requires is_encryptor when initializing)
void aes256ContextCreate(Aes256Context *out, const void *key, bool is_encryptor)
Initialize a 256-bit AES context.
void aes256EncryptBlock(const Aes256Context *ctx, void *dst, const void *src)
Encrypt using an AES context (Requires is_encryptor when initializing)
void aes192DecryptBlock(const Aes192Context *ctx, void *dst, const void *src)
Decrypt using an AES context (Requires !is_encryptor when initializing)
void aes192ContextCreate(Aes192Context *out, const void *key, bool is_encryptor)
Initialize a 192-bit AES context.
void aes128ContextCreate(Aes128Context *out, const void *key, bool is_encryptor)
Initialize a 128-bit AES context.
void aes128DecryptBlock(const Aes128Context *ctx, void *dst, const void *src)
Decrypt using an AES context (Requires !is_encryptor when initializing)
void aes192EncryptBlock(const Aes192Context *ctx, void *dst, const void *src)
Encrypt using an AES context (Requires is_encryptor when initializing)
void aes256DecryptBlock(const Aes256Context *ctx, void *dst, const void *src)
Decrypt using an AES context (Requires !is_encryptor when initializing)
Context for AES-128 operations.
Definition: aes.h:41
Context for AES-192 operations.
Definition: aes.h:46
Context for AES-256 operations.
Definition: aes.h:51
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19