4 #include <twr_common.h>
10 #define TWR_AES_KEYLEN 128
11 #define TWR_AES_IVLEN 128
uint32_t twr_aes_iv_t[TWR_AES_IVLEN/8/4]
AES 128-bit Initialization vector.
bool twr_aes_ctwr_decrypt(void *buffer_out, const void *buffer_in, size_t length, twr_aes_key_t key, twr_aes_iv_t iv)
AES Cipher block chaining (CBC)
void twr_aes_key_from_uint8(twr_aes_key_t key, const uint8_t *buffer)
Create key from uint8 array.
uint32_t twr_aes_key_t[TWR_AES_KEYLEN/8/4]
AES 128-bit Key.
void twr_aes_init(void)
Initialize AES.
void twr_aes_iv_from_uint8(twr_aes_iv_t iv, const uint8_t *buffer)
Create Initialization vector from uint8 array.
bool twr_aes_ecb_decrypt(void *buffer_out, const void *buffer_in, size_t length, twr_aes_key_t key)
AES decryption Electronic CodeBook (ECB)
bool twr_aes_ecb_encrypt(void *buffer_out, const void *buffer_in, const size_t length, const twr_aes_key_t key)
AES encryption Electronic CodeBook (ECB)
bool twr_aes_key_derivation(twr_aes_key_t decryption_key, const twr_aes_key_t key)
AES derivation decryption key from encryption key.
bool twr_aes_ctwr_encrypt(void *buffer_out, const void *buffer_in, size_t length, twr_aes_key_t key, twr_aes_iv_t iv)
AES Cipher block chaining (CBC)