Skip to content

Commit 74133e8

Browse files
committed
doc: security: move configuring PSA Crypto API
Moved the page about configuring PSA Crypto API under security/crypto from the nRF Security lib docs. NCSDK-33433 and NCSDK-33436. Signed-off-by: Grzegorz Ferenc <Grzegorz.Ferenc@nordicsemi.no>
1 parent 768c10e commit 74133e8

File tree

14 files changed

+111
-52
lines changed

14 files changed

+111
-52
lines changed

doc/_utils/redirects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@
549549
("libraries/others/fw_info", "libraries/security/bootloader/fw_info"), # Firmware information
550550
("libraries/nrf_security/index", "libraries/security/nrf_security/index"), # nRF Security (landing page in Security libraries)
551551
("libraries/nrf_security/doc/configuration", "libraries/security/nrf_security/doc/configuration"), # Configuration
552-
("libraries/nrf_security/doc/driver_config", "libraries/security/nrf_security/doc/driver_config"), # Feature configurations and driver support
552+
("libraries/nrf_security/doc/driver_config", "security/crypto/driver_config"), # Feature configurations and driver support (moved to security/crypto for v3.1.0)
553+
("libraries/security/nrf_security/doc/driver_config", "security/crypto/driver_config"),
553554
("libraries/nrf_security/doc/mbed_tls_header", "libraries/security/nrf_security/doc/mbed_tls_header"), # User-provided Mbed TLS configuration header
554555
("libraries/nrf_security/doc/backend_config", "libraries/security/nrf_security/doc/backend_config"), # Legacy configurations and supported features
555556
("libraries/tfm/index", "libraries/security/tfm/index"), # TF-M libraries (landing)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Enabling support for the Encrypted key usage scheme looks as shown in the follow
369369
CONFIG_PSA_WANT_ALG_SP800_108_COUNTER_CMAC=y
370370
CONFIG_PSA_WANT_ALG_GCM=y
371371
372-
The configuration is enabling the key type (AES) and the key size (256 bits) supported by the Encrypted usage scheme as explained in the :ref:`ug_nrf54l_crypto_kmu_supported_key_types` section, and in addition enabling the following :ref:`cryptographic features <nrf_security_driver_config>` supported by the CRACEN driver:
372+
The configuration is enabling the key type (AES) and the key size (256 bits) supported by the Encrypted usage scheme as explained in the :ref:`ug_nrf54l_crypto_kmu_supported_key_types` section, and in addition enabling the following :ref:`cryptographic features <ug_crypto_supported_features>` supported by the CRACEN driver:
373373

374374
* Cipher mode: AES ECB (Electronic CodeBook) mode, no padding
375375
* Message Authentication Code (MAC) cipher: cipher-based MAC (CMAC) cipher

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,23 @@ To enable nRF Security, set the :kconfig:option:`CONFIG_NRF_SECURITY` Kconfig op
1212
You can use nRF Security with the PSA Crypto APIs or the Legacy crypto APIs.
1313

1414
PSA Crypto APIs
15-
.. ncs-include:: driver_config.rst
15+
.. ncs-include:: ../../../../security/crypto/driver_config.rst
1616
:start-after: psa_crypto_support_def_start
1717
:end-before: psa_crypto_support_def_end
1818

19-
For more configuration options, see :ref:`psa_crypto_support`.
19+
The PSA Crypto API is enabled by default when you enable nRF Security.
20+
For more information, see :ref:`psa_crypto_support`.
21+
For the list of supported crypto features, see :ref:`ug_crypto_supported_features`.
22+
23+
Depending on the implementation you are using, the |NCS| builds nRF Security using different versions of the PSA Crypto API.
24+
25+
.. ncs-include:: ../../../../security/psa_certified_api_overview.rst
26+
:start-after: psa_crypto_support_tfm_build_start
27+
:end-before: psa_crypto_support_tfm_build_end
2028

2129
Legacy crypto APIs
2230
.. ncs-include:: backend_config.rst
2331
:start-after: legacy_crypto_support_def_start
2432
:end-before: legacy_crypto_support_def_end
2533

