feat(ecc): enable ECC constant time mode for ESP32-H2 ECO5

This commit is contained in:
Mahavir Jain
2024-10-22 15:17:16 +05:30
committed by Aditya Patwardhan
parent 8354773714
commit 6875cbf022
15 changed files with 58 additions and 23 deletions
+2 -1
View File
@@ -38,8 +38,9 @@ menu "ESP Security Specific"
endmenu
config ESP_CRYPTO_FORCE_ECC_CONSTANT_TIME_POINT_MUL
bool "Forcfully enable ECC constant time point multiplication operations"
bool "Forcefully enable ECC constant time point multiplication operations"
depends on SOC_ECC_CONSTANT_TIME_POINT_MUL
depends on !(IDF_TARGET_ESP32H2 && ESP32H2_REV_MIN_FULL < 102)
default N
help
If enabled, the app startup code will burn the ECC_FORCE_CONST_TIME efuse bit to force the
+1 -1
View File
@@ -40,7 +40,7 @@ ESP_SYSTEM_INIT_FN(esp_security_init, SECONDARY, BIT(0), 103)
esp_crypto_dpa_protection_startup();
#endif
#ifdef CONFIG_ESP_CRYPTO_FORCE_ECC_CONSTANT_TIME_POINT_MUL
#if CONFIG_ESP_CRYPTO_FORCE_ECC_CONSTANT_TIME_POINT_MUL
if (!esp_efuse_read_field_bit(ESP_EFUSE_ECC_FORCE_CONST_TIME)) {
ESP_EARLY_LOGD(TAG, "Forcefully enabling ECC constant time operations");
esp_err_t err = esp_efuse_write_field_bit(ESP_EFUSE_ECC_FORCE_CONST_TIME);