Skip to content
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

applications: nrf_desktop: Document MCUboot HW crypto for nRF54L SoC Series #19356

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MarekPieta
Copy link
Contributor

PR introduces documentation for MCUboot HW crypto for nRF54L SoC Series.

Jira: NCSDK-30742

@MarekPieta MarekPieta added the backport v2.9-branch auto-create a PR with same commits to v2.9-branch label Dec 9, 2024
@MarekPieta MarekPieta added this to the 2.9.0 milestone Dec 9, 2024
@MarekPieta MarekPieta requested a review from a team December 9, 2024 16:01
@MarekPieta MarekPieta requested a review from a team as a code owner December 9, 2024 16:01
@github-actions github-actions bot added doc-required PR must not be merged without tech writer approval. changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Dec 9, 2024
@MarekPieta MarekPieta removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 9, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 9, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 7

Inputs:

Sources:

more details

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (0)

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain
  • ◻️ Build twister
  • ◻️ Integration tests

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

Copy link
Contributor

@annwoj annwoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick review

applications/nrf_desktop/board_configuration.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/description.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/description.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/description.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/doc/dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/description.rst Outdated Show resolved Hide resolved
@peknis
Copy link
Contributor

peknis commented Dec 10, 2024

If you plan a release note entry, add it to #19240 as a comment.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 10, 2024
Change introduces information that hardware crypto is used for the
MCUboot botloader on nRF54L15 DK.

Jira: NCSDK-30742

Signed-off-by: Marek Pieta <[email protected]>
Signed-off-by: Anna Wojdylo <[email protected]>
@MarekPieta MarekPieta force-pushed the nrf54l15_mcuboot_hw_crypto_doc branch from 3d2f761 to 1774761 Compare December 10, 2024 08:04
@MarekPieta MarekPieta removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 10, 2024
@MarekPieta MarekPieta requested a review from annwoj December 10, 2024 08:13
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/bootloader_dfu.rst Outdated Show resolved Hide resolved
applications/nrf_desktop/description.rst Outdated Show resolved Hide resolved
@divipillai divipillai added the CI-disable Disable CI for this PR label Dec 10, 2024
Change introduces documentation describing nRF54L MCUboot provisioning.
Storing MCUboot keys in KMU requires manual provisioning.

Jira: NCSDK-30742

Signed-off-by: Marek Pieta <[email protected]>
Signed-off-by: Anna Wojdylo <[email protected]>
Signed-off-by: Divya Pillai <[email protected]>
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 10, 2024
Change introduces doucumentation for using MCUboot hardware
cryptography on nRF54L SoC Series.

Jira: NCSDK-30742

Signed-off-by: Marek Pieta <[email protected]>
Signed-off-by: Anna Wojdylo <[email protected]>
Signed-off-by: Divya Pillai <[email protected]>
@MarekPieta MarekPieta force-pushed the nrf54l15_mcuboot_hw_crypto_doc branch from c37b4a0 to ee08e14 Compare December 10, 2024 10:36
@MarekPieta MarekPieta removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 10, 2024
@MarekPieta MarekPieta requested a review from nvlsianpu December 10, 2024 10:57
The private keys are stored in the application configuration directory of the board.
Path to the private key is defined by the ``SB_CONFIG_BOOT_SIGNATURE_KEY_FILE`` sysbuild Kconfig option.
You only need to provision one public key to an nRF Desktop device.
For details, see :ref:`provisioning KMU for nRF54L devices <ug_nrf54l_developing_provision_kmu>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we agree to place here commends on how to provision dk?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this idea, but eventually we desisted from doing it. More provisioning methods might be introduced in the future (I guess some of them would be done through GUI). Alternatively the provisioning might be done automatically together with programming the board. I would prefer not to maintain this doc part in scope of nRF Desktop.

The command is described on the linked provisioning KMU for nRF54L devices page. I could also add a single key command variant there to make it more straightforward for nRF Desktop users.

The nRF54L SoC Series enhances security and reduces boot times by using hardware cryptography in the MCUboot immutable bootloader.
The |NCS| allows using hardware cryptography for ED25519 signature (``SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519``) on the nRF54L SoC Series.

You can enhance security further by enabling the following sysbuild Kconfig options:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't those options enabled by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Application needs to enable them in sysbuild configuration

Copy link
Contributor

@kapi-no kapi-no left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some high-level comments regarding the documentation organisation

In this use case, the application image is automatically signed by the |NCS| build system.
However, the public key is not automatically provisioned to the device when programming the bootloader and the application images using the ``west flash`` command.

To provision the MCUboot keys, use the ``west ncs-provision`` command before programming the bootloader and application images.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to add this documentation section to general MCUboot documentation and only provide a link here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a bit more complicated to make a generic documentation for MCUboot (using KMU is controlled with a Kconfig option, multiple public keys might be used etc.). I would prefer to keep this simple docs in scope of nRF Desktop for NCS 2.9. After MCUboot bootloader docs are improved, we could remove part of this documentation and replace it with a link.

@@ -952,6 +952,24 @@ See :ref:`app_build_file_suffixes` and :ref:`cmake_options` for information abou

.. nrf_desktop_fastpair_important_end
nRF54L MCUboot provisioning
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid target names in section titles? You can find a few suggestions below:

MCUboot provisioning using the key storage peripheral

or

MCUboot provisioning using the KMU peripheral

or

MCUboot provisioning using the HW storage

The KMU is also available for nRF53 Series.

And then we can list supported targets or even provide a reference to the list that is maintained in the general MCUboot documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally prefer to keep nRF54L in the section name as currently it's the only SoC Series that supports the feature. Even Kconfigs and build system have SoC Series dependencies. I am worried that making the documentation more generic could lead to false impression that other SoC Series might also support these features.

Copy link
Contributor Author

@MarekPieta MarekPieta Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, using nRF54L in the title allows to skip whole section for other SoC Series' users

@MarekPieta MarekPieta requested a review from kapi-no December 11, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport v2.9-branch auto-create a PR with same commits to v2.9-branch CI-disable Disable CI for this PR doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants