SBSFU - Updating ECC public key in runtime
- June 2, 2025
- 2 replies
- 583 views
Hello,
I would like to replace ECC public key in SE_Key_region_ROM region from my application in runtime. My device has no protection enabled (RDP, PCROP, WRP). I am able to read and write in the region via CubeProgrammer.
I dumped the 256 bytes of SE_Key_region_ROM but I am unable to identify the public key associated to the ECC private key ECCKEY1.txt. How can I retrieve and identify the public key based on the default private key provided by STM (SE_Key_region_ROM region starts at address 0x08000400) ?
This is my use case :
I have a device is running with default SBSFU configuration (ECCKEY1.txt and OEM_KEY_COMPANY1_key_AES_CBC.bin used to sign and encrypt the firmware). My device supports firmware update OTA by cellular.
I would like to test this procedure :
- Sign a firmware with a new ECC private key and update the device with this firmware.
- After download and before rebooting, the first firmware would copy the ECC public key to SE_Key_region_ROM
- After reboot, the bootloader will check the signature of new firmware with new ECC public key.
Thanks for the support.
Best Regards,
Luca
