This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: Secure Boot key usage replacement

Part Number: AM62P

Hi TI experts.

As we know, normally the keys used for secure boot, are SMPK (authentication) and SMEK (decryption), 

  1. whether can change the algorithm? for example, use symmetric algorithm (AES-CMAC) to do the authentication? If they implmented by ROM code (Secure ROM / public ROM) or TIFS, I think NO
  2. For Keyring usage, we can replace the SMPK and SMEK with keyrings. then does it mean we only replace to use same type keyring? for example of Secure Boot feature, we only can use Asymmetric keyring to replace SMPK, and have to use same key length?

Thanks in advance!

  • Hello,

    whether can change the algorithm? for example, use symmetric algorithm (AES-CMAC) to do the authentication? If they implmented by ROM code (Secure ROM / public ROM) or TIFS, I think NO

    It is not possible to change the algorithm. The authentication is supported for the RSA/ECC keys only while decryption is supported for AES-256-CBC only.

    for example of Secure Boot feature, we only can use Asymmetric keyring to replace SMPK, and have to use same key length?

    The authentication is supported for the asymmetric keys only. However, the asymmetric key in the keyring does not have to match the SMPK. It can be any supported asymmetric key from TIFS.

    Regards,

    Prashant

  • Hi Prashant,

    Thanks for clarification.

    For Secure Boot keys usage, we have another question:

    As we know for HS-FS device, the customer keys are not injected, so the secure boot will use TI Root key set (MPK / MEK) to sign the TIFS and R5F_DM images. I think this is clear.

    But for HS-SE device, after Customer keys injected, for TIFS and R5F_DM image, will use which keys? also use TI root keys (MPK and MEK)  or Customer Keys (SMPK / SMEK).

    According to this diagram, the TIFS image of HE-SE, does it mean signed by TI root keys firstly, and sign with customer keys again?

     The confused info is according to below diagram, for HS-SE device, the TI keys will be invalid, does it mean after customer keys injected, the TI root keys will be never used any more?

    BR

    Tim.

  • Hi Tim,

    so the secure boot will use TI Root key set (MPK / MEK) to sign the TIFS and R5F_DM images. I think this is clear.

    There is no concept of secure boot on HSFS devices. The TIFS firmware only is signed with TI keys  but the user applications are signed with any random key on the HSFS devices.

    On the HSSE devices, the SBL and the applications are signed with the active customer programmed keys (SMPK or BMPK) and the TIFS firmware is signed with TI keys only.

    Regards,

    Prashant

  • Hello Prashant,

    Almost clear for this.

    The SBL and other user application image will be signed and encrypted by customer keys, but for TIFS, seems also have conflict info in "K3 Security Hardware Architecture" (SPRUIM0C.pdf) - chapter 9 Security Booting Flow:

    could you help to confirm? 

    BR.

    Tim

  • Hi Tim,

    but for TIFS, seems also have conflict info in "K3 Security Hardware Architecture" (SPRUIM0C.pdf) - chapter 9 Security Booting Flow:

    This is for Prime Model of the devices which is not supported on the SITARA devices like AM62P. The TIFS is signed with TI keys only on AM62 devices. Basically, the customer do not need to concern with the signing of the TIFS firmware as it is provided as already signed blobs in the SDKs.

  • Hi Prashant,

    Thanks for clarify, So for AM62Px SoC, the TIFS is only need to signed and encrypted by TI root Key set. no need to use Customer keys sign again. during secure boot, the Secure ROM will only use MPK to verify it directly. 

    For SBL image, Secure Rom will verify it use SMPK/BMPK;

    For other images, TIFS will verify them use SMPK/BMPK too.

    BR.

  • That is correct.

  • Hello Prashant, 

    Because the TIFS is only signed by TI MPK, I think TI will use RSA4096 private key,  If yes:

    1. The image from TI SDK, the TIFS image's certificate or signature is available, correct? because customer don't have TI MPK private key, cannot sign it. So I guess it is available yet for customer.

    2. what about the padding of RSA4096: also use PCKS v1.5 or PSS?

    3. From AM62Px MCU+ SDK, where we can found the TIFS images and its Cert?

    Thanks

    BR.

    Tim.

  • Hello,

    Basically, the customer do not need to concern with the signing of the TIFS firmware as it is provided as already signed blobs in the SDKs.

    As I mentioned, the TIFS firmware and its certificate is provided in the SDKs. For AM62P MCU+ SDK, these are available at the path "source/drivers/sciclient/soc/am62px".

  • Hello Prashant,

    For am62px SDKs, we only have the binary file of TIFS, is there any diagram or architecture to introduce it?

    we got the TIFS package of am263px, its SW component as below:

    for am62px TIFS, is there mainly differences compared with this? 

    Thanks

    BR

  • Hello,

    AM62P and AM263 are two different devices with different architectures. The TIFS is a closed source software and so provided as binary blobs only in the SDKs.

  • Hello 

    For other images (except TIFS), will be signed by customer private key (SMPK), and will be verified by Customer public key SMPK during Secure boot, this SMPK public key will included in X.509 Cert, so the OTP area only have SMPK hash is enough, the hash is only used to verify the SMPK (from X.509 Cert) validation. at the end will use the SMPK public (from X.509 Cert) to verify the images signature. I think this process it clearly and reasonably.

    But for TIFS, The TIFS image is signed by TI MPK (private), and the Signature also included in SDK. then during secure boot sequence, I think it will be verified by Secure ROM used TI MPK (public). but the OTP area, it only stored TI MPK hash, do not stored MPK key itself, how to verify it?

    OR whether TI provide the TI MPK combined in TIFS X.509 Cert? If yes, that means all of the device, will use the same MPK? This is not reasonable.

    BR.

  • The X.509 certificate itself contains the public key which is applicable for both normal images and TIFS certificate. The Secure ROM extracts the TI MPK public key from the certificate, calculates the SHA512 hash, and matches it with the SHA512 hash of the TI MPK programmed in the efuses.

  • Thanks for clarification.

    So the TI MPK is fleet key available for all devices? not device unique key.

    BR

  • That is correct.

  • hello Prashant,

    We found `tiboot3.bin` in the SDK, which is a combined binary file signed by SYSFW. I believe it was generated by the script "rom_image_gen.py", but upon examining the script, I found that it uses the key `custMpk.pem` instead of TI MPK. This confuses me; which key does the TIFS format actually use?

    Or, does this mean that the files "sysfw-hs-enc-cert.bin" and "sysfw-hs-enc.bin" are each signed by TI-MPK and encrypted by TI-MEK from original SYSFW, then used as input to the "rom_image_gen.py" script, which then signs them again using `custMPK`? The final result is the `tiboot3` file.

    Thanks.

  • Or, does this mean that the files "sysfw-hs-enc-cert.bin" and "sysfw-hs-enc.bin" are each signed by TI-MPK and encrypted by TI-MEK from original SYSFW, then used as input to the "rom_image_gen.py" script, which then signs them again using `custMPK`?

    The images themselves aren't signed but the certificate only. The "sysfw-hs-enc.bin" is just the SYSFW binary encrypted by the TI-MEK while "sysfw-hs-enc-cert.bin" is the corresponding certificate signed by the TI-MPK.

    These blobs are just concatenated to the SBL binary and their hashes are put into the outer certificate signed by "custMpk". The certificate signed by the "custMpk" are concatenated with the SBL binary, SYSFW blobs, Board configuration blob to make the "tiboot3.bin"

  • Yes, only the Cert has to be signed. my description has a mistake.

    So according to your comment, all binary file combined and calculate a new hash, it will be merged into the outer Cert, and then this outer Cert will be signed by custMPK, this new sign will be part of the outer Cert. this outer Cert also include custMPK.

    At the end, the outerCert, SBL_enc, SYSFW_enc, SYSFW_enc_Cert, board cfg... will be combined as tiboot3.

    During Secure boot, this tiboot3 file will be parsed by public ROM, and the outer Cert will be verified by Secure ROM firstly?

    The SYSFW_enc_cert will be verified by TI-MPK. The SYSFW_enc will be decrypted by TI-MEK stored in OTP.

    Am I understanding correct?

  • all binary file combined and calculate a new hash, it will be merged into the outer Cert,

    The individual hashes of the blobs are contained in the outer certificate. At runtime, the Secure ROM performs the integrity check for each blob after verifying the certificate. Everything else is correct.

  • Thanks very much!