Updating the uROT signature remotely in a production device
Here is my attempt at background as I understand it...
iROT is a ROM program in the STM32H563. It contains a P256 EC algorithm, and checks some section of FLASH that you define as a program for a signature, then jumps to it. The definition of the program and sig are stored Option Bytes. In my case, I would be asking iROT to check my secondary bootloader for authenticity, in STM32 terms, this becomes the uROT in some cases or OEMuROT in others (terrible naming). Level1 Secure iROT checks my Level2 Secure bootloader, my bootloader checks my Non-secure application. The signature format is confusing, and I think the tools are greatly lacking clarity, but I think I get the idea.
1. What if I change my bootloader in the field? I OTA download a new bootloader. My Non-Secure application stores the update to the secondary bootloader, confirms it's signature with my OTA process, decrypts. Now... My secondary bootloader will update itself on next boot - BUT - If my Level2 secondary bootloader does not ALSO update the Option Bytes iROT-used signature, it will update itself, then on next boot, iROT will refuse to jump to it. Can my application change these option bytes when the product state is TZ-CLOSED? Can I do this from a (Level2?) Secure area?
2. I think no, and this is why STM32H5 iROT has an "INSTALL" method. Where the "uROT" (my bootloader update) and a "DATA" file (the new signature iROT should use) is put somewhere on chip, then somehow iROT sees this, and will update the secondary bootloader / uROT itself in Level1 Secure, then check and jump to it. I am not sure how iROT knows to trigger this install practice. I can not find documentation on this.
Overall, all of the documentation on the root of trust system needs someone to come in and write a non-technical "Here is what we intended" overview.
