Skip to content

Commit 768c10e

Browse files
greg-fernordicjm
authored andcommitted
doc: crypto: add driver overview
Added information about the driver selection process. Added additional details about crypto drivers. NCSDK-33433, NCSDK-33436, NCSDK-30042. Signed-off-by: Grzegorz Ferenc <[email protected]>
1 parent 047427b commit 768c10e

File tree

8 files changed

+861
-75
lines changed

8 files changed

+861
-75
lines changed

doc/nrf/glossary.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ Glossary
189189
In the |NCS|, this term is used in the context of `ARM TrustZone`_ and :ref:`app_boards_spe_nspe` (:term:`Non-Secure Processing Environment (NSPE)` and :term:`Secure Processing Environment (SPE)`).
190190

191191
CRACEN
192-
A hardware cryptographic engine within nRF54H devices.
192+
A hardware crypto accelerator within nRF54L Series devices, and the name of the :term:`cryptographic driver <Cryptographic driver>` in the |NCS|.
193+
For more information, see :ref:`ug_nrf54l_crypto_kmu_cracen_peripherals` on the :ref:`ug_nrf54l_cryptography` page.
194+
195+
Cryptographic driver
196+
A specialized component that implements specific cryptographic algorithms or provides access to hardware accelerators.
197+
See :ref:`crypto_drivers` for more information.
193198

194199
Data Terminal Ready (DTR)
195200
A control signal in RS-232 serial communications transmitted from data terminal equipment, such as a computer, to data communication equipment.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ The nrf_oberon driver may then be disabled by using the Kconfig option :kconfig:
6464
On nRF54L Series devices, CRACEN is the only source of entropy.
6565
Therefore, it is not possible to disable the :kconfig:option:`CONFIG_PSA_CRYPTO_DRIVER_CRACEN` Kconfig option when the Zephyr entropy driver is enabled.
6666

67-
6867
.. _nrf_security_drivers_config_multiple:
6968

7069
Configuring multiple drivers
@@ -103,7 +102,7 @@ When multiple enabled drivers support the same cryptographic feature, the config
103102
Configuring cryptographic features
104103
**********************************
105104

106-
You can enable a cryptographic feature or algorithm using `CONFIG_PSA_WANT_ALG_*`_ Kconfig options, which are specific for PSA Crypto API configurations.
105+
You can enable a cryptographic feature or algorithm using `CONFIG_PSA_WANT_*`_ Kconfig options, which are specific for PSA Crypto API configurations.
107106
For example, to enable the AES algorithm, set the :kconfig:option:`CONFIG_PSA_WANT_ALG_AES` Kconfig option.
108107

109108
For a list of supported cryptographic features and algorithms and the Kconfig options to enable them, see :ref:`ug_crypto_supported_features`.

doc/nrf/links.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,8 @@
644644
.. _`CONFIG_SSF_PSA_CRYPTO_SERVICE_ENABLED`: https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#!CONFIG_SSF_PSA_CRYPTO_SERVICE_ENABLED
645645
.. _`Matter factory data Kconfig options`: https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#!CHIP_FACTORY_DATA
646646
.. _`Kconfig search results`: https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#!CONFIG_PM_PARTITION_SIZE
647-
.. _`CONFIG_PSA_WANT_ALG_*`: https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#!CONFIG_PSA_WANT_ALG
647+
.. _`CONFIG_PSA_WANT_*`: https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#!CONFIG_PSA_WANT_
648+
.. _`CONFIG_PSA_USE_*`: https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#!CONFIG_PSA_USE_
648649

649650
.. _`Threads`: https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/kernel/services/threads/index.html
650651

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ Security
120120

121121
* Added the new section about :ref:`ug_crypto_index`.
122122
The new section includes pages about :ref:`ug_crypto_architecture` (new page) and :ref:`crypto_drivers` (moved from :ref:`nrf_security` library).
123-
* Updated the :ref:`ug_tfm_logging` page with more details about how to configure logging on the same UART instance as the application for nRF5340 and nRF91 Series devices.
123+
124+
* Updated:
125+
126+
* The :ref:`ug_tfm_logging` page with more details about how to configure logging on the same UART instance as the application for nRF5340 and nRF91 Series devices.
127+
* The :ref:`crypto_drivers` page with more details about the driver selection process.
124128

125129
Protocols
126130
=========

doc/nrf/security/crypto/crypto_architecture.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ In this figure:
2525

