Skip to content

Commit 10211d4

Browse files
de-nordicrlubos
authored andcommitted
[nrf noup] bootutil: Provide support for SHA512 with ED25519
Use SHA512 directly calculated over image with the ED25519 signature. Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit ccb9552)
1 parent 9e1d883 commit 10211d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

boot/zephyr/Kconfig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ config BOOT_PSA_IMG_HASH_ALG_SHA256_DEPENDENCIES
8080

8181
config BOOT_ED25519_PSA_DEPENDENCIES
8282
bool
83-
select PSA_WANT_ALG_SHA_256
83+
select PSA_WANT_ALG_SHA_256 if BOOT_IMG_HASH_ALG_SHA256
8484
select PSA_WANT_ALG_SHA_512
8585
select PSA_WANT_ALG_PURE_EDDSA
8686
select PSA_WANT_ECC_TWISTED_EDWARDS_255
@@ -228,6 +228,11 @@ config BOOT_SIGNATURE_TYPE_ED25519
228228
bool "Edwards curve digital signatures using ed25519"
229229
select BOOT_ENCRYPTION_SUPPORT
230230
select BOOT_IMG_HASH_ALG_SHA256_ALLOW
231+
select BOOT_IMG_HASH_ALG_SHA512_ALLOW if BOOT_USE_PSA_CRYPTO
232+
help
233+
This is ed25519 signature calculated over SHA512 of SHA256 of application
234+
image; that is not completely correct approach as the SHA512 should be
235+
rather directly calculated over an image.
231236

232237
if BOOT_SIGNATURE_TYPE_ED25519
233238
choice BOOT_ED25519_IMPLEMENTATION

0 commit comments

Comments
 (0)