-
Notifications
You must be signed in to change notification settings - Fork 763
HMAC/HKDF-SHA512 support basics #2299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
MCUboot now runs and boots up macs? 😆 |
c374032
to
96074f2
Compare
boot/zephyr/Kconfig
Outdated
depends on BOOT_ENCRYPT_X25519 | ||
depends on BOOT_USE_PSA_CRYPTO | ||
help | ||
By default SHA512 is used for HKDF/HMAC in key exchange expansion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help: By default SHA256 is used...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I am stuck at PSA of nrf54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
scripts/imgtool/image.py
Outdated
hmac_sha_alg = hashes.SHA256() | ||
elif hmac_sha == '512': | ||
if not isinstance(enckey, x25519.X25519Public): | ||
raise click.UsageError("Currently only ECIES-X2519 supports HMAC-SHA512") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: ECIES-X2519
-> ECIES-X25519
Information on TLV and format. Signed-off-by: Dominik Ermel <[email protected]>
Add support for HKDF/HMAC based on SHA512 for ECIES-X25519 key exchange. The commit adds MCUBOOT_HMAC_SHA512 that enables new TLV IMAGE_TLV_ENC_X25519_SHA512. Encryption code has been altered to support the MCUBOOT_HMAC_SHA512. Signed-off-by: Dominik Ermel <[email protected]>
The commit addds CONFIG_BOOT_HMAC_SHA512 that enables MCUboot configuration option MCUBOOT_HMAC_SHA512, that is used for switching HKDF/HMAC in ECIES key exchange to SHA512, from default SHA256. This option, currently, is only available for ECIES-X25519 with PSA as crypto backend. Signed-off-by: Dominik Ermel <[email protected]>
Commit adds imgtool command line option --hmac-sha allowing to select between SHA256 and SHA512 for HMAC/HKDF. Signed-off-by: Dominik Ermel <[email protected]>
No description provided.