[Backport ncs-v3.4-branch] [nrf noup] zephyr: imgtool: sim: support multiple keys - #729
Open
NordicBuilder wants to merge 2 commits into
Open
[Backport ncs-v3.4-branch] [nrf noup] zephyr: imgtool: sim: support multiple keys#729NordicBuilder wants to merge 2 commits into
NordicBuilder wants to merge 2 commits into
Conversation
zephyr: support multiple signing keys CONFIG_BOOT_SIGNATURE_KEY_FILE accepts a comma-separated list of PEMs. The first entry may be a keypair or public-only PEM — only the public bytes are ever embedded in the bootloader binary; subsequent entries must be public-only and are validated at CMake configure time. This enables the prod/dev custody model: a development bootloader can boot both production-signed and development-signed images, while production bootloaders embed only the production public key. imgtool: add --name-suffix to getpub and getpubhash Emits suffixed C/Rust symbol names so more than one key of the same signature type can be embedded without collisions. imgtool: add keyinfo subcommand Reports whether a PEM is a keypair (private) or public-only. Used by the Zephyr build to enforce that verification-only entries past the first are public-only PEMs. sim: tests for multiple ed25519 keys Add the sig-second-key feature and multi_key test scenarios covering single-key and dual-key builds. Documentation updated in docs/readme-zephyr.md, docs/signed_images.md, and docs/imgtool.md. Closes #2700. Signed-off-by: JP Hutchins <jp@intercreate.io> NCS adaptation notes: - Simulator changes excluded (not applicable to sdk-mcuboot). - CMakeLists.txt: NCS-specific key resolution (CONF_FILE scanning and KEY_FILE global property) preserved for the primary key; additional keys use CONF_DIR (same source as primary key) rather than APPLICATION_CONFIG_DIR for relative path resolution. zephyr_library_sources() used instead of target_sources() to match existing NCS conventions. MCUBOOT_SIGN_KEY_COUNT=1 set in else() branch to cover KMU, ITS, builtin-key, and any other no-key-file configurations. - Kconfig: BOOT_BUILTIN_KEY replaced with BOOT_SIGNATURE_USING_KMU and NCS_BOOT_SIGNATURE_USING_ITS in the mutually-exclusive list; help text updated to reflect NCS CONF_FILE-based path resolution behaviour. - imgtool: keyinfo uses hasattr(key_obj, "private_bytes") on the underlying cryptography key object to detect private keys, replacing keys.PayloadSigner/DigestSigner (absent in NCS) and keys.PrivateBytesMixin (which Ed25519 does not inherit in this fork). (cherry picked from commit 5497c95f1c8cde55a2d0da0db96e53fad77b8c8d) Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no> (cherry picked from commit 9182123)
…91 only Scope the comma separated BOOT_SIGNATURE_KEY_FILE to only 91 series devices in NCS 3.4. Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Aug 20, 2026
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-mcuboot#729 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
|
nvlsianpu
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Backport 9182123 from #722.