Merge branch 'feat/support_both_aes_and_sha_block_and_dma_modes_during_runtime' into 'master'

feat(mbedtls): Support both SHA block and DMA modes during runtime

Closes IDF-11848

See merge request espressif/esp-idf!36589
This commit is contained in:
Harshal Patil
2025-02-06 11:19:51 +08:00
28 changed files with 458 additions and 1271 deletions

View File

@@ -60,13 +60,13 @@ if(CONFIG_SOC_SHA_SUPPORTED)
if(CONFIG_SOC_SHA_SUPPORT_DMA)
list(APPEND srcs "sha/sha_dma.c"
"$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/sha.c")
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/include")
"$ENV{IDF_PATH}/components/mbedtls/port/sha/core/sha.c")
list(APPEND priv_include_dirs "$ENV{IDF_PATH}/components/mbedtls/port/sha/core/include")
if(NOT CONFIG_SOC_SHA_GDMA)
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/esp_sha_crypto_dma_impl.c")
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/sha/core/esp_sha_crypto_dma_impl.c")
else()
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/sha/dma/esp_sha_gdma_impl.c"
list(APPEND srcs "$ENV{IDF_PATH}/components/mbedtls/port/sha/core/esp_sha_gdma_impl.c"
"$ENV{IDF_PATH}/components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c")
endif()
endif()

View File

@@ -17,7 +17,7 @@
#if SOC_SHA_SUPPORTED
#if SOC_SHA_SUPPORT_DMA
#include "sha/sha_dma.h"
#include "sha/sha_core.h"
#include "sha_dma.h"
#if defined(SOC_SHA_SUPPORT_SHA1)