Skip to content

Commit d297557

Browse files
melwee01jukkar
authored andcommitted
doc: Add note about microcode
Small cleanup of cryptography.rst page Add anchor for Configuration header Add note about CRACEN microcode Add Kconfig option for microcode download Signed-off-by: Mel Weed <[email protected]>
1 parent 54de177 commit d297557

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

doc/nrf/app_dev/device_guides/nrf54l/cryptography.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ nRF54L Series cryptography
1010
The cryptographic peripherals of the nRF54L Series are supported through a set of standard PSA Crypto APIs, with some additional vendor-specific extensions.
1111

1212
The nRF Security library offers a set of :ref:`nrf_security_drivers`.
13-
On the nRF54L devices, in addition to the nrf_oberon driver covering the software-based cryptography implementations, the CRACEN driver (nrf_cracen) provides entropy and hardware-accelerated cryptography using the Crypto Accelerator Engine (CRACEN) peripheral.
13+
On nRF54L Series devices, the CRACEN driver (nrf_cracen) provides entropy and hardware-accelerated cryptography using the Crypto Accelerator Engine (CRACEN) peripheral.
1414
The CRACEN PSA driver supports the following:
1515

1616
* Executing cryptographic operations using the CRACEN peripheral.
@@ -26,9 +26,17 @@ KMU and CRACEN peripherals
2626
**************************
2727

2828
The nRF54L Series Crypto Accelerator Engine (CRACEN) and the Key Management Unit (KMU) peripherals, along with the CRACEN PSA driver, are central when ensuring that the assets of an nRF54L device are protected.
29-
While CRACEN is not accessed by the CPU and typically not directly used by the end-users and their applications, the KMU provides operations to import, use, revoke, and/or delete assets.
29+
While CRACEN is not accessed by the CPU and typically not directly used by the end-users and their applications, the KMU provides operations to import, use, revoke, or delete assets.
3030
Only the KMU is able to push assets to CRACEN's protected RAM and the SEED register.
3131

32+
.. note::
33+
CRACEN relies on microcode for asymmetric cryptography operations like signature validation.
34+
On the nRF54L15, nRF54L10, and nRF54L05 devices, this microcode must be uploaded to a special CRACEN RAM area before first use and after each reset.
35+
36+
If a bootloader uploads this microcode, there is no need to re-upload it for application use.
37+
This saves approximately 5 KB in the crypto driver code.
38+
See the :ref:`ug_nrf54l_crypto_configuration` section for more information.
39+
3240
The KMU can store cryptographic keys and 384-bit random seeds for the IKG in key storage slots.
3341
The CRACEN PSA driver exposes the KMU operations through standard PSA Crypto API calls, with some vendor-specific extensions.
3442
The following KMU operations are supported:
@@ -132,7 +140,6 @@ IKG keys are also accessed using the standard PSA Crypto APIs, and are reference
132140

133141
The keys are not exportable, except for the public key associated with the asymmetric key.
134142

135-
136143
.. _ug_nrf54l_crypto_kmu_key_programming_model:
137144

138145
Programming model for referencing keys
@@ -284,7 +291,6 @@ Removing or revoking keys from KMU
284291
Keys are deleted or revoked using the ``psa_destroy_key`` function.
285292
Calling the ``psa_destroy_key`` function on keys that have the persistence ``CRACEN_KEY_PERSISTENCE_REVOKABLE``, will mark the associated KMU slots as revoked, preventing the slots from being reused for new keys.
286293

287-
288294
Using KMU keys
289295
==============
290296

@@ -307,19 +313,25 @@ You might encounter the following KMU-specific error codes when using the KMU ke
307313
* ``PSA_ERROR_HARDWARE_FAILURE``: The key slot has invalid data.
308314
* ``PSA_ERROR_CORRUPTION_DETECTED``: The key slot has invalid data.
309315

316+
.. _ug_nrf54l_crypto_configuration:
317+
310318
Configuration
311319
*************
312320

313321
See :ref:`configuring_kconfig` for information on how to set the required configuration options temporarily or permanently.
314322

315-
The CRACEN peripheral does not require any configuration.
316-
Its operation is ensured by hardware.
323+
The CRACEN peripheral's operation is ensured by hardware.
324+
325+
The following Kconfig option toggles CRACEN microcode upload:
326+
327+
* :kconfig:option:`CONFIG_CRACEN_LOAD_MICROCODE`: Enabled by default.
328+
Set to ``n`` to disable microcode upload.
317329

318-
The following Kconfig options are used to enable support for KMU:
330+
Use the following Kconfig options to enable KMU support:
319331

320-
* :kconfig:option:`CONFIG_NRF_SECURITY`: Enables the nRF Security library
321-
* :kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_C`: Enables the Platform Security Architecture (PSA) cryptography API
322-
* :kconfig:option:`CONFIG_PSA_CRYPTO_DRIVER_CRACEN`: Enables the CRACEN driver
332+
* :kconfig:option:`CONFIG_NRF_SECURITY`: Enables the nRF Security library.
333+
* :kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_C`: Enables the Platform Security Architecture (PSA) cryptography API.
334+
* :kconfig:option:`CONFIG_PSA_CRYPTO_DRIVER_CRACEN`: Enables the CRACEN driver.
323335

324336
The following code block shows how KMU support is enabled:
325337

doc/nrf/libraries/security/nrf_security/doc/backend_config.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ This section covers the configurations available when using :ref:`legacy_crypto_
1414
Legacy crypto toolbox APIs are marked as deprecated in the |NCS| version 2.8.0, and will be removed in a future version.
1515
It is not recommended to use the legacy crypto toolbox APIs and the related configurations in any new designs.
1616

17+
.. note::
18+
Legacy crypto toolbox APIs are not supported on nRF54L Series devices.
19+
1720
.. _nrf_security_backend_config_multiple:
1821

1922
Configuring backends

0 commit comments

Comments
 (0)