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.

CC3220S: Security Question, for external flash and the secure boot flow

Part Number: CC3220S

Hi!

I was wondering if there was a diagram that outlines how the secure boot flow works for the CC3220S? The "Technical Reference Manual," has a boot flow for the SF variant, but I wasn't able to find anything about the S variant. My main concern is how is the integrity verified? From my understand there should a hashing algorithm which calculates the hash and gets stored. However, I don't know where is it stored? I don't think it would be stored on the external flash, because if this was the case, wouldn't swapping out the flash chip be a security vulnerability? 

Thank you for your help!

Vasav 

  • Hi Vasav,

    This is pretty simple at CC3220S is code executed from RAM. CC3220S chip does not have internal XIP flash and from this reason HASH cannot be stored inside QFN chip. Code is always loaded by the ROM bootloder into RAM after every startup from SPI flash. During this loading is verified signature of code against signing certificate chain.

    Jan

  • Some clarification.

    The hash is stored in the file system as a secure file. This will be used by the bootloader of both S and SF bootloaders to authenticate the MCU image.

    The signature (against the certificate chain) is verified only when the image is written to the file system (and that's when the hash is created).

    Once the file is authenticated against the hash it will copied to the ram of the S device.

    Br,

    Kobi

  • Hi!

    Thank you both for your help!

    , if the hash is stored in external flash, is correct for me to assume that, de-soldering the flash and soldering on a new one with a different image could be a security issue?

    Vasav

  • no. because secure files are encrypted with device specific key. Decryption of the file will fail if you try it on a different device.

  • Hi Vasav,

    In the standpoint of overall of your product yes, in stand point of "secrets" inside your SPI flash not. Important parts of SPI flash are encrypted by the unique key and cannot be used with other CC3220 QFN.

    Attack vector which you describe is possible to almost all electronic device on the world. If you are able buy component which you exchanging at free market.

    Jan

  • Just for more clarification, I drew a diagram of what I think is happening in the secure bootflow, can you confirm this or make any suggestion on how it is different? 

    (I'm a bit more of a visual learner, so this just makes it easier for me to understand :D) 

  • Hi Vasav,

    I think there are a lot of details you could go into and represent, but that they aren't necessary to capture. I believe you have a solid understanding of how it works. One note for your representation may be to not mix "user files" and "image" terms. Here I think we have been focusing on the MCU binary specifically. That might be confusing.

    Also, I believe the "hash" should be represented as performed on the plaintext rather than the encrypted version of the file, so you might have some pieces a little out of order unless you are just showing a high-level representation.

    Best Regards,

    Ben M