33 #ifndef __SILICON_LABS_EM_AES_H__
34 #define __SILICON_LABS_EM_AES_H__
37 #if defined(AES_COUNT) && (AES_COUNT > 0)
66 typedef void (*AES_CtrFuncPtr_TypeDef)(uint8_t *ctr);
79 #if defined( AES_CTRL_AES256 )
95 #if defined( AES_CTRL_AES256 )
109 AES_CtrFuncPtr_TypeDef ctrFunc);
111 #if defined( AES_CTRL_AES256 )
117 AES_CtrFuncPtr_TypeDef ctrFunc);
124 #if defined( AES_CTRL_AES256 )
134 #if defined( AES_CTRL_AES256 )
150 __STATIC_INLINE
void AES_IntClear(uint32_t flags)
164 __STATIC_INLINE
void AES_IntDisable(uint32_t flags)
166 AES->IEN &= ~(flags);
183 __STATIC_INLINE
void AES_IntEnable(uint32_t flags)
200 __STATIC_INLINE uint32_t AES_IntGet(
void)
220 __STATIC_INLINE uint32_t AES_IntGetEnabled(
void)
225 return AES->IF & ien;
237 __STATIC_INLINE
void AES_IntSet(uint32_t flags)
249 #if defined( AES_CTRL_AES256 )
__STATIC_INLINE void AES_CTR256(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, uint8_t *ctr, CRYPTO_AES_CtrFuncPtr_TypeDef ctrFunc)
AES Counter (CTR) cipher mode encryption/decryption, 256 bit key.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
__STATIC_INLINE void AES_ECB128(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, bool encrypt)
AES Electronic Codebook (ECB) cipher mode encryption/decryption, 128 bit key.
__STATIC_INLINE void AES_CFB256(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
AES Cipher feedback (CFB) cipher mode encryption/decryption, 256 bit key.
__STATIC_INLINE void AES_CFB128(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
AES Cipher feedback (CFB) cipher mode encryption/decryption, 128 bit key.
__STATIC_INLINE void AES_CBC128(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
AES Cipher-block chaining (CBC) cipher mode encryption/decryption, 128 bit key.
__STATIC_INLINE void AES_OFB256(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv)
AES Output feedback (OFB) cipher mode encryption/decryption, 256 bit key.
__STATIC_INLINE void AES_OFB128(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv)
AES Output feedback (OFB) cipher mode encryption/decryption, 128 bit key.
__STATIC_INLINE void AES_CTRUpdate32Bit(uint8_t *ctr)
Update last 32 bits of 128 bit counter, by incrementing with 1.
__STATIC_INLINE void AES_ECB256(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, bool encrypt)
AES Electronic Codebook (ECB) cipher mode encryption/decryption, 256 bit key.
__STATIC_INLINE void AES_DecryptKey128(uint8_t *out, const uint8_t *in)
Generate 128 bit AES decryption key from 128 bit encryption key. The decryption key is used for some ...
__STATIC_INLINE void AES_DecryptKey256(uint8_t *out, const uint8_t *in)
Generate 256 bit AES decryption key from 256 bit encryption key. The decryption key is used for some ...
__STATIC_INLINE void AES_CTR128(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, uint8_t *ctr, CRYPTO_AES_CtrFuncPtr_TypeDef ctrFunc)
AES Counter (CTR) cipher mode encryption/decryption, 128 bit key.
__STATIC_INLINE void AES_CBC256(uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
AES Cipher-block chaining (CBC) cipher mode encryption/decryption, 256 bit key.