2626
* Application calls the PSA Crypto implementation through the PSA Crypto API.
2727
* The PSA Crypto API implementation is an abstraction layer that manages cryptographic operations, key handling, and driver coordination.
28-
The implementations can be different, but they should all conform to the PSA Crypto specification.
29-
* Crypto driver is a specialized component that implements specific cryptographic algorithms or provides access to hardware accelerators.
28+
The implementations can be different, but they should all conform to the PSA Crypto API standard.
29+
* Cryptographic driver is a specialized component that implements specific cryptographic algorithms or provides access to hardware accelerators.
3030
* Storage integration provides persistent and secure storage capabilities through standardized PSA Secure Storage APIs.
3131
It implements storage interfaces that allow the PSA Crypto implementation to securely store and retrieve keys, ensuring proper protection of sensitive material throughout its lifecycle.
32+
* Hardware platform is the physical device with security features, such as cryptographic hardware engines or secure storage.
3233

3334
.. _ug_crypto_architecture_interaction_flow:
3435

@@ -80,6 +81,12 @@ The Oberon PSA Crypto is a library that serves as the central component managing
8081
The Oberon PSA Crypto acts as the implementation provider, directly exposing the PSA Crypto API to applications.
8182
Each driver can implement support for different subsets of cryptographic algorithms, providing software support for algorithms that hardware cannot support.
8283

84+
This implementation standard is suitable for applications that prioritize simplicity and do not require the additional security isolation provided by TF-M.
85+
It offers direct access to cryptographic functionality with minimal overhead, making it ideal for resource-constrained applications.
86+
87+
Driver selection in the Oberon PSA Crypto implementation
88+
--------------------------------------------------------
89+
8390
The following figure shows the driver library selection through the driver wrapper, one of the internal modules of Oberon PSA Crypto:
8491

8592
.. figure:: ../images/psa_certified_api_lib_selection.svg
@@ -88,8 +95,7 @@ The following figure shows the driver library selection through the driver wrapp
8895

8996
Oberon PSA Crypto driver library selection
9097

91-
This implementation standard is suitable for applications that prioritize simplicity and do not require the additional security isolation provided by TF-M.
92-
It offers direct access to cryptographic functionality with minimal overhead, making it ideal for resource-constrained applications.
98+
For more information about the driver selection, see :ref:`crypto_drivers`.
9399

94100
Storage integration for the Oberon PSA Crypto implementation
95101
------------------------------------------------------------
@@ -114,23 +120,29 @@ The TF-M Crypto Service implementation provides PSA Crypto API access through Tr
114120

115121
TF-M Crypto Service implementation
116122

123+
In this architecture, TF-M implements the secure cryptographic service using the existing Oberon PSA Core and its associated drivers within the secure environment.
124+
Additionally, TF-M integrates key storage using its internal mechanisms, offering secure key management through :ref:`Internal Trusted Storage <ug_tfm_services_its>` and :ref:`Protected Storage <tfm_partition_ps>`.
125+
117126
This implementation leverages TF-M's Secure Processing Environment (SPE) to isolate cryptographic operations from the Non-Secure Processing Environment (NSPE).
118127
TF-M is built on top of TrustZone technology and isolates the PSA Crypto API as non-secure callable calls into a secure processing environment.
128+
Cryptographic keys are stored and isolated in the SPE, ensuring they are not accessible by the application running in the NSPE.
129+
The cryptographic drivers (nrf_cc3xx, nrf_oberon, and CRACEN) are available within the secure environment, providing consistent cryptographic capabilities.
119130

120131
.. figure:: ../images/tfm_psa_crypto_api_nspe_spe.svg
121132
:alt: TF-M Crypto Service implementation in the NSPE and SPE
122133
:align: center
123134

124135
TF-M Crypto Service implementation in the NSPE and SPE
125136

126-
In this architecture, TF-M implements the secure cryptographic service using the existing Oberon PSA Core and its associated drivers within the secure environment.
127-
Cryptographic keys are stored and isolated in the SPE, ensuring they are not accessible by the application running in the NSPE.
128-
The same cryptographic drivers (nrf_cc3xx, nrf_oberon, and CRACEN) are available within the secure environment, providing consistent cryptographic capabilities.
129-
Additionally, TF-M integrates key storage using its internal mechanisms, offering secure key management through :ref:`Internal Trusted Storage <ug_tfm_services_its>` and :ref:`Protected Storage <tfm_partition_ps>`.
130-
131-
This implementation standard is mandatory for applications requiring PSA Certified security levels and provides the highest level of security through hardware-enforced isolation.
137+
This implementation standard is mandatory for applications requiring higher `PSA Certified security levels <PSA Certified IoT Security Framework_>`_ and provides the highest level of security through hardware-enforced isolation.
132138
It ensures that cryptographic operations and key material remain protected even if the non-secure application is compromised.
133139

140+
Driver selection in the TF-M Crypto Service implementation
141+
----------------------------------------------------------
142+
143+
The TF-M Crypto Service implementation uses the same driver selection mechanism as the Oberon PSA Crypto implementation.
144+
For more information about the driver selection, see :ref:`crypto_drivers`.
145+
134146
Storage integration for the TF-M Crypto Service implementation
135147
--------------------------------------------------------------
136148

0 commit comments

Comments
 (0)