MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClKey_Types.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2023 NXP */
3/* */
4/* SPDX-License-Identifier: BSD-3-Clause */
5/* */
6/* Redistribution and use in source and binary forms, with or without */
7/* modification, are permitted provided that the following conditions are */
8/* met: */
9/* */
10/* 1. Redistributions of source code must retain the above copyright */
11/* notice, this list of conditions and the following disclaimer. */
12/* */
13/* 2. Redistributions in binary form must reproduce the above copyright */
14/* notice, this list of conditions and the following disclaimer in the */
15/* documentation and/or other materials provided with the distribution. */
16/* */
17/* 3. Neither the name of the copyright holder nor the names of its */
18/* contributors may be used to endorse or promote products derived from */
19/* this software without specific prior written permission. */
20/* */
21/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS */
22/* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
23/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A */
24/* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
25/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
26/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
27/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */
28/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
29/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
30/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
31/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
32/*--------------------------------------------------------------------------*/
33
38
39#ifndef MCUXCLKEY_TYPES_H_
40#define MCUXCLKEY_TYPES_H_
41
42#include <stdint.h>
43#include <stdbool.h>
44#include <mcuxClConfig.h> // Exported features flags header
45#include <mcuxCsslAnalysis.h>
48#include <mcuxClBuffer.h>
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54/**********************************************
55 * TYPEDEFS
56 **********************************************/
63
67typedef uint32_t mcuxClKey_Status_t;
68
72typedef uint16_t mcuxClKey_AlgorithmId_t;
73
77typedef uint32_t mcuxClKey_Size_t;
78
83
84/* Forward declaration */
85struct mcuxClKey_Protection;
86
93struct mcuxClKey_Descriptor;
94
101typedef struct mcuxClKey_Descriptor mcuxClKey_Descriptor_t;
102
109
116struct mcuxClKey_TypeDescriptor;
117
124typedef struct mcuxClKey_TypeDescriptor mcuxClKey_TypeDescriptor_t;
125
132
139
146struct mcuxClKey_ProtectionDescriptor;
147
154typedef struct mcuxClKey_ProtectionDescriptor mcuxClKey_ProtectionDescriptor_t;
155
162
163#ifdef MCUXCL_FEATURE_KEY_AGREEMENT
167struct mcuxClKey_Agreement_AdditionalInput{
169 uint32_t size;
170};
171
172typedef struct mcuxClKey_Agreement_AdditionalInput mcuxClKey_Agreement_AdditionalInput_t;
173
180struct mcuxClKey_AgreementDescriptor;
181
188typedef struct mcuxClKey_AgreementDescriptor mcuxClKey_AgreementDescriptor_t;
189
195typedef const mcuxClKey_AgreementDescriptor_t * const mcuxClKey_Agreement_t;
196
197#endif /* MCUXCL_FEATURE_KEY_AGREEMENT */
198
199#ifdef MCUXCL_FEATURE_KEY_SELFTEST
200
207struct mcuxClKey_TestDescriptor;
208
215typedef struct mcuxClKey_TestDescriptor mcuxClKey_TestDescriptor_t;
216
222typedef const mcuxClKey_TestDescriptor_t * const mcuxClKey_Test_t;
223#endif /* MCUXCL_FEATURE_KEY_SELFTEST */
230struct mcuxClKey_GenerationDescriptor;
231
238typedef struct mcuxClKey_GenerationDescriptor mcuxClKey_GenerationDescriptor_t;
239
246
247
248#ifdef MCUXCL_FEATURE_KEY_DERIVATION
252struct mcuxClKey_DerivationAlgorithmDescriptor;
253
257typedef struct mcuxClKey_DerivationAlgorithmDescriptor mcuxClKey_DerivationAlgorithmDescriptor_t;
258
262typedef const mcuxClKey_DerivationAlgorithmDescriptor_t * const mcuxClKey_DerivationAlgorithm_t;
263
267struct mcuxClKey_DerivationInput {
269 uint32_t size;
270};
271
275typedef struct mcuxClKey_DerivationInput mcuxClKey_DerivationInput_t;
276
283struct mcuxClKey_DerivationMode;
284
291typedef struct mcuxClKey_DerivationMode mcuxClKey_DerivationMode_t;
292
299typedef const mcuxClKey_DerivationMode_t * mcuxClKey_Derivation_t;
300
305extern const mcuxClKey_TypeDescriptor_t mcuxClKey_TypeDescriptor_derivationKey_variableLength;
306
310
311MCUX_CSSL_ANALYSIS_START_SUPPRESS_DECLARED_BUT_NEVER_REFERENCED("Consumed by user / customer. Hence, it is declared but never referenced. ")
312static const mcuxClKey_Type_t mcuxClKey_Type_derivationKey_variableLength = &mcuxClKey_TypeDescriptor_derivationKey_variableLength;
313MCUX_CSSL_ANALYSIS_STOP_SUPPRESS_DECLARED_BUT_NEVER_REFERENCED()
314#endif /* MCUXCL_FEATURE_KEY_DERIVATION */
315
316 /* mcuxClKey_Types */
320
321#ifdef __cplusplus
322} /* extern "C" */
323#endif
324
325#endif /* MCUXCLKEY_TYPES_H_ */
Top-level include file for the mcuxClBuffer component.
Definition of function identifiers for the flow protection mechanism.
Provides the API for the CSSL flow protection mechanism.
const uint8_t * mcuxCl_InputBuffer_t
Input buffer type.
Definition mcuxClBuffer_Pointer.h:58
struct mcuxClKey_Descriptor mcuxClKey_Descriptor_t
Key descriptor type.
Definition mcuxClKey_Types.h:101
struct mcuxClKey_ProtectionDescriptor mcuxClKey_ProtectionDescriptor_t
Key protection mechanism descriptor type.
Definition mcuxClKey_Types.h:154
uint16_t mcuxClKey_AlgorithmId_t
Type for algorithm based key id.
Definition mcuxClKey_Types.h:72
mcuxClKey_TypeDescriptor_t * mcuxClKey_CustomType_t
Custom key type handle type.
Definition mcuxClKey_Types.h:138
uint32_t mcuxClKey_Size_t
Type for algorithm based key size.
Definition mcuxClKey_Types.h:77
mcuxClKey_Status_t mcuxClKey_Status_Protected_t
Deprecated type for Key component error codes, returned by functions with code-flow protection.
Definition mcuxClKey_Types.h:82
const mcuxClKey_TypeDescriptor_t * mcuxClKey_Type_t
Key type handle type.
Definition mcuxClKey_Types.h:131
uint32_t mcuxClKey_Status_t
Type for Key component error codes.
Definition mcuxClKey_Types.h:67
struct mcuxClKey_GenerationDescriptor mcuxClKey_GenerationDescriptor_t
Key generation descriptor type.
Definition mcuxClKey_Types.h:238
const mcuxClKey_ProtectionDescriptor_t * mcuxClKey_Protection_t
Key protection mechanism type.
Definition mcuxClKey_Types.h:161
const mcuxClKey_GenerationDescriptor_t *const mcuxClKey_Generation_t
Key generation type.
Definition mcuxClKey_Types.h:245
struct mcuxClKey_TypeDescriptor mcuxClKey_TypeDescriptor_t
Key type descriptor type.
Definition mcuxClKey_Types.h:124
mcuxClKey_Descriptor_t *const mcuxClKey_Handle_t
Key handle type.
Definition mcuxClKey_Types.h:108
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition mcuxCsslFlowProtection.h:101