esp-idf/components/efuse/src
Mahavir Jain 0ccfa4b0c2
fix(esp32h2): program use_hardware_k efuse bit for ECDSA key purpose
In ESP32-H2, the ECDSA peripheral by default uses the TRNG (hardware)
generated k value but it can be overridden to software supplied k.
This can happen through by overriding the `ECDSA_SOFTWARE_SET_K` bit
in the configuration register. Even though the HAL API is not exposed
for this but still it could be achieved by direct register
programming. And for this scenario, if sufficiently random k is not
supplied by the software then it could posses a security risk.

In this change, we are unconditionally programming the efuse
`ESP_EFUSE_ECDSA_FORCE_USE_HARDWARE_K` bit during startup security
checks itself. Additionally, same is ensured in the `esp_efuse_write_key`
API as well. This always enforces the hardware k mode in the ECDSA
peripheral and ensures strongest possible security.
2023-11-20 16:03:29 +05:30
..
efuse_controller/keys fix(esp32h2): program use_hardware_k efuse bit for ECDSA key purpose 2023-11-20 16:03:29 +05:30
esp_efuse_api.c efuse: Checks errors of 4x coding scheme for BLOCK0 if so then abort 2022-06-09 17:49:03 +08:00
esp_efuse_fields.c efuse: Remove dependency on bootloader component headers 2023-03-16 01:50:21 +08:00
esp_efuse_utility.c efuse: Fix load_efuses_from_flash when FE is on 2023-03-23 16:20:43 +08:00