feat(hal/aes): Enable pseudo rounds function during AES operations

This commit is contained in:
harshal.patil
2024-09-18 12:18:51 +05:30
parent bcd80c92f3
commit c6ea979efa
11 changed files with 196 additions and 16 deletions

View File

@@ -9,6 +9,7 @@
#include <stdbool.h>
#include "aes/esp_aes.h"
#include "soc/soc_caps.h"
#include "hal/aes_hal.h"
#include "esp_crypto_dma.h"
#ifdef __cplusplus
@@ -17,6 +18,20 @@ extern "C" {
bool valid_key_length(const esp_aes_context *ctx);
#ifdef CONFIG_MBEDTLS_AES_USE_PSEUDO_ROUND_FUNC
/**
* @brief Default pseudo rounds configs of the AES accelerator
*/
typedef enum {
ESP_AES_PSEUDO_ROUNDS_DISABLE = 0,
ESP_AES_PSEUDO_ROUNDS_LOW,
ESP_AES_PSEUDO_ROUNDS_MEDIUM,
ESP_AES_PSEUDO_ROUNDS_HIGH,
} esp_aes_psuedo_rounds_state_t;
void esp_aes_enable_pseudo_rounds(esp_aes_psuedo_rounds_state_t state);
#endif /* CONFIG_MBEDTLS_AES_USE_PSEUDO_ROUND_FUNC */
#if SOC_AES_SUPPORT_DMA
/**
* @brief Run a AES operation using DMA