forked from espressif/esp-idf
ecc: added SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK
soc caps for esp32c2
as the ESP32C2 ECC peripheral has a bug in ECC point verification, if value of K is zero the verification fails
This commit is contained in:
@@ -132,7 +132,7 @@ TEST_CASE("ECC point multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SOC_ECC_SUPPORT_POINT_VERIFY
|
#if SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
|
||||||
static int ecc_point_verify(const uint8_t *x_le, const uint8_t *y_le, uint8_t len)
|
static int ecc_point_verify(const uint8_t *x_le, const uint8_t *y_le, uint8_t len)
|
||||||
{
|
{
|
||||||
ecc_enable_and_reset();
|
ecc_enable_and_reset();
|
||||||
@@ -182,7 +182,7 @@ TEST_CASE("ECC point verification on SECP192R1 and SECP256R1", "[ecc][hal]")
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY
|
#if SOC_ECC_SUPPORT_POINT_MULT && SOC_ECC_SUPPORT_POINT_VERIFY && !defined(SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK)
|
||||||
TEST_CASE("ECC point verification and multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
|
TEST_CASE("ECC point verification and multiplication on SECP192R1 and SECP256R1", "[ecc][hal]")
|
||||||
{
|
{
|
||||||
test_ecc_point_mul_inner(true);
|
test_ecc_point_mul_inner(true);
|
||||||
|
@@ -203,6 +203,10 @@ config SOC_CPU_IDRAM_SPLIT_USING_PMP
|
|||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
|
||||||
config SOC_GDMA_GROUPS
|
config SOC_GDMA_GROUPS
|
||||||
int
|
int
|
||||||
default 1
|
default 1
|
||||||
|
@@ -98,6 +98,9 @@
|
|||||||
|
|
||||||
#define SOC_CPU_IDRAM_SPLIT_USING_PMP 1
|
#define SOC_CPU_IDRAM_SPLIT_USING_PMP 1
|
||||||
|
|
||||||
|
/*-------------------------- ECC CAPS --------------------------*/
|
||||||
|
#define SOC_ECC_SUPPORT_POINT_VERIFY_QUIRK 1 // C2 ECC peripheral has a bug in ECC point verification, if value of K is zero the verification fails
|
||||||
|
|
||||||
/*-------------------------- GDMA CAPS -------------------------------------*/
|
/*-------------------------- GDMA CAPS -------------------------------------*/
|
||||||
#define SOC_GDMA_GROUPS (1U) // Number of GDMA groups
|
#define SOC_GDMA_GROUPS (1U) // Number of GDMA groups
|
||||||
#define SOC_GDMA_PAIRS_PER_GROUP (1U) // Number of GDMA pairs in each group
|
#define SOC_GDMA_PAIRS_PER_GROUP (1U) // Number of GDMA pairs in each group
|
||||||
|
Reference in New Issue
Block a user