feat(soc): Update ESP32-C5 ECO2 to support SHA512

This commit is contained in:
harshal.patil
2025-04-29 15:04:51 +05:30
parent 8694f893ea
commit e7a76ff71e
4 changed files with 51 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -18,6 +18,11 @@ typedef enum {
SHA1 = 0,
SHA2_224,
SHA2_256,
SHA2_384,
SHA2_512,
SHA2_512224,
SHA2_512256,
SHA2_512T,
SHA_TYPE_MAX
} SHA_TYPE;

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -168,6 +168,25 @@ static inline void sha_ll_write_digest(esp_sha_type sha_type, void *digest_state
}
}
/**
* @brief Sets SHA512_t T_string parameter
*
* @param t_string T_string parameter
*/
static inline void sha_ll_t_string_set(uint32_t t_string)
{
REG_WRITE(SHA_T_STRING_REG, t_string);
}
/**
* @brief Sets SHA512_t T_string parameter's length
*
* @param t_len T_string parameter length
*/
static inline void sha_ll_t_len_set(uint8_t t_len)
{
REG_WRITE(SHA_T_LENGTH_REG, t_len);
}
#ifdef __cplusplus
}

View File

@@ -1063,6 +1063,26 @@ config SOC_SHA_SUPPORT_SHA256
bool
default y
config SOC_SHA_SUPPORT_SHA384
bool
default y
config SOC_SHA_SUPPORT_SHA512
bool
default y
config SOC_SHA_SUPPORT_SHA512_224
bool
default y
config SOC_SHA_SUPPORT_SHA512_256
bool
default y
config SOC_SHA_SUPPORT_SHA512_T
bool
default y
config SOC_ECC_CONSTANT_TIME_POINT_MUL
bool
default y

View File

@@ -420,6 +420,11 @@
#define SOC_SHA_SUPPORT_SHA1 (1)
#define SOC_SHA_SUPPORT_SHA224 (1)
#define SOC_SHA_SUPPORT_SHA256 (1)
#define SOC_SHA_SUPPORT_SHA384 (1)
#define SOC_SHA_SUPPORT_SHA512 (1)
#define SOC_SHA_SUPPORT_SHA512_224 (1)
#define SOC_SHA_SUPPORT_SHA512_256 (1)
#define SOC_SHA_SUPPORT_SHA512_T (1)
/*--------------------------- ECC CAPS ---------------------------------------*/
#define SOC_ECC_CONSTANT_TIME_POINT_MUL 1