mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-06 13:18:07 +00:00
Merge branch 'feature/add_ecdsa_p384_support_and_testcases' into 'master'
feat: add ecdsa-p384 testcases and relative support for ESP32C5 ECO2 Closes IDF-13008 and IDF-12630 See merge request espressif/esp-idf!38857
This commit is contained in:
@@ -96,6 +96,9 @@ __attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg(
|
||||
|
||||
__attribute__((always_inline)) static inline void efuse_ll_set_ecdsa_key_blk(ecdsa_curve_t curve, int efuse_blk)
|
||||
{
|
||||
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;
|
||||
@@ -103,6 +106,13 @@ __attribute__((always_inline)) static inline void efuse_ll_set_ecdsa_key_blk(ecd
|
||||
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;
|
||||
|
Reference in New Issue
Block a user