Dear all,
I want to load a new key,but i don't kown how to set the boot protected flag?
set 1 or 0 what do sth. mean.
Here is the sample code to load usr key and boot mac key:
/* load CSEC_BOOT_MAC_KEY */
retVal = loadKey(CSEC_BOOT_MAC_KEY, key, 1, 0);
/* load a user key with the boot protected flag set to 1 */
retVal = loadKey(CSEC_KEY_1, test_key, 1, 1);
Hi,
function loadKey has following parameters:
bool loadKey(csec_key_id_t keyId, uint8_t *keyNew, uint8_t counter, bool bootProtection)
There's bool parameter bootProtection, so you can just turn it on or off.
Search for "bootProtection" in file csec_utils.c to see how it is implemented. It follows SHE specification.
Or you can check AN5401 for more details:
Regards,
Lukas