![Logo](ti_logo.svg) |
AM64x MCU+ SDK
08.01.00
|
|
Go to the documentation of this file.
49 #include <security/crypto.h>
65 #define CRYPTO_AES_DECRYPT (0U)
67 #define CRYPTO_AES_ENCRYPT (1U)
69 #define CRYPTO_AES_CMAC (2U)
78 #define CRYPTO_AES_CBC_128 (0U)
80 #define CRYPTO_AES_CBC_192 (1U)
82 #define CRYPTO_AES_CBC_256 (2U)
84 #define CRYPTO_AES_CMAC_128 (3U)
86 #define CRYPTO_AES_CMAC_192 (4U)
88 #define CRYPTO_AES_CMAC_256 (5U)
92 #define CRYPTO_AES_IV_LENGTH (16U)
95 #define CRYPTO_AES_KEY_LENGTH (32U)
110 typedef struct Crypto_AesParams_s
131 typedef int32_t (*
Crypto_AesCbcFxn)(Crypto_AesContext *ctx,
const uint8_t *input, uint32_t inputLength, uint8_t *output );
134 typedef struct Crypto_AesCbcFxns_s
#define CRYPTO_AES_IV_LENGTH
IV buffer length should be 16 bytes.
Definition: crypto_aes.h:92
int32_t(* Crypto_AesSetKeyEncFxn)(Crypto_AesContext *ctx)
Definition: crypto_aes.h:129
int32_t Crypto_aesSetKeyEnc(Crypto_AesHandle handle)
This function sets the Advance Encryption Standard (AES) encryption key.
int32_t(* Crypto_AesCloseFxn)(Crypto_AesContext *ctx)
Definition: crypto_aes.h:128
uint32_t algoType
Definition: crypto_aes.h:114
int32_t(* Crypto_AesOpenFxn)(Crypto_AesContext *ctx, const Crypto_AesParams *params)
callback functions declarations
Definition: crypto_aes.h:127
uint32_t type
Definition: crypto_aes.h:122
CRYPTO AES driver context.
Definition: crypto_aes.h:150
Crypto_AesSetKeyDecFxn setKeyDecFxn
Definition: crypto_aes.h:142
int32_t Crypto_aesCbc(Crypto_AesHandle handle, const uint8_t *input, uint32_t ilen, uint8_t *output)
This function finishes the Advance Encryption Standard (AES) operation, and writes the result to the ...
Crypto_AesHandle Crypto_aesOpen(Crypto_AesContext *ctx, const Crypto_AesParams *params)
This function gives the configuration based on type.
Crypto_AesCloseFxn closeFxn
Definition: crypto_aes.h:138
int32_t(* Crypto_AesSetKeyDecFxn)(Crypto_AesContext *ctx)
Definition: crypto_aes.h:130
Crypto_AesOpenFxn openFxn
Definition: crypto_aes.h:136
uintptr_t rsv[70U]
Definition: crypto_aes.h:155
Crypto_AesCbcFxns * fxns
Definition: crypto_aes.h:153
Crypto_AesConfig gCryptoAesConfig[CRYPTO_NUM_TYPE]
Externally defined AES driver configuration array.
Crypto_AesCbcFxn cbcFxn
Definition: crypto_aes.h:144
int32_t(* Crypto_AesCbcFxn)(Crypto_AesContext *ctx, const uint8_t *input, uint32_t inputLength, uint8_t *output)
Definition: crypto_aes.h:131
void * Crypto_AesHandle
Handle to the Crypto AES driver returned by Crypto_aesOpen()
Definition: crypto_aes.h:98
Driver implementation callbacks.
Definition: crypto_aes.h:135
Crypto_AesSetKeyEncFxn setKeyEncFxn
Definition: crypto_aes.h:140
void Crypto_AesParams_init(Crypto_AesParams *params)
Set default parameters in the Crypto_AesParams structure.
Parameters passed during Crypto_aesOpen()
Definition: crypto_aes.h:111
int32_t Crypto_aesClose(Crypto_AesHandle handle)
This function clears a Advance Encryption Standard (AES) context.
Crypto_AesParams params
Definition: crypto_aes.h:151
uint32_t aesMode
Definition: crypto_aes.h:112
Crypto_AesCbcFxns * fxns
Definition: crypto_aes.h:167
CRYPTO AES global configuration array.
Definition: crypto_aes.h:166
int32_t Crypto_aesSetKeyDec(Crypto_AesHandle handle)
This function sets the Advance Encryption Standard (AES) decryption key.
uint32_t keySizeInBits
Definition: crypto_aes.h:120
#define CRYPTO_AES_KEY_LENGTH
key buffer length, min 16 bytes and max 32 bytes
Definition: crypto_aes.h:95