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.

F29H850TU: Cerificate Handling

Part Number: F29H850TU

Hi,

After writing data to CPU flash and HSM flash in SE mode, 

  1. Are we storing plain code or encrypted in flash?
  2. If plain code is stored, whats the point of storing the certificate?
  3. For every boot, does boot ROM validate the code? Like cert validation and hashing etc? But while flashing the code itself, we are validating the certificate and pogramming in flash. Why is there need to validate twice? Are these validation same?

Thanks

Geetha K

 

  • Hi Geetha,

    Are we storing plain code or encrypted in flash?

    Secure boot requires an image to be encrypted (optional) and signed using customer keys. Thus, it can either be unencrypted (plain code) or encrypted, this us up to the user.

    If plain code is stored, whats the point of storing the certificate?

    Even if the plain code is stored, the certificate still serves the below security functions:

    • Authentication - confirms that the code comes from a trusted source
    • Integrity - ensures that the code has not been tampered with since singing

    ROM uses the programmed certificate during its validation at every device boot up (more info below).

    For every boot, does boot ROM validate the code? Like cert validation and hashing etc? But while flashing the code itself, we are validating the certificate and pogramming in flash. Why is there need to validate twice? Are these validation same?

    Yes, the boot ROM validates the code on every boot.The validations during flash programming and at boot up serve different purposes. During flash programming, validation of cert/code is to prevent invalid code from being programmed onto the device. This validation happens at every boot as well to ensure that the stored code hasn't been corrupted or altered. This is mainly to protect against any post-programming tampering, flash corruption, or malicious modification between boots. 

    Best Regards,

    Marlyn

  • Hi Marlyn,

    Thanks for the info

    Are we storing plain code or encrypted in flash?

    I have encrypted code and how do I store this flash?After decrypting(plain code)  or encrypted code itself?

    As I am also storing the certificate with signature(calculated for the encrypted code), if the plain code is stored, during bootup validation, it will be failed.

  • Hi Geetha,

    You would want to store the encrypted code itself in Flash. The certificate you are using is for the encrypted code, as you stated, if you program the plain code then bootup validation process will fail. The HSM will handle decryption during the boot process while validating against the certificate signature that was calculated for the encrypted code. 

    Best Regards,

    Marlyn

  • Hi

    The HSM will handle decryption during the boot process while validating against the certificate signature that was calculated for the encrypted code. 

    Will the HSM load the data into RAM while decrypting during the boot process?

  • Hi Geetha,

    Yes, the HSM will have exclusive access to the RAM region during this time. More details on this are described in the 'C29x CPU Secure Peripheral Boot' section of the HSM User Guide.

    Best Regards,

    Marlyn