2634
For more configuration options, see :ref:`nrf_security_legacy_config`.
27-
28-
Building with TF-M
29-
******************
30-
31-
If :kconfig:option:`CONFIG_BUILD_WITH_TFM` is enabled together with :kconfig:option:`CONFIG_NRF_SECURITY`, the TF-M secure image will enable the use of the hardware acceleration of Arm CryptoCell.
32-
In this case, the Kconfig configurations in the nRF Security subsystem control the features enabled in TF-M.
33-
34-
.. ncs-include:: driver_config.rst
35-
:start-after: psa_crypto_support_tfm_build_start
36-
:end-before: psa_crypto_support_tfm_build_end

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ This library conforms to the specific revision of Mbed TLS that is supplied thro
2525
:caption: Subpages:
2626

2727
doc/configuration
28-
doc/driver_config
2928
doc/backend_config
3029
doc/mbed_tls_header

doc/nrf/protocols/matter/getting_started/kconfig.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ Configuration options for other modules
2828
***************************************
2929

3030
Because Matter is an application layer protocol on top of the other IPv6-based transport protocols (see :ref:`ug_matter_architecture`), it uses multiple software modules with their own configuration options to provide the communication between the devices and the necessary functionalities.
31-
It uses modules such as Bluetooth® LE, the IPv6 stack (for example :ref:`Thread <ug_thread_configuring>`), :ref:`nRF Security <nrf_security_config>`, or :ref:`MCUboot <mcuboot:mcuboot_ncs>`.
31+
It uses modules such as Bluetooth® LE, the IPv6 stack (for example :ref:`Thread <ug_thread_configuring>`), :ref:`PSA Crypto API <psa_crypto_support>`, or :ref:`MCUboot <mcuboot:mcuboot_ncs>`.
3232
Make sure to review the configuration options of these modules when configuring Matter.

doc/nrf/protocols/thread/configuring.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,14 @@ At the end of the configuration process, you can check the EUI-64 value using Op
211211
212212
.. _ug_thread_configuring_crypto:
213213

214-
Cryptography options
215-
====================
214+
Cryptographic support
215+
=====================
216216

217-
By default, the OpenThread stack uses the :ref:`nrf_security` (nrf_security) for cryptographic operations.
218-
The module provides hardware-accelerated cryptographic functionality on selected Nordic Semiconductor SoCs as well as alternate software-based implementations of the Mbed TLS APIs
217+
By default, the OpenThread stack uses the Mbed TLS crypto toolbox API for cryptographic operations.
218+
The support is implemented through the :ref:`nrf_security` library, which provides hardware-accelerated cryptographic functionality on selected Nordic Semiconductor SoCs as well as alternate software-based implementations of the Mbed TLS APIs.
219219
To use `Mbed TLS`_, modify the :kconfig:option:`OPENTHREAD_MBEDTLS_CHOICE` Kconfig option.
220220

221-
For more information about the configuration and usage of the :ref:`nrf_security`, see the :ref:`nrf_security_config` page.
221+
For more information, see the :ref:`legacy_crypto_support` page.
222222
For more information about the open source Mbed TLS implementation in the |NCS|, see the `sdk-mbedtls`_ repository.
223223

224224
.. _ug_thread_configure_commission:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Security
119119
========
120120

121121
* Added the new section about :ref:`ug_crypto_index`.
122-
The new section includes pages about :ref:`ug_crypto_architecture` (new page) and :ref:`crypto_drivers` (moved from :ref:`nrf_security` library).
122+
The new section includes pages about :ref:`ug_crypto_architecture` (new page), :ref:`crypto_drivers` and :ref:`psa_crypto_support` (both moved from the :ref:`nrf_security` library documentation).
123123

124124
* Updated:
125125

doc/nrf/security/crypto/crypto_architecture.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ Both are based on the `sdk-oberon-psa-crypto`_ library, which offers a lightweig
6464

6565
PSA Crypto API implementations in the |NCS|
6666

