Dear TI Experts,
I am facing the burning of my custom keys into the eFUSEs and I have some doubts regarding the SMEK key.
I have an HS device and I want to know the effective employment of the SMEK key and its consequences.
According the AM243x SDK documentation ( https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_05_00_24/exports/docs/api_guide_am243x/SECURE_BOOT.html#autotoc_md312 ) the devconfig.mak file requires to compile the CUST_MEK variable with the custom SMEK key file (hex content!). The CUST_MEK variable is copied in the APP_ENCRYPTION_KEY variable.
In the same devconfig.mak file, it is required the encryption for the SBL image: ENC_SBL_ENABLED?=yes.
Observing the makefile_ccs_bootimage_gen files from the SBL projects inside the AM243x SDK, I notice that the APP_ENCRYPTION_KEY is never used.
1) I don’t understand if the SMEK key is effective used. From the devconfig.mak file the SBL encryption is required, but in the post-build steps of a SBL project, it seems like the SBL image isn’t encrypted. So is SMEK key really employed or not?.
In the OTP keywriter documentation, in the building of the keywriter certificate (gen_keywr_cert.sh), it is possible specify the SMEK key file (binary content) through the option --smek.
2) if the SBL image seems to be not really encrypted (see above considerations), what happens fusing the SMEK key in the OTP? Maybe the ROM code expects to find an encrypted SBL image? And if my SBL image isn’t really encrypted, does the ROM code load the SBL image anyway?.
According the help of the gen_keywr_cert.sh script, the --smek option requires:
--smek Path to file 256 bit (symmetric key, binary file) SMEK key to be used
What is the proper command to generate this key? Is it enough a 256 bit random number (i.e. : openssl rand -out smek.key 32)?.
Thanks in advance.
Best regards,
Matteo