nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
crypto_driver_contexts_key_derivation.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef PSA_CRYPTO_DRIVER_CONTEXTS_KEY_DERIVATION_H
8#define PSA_CRYPTO_DRIVER_CONTEXTS_KEY_DERIVATION_H
9
10#include "psa/crypto_driver_common.h"
11
12/* Include the context structure definitions for enabled drivers. */
13
14#ifdef PSA_NEED_OBERON_KEY_DERIVATION_DRIVER
15#include "oberon_key_derivation.h"
16#endif
17#ifdef PSA_NEED_OBERON_PAKE_DRIVER
18#include "oberon_pake.h"
19#endif
20#ifdef PSA_NEED_OBERON_CTR_DRBG_DRIVER
21#include "oberon_ctr_drbg.h"
22#endif
23#ifdef PSA_NEED_OBERON_HMAC_DRBG_DRIVER
24#include "oberon_hmac_drbg.h"
25#endif
26
27#if defined(PSA_NEED_CRACEN_KEY_DERIVATION_DRIVER) || defined(PSA_NEED_CRACEN_PAKE_DRIVER)
29#endif
30
31#if defined(PSA_CRYPTO_DRIVER_IRONSIDE)
32#include "ironside_psa_types.h"
33#endif
34
35/*
36 * Define the context to be used for an operation that is executed through the
37 * PSA Driver wrapper layer as the union of all possible drivers' contexts.
38 *
39 * The union members are the driver's context structures, and the member names
40 * are formatted as `'drivername'_ctx`.
41 */
42
43typedef union {
44 /* Make sure this union is always non-empty */
45 unsigned int dummy;
46#ifdef PSA_NEED_OBERON_KEY_DERIVATION_DRIVER
47 oberon_key_derivation_operation_t oberon_kdf_ctx;
48#endif
49#ifdef PSA_NEED_CRACEN_KEY_DERIVATION_DRIVER
51#endif
53
54typedef union {
55 /* Make sure this union is always non-empty */
56 unsigned int dummy;
57#ifdef PSA_NEED_OBERON_PAKE_DRIVER
58 oberon_pake_operation_t oberon_pake_ctx;
59#endif
60#ifdef PSA_NEED_CRACEN_PAKE_DRIVER
61 cracen_pake_operation_t cracen_pake_ctx;
62#endif
63#ifdef PSA_CRYPTO_DRIVER_IRONSIDE
64 ironside_psa_pake_operation_t ironside_pake_ctx;
65#endif
67
68typedef union {
69 /* Make sure this union is always non-empty */
70 unsigned int dummy;
71#ifdef PSA_NEED_OBERON_CTR_DRBG_DRIVER
72 oberon_ctr_drbg_context_t oberon_ctr_drbg_ctx;
73#endif
74#ifdef PSA_NEED_OBERON_HMAC_DRBG_DRIVER
75 oberon_hmac_drbg_context_t oberon_hmac_drbg_ctx;
76#endif
78
79#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_KEY_DERIVATION_H */
Definition cracen_psa_primitives.h:426
Definition cracen_psa_primitives.h:621
unsigned int dummy
Definition crypto_driver_contexts_key_derivation.h:45
Definition crypto_driver_contexts_key_derivation.h:43
unsigned int dummy
Definition crypto_driver_contexts_key_derivation.h:56
Definition crypto_driver_contexts_key_derivation.h:54
unsigned int dummy
Definition crypto_driver_contexts_key_derivation.h:70
Definition crypto_driver_contexts_key_derivation.h:68