Skip to content

Commit

Permalink
fix(mbedtls/aes): fix AES interrupt allocation for AES-GCM operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshal5 committed Dec 1, 2023
1 parent bffe5d2 commit 00919c3
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions components/mbedtls/port/aes/esp_aes_gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,28 @@
* http://csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf
* http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
*/

#include "soc/soc_caps.h"

#include <string.h>

#include "aes/esp_aes.h"
#include "aes/esp_aes_gcm.h"
#include "aes/esp_aes_internal.h"
#include "hal/aes_hal.h"

#include "esp_log.h"
#include "mbedtls/aes.h"
#include "mbedtls/error.h"
#include "mbedtls/gcm.h"
#include "mbedtls/platform.h"

#include "esp_heap_caps.h"
#include "esp_log.h"
#include "soc/soc_caps.h"
#include "soc/soc_memory_layout.h"

#include "mbedtls/error.h"
#include "mbedtls/platform.h"
#include <string.h>
#include "sdkconfig.h"

#if SOC_AES_SUPPORT_DMA
#include "esp_aes_dma_priv.h"
#endif

#define ESP_PUT_BE64(a, val) \
do { \
Expand Down Expand Up @@ -326,6 +331,10 @@ void esp_aes_gcm_init( esp_gcm_context *ctx)

bzero(ctx, sizeof(esp_gcm_context));

#if SOC_AES_SUPPORT_DMA && CONFIG_MBEDTLS_AES_USE_INTERRUPT
esp_aes_intr_alloc();
#endif

ctx->gcm_state = ESP_AES_GCM_STATE_INIT;
}

Expand Down

0 comments on commit 00919c3

Please sign in to comment.