mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
refactor(esp_hal_security): Updated esp_hal_security build and includes
This commit is contained in:
@@ -20,6 +20,7 @@ set(COMPONENTS
|
|||||||
bootloader
|
bootloader
|
||||||
esptool_py
|
esptool_py
|
||||||
esp_hw_support
|
esp_hw_support
|
||||||
|
esp_hal_security
|
||||||
esp_system
|
esp_system
|
||||||
freertos
|
freertos
|
||||||
hal
|
hal
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ SECTIONS
|
|||||||
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:huk_hal.*(.literal .text .literal.* .text.*)
|
*libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:key_mgr_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_key_mgr.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_security.a:esp_crypto_periph_clk.*(.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.*)
|
*libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*)
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ SECTIONS
|
|||||||
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:efuse_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_security.a:esp_crypto_periph_clk.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_hal_wdt.a:wdt_hal_iram.*(.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.*)
|
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ SECTIONS
|
|||||||
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:huk_hal.*(.literal .text .literal.* .text.*)
|
*libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:key_mgr_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_key_mgr.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_security.a:esp_crypto_periph_clk.*(.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.*)
|
*libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*)
|
||||||
|
|||||||
@@ -90,8 +90,8 @@ SECTIONS
|
|||||||
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
|
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:huk_hal.*(.literal .text .literal.* .text.*)
|
*libesp_hal_security.a:huk_hal.*(.literal .text .literal.* .text.*)
|
||||||
*libhal.a:key_mgr_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_key_mgr.*(.literal .text .literal.* .text.*)
|
||||||
*libesp_security.a:esp_crypto_periph_clk.*(.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.*)
|
*libesp_security.a:esp_crypto_lock.*(.literal .text .literal.* .text.*)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ if(esp_tee_build)
|
|||||||
|
|
||||||
idf_component_register(SRCS ${tee_srcs}
|
idf_component_register(SRCS ${tee_srcs}
|
||||||
INCLUDE_DIRS ${tee_inc_dirs}
|
INCLUDE_DIRS ${tee_inc_dirs}
|
||||||
PRIV_REQUIRES efuse esp_app_format esptool_py)
|
PRIV_REQUIRES efuse esp_app_format esptool_py esp_hal_security)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -74,7 +74,8 @@ if(BOOTLOADER_BUILD OR CONFIG_APP_BUILD_TYPE_RAM)
|
|||||||
"private_include")
|
"private_include")
|
||||||
set(priv_requires micro-ecc spi_flash efuse esp_bootloader_format esp_app_format esptool_py)
|
set(priv_requires micro-ecc spi_flash efuse esp_bootloader_format esp_app_format esptool_py)
|
||||||
# `esp_hal_ana_conv` is required by bootloader_random_esp32xx.c
|
# `esp_hal_ana_conv` is required by bootloader_random_esp32xx.c
|
||||||
list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer esp_hal_clock)
|
list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer
|
||||||
|
esp_hal_clock esp_hal_security)
|
||||||
list(APPEND srcs
|
list(APPEND srcs
|
||||||
"src/bootloader_init.c"
|
"src/bootloader_init.c"
|
||||||
"src/bootloader_clock_loader.c"
|
"src/bootloader_clock_loader.c"
|
||||||
@@ -92,7 +93,8 @@ else()
|
|||||||
# heap is required for `heap_memory_layout.h` header
|
# heap is required for `heap_memory_layout.h` header
|
||||||
set(priv_requires spi_flash mbedtls efuse heap esp_bootloader_format esp_app_format esptool_py)
|
set(priv_requires spi_flash mbedtls efuse heap esp_bootloader_format esp_app_format esptool_py)
|
||||||
# `esp_hal_ana_conv` is required by bootloader_random_esp32xx.c
|
# `esp_hal_ana_conv` is required by bootloader_random_esp32xx.c
|
||||||
list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer esp_hal_clock)
|
list(APPEND priv_requires esp_hal_wdt esp_hal_gpio esp_hal_uart esp_hal_ana_conv esp_hal_rtc_timer
|
||||||
|
esp_hal_clock esp_hal_security)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BOOTLOADER_BUILD)
|
if(BOOTLOADER_BUILD)
|
||||||
|
|||||||
@@ -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
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,15 +31,15 @@ list(APPEND srcs "src/esp_efuse_api.c"
|
|||||||
|
|
||||||
if(non_os_build)
|
if(non_os_build)
|
||||||
idf_component_register(SRCS "${srcs}"
|
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}"
|
INCLUDE_DIRS "${include_dirs}"
|
||||||
PRIV_INCLUDE_DIRS "${private_include}")
|
PRIV_INCLUDE_DIRS "${private_include}")
|
||||||
else()
|
else()
|
||||||
list(APPEND srcs "src/esp_efuse_startup.c")
|
list(APPEND srcs "src/esp_efuse_startup.c")
|
||||||
if(${target} STREQUAL "linux")
|
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()
|
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()
|
endif()
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
PRIV_REQUIRES "${priv_requires}"
|
PRIV_REQUIRES "${priv_requires}"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
// The HAL layer for AES
|
// The HAL layer for AES
|
||||||
|
|
||||||
#include "esp_hal_security/aes_hal.h"
|
#include "hal/aes_hal.h"
|
||||||
#include "esp_hal_security/aes_ll.h"
|
#include "hal/aes_ll.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/apm_hal.h"
|
#include "hal/apm_hal.h"
|
||||||
#include "esp_hal_security/apm_ll.h"
|
#include "hal/apm_ll.h"
|
||||||
#include "hal/log.h"
|
#include "hal/log.h"
|
||||||
|
|
||||||
#if SOC_IS(ESP32P4)
|
#if SOC_IS(ESP32P4)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hal/systimer_hal.h"
|
#include "hal/systimer_hal.h"
|
||||||
#include "esp_hal_security/ds_hal.h"
|
#include "hal/ds_hal.h"
|
||||||
#include "esp_hal_security/ds_ll.h"
|
#include "hal/ds_ll.h"
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include "esp_hal_security/ecc_hal.h"
|
#include "hal/ecc_hal.h"
|
||||||
#include "esp_hal_security/ecc_ll.h"
|
#include "hal/ecc_ll.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
/* ECC curve size constants in bytes */
|
/* ECC curve size constants in bytes */
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecdsa_ll.h"
|
#include "hal/ecdsa_ll.h"
|
||||||
#include "esp_hal_security/ecdsa_hal.h"
|
#include "hal/ecdsa_hal.h"
|
||||||
#include "hal/efuse_hal.h"
|
#include "hal/efuse_hal.h"
|
||||||
#include "hal/efuse_ll.h"
|
#include "hal/efuse_ll.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY
|
#ifdef SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY
|
||||||
#include "esp_hal_security/key_mgr_hal.h"
|
#include "hal/key_mgr_hal.h"
|
||||||
#include "esp_hal_security/key_mgr_ll.h"
|
#include "hal/key_mgr_ll.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ECDSA_HAL_P192_COMPONENT_LEN 24
|
#define ECDSA_HAL_P192_COMPONENT_LEN 24
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/dport_access.h"
|
#include "soc/dport_access.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/mpi_types.h"
|
#include "hal/mpi_types.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/hwcrypto_periph.h"
|
#include "soc/hwcrypto_periph.h"
|
||||||
#include "soc/mpi_periph.h"
|
#include "soc/mpi_periph.h"
|
||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/dport_access.h"
|
#include "soc/dport_access.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
|
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "soc/hwcrypto_reg.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/mpi_types.h"
|
#include "hal/mpi_types.h"
|
||||||
#include "soc/hwcrypto_periph.h"
|
#include "soc/hwcrypto_periph.h"
|
||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/aes_reg.h"
|
#include "soc/aes_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
#include "soc/interrupts.h"
|
#include "soc/interrupts.h"
|
||||||
#include "esp_hal_security/apm_types.h"
|
#include "hal/apm_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include "soc/ecdsa_reg.h"
|
#include "soc/ecdsa_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/efuse_periph.h"
|
#include "soc/efuse_periph.h"
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "esp_hal_security/huk_types.h"
|
#include "hal/huk_types.h"
|
||||||
#include "soc/huk_reg.h"
|
#include "soc/huk_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/lp_aon_reg.h"
|
#include "soc/lp_aon_reg.h"
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "hal/assert.h"
|
#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/keymng_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/assert.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_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/rsa_reg.h"
|
#include "soc/rsa_reg.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
#include "soc/interrupts.h"
|
#include "soc/interrupts.h"
|
||||||
#include "esp_hal_security/apm_types.h"
|
#include "hal/apm_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.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_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/rsa_reg.h"
|
#include "soc/rsa_reg.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
#include "soc/interrupts.h"
|
#include "soc/interrupts.h"
|
||||||
#include "esp_hal_security/apm_types.h"
|
#include "hal/apm_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include "soc/ecdsa_reg.h"
|
#include "soc/ecdsa_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/efuse_periph.h"
|
#include "soc/efuse_periph.h"
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#include "hal/efuse_hal.h"
|
#include "hal/efuse_hal.h"
|
||||||
#include "soc/chip_revision.h"
|
#include "soc/chip_revision.h"
|
||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
#include "soc/interrupts.h"
|
#include "soc/interrupts.h"
|
||||||
#include "esp_hal_security/apm_types.h"
|
#include "hal/apm_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+2
-2
@@ -12,8 +12,8 @@
|
|||||||
#include "soc/ecdsa_struct.h"
|
#include "soc/ecdsa_struct.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/efuse_periph.h"
|
#include "soc/efuse_periph.h"
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
#include "esp_hal_security/ecc_ll.h"
|
#include "hal/ecc_ll.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.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_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/rsa_reg.h"
|
#include "soc/rsa_reg.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include "soc/ecdsa_reg.h"
|
#include "soc/ecdsa_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/efuse_periph.h"
|
#include "soc/efuse_periph.h"
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.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_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/rsa_reg.h"
|
#include "soc/rsa_reg.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/pcr_reg.h"
|
#include "soc/pcr_reg.h"
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include "soc/ecdsa_reg.h"
|
#include "soc/ecdsa_reg.h"
|
||||||
#include "soc/pcr_struct.h"
|
#include "soc/pcr_struct.h"
|
||||||
#include "soc/efuse_periph.h"
|
#include "soc/efuse_periph.h"
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
#include "soc/hp_sys_clkrst_struct.h"
|
#include "soc/hp_sys_clkrst_struct.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "hal/config.h"
|
#include "hal/config.h"
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/hp_sys_clkrst_struct.h"
|
#include "soc/hp_sys_clkrst_struct.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
#include "hal/config.h"
|
#include "hal/config.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
#include "hal/efuse_hal.h"
|
#include "hal/efuse_hal.h"
|
||||||
#include "soc/ecc_mult_reg.h"
|
#include "soc/ecc_mult_reg.h"
|
||||||
#include "soc/hp_sys_clkrst_struct.h"
|
#include "soc/hp_sys_clkrst_struct.h"
|
||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
#include "soc/hp_sys_clkrst_struct.h"
|
#include "soc/hp_sys_clkrst_struct.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/efuse_periph.h"
|
#include "soc/efuse_periph.h"
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
#include "hal/efuse_hal.h"
|
#include "hal/efuse_hal.h"
|
||||||
#include "hal/config.h"
|
#include "hal/config.h"
|
||||||
#include "soc/chip_revision.h"
|
#include "soc/chip_revision.h"
|
||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
#include "soc/system_reg.h"
|
#include "soc/system_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/hp_sys_clkrst_struct.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "esp_hal_security/huk_types.h"
|
#include "hal/huk_types.h"
|
||||||
#include "soc/huk_reg.h"
|
#include "soc/huk_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "hal/assert.h"
|
#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/keymng_reg.h"
|
||||||
#include "soc/hp_sys_clkrst_struct.h"
|
#include "soc/hp_sys_clkrst_struct.h"
|
||||||
#include "hal/config.h"
|
#include "hal/config.h"
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.h"
|
#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/hp_sys_clkrst_struct.h"
|
||||||
#include "soc/mpi_periph.h"
|
#include "soc/mpi_periph.h"
|
||||||
#include "soc/rsa_reg.h"
|
#include "soc/rsa_reg.h"
|
||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
#include "soc/hp_sys_clkrst_struct.h"
|
#include "soc/hp_sys_clkrst_struct.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/mpi_types.h"
|
#include "hal/mpi_types.h"
|
||||||
#include "soc/hwcrypto_periph.h"
|
#include "soc/hwcrypto_periph.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/mpi_periph.h"
|
#include "soc/mpi_periph.h"
|
||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "hal/mmu_ll.h"
|
#include "hal/mmu_ll.h"
|
||||||
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/system_struct.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_BLOCK_SZ 64
|
||||||
#define SHA256_DIGEST_SZ 32
|
#define SHA256_DIGEST_SZ 32
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "esp_hal_security/mpi_types.h"
|
#include "hal/mpi_types.h"
|
||||||
#include "soc/hwcrypto_periph.h"
|
#include "soc/hwcrypto_periph.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/mpi_periph.h"
|
#include "soc/mpi_periph.h"
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/hwcrypto_reg.h"
|
#include "soc/hwcrypto_reg.h"
|
||||||
#include "soc/system_struct.h"
|
#include "soc/system_struct.h"
|
||||||
#include "esp_hal_security/sha_types.h"
|
#include "hal/sha_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "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
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
#include "esp_hal_security/hmac_hal.h"
|
#include "hal/hmac_hal.h"
|
||||||
#include "esp_hal_security/hmac_ll.h"
|
#include "hal/hmac_ll.h"
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
#if SOC_KEY_MANAGER_HMAC_KEY_DEPLOY
|
#if SOC_KEY_MANAGER_HMAC_KEY_DEPLOY
|
||||||
#include "esp_hal_security/key_mgr_hal.h"
|
#include "hal/key_mgr_hal.h"
|
||||||
#include "esp_hal_security/key_mgr_ll.h"
|
#include "hal/key_mgr_ll.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void hmac_hal_start(void)
|
void hmac_hal_start(void)
|
||||||
|
|||||||
@@ -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
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
// The HAL layer for Hardware Unique Key(HUK) Generator
|
// The HAL layer for Hardware Unique Key(HUK) Generator
|
||||||
|
|
||||||
#include "esp_hal_security/huk_hal.h"
|
#include "hal/huk_hal.h"
|
||||||
#include "esp_hal_security/huk_ll.h"
|
#include "hal/huk_ll.h"
|
||||||
#include "esp_hal_security/huk_types.h"
|
#include "hal/huk_types.h"
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
#include "hal/log.h"
|
#include "hal/log.h"
|
||||||
#include "rom/km.h"
|
#include "rom/km.h"
|
||||||
|
|||||||
+2
-2
@@ -16,9 +16,9 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "esp_hal_security/aes_types.h"
|
#include "hal/aes_types.h"
|
||||||
#if SOC_AES_SUPPORTED
|
#if SOC_AES_SUPPORTED
|
||||||
#include "esp_hal_security/aes_ll.h"
|
#include "hal/aes_ll.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
+2
-2
@@ -13,8 +13,8 @@ extern "C" {
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#if SOC_APM_SUPPORTED
|
#if SOC_APM_SUPPORTED
|
||||||
#include "esp_hal_security/apm_ll.h"
|
#include "hal/apm_ll.h"
|
||||||
#include "esp_hal_security/apm_types.h"
|
#include "hal/apm_types.h"
|
||||||
|
|
||||||
#if SOC_IS(ESP32P4)
|
#if SOC_IS(ESP32P4)
|
||||||
|
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "esp_hal_security/ds_types.h"
|
#include "hal/ds_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "esp_hal_security/ecc_types.h"
|
#include "hal/ecc_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "esp_hal_security/ecdsa_types.h"
|
#include "hal/ecdsa_types.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/config.h"
|
#include "hal/config.h"
|
||||||
|
|
||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_hal_security/hmac_types.h"
|
#include "hal/hmac_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
#if SOC_HUK_SUPPORTED
|
#if SOC_HUK_SUPPORTED
|
||||||
#include "esp_hal_security/huk_types.h"
|
#include "hal/huk_types.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
#if SOC_KEY_MANAGER_SUPPORTED
|
#if SOC_KEY_MANAGER_SUPPORTED
|
||||||
#include "esp_hal_security/key_mgr_types.h"
|
#include "hal/key_mgr_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user