67+
.. note::
68+
Depending on the implementation you are using, the |NCS| build system uses different versions of the PSA Crypto API.
69+
70+
.. ncs-include:: ../psa_certified_api_overview.rst
71+
:start-after: psa_crypto_support_tfm_build_start
72+
:end-before: psa_crypto_support_tfm_build_end
73+
6774
.. _ug_crypto_architecture_implementation_standards_oberon:
6875

6976
Oberon PSA Crypto implementation

doc/nrf/libraries/security/nrf_security/doc/driver_config.rst renamed to doc/nrf/security/crypto/driver_config.rst

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _psa_crypto_support:
22
.. _nrf_security_driver_config:
33

4-
Configuring nRF Security with PSA Crypto APIs
5-
#############################################
4+
Configuring PSA Crypto APIs
5+
###########################
66

77
.. contents::
88
:local:
@@ -11,23 +11,25 @@ Configuring nRF Security with PSA Crypto APIs
1111
.. psa_crypto_support_def_start
1212
1313
The PSA Crypto in the |NCS| provides secure crypto operations through standardized :ref:`Platform Security Architecture <ug_psa_certified_api_overview>`.
14-
It implements the cryptographic features either in software, or using hardware accelerators.
15-
16-
The PSA Crypto API is enabled by default when you enable nRF Security with the :kconfig:option:`CONFIG_NRF_SECURITY` Kconfig option.
14+
Using :ref:`one of the two available implementations of the PSA Crypto API <ug_crypto_architecture_implementation_standards>`, the SDK implements the cryptographic features in software or using hardware accelerators, or both.
1715

1816
.. psa_crypto_support_def_end
1917
20-
.. psa_crypto_support_tfm_build_start
18+
.. note::
19+
If you work with the Mbed TLS legacy crypto toolbox, see :ref:`legacy_crypto_support`.
20+
21+
.. _psa_crypto_support_enable:
2122

22-
When you :ref:`build with TF-M<ug_tfm>`, `PSA Certified Crypto API`_ v1.0 is implemented.
23-
Otherwise, when you build without TF-M, v1.2 of the API is used.
23+
Enabling PSA Crypto API
24+
***********************
2425

25-
.. psa_crypto_support_tfm_build_end
26+
To enable the use of PSA Crypto API in your application, enable the following Kconfig options depending on the implementation you want to use:
2627

27-
This page covers the configurations available when using the :ref:`nrf_security_drivers` compatible with the PSA Crypto API.
28-
If you work with the legacy crypto toolbox, see :ref:`legacy_crypto_support`.
28+
* For the :ref:`Oberon PSA Crypto implementation <ug_crypto_architecture_implementation_standards_oberon>`, enable the :kconfig:option:`CONFIG_NRF_SECURITY` Kconfig option.
29+
* For the :ref:`TF-M Crypto Service implementation <ug_crypto_architecture_implementation_standards_tfm>`, enable the :kconfig:option:`CONFIG_NRF_SECURITY` Kconfig option together with the :kconfig:option:`CONFIG_BUILD_WITH_TFM` Kconfig option.
30+
For more information, see :ref:`ug_tfm_building_secure_services`.
2931

30-
.. _nrf_security_drivers_config_single:
32+
.. _psa_crypto_support_single_driver:
3133

3234
Configuring single drivers
3335
**************************
@@ -64,7 +66,7 @@ The nrf_oberon driver may then be disabled by using the Kconfig option :kconfig:
6466
On nRF54L Series devices, CRACEN is the only source of entropy.
6567
Therefore, it is not possible to disable the :kconfig:option:`CONFIG_PSA_CRYPTO_DRIVER_CRACEN` Kconfig option when the Zephyr entropy driver is enabled.
6668

67-
.. _nrf_security_drivers_config_multiple:
69+
.. _psa_crypto_support_multiple_drivers:
6870

6971
Configuring multiple drivers
7072
****************************
@@ -106,3 +108,12 @@ You can enable a cryptographic feature or algorithm using `CONFIG_PSA_WANT_*`_ K
106108
For example, to enable the AES algorithm, set the :kconfig:option:`CONFIG_PSA_WANT_ALG_AES` Kconfig option.
107109

