Skip to content

Commit e60ece6

Browse files
greg-ferrlubos
authored andcommitted
doc: crypto: add crypto_driver_contexts_* API
Added a container for Nordic-specific crypto driver contexts. This container adds doxygen groups for the crypto driver contexts files at subsys/nrf_security/include/psa. It also links directly to the Oberon API module and other files used in the Nordic implementation. NCSDK-30040. Signed-off-by: Grzegorz Ferenc <[email protected]>
1 parent a956b5d commit e60ece6

File tree

3 files changed

+89
-1
lines changed

3 files changed

+89
-1
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,10 @@ Additionally, either :kconfig:option:`CONFIG_CC3XX_BACKEND` or :kconfig:option:`
121121

122122
.. note::
123123
Enabling the CryptoCell by using :kconfig:option:`CONFIG_CC3XX_BACKEND` in a non-secure image of a TF-M build will have no effect.
124+
125+
API documentation
126+
*****************
127+
128+
| Header files: :file:`subsys/nrf_security/include/psa/crypto_driver_contexts_*.h`
129+
130+
.. doxygengroup:: nrf_security_api_structures

doc/nrf/nrf.doxyfile.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,10 @@ WARN_LOGFILE =
959959
INPUT = @DOCSET_SOURCE_BASE@/applications \
960960
@DOCSET_SOURCE_BASE@/lib \
961961
@DOCSET_SOURCE_BASE@/include \
962-
@DOCSET_SOURCE_BASE@/subsys/nrf_security/include
962+
@DOCSET_SOURCE_BASE@/subsys/nrf_security/include/psa/crypto_driver_contexts_composites.h \
963+
@DOCSET_SOURCE_BASE@/subsys/nrf_security/include/psa/crypto_driver_contexts_key_derivation.h \
964+
@DOCSET_SOURCE_BASE@/subsys/nrf_security/include/psa/crypto_driver_contexts_primitives.h \
965+
@DOCSET_SOURCE_BASE@/subsys/nrf_security/include/nrf_security_api_structure.h
963966

964967
# This tag can be used to specify the character encoding of the source files
965968
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/**
8+
* @defgroup nrf_security_api_structures Nordic-specific PSA API structures
9+
* @brief Platform Security Architecture (PSA) API structures for nRF Security
10+
*
11+
* The nRF Security subsystem provides integration between Mbed TLS and
12+
* hardware-accelerated cryptographic libraries through PSA drivers. These structures
13+
* define the implementation-specific context types used in the PSA Crypto API.
14+
*
15+
* The `crypto_driver_contexts_*` files are Nordic-specific implementations
16+
* for the corresponding `crypto_driver_contexts_*` files in the Oberon API. This API is defined
17+
* in sdk-nrf at https://github.com/nrfconnect/sdk-nrf/tree/main/subsys/nrf_security/include/psa and
18+
* should be consulted together with the three Nordic-specific files.
19+
*
20+
* Nordic-specific implementations are designed to extend available cryptographic features
21+
* with hardware acceleration or alternative implementations. The supported drivers include:
22+
* - Arm CryptoCell cc3xx (hardware acceleration for nRF52840, nRF91 Series, and nRF5340)
23+
* - nrf_oberon (optimized cryptographic algorithms)
24+
* - CRACEN (hardware acceleration for nRF54L Series)
25+
*
26+
* For detailed documentation on these drivers, see the nRF Connect SDK documentation:
27+
* https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/security/nrf_security/index.html
28+
*
29+
* The Nordic-specific implementation also uses files located at:
30+
* - https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_primitives.h
31+
*
32+
* @{
33+
*/
34+
35+
/**
36+
* @defgroup psa_crypto_drivers PSA Crypto Drivers
37+
* @brief PSA Crypto driver context structures
38+
*
39+
* @{
40+
*/
41+
42+
/**
43+
* @defgroup psa_crypto_driver_primitives Primitive Crypto Drivers
44+
* @brief Driver context structures for primitive cryptographic operations
45+
*
46+
* These structures define the contexts for primitive cryptographic operations,
47+
* which do not rely on other contexts. They include contexts for hash operations
48+
* and cipher operations implemented by various drivers such as cc3xx, Oberon,
49+
* and CRACEN.
50+
*
51+
* @file crypto_driver_contexts_primitives.h
52+
*/
53+
54+
/**
55+
* @defgroup psa_crypto_driver_composites Composite Crypto Drivers
56+
* @brief Driver context structures for composite cryptographic operations
57+
*
58+
* These structures define the contexts for composite operations,
59+
* which make use of other primitive operations. They include contexts for MAC
60+
* and AEAD operations implemented by various drivers such as cc3xx, Oberon,
61+
* and CRACEN.
62+
*
63+
* @file crypto_driver_contexts_composites.h
64+
*/
65+
66+
/**
67+
* @defgroup psa_crypto_driver_key_derivation Key Derivation Crypto Drivers
68+
* @brief Driver context structures for key derivation operations
69+
*
70+
* These structures define the contexts for key derivation, PAKE, and random
71+
* generation operations implemented by various drivers such as Oberon and CRACEN.
72+
*
73+
* @file crypto_driver_contexts_key_derivation.h
74+
*/
75+
76+
/** @} */
77+
78+
/** @} */

0 commit comments

Comments
 (0)