mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
feat(hal/aes): Enable pseudo rounds function during AES operations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user