mirror of
https://github.com/espressif/esp-idf.git
synced 2026-07-17 08:23:09 +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:
@@ -11,6 +11,7 @@
|
||||
#include "esp_efuse.h"
|
||||
#include "esp_efuse_table.h"
|
||||
#include "esp_log.h"
|
||||
#include "hal/key_mgr_hal.h"
|
||||
#include "hal/key_mgr_ll.h"
|
||||
#include "hal/mspi_ll.h"
|
||||
#include "soc/soc_caps.h"
|
||||
@@ -79,7 +80,7 @@ esp_err_t esp_flash_encryption_enable_key_mgr(void)
|
||||
};
|
||||
|
||||
// Force Key Manager to use eFuse key for XTS-AES operation
|
||||
key_mgr_hal_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_FLASH_XTS_AES_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "esp_efuse_table.h"
|
||||
#include "esp_log.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "hal/key_mgr_hal.h"
|
||||
#include "hal/key_mgr_ll.h"
|
||||
#include "hal/mspi_ll.h"
|
||||
|
||||
@@ -61,7 +62,7 @@ esp_err_t esp_flash_encryption_enable_key_mgr(void)
|
||||
};
|
||||
|
||||
// Force Key Manager to use eFuse key for XTS-AES operation
|
||||
key_mgr_hal_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_FLASH_XTS_AES_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user