kopia lustrzana https://github.com/espressif/esp-idf
secure_boot: Added Kconfig option for aggressive key revoke
Applicable to S2, C3, and S3pull/7547/head
rodzic
c1d3b295e8
commit
8ff3dbc05d
|
@ -614,6 +614,22 @@ menu "Security features"
|
|||
|
||||
Refer to the Secure Boot section of the ESP-IDF Programmer's Guide for this version before enabling.
|
||||
|
||||
config SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE
|
||||
bool "Enable Aggressive key revoke strategy"
|
||||
depends on SECURE_BOOT && (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3)
|
||||
default N
|
||||
help
|
||||
If this option is set, ROM bootloader will revoke the public key digest burned in efuse block
|
||||
if it fails to verify the signature of software bootloader with it.
|
||||
Revocation of keys does not happen when enabling secure boot. Once secure boot is enabled,
|
||||
key revocation checks will be done on subsequent boot-up, while verifying the software bootloader
|
||||
|
||||
This feature provides a strong resistance against physical attacks on the device.
|
||||
|
||||
NOTE: Once a digest slot is revoked, it can never be used again to verify an image
|
||||
This can lead to permanent bricking of the device, in case all keys are revoked
|
||||
because of signature verification failure.
|
||||
|
||||
choice SECURE_BOOTLOADER_KEY_ENCODING
|
||||
bool "Hardware Key Encoding"
|
||||
depends on SECURE_BOOTLOADER_REFLASHABLE
|
||||
|
|
|
@ -330,6 +330,9 @@ Secure Boot Best Practices
|
|||
* Applications should be signed with only one key at a time, to minimize the exposure of unused private keys.
|
||||
* The bootloader can be signed with multiple keys from the factory.
|
||||
|
||||
Conservative approach:
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Assuming a trusted private key (N-1) has been compromised, to update to new key pair (N).
|
||||
|
||||
1. Server sends an OTA update with an application signed with the new private key (#N).
|
||||
|
@ -342,6 +345,17 @@ Secure Boot Best Practices
|
|||
|
||||
* A similar approach can also be used to physically re-flash with a new key. For physical re-flashing, the bootloader content can also be changed at the same time.
|
||||
|
||||
Aggressive approach:
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
ROM code has an additional feature of revoking a public key digest if the signature verification fails.
|
||||
|
||||
To enable this feature, you need to burn SECURE_BOOT_AGGRESSIVE_REVOKE efuse or enable :ref:`CONFIG_SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE`
|
||||
|
||||
Key revocation is not applicable unless secure boot is successfully enabled. Also, a key is not revoked in case of invalid signature block or invalid image digest, it is only revoked in case the signature verification fails, i.e. revoke key only if failure in step 3 of :ref:`verify_image`
|
||||
|
||||
Once a key is revoked, it can never be used for verfying a signature of an image. This feature provides strong resistance against physical attacks on the device. However, this could also brick the device permanently if all the keys are revoked because of signature verification failure.
|
||||
|
||||
.. _secure-boot-v2-technical-details:
|
||||
|
||||
Technical Details
|
||||
|
|
Ładowanie…
Reference in New Issue