Skip to content

Commit db554f5

Browse files
57300rlubos
authored andcommitted
doc: Update nRF54H20 key provisioning page
Replace the outdated information pertaining to SUIT SDFW with new info applicable to the latest release of IronSide SE. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 4dc5927)
1 parent 32b4c52 commit db554f5

File tree

2 files changed

+50
-47
lines changed

2 files changed

+50
-47
lines changed

doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_ironside.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,8 @@ It is divided into a 16-bit major version and a 16-bit minor version.
381381

382382
This versioning scheme allows IronSide to support multiple UICR formats, enabling updates to the format without breaking compatibility with existing configurations.
383383

384+
.. _ug_nrf54h20_ironside_se_uicr_lock:
385+
384386
UICR.LOCK
385387
=========
386388

@@ -1261,6 +1263,8 @@ See the following table for a summary of the available boot commands:
12611263

12621264
The following chapters describe each command in detail.
12631265

1266+
.. _ug_nrf54h20_ironside_se_eraseall_command:
1267+
12641268
``ERASEALL`` command
12651269
====================
12661270

doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_keys.rst

Lines changed: 46 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,82 +7,77 @@ Provisioning keys on the nRF54H20 SoC
77
:local:
88
:depth: 2
99

10-
This guide describes how to generate and provision cryptographic public keys on an nRF54H20 SoC in the Root of Trust (RoT) lifecycle state.
11-
It is intended for developers defining manifest signing keys for the application core, radio core, and OEM root.
12-
A successful provisioning makes the keys available to Secure Domain Firmware through PSA Crypto key identifiers.
10+
This guide describes how to provision pre-generated cryptographic keys on an nRF54H20 SoC.
11+
It is intended for developers who wish to create a predefined set of keys for their application, made available through PSA Crypto key identifiers.
1312

1413
Prerequisites
1514
=============
1615

17-
To follow this guide, your nRF54H20 device must meet the following requirement:
16+
To follow this guide, your nRF54H20 device must meet the following requirements:
1817

1918
* On the nRF54H20 DK, you must :ref:`provision <ug_nrf54h20_gs_bringup_soc_bin>` the DK as described in the :ref:`ug_nrf54h20_gs` page.
2019
* On a custom nRF54H20-based device, you must :ref:`configure, generate, and program the BICR <ug_nrf54h20_custom_pcb_bicr>` as described in the :ref:`ug_nrf54h20_custom_pcb` page.
21-
* You must configure :ref:`ug_nrf54h20_ironside_uicr_securestorage` in your |ISE| UICR configuration.
2220

2321
Overview
2422
========
2523

26-
The keys provisioning workflow for the nRF54H20 SoC consists of two main steps:
24+
The keys provisioning workflow for the nRF54H20 SoC consists of three main steps:
2725

28-
1. Generating the required metadata using a script provided with the |NCS|.
26+
1. Choosing key identifiers based on the desired properties for each key.
27+
#. Generating the required metadata using a script provided with the |NCS|.
2928
#. Provisioning the keys to the nRF54H20 SoC.
3029

31-
.. note::
32-
The nRF54H20 SoC must be in RoT lifecycle state for key provisioning to work.
33-
For more details on lifecycle states, see :ref:`ug_nrf54h20_architecture_lifecycle`.
30+
.. rst-class:: numbered-step
3431

35-
.. _ug_nrf54h20_keys_generating:
32+
Choosing a key ID
33+
=================
34+
35+
Key provisioning is supported by the |ISE| firmware through the :ref:`ug_crypto_architecture_implementation_standards_ironside` of the PSA Crypto API.
36+
|ISE| defines two categories of keys that can be provisioned: standard *user keys* and non-standard *revocable keys*.
37+
These categories are tied to distinct key ID ranges.
3638

37-
Generating the keys
38-
===================
39+
User keys
40+
---------
3941

40-
A script is used to generate the necessary cryptographic keys, BLOBs, and metadata required for provisioning.
41-
The script follows the PSA Crypto standard to generate the required 28-byte key.
42-
It is located in the :file:`nrf/scripts/generate_psa_key_attributes.py` file.
42+
These are the standard persistent keys conforming to the :ref:`supported version of the PSA Crypto API <ug_psa_certified_api_overview_crypto_ncs>`:
4343

44-
To generate the keys, follow these steps:
44+
* Minimum ID: ``0x00000001`` (``PSA_KEY_ID_USER_MIN``)
45+
* Maximum ID: ``0x3FFFFFFF`` (``PSA_KEY_ID_USER_MAX``)
4546

46-
1. Generate private keys using Ed25519::
47+
In order to successfully provision user keys, you must first configure cryptographic partitions in your :ref:`ug_nrf54h20_ironside_uicr_securestorage` configuration.
4748

48-
openssl genpkey -algorithm Ed25519 -out MANIFEST_APPLICATION_GEN1_priv.pem
49-
openssl genpkey -algorithm Ed25519 -out MANIFEST_RADIOCORE_GEN1_priv.pem
50-
openssl genpkey -algorithm Ed25519 -out MANIFEST_OEM_ROOT_GEN1_priv.pem
49+
Revocable keys
50+
--------------
5151

52-
#. Extract public keys::
52+
These are an extension of user keys with special properties for secure provisioning during device manufacturing:
5353

54-
openssl pkey -in MANIFEST_APPLICATION_GEN1_priv.pem -pubout -out MANIFEST_APPLICATION_GEN1_pub.pem
55-
openssl pkey -in MANIFEST_RADIOCORE_GEN1_priv.pem -pubout -out MANIFEST_RADIOCORE_GEN1_pub.pem
56-
openssl pkey -in MANIFEST_OEM_ROOT_GEN1_priv.pem -pubout -out MANIFEST_OEM_ROOT_GEN1_pub.pem
54+
* Minimum ID: ``0x40002000``
55+
* Maximum ID: ``0x4FFFFFFF``
5756

