change(bootloader_support): Rename the esp_flash_encryption_enable_key_mgr() API

This commit is contained in:
harshal.patil
2025-09-18 15:14:12 +05:30
parent 540c719c66
commit c9417e418b
4 changed files with 14 additions and 5 deletions

View File

@@ -12,6 +12,8 @@
#include "esp_log.h"
#include "sdkconfig.h"
#include "esp_crypto_periph_clk.h"
#include "esp_key_mgr.h"
#include "hal/key_mgr_hal.h"
#include "hal/key_mgr_ll.h"
#include "hal/mspi_ll.h"
@@ -52,12 +54,13 @@ esp_err_t esp_flash_encryption_enable_secure_features(void)
return ESP_OK;
}
esp_err_t esp_flash_encryption_enable_key_mgr(void)
esp_err_t esp_flash_encryption_use_efuse_key(void)
{
esp_crypto_key_mgr_enable_periph_clk(true);
// Force Key Manager to use eFuse key for XTS-AES operation
key_mgr_ll_set_key_usage(ESP_KEY_MGR_XTS_AES_128_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
key_mgr_hal_set_key_usage(ESP_KEY_MGR_XTS_AES_128_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
_mspi_timing_ll_reset_mspi();
return ESP_OK;