Can ECDSA signing key be changed when secure boot is enabled?
Posted: Sun Nov 22, 2020 12:24 am
Hello!
I have a project on enabling and discussing ESP32's security functions and I was wondering whether once secure boot enabled, does ECDSA key can be changed. I have an assumption that the answer is NO, with some explanations I consider as correct, but I'd need confirmation or correction, as I'm not sure.
1. Reflashable mode: as the AES256 key stored in eFuse is equivalent to the SHA256 hash value of the ECDSA private key, in the chain of trust, hardware can verify the bootloader via this key. However, when we'd reflash the bootloader with a different ECDSA key, this verification would fail. So this is why we can't change ECDSA key in Reflashable mode. Am I right?
2. One-time flash: as the secure bootloader is permanent, it needs to have a key that can verify the application (chain of trust again). This key is embedded in bootloader through the first flash and as the bootloader is permanent, this key also cannot be changed. So if we flash a new application image signed by a different key, the bootloader can't verify it. So this is why we can't change ECDSA key in OTF mode, as well. Am I right?
Thanks in advance,
AndrĂ¡s
I have a project on enabling and discussing ESP32's security functions and I was wondering whether once secure boot enabled, does ECDSA key can be changed. I have an assumption that the answer is NO, with some explanations I consider as correct, but I'd need confirmation or correction, as I'm not sure.
1. Reflashable mode: as the AES256 key stored in eFuse is equivalent to the SHA256 hash value of the ECDSA private key, in the chain of trust, hardware can verify the bootloader via this key. However, when we'd reflash the bootloader with a different ECDSA key, this verification would fail. So this is why we can't change ECDSA key in Reflashable mode. Am I right?
2. One-time flash: as the secure bootloader is permanent, it needs to have a key that can verify the application (chain of trust again). This key is embedded in bootloader through the first flash and as the bootloader is permanent, this key also cannot be changed. So if we flash a new application image signed by a different key, the bootloader can't verify it. So this is why we can't change ECDSA key in OTF mode, as well. Am I right?
Thanks in advance,
AndrĂ¡s