nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
crypto_driver_contexts_primitives.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7/*
8 * Declaration of context structures for use with the PSA driver wrapper
9 * interface. This file contains the context structures for 'primitive'
10 * operations, i.e. those operations which do not rely on other contexts.
11 *
12 * Warning: This file will be auto-generated in the future.
13 *
14 * \note This file may not be included directly. Applications must
15 * include psa/crypto.h.
16 *
17 * \note This header and its content is not part of the Mbed TLS API and
18 * applications must not depend on it. Its main purpose is to define the
19 * multi-part state objects of the PSA drivers included in the cryptographic
20 * library. The definition of these objects are then used by crypto_struct.h
21 * to define the implementation-defined types of PSA multi-part state objects.
22 */
23
24#ifndef PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H
25#define PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H
26
27#include <tf_psa_crypto_common.h>
28
29#include "psa/crypto_driver_common.h"
30
31/* Include the context structure definitions for those drivers that were
32 * declared during the autogeneration process.
33 */
34#if defined(PSA_NEED_CC3XX_CIPHER_DRIVER) || defined(PSA_NEED_CC3XX_HASH_DRIVER)
35#include "cc3xx_crypto_primitives.h"
36#elif defined(PSA_CRYPTO_DRIVER_CRACEN)
38#endif /* PSA_CRYPTO_DRIVER_CC3XX */
39
40#if defined(PSA_NEED_OBERON_CIPHER_DRIVER)
41#include "oberon_cipher.h"
42#endif
43#if defined(PSA_NEED_OBERON_HASH_DRIVER)
44#include "oberon_hash.h"
45#endif
46#if defined(PSA_NEED_OBERON_XOF_DRIVER)
47#include "oberon_xof.h"
48#endif
49
50/* Define the context to be used for an operation that is executed through the
51 * PSA Driver wrapper layer as the union of all possible driver's contexts.
52 *
53 * The union members are the driver's context structures, and the member names
54 * are formatted as `'drivername'_ctx`. This allows for procedural generation
55 * of both this file and the content of psa_crypto_driver_wrappers.c
56 */
57
58typedef union {
59 unsigned int dummy; /* Make sure this union is always non-empty */
60#if defined(PSA_NEED_CC3XX_HASH_DRIVER)
61 cc3xx_hash_operation_t cc3xx_driver_ctx;
62#endif
63#if defined(PSA_NEED_OBERON_HASH_DRIVER)
64 oberon_hash_operation_t oberon_driver_ctx;
65#endif
66#if defined(PSA_CRYPTO_DRIVER_CRACEN)
67 cracen_hash_operation_t cracen_driver_ctx;
68#endif
70
71typedef union {
72 unsigned int dummy; /* Make sure this union is always non-empty */
73#if defined(PSA_NEED_CC3XX_CIPHER_DRIVER)
74 cc3xx_cipher_operation_t cc3xx_driver_ctx;
75#endif /* PSA_CRYPTO_DRIVER_CC3XX */
76#if defined(PSA_NEED_OBERON_CIPHER_DRIVER)
77 oberon_cipher_operation_t oberon_driver_ctx;
78#endif /* PSA_CRYPTO_DRIVER_CC3XX */
79#if defined(PSA_CRYPTO_DRIVER_CRACEN)
80 cracen_cipher_operation_t cracen_driver_ctx;
81#endif
82
84
85typedef union {
86 unsigned int dummy; /* Make sure this union is always non-empty */
87#if defined(PSA_NEED_OBERON_XOF_DRIVER)
88 oberon_xof_operation_t oberon_xof_ctx;
89#endif
91
92#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H */
93/* End of automatically generated file. */
Definition cracen_psa_primitives.h:282
Definition cracen_psa_primitives.h:262
unsigned int dummy
Definition crypto_driver_contexts_primitives.h:72
Definition crypto_driver_contexts_primitives.h:71
unsigned int dummy
Definition crypto_driver_contexts_primitives.h:59
Definition crypto_driver_contexts_primitives.h:58
unsigned int dummy
Definition crypto_driver_contexts_primitives.h:86
Definition crypto_driver_contexts_primitives.h:85