You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ECDSA signatures created by imgtool are not deterministic, because a random value is used as an input to the signature scheme.
This means that the signed images are not reproducible, which is generally a bad thing for builds. It may lead to unnecessary firmware updates if the signature (instead of just the hash) is used for deciding if an update is necessary. It may also complicate automated tests. This problem already came up in zephyrproject-rtos/zephyr#52271
RFC6979 defines how to do deterministic signature generation. Unfortunately it seems that the cryptography module does not support this. However PyCryptodome does support it and produces valid, deterministic signatures.
@sw, maybe this will solve the problem for the signatures, but as soon as you start using encrypted images the same problem will arise because the key derivation method starts from a random value that is different for each image generation.
OpenSSL merged support for determistic ECDSA two months ago: openssl/openssl#18809. This probably means that soon enough cryptography will also support it.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
The ECDSA signatures created by imgtool are not deterministic, because a random value is used as an input to the signature scheme.
This means that the signed images are not reproducible, which is generally a bad thing for builds. It may lead to unnecessary firmware updates if the signature (instead of just the hash) is used for deciding if an update is necessary. It may also complicate automated tests. This problem already came up in zephyrproject-rtos/zephyr#52271
RFC6979 defines how to do deterministic signature generation. Unfortunately it seems that the
cryptography
module does not support this. However PyCryptodome does support it and produces valid, deterministic signatures.The following line:
mcuboot/scripts/imgtool/image.py
Line 459 in aee388a
could be replaced by this:
This obviously is rather hackish, but maybe someone can find a clean way to do this using the
cryptography
module?Note that I'm no cryptography expert and make no claims on the security ramifications of doing this.
The text was updated successfully, but these errors were encountered: