AM243x MCU+ SDK  08.01.00
crypto_aes.h File Reference

Go to the source code of this file.

Data Structures

struct  Crypto_AesParams
 Parameters passed during Crypto_aesOpen() More...
 
struct  Crypto_AesCommonFxns
 Driver implementation callbacks. More...
 
struct  Crypto_AesCbcFxns
 Driver implementation callbacks. More...
 
struct  Crypto_AesCmacFxns
 Driver implementation callbacks. More...
 
struct  Crypto_AesFxns
 Driver implementation callbacks. More...
 
struct  Crypto_AesContext
 CRYPTO AES driver context. More...
 
struct  Crypto_AesConfig
 CRYPTO AES global configuration array. More...
 

Macros

#define CRYPTO_AES_IV_LENGTH   (16U)
 IV buffer length should be 16 bytes. More...
 
#define CRYPTO_AES_KEY_LENGTH   (32U)
 key buffer length, min 16 bytes and max 32 bytes More...
 
AES algorithm type

#define CRYPTO_AES_DECRYPT   (0U)
 AES decryption algorithm. More...
 
#define CRYPTO_AES_ENCRYPT   (1U)
 AES encryption algorithm. More...
 
#define CRYPTO_AES_CMAC   (2U)
 AES CMAC algorithm. More...
 
AES modes

#define CRYPTO_AES_CBC_128   (0U)
 AES CBC 128 bit MODE and Key size should be 128 bits. More...
 
#define CRYPTO_AES_CBC_192   (1U)
 AES CBC 192 bit MODE and Key size should be 192 bits. More...
 
#define CRYPTO_AES_CBC_256   (2U)
 AES CBC 256 bit MODE and Key size should be 256 bits. More...
 
#define CRYPTO_AES_CMAC_128   (3U)
 AES CMAC with 128-bit ECB mode. More...
 
#define CRYPTO_AES_CMAC_192   (4U)
 AES CMAC with 192-bit ECB mode. More...
 
#define CRYPTO_AES_CMAC_256   (5U)
 AES CMAC with 256-bit ECB mode. More...
 

Typedefs

typedef void * Crypto_AesHandle
 Handle to the Crypto AES driver returned by Crypto_aesOpen() More...
 
typedef int32_t(* Crypto_AesOpenFxn) (Crypto_AesContext *ctx, const Crypto_AesParams *params)
 common callback functions declarations More...
 
typedef int32_t(* Crypto_AesCloseFxn) (Crypto_AesContext *ctx)
 
typedef int32_t(* Crypto_AesSetKeyEncFxn) (Crypto_AesContext *ctx)
 aes cbc callback functions declarations More...
 
typedef int32_t(* Crypto_AesSetKeyDecFxn) (Crypto_AesContext *ctx)
 
typedef int32_t(* Crypto_AesCbcFxn) (Crypto_AesContext *ctx, const uint8_t *input, uint32_t inputLength, uint8_t *output)
 
typedef int32_t(* Crypto_CmacSetUpFxn) (Crypto_AesContext *ctx)
 aes cmac callback functions declarations More...
 
typedef int32_t(* Crypto_CmacStartFxn) (Crypto_AesContext *ctx)
 
typedef int32_t(* Crypto_CmacUpdateFxn) (Crypto_AesContext *ctx, const uint8_t *input, uint32_t ilen)
 
typedef int32_t(* Crypto_CmacFinishFxn) (Crypto_AesContext *ctx, uint8_t *output)
 
typedef int32_t(* Crypto_CmacSingleShotFxn) (Crypto_AesContext *ctx, const uint8_t *input, uint32_t ilen, uint8_t *output)
 

Functions

void Crypto_AesParams_init (Crypto_AesParams *params)
 Set default parameters in the Crypto_AesParams structure. More...
 
Crypto_AesHandle Crypto_aesOpen (Crypto_AesContext *ctx, const Crypto_AesParams *params)
 This function gives the configuration based on type. More...
 
int32_t Crypto_aesClose (Crypto_AesHandle handle)
 This function clears a Advance Encryption Standard (AES) context. More...
 
int32_t Crypto_aesSetKeyEnc (Crypto_AesHandle handle)
 This function sets the Advance Encryption Standard (AES) encryption key. More...
 
int32_t Crypto_aesSetKeyDec (Crypto_AesHandle handle)
 This function sets the Advance Encryption Standard (AES) decryption key. More...
 
int32_t Crypto_aesCbc (Crypto_AesHandle handle, const uint8_t *input, uint32_t ilen, uint8_t *output)
 This function finishes the Advance Encryption Standard Cipher Block Chaining (AES-CBC) operation, and writes the result to the output buffer. More...
 
int32_t Crypto_cmacSetup (Crypto_AesHandle handle)
 This function prepares a cipher context for use with the given cipher primitive. More...
 
int32_t Crypto_cmacStarts (Crypto_AesHandle handle)
 This function sets the CMAC key, and prepares to authenticate the input data. More...
 
int32_t Crypto_cmacUpdate (Crypto_AesHandle handle, const uint8_t *input, uint32_t ilen)
 This function feeds an input buffer into an ongoing CMAC computation. More...
 
int32_t Crypto_cmacFinish (Crypto_AesHandle handle, uint8_t *output)
 This function finishes the CMAC operation, and writes the result to the output buffer. More...
 
int32_t Crypto_cmacSingleShot (Crypto_AesHandle handle, const uint8_t *input, uint32_t ilen, uint8_t *output)
 This function calculates the Advance Encryption Standard Cipher-based Message Authentication Code (AES-CMAC) of a buffer. More...
 

Variables

Crypto_AesConfig gCryptoAesConfig [CRYPTO_NUM_TYPE]
 Externally defined AES driver configuration array. More...