26#ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32675_AES_H_
27#define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32675_AES_H_
46typedef void (*mxc_aes_complete_t)(
void *req,
int result);
76typedef struct _mxc_aes_cipher_req_t {
82 mxc_aes_complete_t callback;
Registers, Bit Masks and Bit Positions for the AES Peripheral Module.
Registers, Bit Masks and Bit Positions for the AESKEYS Peripheral Module.
#define MXC_S_AES_CTRL_KEY_SIZE_AES128
Definition: aes_regs.h:125
#define MXC_S_AES_CTRL_KEY_SIZE_AES256
Definition: aes_regs.h:129
#define MXC_S_AES_CTRL_KEY_SIZE_AES192
Definition: aes_regs.h:127
mxc_aes_enc_type_t encryption
Encrytion type or mxc_aes_enc_type_t.
Definition: aes.h:81
uint32_t * resultData
Pointer to encrypted data.
Definition: aes.h:79
mxc_aes_keys_t keySize
Size of AES key.
Definition: aes.h:80
uint32_t * inputData
Pointer to input data.
Definition: aes.h:78
uint32_t length
Length of the data.
Definition: aes.h:77
void MXC_AES_SetKeySize(mxc_aes_keys_t key)
Set Key size for encryption or decryption.
mxc_aes_keys_t MXC_AES_GetKeySize(void)
Get the currently set key size.
mxc_aes_enc_type_t
Enumeration type to select AES key source and encryption type.
Definition: aes.h:66
uint32_t MXC_AES_GetFlags(void)
Get Interrupt flags set.
void MXC_AES_DisableInt(uint32_t interrupt)
Disable AES Interrupts.
void MXC_AES_FlushInputFIFO(void)
Flush Input Data FIFO.
void MXC_AES_DMACallback(int ch, int error)
This function should be called from the DMA Handler when using Async functions.
void MXC_AES_EnableInt(uint32_t interrupt)
Enable AES Interrupts.
int MXC_AES_Encrypt(mxc_aes_req_t *req)
Perform an encryption.
int MXC_AES_Decrypt(mxc_aes_req_t *req)
Perform a decryption.
int MXC_AES_Init(void)
Enable portions of the AES.
int MXC_AES_IsBusy(void)
Checks the global AES Busy Status.
mxc_aes_keys_t
Enumeration type to select AES key.
Definition: aes.h:56
int MXC_AES_TXDMAConfig(void *src_addr, int len)
Perform AES TX using DMA. Configures DMA request and starts the transmission.
int MXC_AES_EncryptAsync(mxc_aes_req_t *req)
Perform an encryption using Interrupt.
void MXC_AES_FlushOutputFIFO(void)
Flush Output Data FIFO.
int MXC_AES_Shutdown(void)
Disable and reset portions of the AES.
void MXC_AES_Start(void)
Start AES Calculations.
int MXC_AES_GenericAsync(mxc_aes_req_t *req, uint8_t enc)
Perform encryption or decryption using DMA.
void MXC_AES_GenerateKey(void)
This function should be called before encryption to genrate external key.
int MXC_AES_RXDMAConfig(void *dest_addr, int len)
Perform AES RX using DMA. Configures DMA request and receives data from AES FIFO.
int MXC_AES_Generic(mxc_aes_req_t *req)
int MXC_AES_DecryptAsync(mxc_aes_req_t *req)
Perform a decryption using Interrupt.
void MXC_AES_ClearFlags(uint32_t flags)
Clear the interrupts.
void MXC_AES_SetExtKey(const void *key, mxc_aes_keys_t len)
Set the external key.
@ MXC_AES_ENCRYPT_EXT_KEY
Encryption using External key.
Definition: aes.h:67
@ MXC_AES_DECRYPT_EXT_KEY
Encryption using internal key.
Definition: aes.h:68
@ MXC_AES_DECRYPT_INT_KEY
Decryption using internal key.
Definition: aes.h:69
@ MXC_AES_192BITS
Select AES-192 bit key.
Definition: aes.h:58
@ MXC_AES_256BITS
Select AES-256 bit key.
Definition: aes.h:59
@ MXC_AES_128BITS
Select AES-128 bit key.
Definition: aes.h:57
Structure used to set up AES request.
Definition: aes.h:76