Skip to content

Commit 8ca9707

Browse files
nordicjmeivindj-nordic
authored andcommitted
doc: Add guide on bootloader keys
Adds a guide describing how to generate and use MCUboot keys Signed-off-by: Jamie McCrae <[email protected]>
1 parent e5e1e17 commit 8ca9707

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

doc/nrf-bm/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ The |BMlong| is a distinct repository that incorporates elements from the existi
3939
libraries/index.rst
4040
samples.rst
4141
ug_dfu.rst
42+
ug_bootloader_keys.rst
4243
release_notes.rst

doc/nrf-bm/links.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
.. _`MCUmgr`: https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr.html
5858
.. _`DTS`: https://docs.zephyrproject.org/latest/build/dts/index.html
5959
.. _`System reset`: https://docs.zephyrproject.org/latest/services/device_mgmt/smp_groups/smp_group_0.html#system-reset
60+
.. _`Image tool`: https://docs.mcuboot.com/imgtool.html
6061

6162
.. ### Release notes
6263

doc/nrf-bm/ug_bootloader_keys.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.. _ug_bootloader_keys:
2+
3+
Bootloader keys
4+
###############
5+
6+
When MCUboot is used in a project, by default it uses a dummy ed25519 signing key.
7+
This key should only be used for development purposes.
8+
9+
For testing and production use cases, unique signing keys must be generated and kept secure (one key per project) to ensure the integrity of firmware update security.
10+
11+
Signature type
12+
--------------
13+
14+
MCUboot in |BMshort| supports the following signature types:
15+
16+
+------------+----------------------------------------------------------------------+-----------------------------------------------------------------------------+
17+
| Type | Description | Sysbuild Kconfig |
18+
+============+======================================================================+=============================================================================+
19+
| None | No signature verification (insecure) | :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_NONE` |
20+
+------------+----------------------------------------------------------------------+-----------------------------------------------------------------------------+
21+
| RSA | RSA-2048 or RSA-3072 signature | :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_RSA` |
22+
+------------+----------------------------------------------------------------------+-----------------------------------------------------------------------------+
23+
| ECDSA-P256 | Elliptic curve digital signature with curve P-256 | :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_ECDSA_P256` |
24+
+------------+----------------------------------------------------------------------+-----------------------------------------------------------------------------+
25+
| ed25519 | Edwards curve digital signature using ed25519 (recommended, default) | :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_ED25519` |
26+
+------------+----------------------------------------------------------------------+-----------------------------------------------------------------------------+
27+
28+
.. _ug_bootloader_keys_generating:
29+
30+
Generating a key
31+
----------------
32+
33+
See `Image tool`_ documentation for details on the ``imgtool`` which includes details on how to generate a signing key.
34+
35+
.. _ug_bootloader_keys_using:
36+
37+
Using a key in a project
38+
------------------------
39+
40+
Once a key has been generated, it can be used in a project by setting the :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_SIGNATURE_KEY_FILE` sysbuild Kconfig option to the absolute path of the generated ``.pem`` key file.

doc/nrf-bm/ug_dfu.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,11 @@ Building and running
314314
If the installer image was loaded, then it will apply the updates and reboot into firmware loader mode automatically and allow for loading the application firmware update using the same process.
315315
If an application update was loaded, then the new application will begin executing.
316316

317+
Signing keys
318+
************
319+
320+
When building with an MCUboot board variant, it will use a default dummy MCUboot signing key which **should not be used in production**, see :ref:`ug_bootloader_keys` for details on how to generate and use a custom signing key when building an application.
321+
317322
DFU samples
318323
***********
319324

0 commit comments

Comments
 (0)