58-
#. Check the required key IDs::
57+
Revocable keys can only be provisioned as long as the :ref:`ug_nrf54h20_ironside_se_uicr_lock` configuration is disabled.
58+
Once the UICR is locked, no more keys can be created in this range, which means that when a revocable key is destroyed, it cannot be replaced.
5959

60-
MANIFEST_PUBKEY_APPLICATION_GEN1 = 0x40022100
61-
MANIFEST_PUBKEY_APPLICATION_GEN2 = 0x40022101
62-
MANIFEST_PUBKEY_APPLICATION_GEN3 = 0x40022102
63-
MANIFEST_PUBKEY_OEM_ROOT_GEN1 = 0x4000AA00
64-
MANIFEST_PUBKEY_OEM_ROOT_GEN2 = 0x4000AA01
65-
MANIFEST_PUBKEY_OEM_ROOT_GEN3 = 0x4000AA02
66-
MANIFEST_PUBKEY_RADIOCORE_GEN1 = 0x40032100
67-
MANIFEST_PUBKEY_RADIOCORE_GEN2 = 0x40032101
68-
MANIFEST_PUBKEY_RADIOCORE_GEN3 = 0x40032102
60+
These keys are provisioned into |ISE|'s internal storage, not the location controlled by :ref:`ug_nrf54h20_ironside_uicr_securestorage`.
6961

70-
#. Create a JSON input file with the :ref:`generate_psa_key_attributes_script`:
62+
.. _ug_nrf54h20_keys_generating:
7163

72-
* For the application core::
64+
.. rst-class:: numbered-step
7365

74-
python generate_psa_key_attributes.py --usage VERIFY --allow-usage-export --id 0x40022100 --type ECC_PUBLIC_KEY_TWISTED_EDWARDS --key-bits 255 --algorithm EDDSA_PURE --location LOCATION_CRACEN --key-from-file MANIFEST_APPLICATION_GEN1_pub.pem --file all_keys.json --cracen-usage RAW --persistence PERSISTENCE_DEFAULT
66+
Generating key metadata
67+
=======================
7568

76-
* For the radio core::
69+
The :ref:`generate_psa_key_attributes_script` is used to generate a JSON file containing the necessary cryptographic keys, BLOBs, and metadata required for provisioning.
7770

78-
python generate_psa_key_attributes.py --usage VERIFY --allow-usage-export --id 0x40032100 --type ECC_PUBLIC_KEY_TWISTED_EDWARDS --key-bits 255 --algorithm EDDSA_PURE --location LOCATION_CRACEN --key-from-file MANIFEST_RADIOCORE_GEN1_pub.pem --file all_keys.json --cracen-usage RAW --persistence PERSISTENCE_DEFAULT
71+
Here is an example command to generate metadata for provisioning the public key part of an Ed25519 key, from a pre-existing PEM file, as a revocable key:
7972

80-
* For the main root manifest::
73+
.. parsed-literal::
74+
:class: highlight
8175
82-
python generate_psa_key_attributes.py --usage VERIFY --allow-usage-export --id 0x4000AA00 --type ECC_PUBLIC_KEY_TWISTED_EDWARDS --key-bits 255 --algorithm EDDSA_PURE --location LOCATION_CRACEN --key-from-file MANIFEST_OEM_ROOT_GEN1_pub.pem --file all_keys.json --cracen-usage RAW --persistence PERSISTENCE_DEFAULT
76+
python generate_psa_key_attributes.py --usage VERIFY --id 0x40002000 --type ECC_PUBLIC_KEY_TWISTED_EDWARDS --key-bits 255 --algorithm EDDSA_PURE --location LOCATION_LOCAL_STORAGE --key-from-file public_key.pem --file all_keys.json --persistence PERSISTENCE_DEFAULT
8377
78+
The output file (named :file:`all_keys.json` in the previous example) serves as an input for the next step.
8479

85-
The generated key data is stored in a JSON file, which serves as an input for the next step.
80+
.. rst-class:: numbered-step
8681

8782
Provisioning the keys
8883
=====================
@@ -91,13 +86,17 @@ Provisioning the keys
9186
:start-after: nrfutil_provision_keys_info_start
9287
:end-before: nrfutil_provision_keys_info_end
9388

94-
The Secure Domain Firmware on the device handles the actual key provisioning using PSA Crypto's ``psa_import_key`` function.
89+
The |ISE| firmware on the device handles the actual key provisioning using PSA Crypto's ``psa_import_key`` function.
9590
Provisioning a key calls the function to import the key:
9691

97-
* The ``metadata`` field from the JSON file is used for the function's attributes argument.
98-
* The ``value`` field is passed to the function's data argument.
99-
* The function's ``data_length`` is set to the length of the value field.
92+
* The ``metadata`` field from the JSON file is used for the function's ``attributes`` argument.
93+
* The ``value`` field is passed to the function's ``data`` argument.
94+
* The length of the ``value`` field is passed to the function's ``data_length`` argument.
10095

10196
.. include:: ../../../../../scripts/generate_psa_key_attributes/generate_psa_key_attributes.rst
10297
:start-after: nrfutil_provision_keys_command_start
10398
:end-before: nrfutil_provision_keys_command_end
99+
100+
.. note::
101+
The :ref:`ug_nrf54h20_ironside_se_eraseall_command` destroys all keys stored on the device.
102+
Whenever you execute this boot command, you have to provision your keys all over again.

0 commit comments

Comments
 (0)