mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
change(esp_key_mgr): Store key_len field in the key_info
- Update the Key Manager key types to be generic - Define a new enum to determine the length of the keys - Refactor the Key Manager driver support generic key types and key lengths - Also store key deployment mode in the key recovery info
This commit is contained in:
@@ -35,11 +35,7 @@ static void configure_ecdsa_periph(ecdsa_hal_config_t *conf)
|
||||
|
||||
#if SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY
|
||||
// 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);
|
||||
} else {
|
||||
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_256_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
|
||||
}
|
||||
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
|
||||
#endif
|
||||
}
|
||||
#if SOC_KEY_MANAGER_SUPPORTED
|
||||
@@ -48,11 +44,7 @@ static void configure_ecdsa_periph(ecdsa_hal_config_t *conf)
|
||||
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 {
|
||||
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_256_KEY, ESP_KEY_MGR_USE_OWN_KEY);
|
||||
}
|
||||
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_KEY, ESP_KEY_MGR_USE_OWN_KEY);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user