Update keys used by the SBSFU
Hello,
I am designing a firmware for an IoT that needs to be able to be updated securely. I decided to use the X-CUBE-SBSFU package. From a crypto point of view, the requirements are that:
- The firmware update needs to be confidential
- The firmware update needs to be authenticated
Therefore, I decided to use the SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256 crypto scheme.
So I will need to store on the IoT :
- One symetric key for AES128 (key 1)
- One public key for ECCDSA ((key 2)
According to the UM2262 user manual, those keys are stored in the secure enclave. This means that :
- If I activate RDP lvl 2, those keys are immutable and can never be updated
- If I activate RDP lvl 1, I can mass erase the flash and reflash a bootlader with new keys so I need physical access to the device for the update
Question 1: Are those 2 statements correct ?
Another possible scenario that I see is that:
- I use the Key Management System Middleware
- I modify the SBSFU so that the keys are stored in the section of the flash referred as "KMS Data" in the X-CUBE-SBSFU documentation.
- As the KMS Data can be updated using the KMS secure update procedure, I will be able to update the keys remotley
Question 2: Is this something you would advice me to do ?
Question 3: In the example projects, the KMS secure update is used to update keys unrelated to the SBSFU (i.e. keys of the User applicaton), is this for a security reason that I am missing ?
A last scenario is :
- I use the Key Management System Middleware
- I use the STSAFE-A110 as the external token for the KMS
- I modify the SBSFU so that the keys are stored on the STSAFE
- I modify the KMS secure update procedure so that it becomes possible to update keys located on the STSAFE remotely
Question 4: From you point of view, are the extra security of the STSAFE making that scenario more valuable ?
Question 5: Why is there no example projects in which the keys 1 and 2 are stored on the STSAFE ? Is that a security issue ?
