mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
feat(hal): enabled hardware deterministic mode in ESP32H21
This commit is contained in:
@ -242,16 +242,6 @@ static inline void ecdsa_ll_set_k_type(ecdsa_sign_type_t type)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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)
|
||||
{
|
||||
REG_SET_FIELD(ECDSA_CONF_REG, ECDSA_DETERMINISTIC_LOOP, loop_number);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the stage of ECDSA operation
|
||||
*
|
||||
@ -409,17 +399,6 @@ 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)
|
||||
{
|
||||
return REG_GET_BIT(ECDSA_RESULT_REG, ECDSA_K_VALUE_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the ECDSA curves configuration is supported
|
||||
*/
|
||||
|
@ -747,6 +747,10 @@ config SOC_ECDSA_SUPPORT_DETERMINISTIC_MODE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_ECDSA_SUPPORT_HW_DETERMINISTIC_LOOP
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_ECDSA_P192_CURVE_DEFAULT_DISABLED
|
||||
bool
|
||||
default y
|
||||
|
@ -488,6 +488,7 @@
|
||||
/*------------------------- ECDSA CAPS -------------------------*/
|
||||
#define SOC_ECDSA_SUPPORT_EXPORT_PUBKEY (1)
|
||||
#define SOC_ECDSA_SUPPORT_DETERMINISTIC_MODE (1)
|
||||
#define SOC_ECDSA_SUPPORT_HW_DETERMINISTIC_LOOP (1)
|
||||
#define SOC_ECDSA_P192_CURVE_DEFAULT_DISABLED (1)
|
||||
|
||||
/*-------------------------- UART CAPS ---------------------------------------*/
|
||||
|
Reference in New Issue
Block a user