HAL AES Types

HAL AES Types

group AES_Exported_Types

Typedefs

typedef struct hal_aes_handle_s hal_aes_handle_t

AES Handle type Definition

typedef void ( * hal_aes_cb_t ) ( hal_aes_handle_t * haes )

AES callback type definition

Enums

enum hal_aes_t

AES instance enumeration definition

Values:

enumerator HAL_AES

AES instance

enum hal_aes_state_t

AES Global state enumeration definition

Values:

enumerator HAL_AES_STATE_RESET

AES peripheral is not yet initialized

enumerator HAL_AES_STATE_INIT

AES peripheral is initialized but not yet configured

enumerator HAL_AES_STATE_IDLE

AES peripheral is initialized and configured

enumerator HAL_AES_STATE_ACTIVE

AES internal processing is ongoing

enumerator HAL_AES_STATE_SUSPENDED

AES internal processing is suspended

enum hal_aes_key_size_t

AES key size enumeration definition

Values:

enumerator HAL_AES_KEY_SIZE_128BIT

128-bit long key

enumerator HAL_AES_KEY_SIZE_256BIT

0x00040000 Key size selection 256-bit long key

enum hal_aes_data_swapping_t

AES data swapping enumeration definition

Values:

enumerator HAL_AES_DATA_SWAPPING_NO

No swapping

enumerator HAL_AES_DATA_SWAPPING_HALFWORD

0x00000002 Half-word swapping

enumerator HAL_AES_DATA_SWAPPING_BYTE

0x00000004 Byte swapping

enumerator HAL_AES_DATA_SWAPPING_BIT

0x00000006 Data type Bit swapping

struct hal_aes_gcm_config_t
#include <stm32c5xx_hal_aes.h>

AES GCM_GMAC configuration structure

Public Members

uint32_t * p_init_vect

The initialization vector

uint32_t * p_header

Used only in AES GCM and CCM Algorithm for authentication, For GCM: The header is also known as Additional Authentication Data

uint32_t header_size_byte

The size of header buffer in bytes

struct hal_aes_ccm_config_t
#include <stm32c5xx_hal_aes.h>

AES CCM configuration structure

Public Members

uint32_t * p_b0

B0 is the first authentication block used only in AES CCM mode, composed of 16 bytes

uint32_t * p_header

Used only in AES GCM and CCM Algorithm for authentication, For CCM: Named B1 composed of the associated data length and Associated Data.

uint32_t header_size_byte

The size of header buffer in bytes

struct hal_aes_handle_s
#include <stm32c5xx_hal_aes.h>

AES handle Structure definition

Public Members

hal_aes_t instance

AES Register base address, can be a value of hal_aes_t

volatile hal_aes_state_t global_state

AES peripheral state, can be a value of hal_aes_state_t

uint32_t algorithm

AES chaining mode

volatile uint32_t data_size_byte

Length of input data in byte

volatile uint32_t data_size_sum_byte

Sum of successive payloads lengths (in bytes), stored for a single signature computation after several messages processing

const uint32_t * p_in_buff

Pointer to AES input processing buffer(plaintext or ciphertext)

uint32_t * p_out_buff

Pointer to AES output processing buffer (Allowing to store encrypted or decrypted text)

volatile uint32_t block_count

Counter of input data blocks, one block is equal to 128 bits

const uint32_t * p_header

Used only in AES GCM and CCM Algorithm for authentication, GCM: Also known as Additional Authentication Data CCM: Named B1 composed of the associated data length and Associated Data.

uint32_t header_size_byte

The size of header buffer in bytes

volatile uint32_t suspend_request

AES peripheral suspension request flag

const uint32_t * p_key

Application pointer key to be stored in the handle during suspension

hal_dma_handle_t * hdma_in

AES In DMA handle parameters

hal_dma_handle_t * hdma_out

AES Out DMA handle parameters

const void * p_user_data

User Data Pointer

hal_aes_cb_t p_in_cplt_cb

AES Input FIFO transfer completed callback

hal_aes_cb_t p_out_cplt_cb

AES Output FIFO transfer completed callback

hal_aes_cb_t p_error_cb

AES Error callback

hal_aes_cb_t p_suspend_cb

AES Suspend callback

volatile uint32_t last_error_codes

AES peripheral error code

struct hal_aes_save_context_t
#include <stm32c5xx_hal_aes.h>

AES suspend resume Structure definition

AES suspend resume configuration structure

Public Members

uint32_t CR

Copy of AES control register when processing is suspended

uint32_t iv_buff [ 4 ]

Copy of Initialization Vector registers

uint32_t SUSPRx [ 8 ]

Copy of suspension registers, used only in AES GCM and CCM algorithms

hal_aes_t instance

AES Register base address, can be a value of hal_aes_t

volatile hal_aes_state_t previous_state

AES peripheral state, can be a value of hal_aes_state_t

uint32_t algorithm

AES chaining mode

volatile uint32_t data_size_byte

Length of input data in byte

volatile uint32_t data_size_sum_byte

Sum of successive payloads lengths (in bytes), stored for a single signature computation after several messages processing

const uint32_t * p_in_buff

Pointer to AES input processing buffer(plaintext or ciphertext)

uint32_t * p_out_buff

Pointer to AES output processing buffer (Allowing to store encrypted or decrypted text)

volatile uint32_t block_count

Counter of input data blocks, one block is equal to 128 bits

const uint32_t * p_header

Used only in AES GCM and CCM Algorithm for authentication, GCM: Also known as Additional Authentication Data CCM: Named B1 composed of the associated data length and Associated Data.

uint32_t header_size_byte

The size of header buffer in bytes

volatile uint32_t suspend_request

AES peripheral suspension request flag

const uint32_t * p_key

Application pointer key to be stored in the handle during suspension

hal_aes_cb_t p_in_cplt_cb

AES Input FIFO transfer completed callback

hal_aes_cb_t p_out_cplt_cb

AES Output FIFO transfer completed callback

hal_aes_cb_t p_error_cb

AES Error callback

hal_aes_cb_t p_suspend_cb

AES Suspend callback