fix(esp_security): Fixes incorrect key manager configuration for ESP32-P4 rev < 3

This commit is contained in:
harshal.patil
2026-04-28 14:55:51 +05:30
parent c2cccd0b56
commit 8f9b860131
3 changed files with 19 additions and 12 deletions
+4 -4
View File
@@ -34,10 +34,6 @@ static void configure_ecdsa_periph(ecdsa_hal_config_t *conf)
efuse_hal_set_ecdsa_key(conf->curve, conf->efuse_key_blk);
#if SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY
if (!key_mgr_ll_is_supported()) {
HAL_ASSERT(false && "Key manager is not supported");
}
// Force Key Manager to use eFuse key for XTS-AES operation
if (conf->curve == ECDSA_CURVE_SECP192R1) {
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_192_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
@@ -48,6 +44,10 @@ static void configure_ecdsa_periph(ecdsa_hal_config_t *conf)
}
#if SOC_KEY_MANAGER_SUPPORTED
else {
if (!key_mgr_ll_is_supported()) {
HAL_ASSERT(false && "Key manager is not supported");
}
if (conf->curve == ECDSA_CURVE_SECP192R1) {
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_192_KEY, ESP_KEY_MGR_USE_OWN_KEY);
} else {