108110
For a list of supported cryptographic features and algorithms and the Kconfig options to enable them, see :ref:`ug_crypto_supported_features`.
111+
112+
Building PSA Crypto API
113+
***********************
114+
115+
Depending on the implementation you are using, the |NCS| build system uses different versions of the PSA Crypto API.
116+
117+
.. ncs-include:: ../psa_certified_api_overview.rst
118+
:start-after: psa_crypto_support_tfm_build_start
119+
:end-before: psa_crypto_support_tfm_build_end

doc/nrf/security/crypto/drivers.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ The following figure shows the Oberon PSA Crypto implementation with the cryptog
4040

4141
.. psa_crypto_driver_table_start
4242
43-
The PSA Crypto implementations in the |NCS| use different driver libraries depending on hardware capabilities and user configuration.
44-
They are organized into hardware and software drivers, with hardware drivers taking precedence over software drivers, which provide fallback options.
43+
The cryptographic drivers are organized into hardware and software drivers.
44+
Hardware drivers take precedence over software drivers, which provide fallback options in case the hardware drivers are not available for a given cryptographic operation for a given hardware platform.
4545

4646
.. list-table:: PSA Crypto drivers in the |NCS|
4747
:widths: auto
@@ -173,7 +173,7 @@ The following table provides an overview of the available directives and their c
173173
174174
.. note::
175175

176-
For the complete overview of the available configuration options, see the :ref:`psa_crypto_support` page.
176+
For the complete overview of the available configuration options, see the :ref:`ug_crypto_supported_features` page.
177177

178178
The nRF Security subsystem checks the directives (set through the Kconfig options) to make the optimal driver selection.
179179
The subsystem combines the ``PSA_WANT_*`` and ``PSA_USE_*`` settings in Kconfig to make the appropriate driver selection for the cryptographic operation:
@@ -216,7 +216,7 @@ At the same time, it ensures all cryptographic operations are supported across d
216216
Driver chaining in the |NCS|
217217
----------------------------
218218

219-
Driver chaining is handled in the |NCS| in runtime when you :ref:`enable multiple drivers at the same time <nrf_security_drivers_config_multiple>` and then enable specific :ref:`nrf_oberon driver features in combination with driver features for hardware acceleration <nrf_security_drivers_config_features>`.
219+
Driver chaining is handled in the |NCS| in runtime when you :ref:`enable multiple drivers at the same time <psa_crypto_support_multiple_drivers>` and then enable specific :ref:`nrf_oberon driver features in combination with driver features for hardware acceleration <nrf_security_drivers_config_features>`.
220220

221221
Common driver chains supported in the nrf_oberon driver include the following cases:
222222

@@ -292,7 +292,7 @@ nrf_cc3xx driver configuration
292292

293293
For configuration details, see the following pages:
294294

295-
* :ref:`nrf_security_driver_config` (both drivers)
295+
* :ref:`psa_crypto_support` (both drivers)
296296
* :ref:`nrf_security_legacy_backend_config` (:ref:`nrf_cc3xx_mbedcrypto_readme` used as legacy backend)
297297

298298
.. note::
@@ -324,7 +324,7 @@ For more information about both the driver and the hardware peripheral, see :ref
324324
CRACEN driver configuration
325325
---------------------------
326326

327-
For configuration details, see :ref:`nrf_security_driver_config`.
327+
For configuration details, see :ref:`psa_crypto_support`.
328328

329329
.. _crypto_drivers_oberon:
330330
.. _nrf_security_drivers_oberon:
@@ -381,7 +381,7 @@ nrf_oberon driver configuration
381381

382382
For configuration details, see the following pages:
383383

384-
* :ref:`nrf_security_driver_config`
384+
* :ref:`psa_crypto_support`
385385
* :ref:`nrf_security_legacy_backend_config` (nrf_oberon used as legacy backend)
386386

387387
API documentation

0 commit comments

Comments
 (0)