diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index aa7726c166..aec2c7c0f0 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -20,6 +20,7 @@ set(COMPONENTS bootloader esptool_py esp_hw_support + esp_hal_security esp_system freertos hal diff --git a/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in b/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in index aad2b39b2d..51f81f094a 100644 --- a/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in +++ b/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld.in @@ -91,8 +91,8 @@ SECTIONS *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) - *libhal.a:huk_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_key_mgr.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in b/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in index 1d763d2d22..7837346e9d 100644 --- a/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in +++ b/components/bootloader/subproject/main/ld/esp32p4/bootloader.ld.in @@ -89,7 +89,8 @@ SECTIONS *libhal.a:mmu_hal.*(.literal .text .literal.* .text.*) *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal.key_mgr_hal_set_key_usage .text.key_mgr_hal_set_key_usage) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) *libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in b/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in index f51c5e63af..8bf17b9974 100644 --- a/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in +++ b/components/bootloader/subproject/main/ld/esp32p4/bootloader.rev3.ld.in @@ -90,8 +90,8 @@ SECTIONS *libhal.a:cache_hal.*(.literal .text .literal.* .text.*) *libhal.a:efuse_hal.*(.literal .text .literal.* .text.*) *libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*) - *libhal.a:huk_hal.*(.literal .text .literal.* .text.*) - *libhal.a:key_mgr_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*) + *libesp_hal_security.a:key_mgr_hal.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_key_mgr.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*) *libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader_support/src/bootloader_mem.c b/components/bootloader_support/src/bootloader_mem.c index 6ae07f70e6..916a003de6 100644 --- a/components/bootloader_support/src/bootloader_mem.c +++ b/components/bootloader_support/src/bootloader_mem.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/efuse/CMakeLists.txt b/components/efuse/CMakeLists.txt index 8b5d587213..66413755b9 100644 --- a/components/efuse/CMakeLists.txt +++ b/components/efuse/CMakeLists.txt @@ -31,15 +31,15 @@ list(APPEND srcs "src/esp_efuse_api.c" if(non_os_build) idf_component_register(SRCS "${srcs}" - PRIV_REQUIRES bootloader_support soc spi_flash + PRIV_REQUIRES bootloader_support soc spi_flash esp_hal_security INCLUDE_DIRS "${include_dirs}" PRIV_INCLUDE_DIRS "${private_include}") else() list(APPEND srcs "src/esp_efuse_startup.c") if(${target} STREQUAL "linux") - set(priv_requires soc spi_flash esp_system esp_partition) + set(priv_requires soc spi_flash esp_system esp_partition esp_hal_security) else() - set(priv_requires bootloader_support soc spi_flash esp_system esp_partition esp_app_format) + set(priv_requires bootloader_support soc spi_flash esp_system esp_partition esp_app_format esp_hal_security) endif() idf_component_register(SRCS "${srcs}" PRIV_REQUIRES "${priv_requires}" diff --git a/components/esp_hal_security/aes_hal.c b/components/esp_hal_security/aes_hal.c index ad84c5776f..75b3534c1d 100644 --- a/components/esp_hal_security/aes_hal.c +++ b/components/esp_hal_security/aes_hal.c @@ -6,8 +6,8 @@ // The HAL layer for AES -#include "esp_hal_security/aes_hal.h" -#include "esp_hal_security/aes_ll.h" +#include "hal/aes_hal.h" +#include "hal/aes_ll.h" #include #include #include "soc/soc_caps.h" diff --git a/components/esp_hal_security/apm_hal.c b/components/esp_hal_security/apm_hal.c index 733f4baef7..6cc45772a9 100644 --- a/components/esp_hal_security/apm_hal.c +++ b/components/esp_hal_security/apm_hal.c @@ -7,8 +7,8 @@ #include #include "soc/soc_caps.h" #include "hal/assert.h" -#include "esp_hal_security/apm_hal.h" -#include "esp_hal_security/apm_ll.h" +#include "hal/apm_hal.h" +#include "hal/apm_ll.h" #include "hal/log.h" #if SOC_IS(ESP32P4) diff --git a/components/esp_hal_security/ds_hal.c b/components/esp_hal_security/ds_hal.c index 5025acc32a..9890df41a1 100644 --- a/components/esp_hal_security/ds_hal.c +++ b/components/esp_hal_security/ds_hal.c @@ -5,8 +5,8 @@ */ #include "hal/systimer_hal.h" -#include "esp_hal_security/ds_hal.h" -#include "esp_hal_security/ds_ll.h" +#include "hal/ds_hal.h" +#include "hal/ds_ll.h" #include "hal/assert.h" #include "soc/soc_caps.h" diff --git a/components/esp_hal_security/ecc_hal.c b/components/esp_hal_security/ecc_hal.c index 5de4e651da..47d068401c 100644 --- a/components/esp_hal_security/ecc_hal.c +++ b/components/esp_hal_security/ecc_hal.c @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include "esp_hal_security/ecc_hal.h" -#include "esp_hal_security/ecc_ll.h" +#include "hal/ecc_hal.h" +#include "hal/ecc_ll.h" #include "soc/soc_caps.h" /* ECC curve size constants in bytes */ diff --git a/components/esp_hal_security/ecdsa_hal.c b/components/esp_hal_security/ecdsa_hal.c index 65504ac5cb..0b027be1b7 100644 --- a/components/esp_hal_security/ecdsa_hal.c +++ b/components/esp_hal_security/ecdsa_hal.c @@ -5,8 +5,8 @@ */ #include "hal/assert.h" -#include "esp_hal_security/ecdsa_ll.h" -#include "esp_hal_security/ecdsa_hal.h" +#include "hal/ecdsa_ll.h" +#include "hal/ecdsa_hal.h" #include "hal/efuse_hal.h" #include "hal/efuse_ll.h" #include "soc/soc_caps.h" @@ -18,8 +18,8 @@ #endif #ifdef SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY -#include "esp_hal_security/key_mgr_hal.h" -#include "esp_hal_security/key_mgr_ll.h" +#include "hal/key_mgr_hal.h" +#include "hal/key_mgr_ll.h" #endif #define ECDSA_HAL_P192_COMPONENT_LEN 24 diff --git a/components/esp_hal_security/esp32/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32/include/hal/aes_ll.h index dc6ed0917c..5d4a865c54 100644 --- a/components/esp_hal_security/esp32/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32/include/hal/aes_ll.h @@ -11,7 +11,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/dport_access.h" #include "soc/dport_reg.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32/include/hal/mpi_ll.h index 6a93698528..a8e0f565ee 100644 --- a/components/esp_hal_security/esp32/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/dport_reg.h" #include "soc/hwcrypto_periph.h" #include "soc/mpi_periph.h" diff --git a/components/esp_hal_security/esp32/include/esp_hal_security/mpu_ll.h b/components/esp_hal_security/esp32/include/hal/mpu_ll.h similarity index 100% rename from components/esp_hal_security/esp32/include/esp_hal_security/mpu_ll.h rename to components/esp_hal_security/esp32/include/hal/mpu_ll.h diff --git a/components/esp_hal_security/esp32/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32/include/hal/sha_ll.h index 8e1730e25e..18b4e775e4 100644 --- a/components/esp_hal_security/esp32/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32/include/hal/sha_ll.h @@ -6,7 +6,7 @@ #pragma once #include -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #include "soc/dport_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/dport_access.h" diff --git a/components/esp_hal_security/esp32c2/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32c2/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32c2/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32c2/include/hal/ecc_ll.h index f8cff59878..886a21f207 100644 --- a/components/esp_hal_security/esp32c2/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32c2/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/system_struct.h" diff --git a/components/esp_hal_security/esp32c2/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32c2/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32c2/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32c2/include/hal/sha_ll.h index 8a908d6290..a353e70d19 100644 --- a/components/esp_hal_security/esp32c2/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32c2/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/system_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c3/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32c3/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32c3/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32c3/include/hal/aes_ll.h index 2853cb7209..bbfe795a90 100644 --- a/components/esp_hal_security/esp32c3/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/system_struct.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c3/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32c3/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32c3/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32c3/include/hal/ds_ll.h index 44a9368f66..3b4b6fd602 100644 --- a/components/esp_hal_security/esp32c3/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/ds_ll.h @@ -18,7 +18,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/soc_caps.h" #include "soc/system_struct.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c3/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32c3/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32c3/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32c3/include/hal/hmac_ll.h index 235064507f..4482464536 100644 --- a/components/esp_hal_security/esp32c3/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/hmac_ll.h @@ -18,7 +18,7 @@ #include "soc/system_reg.h" #include "soc/system_struct.h" #include "soc/hwcrypto_reg.h" -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32c3/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32c3/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32c3/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32c3/include/hal/mpi_ll.h index 07408be57b..c8eeae7b55 100644 --- a/components/esp_hal_security/esp32c3/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/hwcrypto_periph.h" #include "soc/system_reg.h" #include "soc/system_struct.h" diff --git a/components/esp_hal_security/esp32c3/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32c3/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32c3/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32c3/include/hal/sha_ll.h index bc06d6e2ce..6970f1ccbe 100644 --- a/components/esp_hal_security/esp32c3/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32c3/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/system_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32c5/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32c5/include/hal/aes_ll.h index 8211bae1a8..4284612742 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/aes_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/apm_ll.h b/components/esp_hal_security/esp32c5/include/hal/apm_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/apm_ll.h rename to components/esp_hal_security/esp32c5/include/hal/apm_ll.h index 71e8dfa1f1..f3176340dc 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/apm_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/apm_ll.h @@ -22,7 +22,7 @@ #include "soc/pcr_reg.h" #include "soc/interrupts.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32c5/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32c5/include/hal/ds_ll.h index c899103008..b9bd401d6d 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/ds_ll.h @@ -18,7 +18,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/soc_caps.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32c5/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32c5/include/hal/ecc_ll.h index fbaa1b7357..b5a5bca2e2 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/ecdsa_ll.h b/components/esp_hal_security/esp32c5/include/hal/ecdsa_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/ecdsa_ll.h rename to components/esp_hal_security/esp32c5/include/hal/ecdsa_ll.h index 30fba77711..38d3a065c0 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/ecdsa_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/ecdsa_ll.h @@ -11,7 +11,7 @@ #include "soc/ecdsa_reg.h" #include "soc/pcr_struct.h" #include "soc/efuse_periph.h" -#include "esp_hal_security/ecdsa_types.h" +#include "hal/ecdsa_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32c5/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32c5/include/hal/hmac_ll.h index 01351cae2f..c96bb609e2 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/hmac_ll.h @@ -18,7 +18,7 @@ #include "soc/system_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/huk_ll.h b/components/esp_hal_security/esp32c5/include/hal/huk_ll.h similarity index 98% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/huk_ll.h rename to components/esp_hal_security/esp32c5/include/hal/huk_ll.h index 7e5321a0be..b8da777d53 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/huk_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/huk_ll.h @@ -19,7 +19,7 @@ #include #include -#include "esp_hal_security/huk_types.h" +#include "hal/huk_types.h" #include "soc/huk_reg.h" #include "soc/soc_caps.h" #include "soc/lp_aon_reg.h" diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/key_mgr_ll.h b/components/esp_hal_security/esp32c5/include/hal/key_mgr_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/key_mgr_ll.h rename to components/esp_hal_security/esp32c5/include/hal/key_mgr_ll.h index dada48274c..26352914bc 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/key_mgr_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/key_mgr_ll.h @@ -16,7 +16,7 @@ #include #include "hal/assert.h" -#include "esp_hal_security/key_mgr_types.h" +#include "hal/key_mgr_types.h" #include "soc/keymng_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32c5/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32c5/include/hal/mpi_ll.h index 852d56aaae..b329402fd6 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/mpi_ll.h @@ -10,7 +10,7 @@ #include #include "soc/soc_caps.h" #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/pcr_reg.h" #include "soc/pcr_struct.h" #include "soc/rsa_reg.h" diff --git a/components/esp_hal_security/esp32c5/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32c5/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32c5/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32c5/include/hal/sha_ll.h index 2ef843e7ed..28c66a0bcc 100644 --- a/components/esp_hal_security/esp32c5/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32c5/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32c6/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32c6/include/hal/aes_ll.h index 49a5768249..826fb36332 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/apm_ll.h b/components/esp_hal_security/esp32c6/include/hal/apm_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/apm_ll.h rename to components/esp_hal_security/esp32c6/include/hal/apm_ll.h index bd5b515f58..6859dc7f2c 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/apm_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/apm_ll.h @@ -20,7 +20,7 @@ #include "soc/pcr_reg.h" #include "soc/interrupts.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32c6/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32c6/include/hal/ds_ll.h index 22b0427f07..ed9f940aa0 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/ds_ll.h @@ -18,7 +18,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/soc_caps.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32c6/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32c6/include/hal/ecc_ll.h index 0758b306aa..264e89958a 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32c6/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32c6/include/hal/hmac_ll.h index 56a929d5fc..75b90ad736 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/hmac_ll.h @@ -18,7 +18,7 @@ #include "soc/system_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32c6/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32c6/include/hal/mpi_ll.h index ca124c3b66..04b4d55a17 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/pcr_reg.h" #include "soc/pcr_struct.h" #include "soc/rsa_reg.h" diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32c6/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32c6/include/hal/sha_ll.h index 0bcbf23261..1c727408d4 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32c6/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c61/include/esp_hal_security/apm_ll.h b/components/esp_hal_security/esp32c61/include/hal/apm_ll.h similarity index 99% rename from components/esp_hal_security/esp32c61/include/esp_hal_security/apm_ll.h rename to components/esp_hal_security/esp32c61/include/hal/apm_ll.h index c94f357458..ff90cce104 100644 --- a/components/esp_hal_security/esp32c61/include/esp_hal_security/apm_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/apm_ll.h @@ -19,7 +19,7 @@ #include "soc/pcr_reg.h" #include "soc/interrupts.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c61/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32c61/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32c61/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32c61/include/hal/ecc_ll.h index ff68f82f8a..14c74e5316 100644 --- a/components/esp_hal_security/esp32c61/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32c61/include/esp_hal_security/ecdsa_ll.h b/components/esp_hal_security/esp32c61/include/hal/ecdsa_ll.h similarity index 99% rename from components/esp_hal_security/esp32c61/include/esp_hal_security/ecdsa_ll.h rename to components/esp_hal_security/esp32c61/include/hal/ecdsa_ll.h index 4502be1f6b..d74921a2ec 100644 --- a/components/esp_hal_security/esp32c61/include/esp_hal_security/ecdsa_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/ecdsa_ll.h @@ -11,7 +11,7 @@ #include "soc/ecdsa_reg.h" #include "soc/pcr_struct.h" #include "soc/efuse_periph.h" -#include "esp_hal_security/ecdsa_types.h" +#include "hal/ecdsa_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c61/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32c61/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32c61/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32c61/include/hal/sha_ll.h index d3380c6d91..8ad73c1463 100644 --- a/components/esp_hal_security/esp32c61/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32c61/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32h2/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32h2/include/hal/aes_ll.h index 3e40f83944..284d4a70b2 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #include "hal/efuse_hal.h" #include "soc/chip_revision.h" diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/apm_ll.h b/components/esp_hal_security/esp32h2/include/hal/apm_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/apm_ll.h rename to components/esp_hal_security/esp32h2/include/hal/apm_ll.h index 05fb35cd69..3428628ffe 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/apm_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/apm_ll.h @@ -17,7 +17,7 @@ #include "soc/pcr_reg.h" #include "soc/interrupts.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32h2/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32h2/include/hal/ds_ll.h index 22b0427f07..ed9f940aa0 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/ds_ll.h @@ -18,7 +18,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/soc_caps.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32h2/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32h2/include/hal/ecc_ll.h index 49aa97e22a..3ad0a815b7 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/ecdsa_ll.h b/components/esp_hal_security/esp32h2/include/hal/ecdsa_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/ecdsa_ll.h rename to components/esp_hal_security/esp32h2/include/hal/ecdsa_ll.h index 5e65193aa1..331ea9f7e2 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/ecdsa_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/ecdsa_ll.h @@ -12,8 +12,8 @@ #include "soc/ecdsa_struct.h" #include "soc/pcr_struct.h" #include "soc/efuse_periph.h" -#include "esp_hal_security/ecdsa_types.h" -#include "esp_hal_security/ecc_ll.h" +#include "hal/ecdsa_types.h" +#include "hal/ecc_ll.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32c6/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32h2/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32c6/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32h2/include/hal/hmac_ll.h index 56a929d5fc..75b90ad736 100644 --- a/components/esp_hal_security/esp32c6/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/hmac_ll.h @@ -18,7 +18,7 @@ #include "soc/system_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32h2/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32h2/include/hal/mpi_ll.h index 5f93b8aee0..b2015b3966 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/pcr_reg.h" #include "soc/pcr_struct.h" #include "soc/rsa_reg.h" diff --git a/components/esp_hal_security/esp32h2/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32h2/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32h2/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32h2/include/hal/sha_ll.h index 25528cb6ae..32ece1b085 100644 --- a/components/esp_hal_security/esp32h2/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32h2/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32h21/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32h21/include/hal/aes_ll.h index ad2abb8fac..54bd4066ff 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32h21/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32h21/include/hal/ds_ll.h index aed8781e55..4f3d0e19ce 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/ds_ll.h @@ -18,7 +18,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/soc_caps.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32h21/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32h21/include/hal/ecc_ll.h index 31da4d128c..6ac32c21aa 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/ecdsa_ll.h b/components/esp_hal_security/esp32h21/include/hal/ecdsa_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/ecdsa_ll.h rename to components/esp_hal_security/esp32h21/include/hal/ecdsa_ll.h index 2483482ded..71d0af830d 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/ecdsa_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/ecdsa_ll.h @@ -11,7 +11,7 @@ #include "soc/ecdsa_reg.h" #include "soc/pcr_struct.h" #include "soc/efuse_periph.h" -#include "esp_hal_security/ecdsa_types.h" +#include "hal/ecdsa_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32h21/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32h21/include/hal/hmac_ll.h index 867356ba5f..f8214c422b 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/hmac_ll.h @@ -18,7 +18,7 @@ #include "soc/system_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32h21/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32h21/include/hal/mpi_ll.h index f7fa65e963..bb6e336eef 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/pcr_reg.h" #include "soc/pcr_struct.h" #include "soc/rsa_reg.h" diff --git a/components/esp_hal_security/esp32h21/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32h21/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32h21/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32h21/include/hal/sha_ll.h index 6d312188e2..2b6dc3d6aa 100644 --- a/components/esp_hal_security/esp32h21/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32h21/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/pcr_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32h4/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32h4/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32h4/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32h4/include/hal/ecc_ll.h index ffe749713c..e5a8958497 100644 --- a/components/esp_hal_security/esp32h4/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32h4/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "soc/ecc_mult_reg.h" #include "soc/pcr_struct.h" #include "soc/pcr_reg.h" diff --git a/components/esp_hal_security/esp32h4/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32h4/include/hal/ecdsa_ll.h new file mode 100644 index 0000000000..b22faaea85 --- /dev/null +++ b/components/esp_hal_security/esp32h4/include/hal/ecdsa_ll.h @@ -0,0 +1,44 @@ +/* + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +#include +#include +#include "hal/assert.h" +#include "soc/ecdsa_reg.h" +#include "soc/pcr_struct.h" +#include "soc/efuse_periph.h" +#include "esp_hal_security/ecdsa_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Set the ECDSA key block in eFuse + * + * @param curve ECDSA curve type + * @param efuse_blk eFuse block number + */ +__attribute__((always_inline)) static inline void ecdsa_ll_set_ecdsa_key_blk(ecdsa_curve_t curve, int efuse_blk) +{ + //ESP32H4 TODO + (void)curve; + (void)efuse_blk; +} + +/** + * @brief Check if the ECDSA peripheral is supported on this chip revision + * For ESP32-H4, ECDSA is always supported + */ +static inline bool ecdsa_ll_is_supported(void) +{ + return true; +} + +#ifdef __cplusplus +} +#endif diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32p4/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32p4/include/hal/aes_ll.h index a1b0034a08..fd7fe0dbcf 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/aes_ll.h @@ -8,7 +8,7 @@ #include #include -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #include "soc/hp_sys_clkrst_struct.h" #include "soc/hwcrypto_reg.h" #include "hal/config.h" diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/apm_ll.h b/components/esp_hal_security/esp32p4/include/hal/apm_ll.h similarity index 100% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/apm_ll.h rename to components/esp_hal_security/esp32p4/include/hal/apm_ll.h diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32p4/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32p4/include/hal/ds_ll.h index 4f07919d93..c2cd170a64 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/ds_ll.h @@ -18,7 +18,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/hp_sys_clkrst_struct.h" #include "soc/soc_caps.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #include "hal/config.h" #ifdef __cplusplus diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/ecc_ll.h b/components/esp_hal_security/esp32p4/include/hal/ecc_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/ecc_ll.h rename to components/esp_hal_security/esp32p4/include/hal/ecc_ll.h index 374e4722a2..ab4b65d187 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/ecc_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/ecc_ll.h @@ -8,7 +8,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #include "hal/efuse_hal.h" #include "soc/ecc_mult_reg.h" #include "soc/hp_sys_clkrst_struct.h" diff --git a/components/esp_hal_security/esp32p4/include/hal/ecdsa_ll.h b/components/esp_hal_security/esp32p4/include/hal/ecdsa_ll.h new file mode 100644 index 0000000000..6b938de80c --- /dev/null +++ b/components/esp_hal_security/esp32p4/include/hal/ecdsa_ll.h @@ -0,0 +1,527 @@ +/* + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +#include +#include +#include "hal/assert.h" +#include "soc/ecdsa_reg.h" +#include "soc/hp_sys_clkrst_struct.h" +#include "soc/soc_caps.h" +#include "soc/efuse_periph.h" +#include "hal/ecdsa_types.h" +#include "hal/efuse_hal.h" +#include "hal/config.h" +#include "soc/chip_revision.h" +#include "soc/soc.h" +#include "hal/ecdsa_types.h" +#include "hal/efuse_hal.h" +#include "hal/config.h" +#include "soc/chip_revision.h" +#include "soc/soc.h" +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Memory blocks of ECDSA parameters + */ +typedef enum { + ECDSA_PARAM_R, + ECDSA_PARAM_S, + ECDSA_PARAM_Z, + ECDSA_PARAM_QAX, + ECDSA_PARAM_QAY +} ecdsa_ll_param_t; + +/** + * @brief Interrupt types in ECDSA + */ +typedef enum { + ECDSA_INT_CALC_DONE, + ECDSA_INT_SHA_RELEASE, +} ecdsa_ll_intr_type_t; + +/** + * @brief Stages of ECDSA operation + */ +typedef enum { + ECDSA_STAGE_START_CALC, + ECDSA_STAGE_LOAD_DONE, + ECDSA_STAGE_GET_DONE +} ecdsa_ll_stage_t; + +/** + * @brief States of ECDSA peripheral + */ +typedef enum { + ECDSA_STATE_IDLE, + ECDSA_STATE_LOAD, + ECDSA_STATE_GET, + ECDSA_STATE_BUSY +} ecdsa_ll_state_t; + +/** + * @brief Types of SHA + */ +typedef enum { + ECDSA_SHA_224, + ECDSA_SHA_256 +} ecdsa_ll_sha_type_t; + +/** + * @brief Operation modes of SHA + */ +typedef enum { + ECDSA_MODE_SHA_START, + ECDSA_MODE_SHA_CONTINUE +} ecdsa_ll_sha_mode_t; + +/** + * @brief Get the state of ECDSA peripheral + * + * @return State of ECDSA + */ +static inline uint32_t ecdsa_ll_get_state(void) +{ + return REG_GET_FIELD(ECDSA_STATE_REG, ECDSA_BUSY); +} + +/** + * @brief Enable the bus clock for ECDSA peripheral module + * + * @param true to enable the module, false to disable the module + */ +static inline void ecdsa_ll_enable_bus_clock(bool enable) +{ + HP_SYS_CLKRST.peri_clk_ctrl25.reg_crypto_ecdsa_clk_en = enable; +} + +/// use a macro to wrap the function, force the caller to use it in a critical section +/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance +#define ecdsa_ll_enable_bus_clock(...) do { \ + (void)__DECLARE_RCC_ATOMIC_ENV; \ + ecdsa_ll_enable_bus_clock(__VA_ARGS__); \ + } while(0) + +/** + * @brief Reset the ECDSA peripheral module + */ +static inline void ecdsa_ll_reset_register(void) +{ + HP_SYS_CLKRST.hp_rst_en2.reg_rst_en_ecdsa = 1; + HP_SYS_CLKRST.hp_rst_en2.reg_rst_en_ecdsa = 0; + + // Clear reset on parent crypto, otherwise ECDSA is held in reset + HP_SYS_CLKRST.hp_rst_en2.reg_rst_en_crypto = 0; + + while (ecdsa_ll_get_state() != ECDSA_STATE_IDLE) { + ; + } +} + +/** + * @brief Enable interrupt of a given type + * + * @param type Interrupt type + */ +static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type) +{ + switch (type) { + case ECDSA_INT_CALC_DONE: +#if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 1); +#else + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_CALC_DONE_INT_ENA, 1); +#endif + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; + } +} + +/** + * @brief Disable interrupt of a given type + * + * @param type Interrupt type + */ +static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type) +{ + switch (type) { + case ECDSA_INT_CALC_DONE: +#if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_ENA, 0); +#else + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_CALC_DONE_INT_ENA, 0); +#endif + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_SHA_RELEASE_INT_ENA, 0); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; + } +} + +/** + * @brief Clear interrupt of a given type + * + * @param type Interrupt type + */ +static inline void ecdsa_ll_clear_intr(ecdsa_ll_intr_type_t type) +{ + switch (type) { + case ECDSA_INT_CALC_DONE: +#if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300 + REG_SET_FIELD(ECDSA_INT_ENA_REG, ECDSA_PREP_DONE_INT_CLR, 1); +#else + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_CALC_DONE_INT_CLR, 1); +#endif + break; + case ECDSA_INT_SHA_RELEASE: + REG_SET_FIELD(ECDSA_INT_CLR_REG, ECDSA_SHA_RELEASE_INT_CLR, 1); + break; + default: + HAL_ASSERT(false && "Unsupported interrupt type"); + break; + } +} + +/** + * @brief Set working mode of ECDSA + * + * @param mode Mode of operation + */ +static inline void ecdsa_ll_set_mode(ecdsa_mode_t mode) +{ + switch (mode) { + case ECDSA_MODE_SIGN_VERIFY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 0); + break; + case ECDSA_MODE_SIGN_GEN: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 1); + break; + case ECDSA_MODE_EXPORT_PUBKEY: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_WORK_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported mode"); + break; + } +} + +/** + * @brief Set curve for ECDSA operation + * + * @param curve ECDSA curve + */ +static inline void ecdsa_ll_set_curve(ecdsa_curve_t curve) +{ + switch (curve) { + case ECDSA_CURVE_SECP192R1: + case ECDSA_CURVE_SECP256R1: + case ECDSA_CURVE_SECP384R1: + case ECDSA_CURVE_SM2: + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_ECC_CURVE, curve); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + return; + } +} + +/** + * @brief Set the source of `Z` (SHA message) + * + * @param mode Mode of SHA generation + */ +static inline void ecdsa_ll_set_z_mode(ecdsa_ll_sha_mode_t mode) +{ + switch (mode) { + case ECDSA_Z_USE_SHA_PERI: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + case ECDSA_Z_USER_PROVIDED: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_SOFTWARE_SET_Z); + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; + } +} + +/** + * @brief Set the signature generation type of ECDSA operation + * + * @param type Type of the ECDSA signature + */ +static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type) +{ + switch (type) { + case ECDSA_K_TYPE_TRNG: + REG_CLR_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + case ECDSA_K_TYPE_DETERMINISITIC: + REG_SET_BIT(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_K); + break; + default: + HAL_ASSERT(false && "Unsupported K type"); + break; + } +} + +/** + * @brief Set the loop number value that is used for deterministic derivation of K + * + * @param loop_number Loop number for deterministic K + */ +static inline void ecdsa_ll_set_deterministic_loop(uint16_t loop_number) +{ +#if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) < 300 + REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_LOOP, loop_number); +#endif +} + +/** + * @brief Set the stage of ECDSA operation + * + * @param stage Stage of operation + */ +static inline void ecdsa_ll_set_stage(ecdsa_ll_stage_t stage) +{ + switch (stage) { + case ECDSA_STAGE_START_CALC: + REG_SET_BIT(ECDSA_START_REG, ECDSA_START); + break; + case ECDSA_STAGE_LOAD_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_LOAD_DONE); + break; + case ECDSA_STAGE_GET_DONE: + REG_SET_BIT(ECDSA_START_REG, ECDSA_GET_DONE); + break; + default: + HAL_ASSERT(false && "Unsupported state"); + break; + } +} + +/** + * @brief Set the SHA type + * + * @param type Type of SHA + */ +static inline void ecdsa_ll_sha_set_type(ecdsa_ll_sha_type_t type) +{ + switch (type) { + case ECDSA_SHA_224: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 1); + break; + case ECDSA_SHA_256: + REG_SET_FIELD(ECDSA_SHA_MODE_REG, ECDSA_SHA_MODE, 2); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; + } +} + +/** + * @brief Set the SHA operation mode + * + * @param mode Mode of SHA operation + */ +static inline void ecdsa_ll_sha_set_mode(ecdsa_ll_sha_mode_t mode) +{ + switch (mode) { + case ECDSA_MODE_SHA_START: + REG_SET_BIT(ECDSA_SHA_START_REG, ECDSA_SHA_START); + break; + case ECDSA_MODE_SHA_CONTINUE: + REG_SET_BIT(ECDSA_SHA_CONTINUE_REG, ECDSA_SHA_CONTINUE); + break; + default: + HAL_ASSERT(false && "Unsupported type"); + break; + } +} + +/** + * @brief Check if SHA is busy + * + * @return - true, if SHA is busy + * - false, if SHA is IDLE + */ +static inline bool ecdsa_ll_sha_is_busy(void) +{ + return REG_GET_BIT(ECDSA_SHA_BUSY_REG, ECDSA_SHA_BUSY); +} + +/** + * @brief Write the ECDSA parameter + * + * @param param Parameter to be written + * @param buf Buffer containing data + * @param len Length of buffer + */ +static inline void ecdsa_ll_write_param(ecdsa_ll_param_t param, const uint8_t *buf, uint16_t len) +{ + uint32_t reg; + uint32_t word; + switch (param) { + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; + } + + for (int i = 0; i < len; i += 4) { + memcpy(&word, buf + i, 4); + REG_WRITE(reg + i, word); + } +} + +/** + * @brief Read the ECDSA parameter + * + * @param param Parameter to be read + * @param buf Buffer where the data will be written + * @param len Length of buffer + */ +static inline void ecdsa_ll_read_param(ecdsa_ll_param_t param, uint8_t *buf, uint16_t len) +{ + uint32_t reg; + switch (param) { + case ECDSA_PARAM_R: + reg = ECDSA_R_MEM; + break; + case ECDSA_PARAM_S: + reg = ECDSA_S_MEM; + break; + case ECDSA_PARAM_Z: + reg = ECDSA_Z_MEM; + break; + case ECDSA_PARAM_QAX: + reg = ECDSA_QAX_MEM; + break; + case ECDSA_PARAM_QAY: + reg = ECDSA_QAY_MEM; + break; + default: + HAL_ASSERT(false && "Invalid parameter"); + return; + } + + memcpy(buf, (void *)reg, len); +} + +/** + * @brief Check if the ECDSA operation is successful + * + * @return - 1, if ECDSA operation succeeds + * - 0, otherwise + */ +static inline int ecdsa_ll_get_operation_result(void) +{ + return REG_GET_BIT(ECDSA_RESULT_REG, ECDSA_OPERATION_RESULT); +} + +/** + * @brief Check if the k value is greater than the curve order. + * + * @return 0, k value is not greater than the curve order. In this case, the k value is the set k value. + * @return 1, k value is greater than than the curve order. In this case, the k value is the set (k mod n). + */ +static inline int ecdsa_ll_check_k_value(void) +{ +#if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) < 300 + return REG_GET_BIT(ECDSA_RESULT_REG, ECDSA_K_VALUE_WARNING); +#else + return 0; +#endif +} + +/** + * @brief Check if the ECDSA deterministic mode is supported + */ +static inline bool ecdsa_ll_is_deterministic_mode_supported(void) +{ + return true; +} + +/** + * @brief Set the ECDSA key block in eFuse + * + * @param curve ECDSA curve type + * @param efuse_blk eFuse block number + */ +__attribute__((always_inline)) static inline void ecdsa_ll_set_ecdsa_key_blk(ecdsa_curve_t curve, int efuse_blk) +{ +#ifdef EFUSE_CFG_ECDSA_BLK + (void) curve; + EFUSE.conf.cfg_ecdsa_blk = efuse_blk; +#else + uint8_t efuse_blk_low = 0; + uint8_t efuse_blk_high = 0; + switch (curve) { + case ECDSA_CURVE_SECP192R1: + EFUSE.ecdsa.cfg_ecdsa_p192_blk = efuse_blk; + break; + case ECDSA_CURVE_SECP256R1: + EFUSE.ecdsa.cfg_ecdsa_p256_blk = efuse_blk; + break; + case ECDSA_CURVE_SECP384R1: + // ECDSA-p384 uses two efuse blocks to store the key. These two blocks are stored in a single integer + // where the least significant 4 bits store the low key block number and the next 4 more significant bits store the high key block number. + HAL_ECDSA_EXTRACT_KEY_BLOCKS(efuse_blk, efuse_blk_high, efuse_blk_low); + EFUSE.ecdsa.cfg_ecdsa_p384_h_blk = efuse_blk_high; + EFUSE.ecdsa.cfg_ecdsa_p384_l_blk = efuse_blk_low; + break; + default: + HAL_ASSERT(false && "Unsupported curve"); + break; + } +#endif +} + +/** + * @brief Check if the ECDSA peripheral uses MPI module's memory + */ +static inline bool ecdsa_ll_is_mpi_required(void) +{ + return true; +} + +/** + * @brief Check if the ECDSA peripheral is supported on this chip revision + * For ESP32-P4, ECDSA is only supported on eco5+ (major 3, minor 0+) + */ +static inline bool ecdsa_ll_is_supported(void) +{ + return ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 300); +} + +#ifdef __cplusplus +} +#endif diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32p4/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32p4/include/hal/hmac_ll.h index b24352cbc0..037c9b7a28 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/hmac_ll.h @@ -18,7 +18,7 @@ #include "soc/system_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/hp_sys_clkrst_struct.h" -#include "esp_hal_security/hmac_hal.h" +#include "hal/hmac_hal.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/huk_ll.h b/components/esp_hal_security/esp32p4/include/hal/huk_ll.h similarity index 98% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/huk_ll.h rename to components/esp_hal_security/esp32p4/include/hal/huk_ll.h index 572cf7e524..dc62489050 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/huk_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/huk_ll.h @@ -19,7 +19,7 @@ #include #include -#include "esp_hal_security/huk_types.h" +#include "hal/huk_types.h" #include "soc/huk_reg.h" #include "soc/soc_caps.h" diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/key_mgr_ll.h b/components/esp_hal_security/esp32p4/include/hal/key_mgr_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/key_mgr_ll.h rename to components/esp_hal_security/esp32p4/include/hal/key_mgr_ll.h index 76354c430e..d1b3774e98 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/key_mgr_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/key_mgr_ll.h @@ -16,7 +16,7 @@ #include #include "hal/assert.h" -#include "esp_hal_security/key_mgr_types.h" +#include "hal/key_mgr_types.h" #include "soc/keymng_reg.h" #include "soc/hp_sys_clkrst_struct.h" #include "hal/config.h" diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32p4/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32p4/include/hal/mpi_ll.h index 8d439bbf05..090862c060 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/hp_sys_clkrst_struct.h" #include "soc/mpi_periph.h" #include "soc/rsa_reg.h" diff --git a/components/esp_hal_security/esp32p4/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32p4/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32p4/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32p4/include/hal/sha_ll.h index 46f3866c9b..49ec3f7287 100644 --- a/components/esp_hal_security/esp32p4/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32p4/include/hal/sha_ll.h @@ -6,7 +6,7 @@ #pragma once #include -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #include "soc/hp_sys_clkrst_struct.h" #include "soc/hwcrypto_reg.h" diff --git a/components/esp_hal_security/esp32s2/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32s2/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32s2/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32s2/include/hal/aes_ll.h index e2e33e77fb..7d18c66e42 100644 --- a/components/esp_hal_security/esp32s2/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32s2/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/dport_reg.h" #include "soc/hwcrypto_reg.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32s2/include/esp_hal_security/crypto_dma_ll.h b/components/esp_hal_security/esp32s2/include/hal/crypto_dma_ll.h similarity index 100% rename from components/esp_hal_security/esp32s2/include/esp_hal_security/crypto_dma_ll.h rename to components/esp_hal_security/esp32s2/include/hal/crypto_dma_ll.h diff --git a/components/esp_hal_security/esp32s2/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32s2/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32s2/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32s2/include/hal/mpi_ll.h index 943d90f063..3d35e58ba0 100644 --- a/components/esp_hal_security/esp32s2/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32s2/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/hwcrypto_periph.h" #include "soc/dport_reg.h" #include "soc/mpi_periph.h" diff --git a/components/esp_hal_security/esp32s2/include/esp_hal_security/mpu_ll.h b/components/esp_hal_security/esp32s2/include/hal/mpu_ll.h similarity index 100% rename from components/esp_hal_security/esp32s2/include/esp_hal_security/mpu_ll.h rename to components/esp_hal_security/esp32s2/include/hal/mpu_ll.h diff --git a/components/esp_hal_security/esp32s2/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32s2/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32s2/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32s2/include/hal/sha_ll.h index 45b0f3b41b..1f13e1d01b 100644 --- a/components/esp_hal_security/esp32s2/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32s2/include/hal/sha_ll.h @@ -8,7 +8,7 @@ #include #include #include "soc/hwcrypto_reg.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #include "soc/dport_reg.h" #include "hal/mmu_ll.h" diff --git a/components/esp_hal_security/esp32s3/include/esp_hal_security/aes_ll.h b/components/esp_hal_security/esp32s3/include/hal/aes_ll.h similarity index 99% rename from components/esp_hal_security/esp32s3/include/esp_hal_security/aes_ll.h rename to components/esp_hal_security/esp32s3/include/hal/aes_ll.h index b8073a5cba..f967b3fa77 100644 --- a/components/esp_hal_security/esp32s3/include/esp_hal_security/aes_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/aes_ll.h @@ -10,7 +10,7 @@ #include #include "soc/hwcrypto_reg.h" #include "soc/system_struct.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32s3/include/esp_hal_security/ds_ll.h b/components/esp_hal_security/esp32s3/include/hal/ds_ll.h similarity index 99% rename from components/esp_hal_security/esp32s3/include/esp_hal_security/ds_ll.h rename to components/esp_hal_security/esp32s3/include/hal/ds_ll.h index d23f1baee0..a552670c55 100644 --- a/components/esp_hal_security/esp32s3/include/esp_hal_security/ds_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/ds_ll.h @@ -13,7 +13,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/soc_caps.h" #include "soc/system_struct.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/esp32s3/include/esp_hal_security/hmac_ll.h b/components/esp_hal_security/esp32s3/include/hal/hmac_ll.h similarity index 99% rename from components/esp_hal_security/esp32s3/include/esp_hal_security/hmac_ll.h rename to components/esp_hal_security/esp32s3/include/hal/hmac_ll.h index 51a44587a4..07c3633f4c 100644 --- a/components/esp_hal_security/esp32s3/include/esp_hal_security/hmac_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/hmac_ll.h @@ -17,7 +17,7 @@ #include "soc/hwcrypto_reg.h" #include "soc/system_struct.h" -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #define SHA256_BLOCK_SZ 64 #define SHA256_DIGEST_SZ 32 diff --git a/components/esp_hal_security/esp32s3/include/esp_hal_security/mpi_ll.h b/components/esp_hal_security/esp32s3/include/hal/mpi_ll.h similarity index 99% rename from components/esp_hal_security/esp32s3/include/esp_hal_security/mpi_ll.h rename to components/esp_hal_security/esp32s3/include/hal/mpi_ll.h index 5a1d5b4e00..ff710b30b2 100644 --- a/components/esp_hal_security/esp32s3/include/esp_hal_security/mpi_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/mpi_ll.h @@ -9,7 +9,7 @@ #include #include #include "hal/assert.h" -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/hwcrypto_periph.h" #include "soc/dport_reg.h" #include "soc/mpi_periph.h" diff --git a/components/esp_hal_security/esp32s3/include/esp_hal_security/mpu_ll.h b/components/esp_hal_security/esp32s3/include/hal/mpu_ll.h similarity index 100% rename from components/esp_hal_security/esp32s3/include/esp_hal_security/mpu_ll.h rename to components/esp_hal_security/esp32s3/include/hal/mpu_ll.h diff --git a/components/esp_hal_security/esp32s3/include/esp_hal_security/sha_ll.h b/components/esp_hal_security/esp32s3/include/hal/sha_ll.h similarity index 99% rename from components/esp_hal_security/esp32s3/include/esp_hal_security/sha_ll.h rename to components/esp_hal_security/esp32s3/include/hal/sha_ll.h index 54b9183556..357ff5980e 100644 --- a/components/esp_hal_security/esp32s3/include/esp_hal_security/sha_ll.h +++ b/components/esp_hal_security/esp32s3/include/hal/sha_ll.h @@ -9,7 +9,7 @@ #include "soc/dport_reg.h" #include "soc/hwcrypto_reg.h" #include "soc/system_struct.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/hmac_hal.c b/components/esp_hal_security/hmac_hal.c index 6a3a6c295d..4bf2426b18 100644 --- a/components/esp_hal_security/hmac_hal.c +++ b/components/esp_hal_security/hmac_hal.c @@ -1,18 +1,18 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #include "stdio.h" -#include "esp_hal_security/hmac_hal.h" -#include "esp_hal_security/hmac_ll.h" +#include "hal/hmac_hal.h" +#include "hal/hmac_ll.h" #include "hal/assert.h" #include "soc/soc_caps.h" #if SOC_KEY_MANAGER_HMAC_KEY_DEPLOY -#include "esp_hal_security/key_mgr_hal.h" -#include "esp_hal_security/key_mgr_ll.h" +#include "hal/key_mgr_hal.h" +#include "hal/key_mgr_ll.h" #endif void hmac_hal_start(void) diff --git a/components/esp_hal_security/huk_hal.c b/components/esp_hal_security/huk_hal.c index 17f34a3e54..22de4d30ef 100644 --- a/components/esp_hal_security/huk_hal.c +++ b/components/esp_hal_security/huk_hal.c @@ -1,13 +1,13 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ // The HAL layer for Hardware Unique Key(HUK) Generator -#include "esp_hal_security/huk_hal.h" -#include "esp_hal_security/huk_ll.h" -#include "esp_hal_security/huk_types.h" +#include "hal/huk_hal.h" +#include "hal/huk_ll.h" +#include "hal/huk_types.h" #include "hal/assert.h" #include "hal/log.h" #include "rom/km.h" diff --git a/components/esp_hal_security/include/esp_hal_security/aes_hal.h b/components/esp_hal_security/include/hal/aes_hal.h similarity index 98% rename from components/esp_hal_security/include/esp_hal_security/aes_hal.h rename to components/esp_hal_security/include/hal/aes_hal.h index 0f5bf645bd..3398915644 100644 --- a/components/esp_hal_security/include/esp_hal_security/aes_hal.h +++ b/components/esp_hal_security/include/hal/aes_hal.h @@ -16,9 +16,9 @@ #include #include #include "soc/soc_caps.h" -#include "esp_hal_security/aes_types.h" +#include "hal/aes_types.h" #if SOC_AES_SUPPORTED -#include "esp_hal_security/aes_ll.h" +#include "hal/aes_ll.h" #endif #ifdef __cplusplus diff --git a/components/esp_hal_security/include/esp_hal_security/aes_types.h b/components/esp_hal_security/include/hal/aes_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/aes_types.h rename to components/esp_hal_security/include/hal/aes_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/apm_hal.h b/components/esp_hal_security/include/hal/apm_hal.h similarity index 99% rename from components/esp_hal_security/include/esp_hal_security/apm_hal.h rename to components/esp_hal_security/include/hal/apm_hal.h index 400459f533..6580e6ebc5 100644 --- a/components/esp_hal_security/include/esp_hal_security/apm_hal.h +++ b/components/esp_hal_security/include/hal/apm_hal.h @@ -13,8 +13,8 @@ extern "C" { #include "esp_err.h" #include "soc/soc_caps.h" #if SOC_APM_SUPPORTED -#include "esp_hal_security/apm_ll.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_ll.h" +#include "hal/apm_types.h" #if SOC_IS(ESP32P4) diff --git a/components/esp_hal_security/include/esp_hal_security/apm_types.h b/components/esp_hal_security/include/hal/apm_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/apm_types.h rename to components/esp_hal_security/include/hal/apm_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/ds_hal.h b/components/esp_hal_security/include/hal/ds_hal.h similarity index 98% rename from components/esp_hal_security/include/esp_hal_security/ds_hal.h rename to components/esp_hal_security/include/hal/ds_hal.h index 3c982ba64d..766854d8b9 100644 --- a/components/esp_hal_security/include/esp_hal_security/ds_hal.h +++ b/components/esp_hal_security/include/hal/ds_hal.h @@ -16,7 +16,7 @@ #include #include #include "soc/soc_caps.h" -#include "esp_hal_security/ds_types.h" +#include "hal/ds_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/include/esp_hal_security/ds_types.h b/components/esp_hal_security/include/hal/ds_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/ds_types.h rename to components/esp_hal_security/include/hal/ds_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/ecc_hal.h b/components/esp_hal_security/include/hal/ecc_hal.h similarity index 99% rename from components/esp_hal_security/include/esp_hal_security/ecc_hal.h rename to components/esp_hal_security/include/hal/ecc_hal.h index 4bfb0a18b2..8f8b047903 100644 --- a/components/esp_hal_security/include/esp_hal_security/ecc_hal.h +++ b/components/esp_hal_security/include/hal/ecc_hal.h @@ -15,7 +15,7 @@ #include "stdint.h" #include #include "soc/soc_caps.h" -#include "esp_hal_security/ecc_types.h" +#include "hal/ecc_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/include/esp_hal_security/ecc_types.h b/components/esp_hal_security/include/hal/ecc_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/ecc_types.h rename to components/esp_hal_security/include/hal/ecc_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/ecdsa_hal.h b/components/esp_hal_security/include/hal/ecdsa_hal.h similarity index 99% rename from components/esp_hal_security/include/esp_hal_security/ecdsa_hal.h rename to components/esp_hal_security/include/hal/ecdsa_hal.h index fb1eab242b..922232dd69 100644 --- a/components/esp_hal_security/include/esp_hal_security/ecdsa_hal.h +++ b/components/esp_hal_security/include/hal/ecdsa_hal.h @@ -14,7 +14,7 @@ #include #include -#include "esp_hal_security/ecdsa_types.h" +#include "hal/ecdsa_types.h" #include "soc/soc_caps.h" #include "hal/config.h" diff --git a/components/esp_hal_security/include/esp_hal_security/ecdsa_types.h b/components/esp_hal_security/include/hal/ecdsa_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/ecdsa_types.h rename to components/esp_hal_security/include/hal/ecdsa_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/hmac_hal.h b/components/esp_hal_security/include/hal/hmac_hal.h similarity index 98% rename from components/esp_hal_security/include/esp_hal_security/hmac_hal.h rename to components/esp_hal_security/include/hal/hmac_hal.h index 8788daa5a2..1dcbd0e6fc 100644 --- a/components/esp_hal_security/include/esp_hal_security/hmac_hal.h +++ b/components/esp_hal_security/include/hal/hmac_hal.h @@ -14,7 +14,7 @@ #include #include -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/include/esp_hal_security/hmac_types.h b/components/esp_hal_security/include/hal/hmac_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/hmac_types.h rename to components/esp_hal_security/include/hal/hmac_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/huk_hal.h b/components/esp_hal_security/include/hal/huk_hal.h similarity index 97% rename from components/esp_hal_security/include/esp_hal_security/huk_hal.h rename to components/esp_hal_security/include/hal/huk_hal.h index 1a64e4f3c8..3bdd04c896 100644 --- a/components/esp_hal_security/include/esp_hal_security/huk_hal.h +++ b/components/esp_hal_security/include/hal/huk_hal.h @@ -10,7 +10,7 @@ #include "soc/soc_caps.h" #if SOC_HUK_SUPPORTED -#include "esp_hal_security/huk_types.h" +#include "hal/huk_types.h" #include #include "esp_err.h" diff --git a/components/esp_hal_security/include/esp_hal_security/huk_types.h b/components/esp_hal_security/include/hal/huk_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/huk_types.h rename to components/esp_hal_security/include/hal/huk_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/key_mgr_hal.h b/components/esp_hal_security/include/hal/key_mgr_hal.h similarity index 99% rename from components/esp_hal_security/include/esp_hal_security/key_mgr_hal.h rename to components/esp_hal_security/include/hal/key_mgr_hal.h index a3f023a2d9..f542781454 100644 --- a/components/esp_hal_security/include/esp_hal_security/key_mgr_hal.h +++ b/components/esp_hal_security/include/hal/key_mgr_hal.h @@ -10,7 +10,7 @@ #include "soc/soc_caps.h" #if SOC_KEY_MANAGER_SUPPORTED -#include "esp_hal_security/key_mgr_types.h" +#include "hal/key_mgr_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/include/esp_hal_security/key_mgr_types.h b/components/esp_hal_security/include/hal/key_mgr_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/key_mgr_types.h rename to components/esp_hal_security/include/hal/key_mgr_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/mpi_hal.h b/components/esp_hal_security/include/hal/mpi_hal.h similarity index 98% rename from components/esp_hal_security/include/esp_hal_security/mpi_hal.h rename to components/esp_hal_security/include/hal/mpi_hal.h index 9e817f18b9..5b4f167e07 100644 --- a/components/esp_hal_security/include/esp_hal_security/mpi_hal.h +++ b/components/esp_hal_security/include/hal/mpi_hal.h @@ -15,7 +15,7 @@ #include #include #include -#include "esp_hal_security/mpi_types.h" +#include "hal/mpi_types.h" #include "soc/soc_caps.h" #ifdef __cplusplus diff --git a/components/esp_hal_security/include/esp_hal_security/mpi_types.h b/components/esp_hal_security/include/hal/mpi_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/mpi_types.h rename to components/esp_hal_security/include/hal/mpi_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/mpu_hal.h b/components/esp_hal_security/include/hal/mpu_hal.h similarity index 93% rename from components/esp_hal_security/include/esp_hal_security/mpu_hal.h rename to components/esp_hal_security/include/hal/mpu_hal.h index 409036fd07..c6559c0c24 100644 --- a/components/esp_hal_security/include/esp_hal_security/mpu_hal.h +++ b/components/esp_hal_security/include/hal/mpu_hal.h @@ -8,7 +8,7 @@ #include "esp_err.h" -#include "esp_hal_security/mpu_types.h" +#include "hal/mpu_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/include/esp_hal_security/mpu_types.h b/components/esp_hal_security/include/hal/mpu_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/mpu_types.h rename to components/esp_hal_security/include/hal/mpu_types.h diff --git a/components/esp_hal_security/include/esp_hal_security/sha_hal.h b/components/esp_hal_security/include/hal/sha_hal.h similarity index 98% rename from components/esp_hal_security/include/esp_hal_security/sha_hal.h rename to components/esp_hal_security/include/hal/sha_hal.h index 6d62f48f3f..c6c11d6ceb 100644 --- a/components/esp_hal_security/include/esp_hal_security/sha_hal.h +++ b/components/esp_hal_security/include/hal/sha_hal.h @@ -16,7 +16,7 @@ #include #include "soc/soc_caps.h" #include "soc/lldesc.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_hal_security/include/esp_hal_security/sha_types.h b/components/esp_hal_security/include/hal/sha_types.h similarity index 100% rename from components/esp_hal_security/include/esp_hal_security/sha_types.h rename to components/esp_hal_security/include/hal/sha_types.h diff --git a/components/esp_hal_security/key_mgr_hal.c b/components/esp_hal_security/key_mgr_hal.c index 8514be1e48..7ef544848b 100644 --- a/components/esp_hal_security/key_mgr_hal.c +++ b/components/esp_hal_security/key_mgr_hal.c @@ -1,13 +1,13 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ // The HAL layer for Key Manager -#include "esp_hal_security/key_mgr_hal.h" -#include "esp_hal_security/key_mgr_ll.h" -#include "esp_hal_security/key_mgr_types.h" +#include "hal/key_mgr_hal.h" +#include "hal/key_mgr_ll.h" +#include "hal/key_mgr_types.h" void key_mgr_hal_start(void) { diff --git a/components/esp_hal_security/mpi_hal.c b/components/esp_hal_security/mpi_hal.c index f2dbedd8ce..fbc72da915 100644 --- a/components/esp_hal_security/mpi_hal.c +++ b/components/esp_hal_security/mpi_hal.c @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include "esp_hal_security/mpi_hal.h" -#include "esp_hal_security/mpi_ll.h" +#include "hal/mpi_hal.h" +#include "hal/mpi_ll.h" #include "soc/soc_caps.h" size_t mpi_hal_calc_hardware_words(size_t words) diff --git a/components/esp_hal_security/mpu_hal.c b/components/esp_hal_security/mpu_hal.c index 993824a226..eb2d8c01f3 100644 --- a/components/esp_hal_security/mpu_hal.c +++ b/components/esp_hal_security/mpu_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,9 +9,9 @@ #include "esp_err.h" -#include "esp_hal_security/mpu_hal.h" -#include "esp_hal_security/mpu_ll.h" -#include "esp_hal_security/mpu_types.h" +#include "hal/mpu_hal.h" +#include "hal/mpu_ll.h" +#include "hal/mpu_types.h" #include "soc/soc_caps.h" diff --git a/components/esp_hal_security/sha_hal.c b/components/esp_hal_security/sha_hal.c index 85a4e380a0..d7da7f4fe6 100644 --- a/components/esp_hal_security/sha_hal.c +++ b/components/esp_hal_security/sha_hal.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -8,9 +8,9 @@ #include #include -#include "esp_hal_security/sha_hal.h" -#include "esp_hal_security/sha_types.h" -#include "esp_hal_security/sha_ll.h" +#include "hal/sha_hal.h" +#include "hal/sha_types.h" +#include "hal/sha_ll.h" #include "soc/soc_caps.h" #define SHA1_STATE_LEN_WORDS (160 / 32) diff --git a/components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c b/components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c index 1a4dc5adbf..e4a8f31730 100644 --- a/components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c +++ b/components/esp_hal_security/test_apps/crypto/main/ds/test_ds.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -24,7 +24,7 @@ ESP_LOG_ATTR_TAG(TAG, "test_ds"); #include "rom/hmac.h" #if SOC_KEY_MANAGER_DS_KEY_DEPLOY -#include "esp_hal_security/key_mgr_ll.h" +#include "hal/key_mgr_ll.h" #endif #if CONFIG_IDF_TARGET_ESP32S2 @@ -60,12 +60,12 @@ _Static_assert(NUM_RESULTS == NUM_MESSAGES, "expected_results size should be the #if !CONFIG_IDF_TARGET_ESP32S2 #include "esp_private/periph_ctrl.h" -#include "esp_hal_security/aes_ll.h" -#include "esp_hal_security/ds_hal.h" -#include "esp_hal_security/ds_ll.h" -#include "esp_hal_security/hmac_hal.h" -#include "esp_hal_security/hmac_ll.h" -#include "esp_hal_security/sha_ll.h" +#include "hal/aes_ll.h" +#include "hal/ds_hal.h" +#include "hal/ds_ll.h" +#include "hal/hmac_hal.h" +#include "hal/hmac_ll.h" +#include "hal/sha_ll.h" #include "esp_crypto_periph_clk.h" static void ds_acquire_enable(void) diff --git a/components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c b/components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c index a66597c79e..d2a4043aa6 100644 --- a/components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c +++ b/components/esp_hal_security/test_apps/crypto/main/ecc/test_ecc.c @@ -13,8 +13,8 @@ #include "esp_log.h" #include "ecc_params.h" #include "soc/soc_caps.h" -#include "esp_hal_security/ecc_hal.h" -#include "esp_hal_security/ecc_ll.h" +#include "hal/ecc_hal.h" +#include "hal/ecc_ll.h" #include "memory_checks.h" #include "unity_fixture.h" diff --git a/components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c b/components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c index bbf0889237..62aa5c7396 100644 --- a/components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c +++ b/components/esp_hal_security/test_apps/crypto/main/ecdsa/test_ecdsa.c @@ -15,13 +15,13 @@ #include "esp_err.h" #include "esp_efuse.h" #include "esp_efuse_table.h" -#include "esp_hal_security/ecc_ll.h" -#include "esp_hal_security/ecdsa_hal.h" +#include "hal/ecc_ll.h" +#include "hal/ecdsa_hal.h" #include "hal/efuse_ll.h" -#include "esp_hal_security/ecdsa_ll.h" -#include "esp_hal_security/ecdsa_types.h" +#include "hal/ecdsa_ll.h" +#include "hal/ecdsa_types.h" #ifdef SOC_MPI_SUPPORTED -#include "esp_hal_security/mpi_ll.h" +#include "hal/mpi_ll.h" #endif #include "soc/soc_caps.h" diff --git a/components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c b/components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c index d92c5319c4..0f7a8cdcfb 100644 --- a/components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c +++ b/components/esp_hal_security/test_apps/crypto/main/hmac/test_hmac.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -31,10 +31,10 @@ static esp_err_t hmac_jtag_disable(void) #if !CONFIG_IDF_TARGET_ESP32S2 -#include "esp_hal_security/hmac_hal.h" -#include "esp_hal_security/hmac_ll.h" -#include "esp_hal_security/ds_ll.h" -#include "esp_hal_security/sha_ll.h" +#include "hal/hmac_hal.h" +#include "hal/hmac_ll.h" +#include "hal/ds_ll.h" +#include "hal/sha_ll.h" #include "esp_private/periph_ctrl.h" #define SHA256_BLOCK_SZ 64 diff --git a/components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c b/components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c index be467a66a6..4222b36f32 100644 --- a/components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c +++ b/components/esp_hal_security/test_apps/crypto/main/key_manager/test_key_manager.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ @@ -10,11 +10,11 @@ #include "esp_efuse_chip.h" #include "esp_heap_caps.h" #include "esp_rom_crc.h" -#include "esp_hal_security/key_mgr_hal.h" -#include "esp_hal_security/key_mgr_ll.h" -#include "esp_hal_security/key_mgr_types.h" -#include "esp_hal_security/huk_types.h" -#include "esp_hal_security/huk_hal.h" +#include "hal/key_mgr_hal.h" +#include "hal/key_mgr_ll.h" +#include "hal/key_mgr_types.h" +#include "hal/huk_types.h" +#include "hal/huk_hal.h" #include "esp_key_mgr.h" #include "memory_checks.h" #include "unity_fixture.h" @@ -26,10 +26,10 @@ #include "esp_log.h" #if SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY -#include "esp_hal_security/ecdsa_types.h" +#include "hal/ecdsa_types.h" #endif #if SOC_KEY_MANAGER_HMAC_KEY_DEPLOY -#include "esp_hal_security/hmac_types.h" +#include "hal/hmac_types.h" #endif #if SOC_KEY_MANAGER_DS_KEY_DEPLOY #include "ds/ds_types.h" diff --git a/components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c b/components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c index f8dce736ed..3b1c8c1797 100644 --- a/components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c +++ b/components/esp_hal_security/test_apps/crypto/main/mpi/test_mpi.c @@ -16,8 +16,8 @@ #define ESP_MPI_USE_MONT_EXP #endif -#include "esp_hal_security/mpi_hal.h" -#include "esp_hal_security/mpi_ll.h" +#include "hal/mpi_hal.h" +#include "hal/mpi_ll.h" #include "mpi_params.h" #include "esp_crypto_periph_clk.h" diff --git a/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_block.h b/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_block.h index 40af5e5d12..c2c3eafa20 100644 --- a/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_block.h +++ b/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_block.h @@ -13,7 +13,7 @@ #include "soc/periph_defs.h" #include "esp_private/periph_ctrl.h" -#include "esp_hal_security/sha_hal.h" +#include "hal/sha_hal.h" #include "test_params.h" #if defined(SOC_SHA_SUPPORT_SHA1) diff --git a/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_dma.h b/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_dma.h index ddd3f479fe..6622d4d026 100644 --- a/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_dma.h +++ b/components/esp_hal_security/test_apps/crypto/main/sha/include/sha_dma.h @@ -13,7 +13,7 @@ #include "soc/periph_defs.h" #include "esp_private/periph_ctrl.h" -#include "esp_hal_security/sha_hal.h" +#include "hal/sha_hal.h" #include "test_params.h" #if defined(SOC_SHA_SUPPORT_SHA1) diff --git a/components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h b/components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h index 937c5bbe74..5f290cea88 100644 --- a/components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h +++ b/components/esp_hal_security/test_apps/crypto/main/sha/include/test_params.h @@ -6,7 +6,7 @@ */ #pragma once #include "soc/soc_caps.h" -#include "esp_hal_security/sha_types.h" +#include "hal/sha_types.h" #if SOC_SHA_SUPPORTED diff --git a/components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c b/components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c index c7ce992100..a6b971ebe4 100644 --- a/components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c +++ b/components/esp_hal_security/test_apps/crypto/main/sha/sha_block.c @@ -13,8 +13,8 @@ #include "soc/periph_defs.h" #include "esp_private/periph_ctrl.h" #include "esp_crypto_periph_clk.h" -#include "esp_hal_security/sha_hal.h" -#include "esp_hal_security/sha_ll.h" +#include "hal/sha_hal.h" +#include "hal/sha_ll.h" #include "sha_block.h" static inline size_t block_length(esp_sha_type type) diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt index ea655ee657..72571b8925 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/CMakeLists.txt @@ -21,7 +21,7 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" "priv_include" PRIV_INCLUDE_DIRS "priv_include/${target}" - REQUIRES ulp unity + REQUIRES ulp unity esp_hal_security PRIV_REQUIRES esp_hal_timg LDFRAGMENTS linker.lf) diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h index 15bfc9ced7..b8ff56f4f9 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c5/test_pms_params.h @@ -9,7 +9,7 @@ #include "soc/soc.h" #include "soc/reg_base.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #include "esp_bit_defs.h" /* diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h index 1c800d74eb..e3a0f9478c 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c6/test_pms_params.h @@ -9,7 +9,7 @@ #include "soc/soc.h" #include "soc/reg_base.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #include "esp_bit_defs.h" /* diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h index 115b04565b..e313af9cf3 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32c61/test_pms_params.h @@ -9,7 +9,7 @@ #include "soc/soc.h" #include "soc/reg_base.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #include "esp_bit_defs.h" /* diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h index cb7e7c7f22..b22a7ce8c9 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/esp32h2/test_pms_params.h @@ -9,7 +9,7 @@ #include "soc/soc.h" #include "soc/reg_base.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" #include "esp_bit_defs.h" /* diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h index 6580d2330b..bcc278ed08 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/priv_include/test_pms_priv.h @@ -12,7 +12,7 @@ #include "soc/soc_caps.h" #include "soc/lp_aon_reg.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_types.h" /********* Panic Handler *********/ diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c index 0ec62430d5..5ea7373eb0 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/common/test_apm_utils.c @@ -13,8 +13,8 @@ #include "soc/interrupts.h" #include "soc/apm_defs.h" -#include "esp_hal_security/apm_hal.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_hal.h" +#include "hal/apm_types.h" #include "esp_attr.h" #include "esp_intr_alloc.h" diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c index f35112ebce..4768ec1700 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_peri_apm.c @@ -8,8 +8,8 @@ #include #include "soc/apm_defs.h" -#include "esp_hal_security/apm_hal.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_hal.h" +#include "hal/apm_types.h" #include "esp_cpu.h" #include "esp_bit_defs.h" diff --git a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c index 99d7506667..6f8de78a6b 100644 --- a/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c +++ b/components/esp_hal_security/test_apps/tee/components/pms_and_cpu_intr/src/pms/test_tee_sys_apm.c @@ -11,8 +11,8 @@ #include "soc/soc_caps.h" #include "soc/apm_defs.h" -#include "esp_hal_security/apm_hal.h" -#include "esp_hal_security/apm_types.h" +#include "hal/apm_hal.h" +#include "hal/apm_types.h" #include "rom/cache.h" #include "esp_rom_sys.h" diff --git a/components/esp_hal_security/test_apps/tee/main/CMakeLists.txt b/components/esp_hal_security/test_apps/tee/main/CMakeLists.txt index a701218c2c..a73b1b8300 100644 --- a/components/esp_hal_security/test_apps/tee/main/CMakeLists.txt +++ b/components/esp_hal_security/test_apps/tee/main/CMakeLists.txt @@ -5,7 +5,7 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "" - PRIV_REQUIRES pms_and_cpu_intr esp_psram + PRIV_REQUIRES pms_and_cpu_intr esp_psram esp_hal_security WHOLE_ARCHIVE) # TODO: IDF-14145 diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index fd2fe752a4..916db55516 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -11,7 +11,7 @@ endif() set(requires esp_hal_gpio esp_hal_usb esp_hal_pmu) # only esp_hw_support/adc_share_hw_ctrl.c requires efuse component -set(priv_requires efuse spi_flash bootloader_support esp_hal_wdt) +set(priv_requires efuse spi_flash bootloader_support esp_hal_wdt esp_hal_security) if(${target} STREQUAL "esp32c6") list(APPEND priv_requires hal) diff --git a/components/esp_security/CMakeLists.txt b/components/esp_security/CMakeLists.txt index 362f942aeb..fe08fb3e07 100644 --- a/components/esp_security/CMakeLists.txt +++ b/components/esp_security/CMakeLists.txt @@ -6,6 +6,7 @@ if(${target} STREQUAL "linux") endif() set(srcs "") +set(requires esp_hal_security) set(priv_requires esp_hw_support hal efuse) set(priv_includes "") @@ -53,6 +54,7 @@ endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS "include" PRIV_INCLUDE_DIRS ${priv_includes} + REQUIRES ${requires} PRIV_REQUIRES ${priv_requires}) if(NOT non_os_build) diff --git a/components/esp_security/src/esp_crypto_periph_clk.c b/components/esp_security/src/esp_crypto_periph_clk.c index 329f6c8eca..f5fa2dc2e7 100644 --- a/components/esp_security/src/esp_crypto_periph_clk.c +++ b/components/esp_security/src/esp_crypto_periph_clk.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/esp_ds.c b/components/esp_security/src/esp_ds.c index 82bb521f01..0d311c610b 100644 --- a/components/esp_security/src/esp_ds.c +++ b/components/esp_security/src/esp_ds.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/esp_hmac.c b/components/esp_security/src/esp_hmac.c index 2e2cf020a4..4b881ec461 100644 --- a/components/esp_security/src/esp_hmac.c +++ b/components/esp_security/src/esp_hmac.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/esp_key_mgr.c b/components/esp_security/src/esp_key_mgr.c index 6ffefe5898..28bcfbedba 100644 --- a/components/esp_security/src/esp_key_mgr.c +++ b/components/esp_security/src/esp_key_mgr.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_security/src/init.c b/components/esp_security/src/init.c index db1fac033a..2db714b424 100644 --- a/components/esp_security/src/init.c +++ b/components/esp_security/src/init.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_system/port/soc/esp32c5/clk.c b/components/esp_system/port/soc/esp32c5/clk.c index 549ebd941a..a9037dd6ca 100644 --- a/components/esp_system/port/soc/esp32c5/clk.c +++ b/components/esp_system/port/soc/esp32c5/clk.c @@ -27,7 +27,6 @@ #if SOC_MODEM_CLOCK_SUPPORTED #include "hal/modem_lpcon_ll.h" #endif -#include "hal/apm_ll.h" #include "hal/clk_gate_ll.h" #include "hal/clk_tree_ll.h" #include "esp_private/esp_sleep_internal.h" diff --git a/components/esp_tee/subproject/CMakeLists.txt b/components/esp_tee/subproject/CMakeLists.txt index 4c3716077f..754def2cdb 100644 --- a/components/esp_tee/subproject/CMakeLists.txt +++ b/components/esp_tee/subproject/CMakeLists.txt @@ -25,7 +25,8 @@ set(ESP_TEE_BUILD 1) set(NON_OS_BUILD 1) # Additional components -list(APPEND COMPONENTS bootloader_support efuse esp_hal_mspi esp_hal_wdt esp_security mbedtls esp_stdio) +list(APPEND COMPONENTS bootloader_support efuse esp_hal_mspi esp_hal_wdt + esp_hal_security esp_security mbedtls esp_stdio) # TEE-specific components list(APPEND COMPONENTS tee_flash_mgr tee_ota_ops tee_sec_storage tee_attestation) diff --git a/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c index cec537a13c..86e30ce131 100644 --- a/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32c5/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c index 0802611ea0..1da37191af 100644 --- a/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32c6/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c index 8946c35f0e..46cba5c6de 100644 --- a/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32c61/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c b/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c index 1cd42774f3..397329461f 100644 --- a/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c +++ b/components/esp_tee/subproject/main/soc/esp32h2/esp_tee_secure_sys_cfg.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/espcoredump/CMakeLists.txt b/components/espcoredump/CMakeLists.txt index fbfd802c40..b0329d71b6 100644 --- a/components/espcoredump/CMakeLists.txt +++ b/components/espcoredump/CMakeLists.txt @@ -8,7 +8,8 @@ set(srcs "") set(includes "") set(priv_includes "") set(priv_requires - esp_partition spi_flash bootloader_support mbedtls esp_rom soc esp_system esp_driver_gpio esp_app_format) + esp_partition spi_flash bootloader_support mbedtls esp_rom soc esp_system esp_driver_gpio esp_app_format + esp_hal_security) if(CONFIG_ESP_COREDUMP_ENABLE) list(APPEND srcs "src/core_dump_init.c" diff --git a/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake b/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake index 7a77cb7a14..5c6b5b769e 100644 --- a/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake +++ b/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake @@ -1,6 +1,6 @@ idf_component_get_property(heap_dir heap COMPONENT_DIR) -set(priv_requires esp_hw_support esp_hal_dma) +set(priv_requires esp_hw_support esp_hal_dma esp_hal_security) set(include_dirs "${COMPONENT_DIR}/port/include" "${COMPONENT_DIR}/mbedtls/include" diff --git a/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c b/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c index 8878375231..2670267aca 100644 --- a/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c +++ b/components/mbedtls/port/aes/dma/esp_aes_crypto_dma_impl.c @@ -17,7 +17,7 @@ esp_err_t esp_aes_dma_start(const crypto_dma_desc_t *input, const crypto_dma_des crypto_dma_ll_reset(); crypto_dma_ll_set_mode(CRYPTO_DMA_AES); - /* Set descriptors, input to AES comes from outlink DMA and viceversa */ + /* Set descriptors, input to AES comes from outlink DMA and vice-versa */ crypto_dma_ll_outlink_set((uint32_t)input); crypto_dma_ll_inlink_set((uint32_t)output); diff --git a/components/mbedtls/port/include/sha512_alt.h b/components/mbedtls/port/include/sha512_alt.h index d0de4623e9..51f6423494 100644 --- a/components/mbedtls/port/include/sha512_alt.h +++ b/components/mbedtls/port/include/sha512_alt.h @@ -73,7 +73,7 @@ typedef struct { } mbedtls_sha512_context; /** - * @brief Sets the specfic algorithm for SHA512 + * @brief Sets the specific algorithm for SHA512 * * @param ctx The mbedtls sha512 context * @@ -82,7 +82,7 @@ typedef struct { */ void esp_sha512_set_mode(mbedtls_sha512_context *ctx, esp_sha_type type); -/* For SHA512/t mode the intial hash value will depend on t */ +/* For SHA512/t mode the initial hash value will depend on t */ void esp_sha512_set_t( mbedtls_sha512_context *ctx, uint16_t t_val); diff --git a/components/mbedtls/port/sha/core/sha.c b/components/mbedtls/port/sha/core/sha.c index eb905d4bb5..2e63b155df 100644 --- a/components/mbedtls/port/sha/core/sha.c +++ b/components/mbedtls/port/sha/core/sha.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 * diff --git a/tools/test_apps/system/g1_components/CMakeLists.txt b/tools/test_apps/system/g1_components/CMakeLists.txt index aa83667ddd..8bef09dd5a 100644 --- a/tools/test_apps/system/g1_components/CMakeLists.txt +++ b/tools/test_apps/system/g1_components/CMakeLists.txt @@ -22,6 +22,7 @@ set(esp_hal_components esp_hal_wdt esp_hal_gpspi esp_hal_pmu + esp_hal_security ) set(COMPONENTS ${g0_components} ${g1_components} ${esp_hal_components} main) diff --git a/tools/test_apps/system/panic/main/CMakeLists.txt b/tools/test_apps/system/panic/main/CMakeLists.txt index 879a7f8526..57c2d3b349 100644 --- a/tools/test_apps/system/panic/main/CMakeLists.txt +++ b/tools/test_apps/system/panic/main/CMakeLists.txt @@ -16,7 +16,7 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" REQUIRES spi_flash esp_psram esp_system esp_partition - PRIV_REQUIRES esp_gdbstub espcoredump) + PRIV_REQUIRES esp_gdbstub espcoredump esp_hal_security) target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-unused-variable" "-Wno-infinite-recursion"