45#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ \
46 ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3]))
47#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); \
48 (ct)[1] = (u8)((st) >> 16); \
49 (ct)[2] = (u8)((st) >> 8); \
53#define AES_BLOCK_SIZE 16
59#define AES_KEY_SIZE_128 16
60#define AES_KEY_SIZE_192 24
61#define AES_KEY_SIZE_256 32
69 uint32_t
context[(4 * (AES_MAXNR + 1)) + 1];
110 uint8_t *cipher_block);
131 uint8_t *plain_block);
int aes_init(cipher_context_t *context, const uint8_t *key, uint8_t keySize)
initializes the AES Cipher-algorithm with the passed parameters
int aes_decrypt(const cipher_context_t *context, const uint8_t *cipher_block, uint8_t *plain_block)
Decrypts one cipher-block and saves the plain-block in plain_block.
int aes_encrypt(const cipher_context_t *context, const uint8_t *plain_block, uint8_t *cipher_block)
encrypts one plainBlock-block and saves the result in cipherblock.
Headers for the packet encryption class.
Common macros and compiler attributes/pragmas configuration.
#define ACCESS(mode, ptr_idx, size_idx)
Emit an attribute (if supported by the compiler) that declares how a function will access its paramet...
the cipher_context_t-struct adapted for AES
uint32_t context[(4 *(AES_MAXNR+1))+1]
context data buffer
the context for cipher-operations