|
| 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. |
0 commit comments