EFM32 Wonder Gecko Software Documentation  efm32wg-doc-5.1.2
em_aes.h File Reference

Detailed Description

Advanced encryption standard (AES) accelerator peripheral API.

Version
5.1.2

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.

Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.

Definition in file em_aes.h.

#include "em_device.h"
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef void(* AES_CtrFuncPtr_TypeDef) (uint8_t *ctr)
 AES counter modification function pointer. More...
 

Functions

void AES_CBC128 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
 Cipher-block chaining (CBC) cipher mode encryption/decryption, 128 bit key. More...
 
void AES_CBC256 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
 Cipher-block chaining (CBC) cipher mode encryption/decryption, 256 bit key. More...
 
void AES_CFB128 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
 Cipher feedback (CFB) cipher mode encryption/decryption, 128 bit key. More...
 
void AES_CFB256 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv, bool encrypt)
 Cipher feedback (CFB) cipher mode encryption/decryption, 256 bit key. More...
 
void AES_CTR128 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, uint8_t *ctr, AES_CtrFuncPtr_TypeDef ctrFunc)
 Counter (CTR) cipher mode encryption/decryption, 128 bit key. More...
 
void AES_CTR256 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, uint8_t *ctr, AES_CtrFuncPtr_TypeDef ctrFunc)
 Counter (CTR) cipher mode encryption/decryption, 256 bit key. More...
 
void AES_CTRUpdate32Bit (uint8_t *ctr)
 Update last 32 bits of 128 bit counter, by incrementing with 1. More...
 
void AES_DecryptKey128 (uint8_t *out, const uint8_t *in)
 Generate 128 bit decryption key from 128 bit encryption key. The decryption key is used for some cipher modes when decrypting. More...
 
void AES_DecryptKey256 (uint8_t *out, const uint8_t *in)
 Generate 256 bit decryption key from 256 bit encryption key. The decryption key is used for some cipher modes when decrypting. More...
 
void AES_ECB128 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, bool encrypt)
 Electronic Codebook (ECB) cipher mode encryption/decryption, 128 bit key. More...
 
void AES_ECB256 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, bool encrypt)
 Electronic Codebook (ECB) cipher mode encryption/decryption, 256 bit key. More...
 
__STATIC_INLINE void AES_IntClear (uint32_t flags)
 Clear one or more pending AES interrupts. More...
 
__STATIC_INLINE void AES_IntDisable (uint32_t flags)
 Disable one or more AES interrupts. More...
 
__STATIC_INLINE void AES_IntEnable (uint32_t flags)
 Enable one or more AES interrupts. More...
 
__STATIC_INLINE uint32_t AES_IntGet (void)
 Get pending AES interrupt flags. More...
 
__STATIC_INLINE uint32_t AES_IntGetEnabled (void)
 Get enabled and pending AES interrupt flags. Useful for handling more interrupt sources in the same interrupt handler. More...
 
__STATIC_INLINE void AES_IntSet (uint32_t flags)
 Set one or more pending AES interrupts from SW. More...
 
void AES_OFB128 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv)
 Output feedback (OFB) cipher mode encryption/decryption, 128 bit key. More...
 
void AES_OFB256 (uint8_t *out, const uint8_t *in, unsigned int len, const uint8_t *key, const uint8_t *iv)
 Output feedback (OFB) cipher mode encryption/decryption, 256 bit key. More...