MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClKey_Types.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2021 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
19 #ifndef MCUXCLKEY_TYPES_H_
20 #define MCUXCLKEY_TYPES_H_
21 
22 #include <stdint.h>
23 #include <stdbool.h>
24 #include <mcuxClCss.h>
25 #include <mcuxClKey_KeyTypes.h>
26 
27 /**********************************************
28  * CONSTANTS
29  **********************************************/
41 #define MCUXCLKEY_STATUS_OK ((mcuxClKey_Status_t) 0xE2E2E2E2u )
42 #define MCUXCLKEY_STATUS_ERROR ((mcuxClKey_Status_t) 0xE2E22E2Eu )
43  /* mcuxClKey_Macros */
48 
49 
50 /**********************************************
51  * TYPEDEFS
52  **********************************************/
63 typedef uint32_t mcuxClKey_Status_t;
64 
69 
74  const uint8_t * pData;
75  uint32_t slot;
77 
81 typedef enum mcuxClKey_LoadLocation {
86 
90 typedef struct mcuxClKey_DstDataProvider {
91  uint8_t * pData;
92  uint32_t byteCount;
93  uint32_t slot;
97 
98 /* Forward declaration */
100 
104 typedef struct mcuxClKey_Descriptor {
107  const uint8_t * pSrcKeyData;
111 
116 
125 
134 
138 typedef struct mcuxClKey_Protection {
144  /* mcuxClKey_Types */
148 
149 
150 /**********************************************
151  * FUNCTIONS
152  **********************************************/
153 /* None */
154 
155 #endif /* MCUXCLKEY_TYPES_H_ */
struct mcuxClKey_DstDataProvider mcuxClKey_DstDataProvider_t
Type of destination information structure.
mcuxClKey_Status_Protected_t(* mcuxClKey_FlushFuncPtr_t)(mcuxClKey_Handle_t key)
Functions to flush a key from coprocessor or memory buffer.
Definition: mcuxClKey_Types.h:133
Use key from memory.
Definition: mcuxClKey_Types.h:83
Type for CSS key store key properties.
Definition: mcuxClCss_Types.h:196
uint32_t slot
Destination key slot.
Definition: mcuxClKey_Types.h:93
Type of destination information structure.
Definition: mcuxClKey_Types.h:90
mcuxClKey_FlushFuncPtr_t flushFunc
Function pointer to a flush function.
Definition: mcuxClKey_Types.h:140
mcuxClCss_KeyProp_t key_properties
Requested properties of the destination key.
Definition: mcuxClKey_Types.h:94
uint32_t protectionTokenLoad
Protection token of the load function.
Definition: mcuxClKey_Types.h:141
Use key from HW IP.
Definition: mcuxClKey_Types.h:84
enum mcuxClKey_LoadLocation mcuxClKey_LoadLocation_t
Type of key location definition.
Key not loaded.
Definition: mcuxClKey_Types.h:82
Type of the key handle.
Definition: mcuxClKey_Types.h:104
uint8_t * pData
Pointer to memory buffer for used as key destination.
Definition: mcuxClKey_Types.h:91
uint64_t mcuxClKey_Status_Protected_t
Type for Key component error codes, returned by functions with code-flow protection.
Definition: mcuxClKey_Types.h:68
Type to map algorithm id and size.
Definition: mcuxClKey_KeyTypes.h:53
Type of source information structure.
Definition: mcuxClKey_Types.h:73
const uint8_t * pData
Pointer to memory buffer with source information.
Definition: mcuxClKey_Types.h:74
uint32_t protectionTokenFlush
Protection token of the flush function.
Definition: mcuxClKey_Types.h:142
mcuxClKey_LoadLocation
Type of key location definition.
Definition: mcuxClKey_Types.h:81
mcuxClKey_SrcAuxDataProvider_t srcAux
Provide aux information for the key.
Definition: mcuxClKey_Types.h:108
mcuxClKey_Status_Protected_t(* mcuxClKey_LoadFuncPtr_t)(mcuxClKey_Handle_t key)
Functions to load a key into coprocessor or memory buffer.
Definition: mcuxClKey_Types.h:124
uint32_t slot
Source key slot.
Definition: mcuxClKey_Types.h:75
mcuxClKey_Type_t type
Define which keytype shall be loaded.
Definition: mcuxClKey_Types.h:105
const uint8_t * pSrcKeyData
Provide source information for the key.
Definition: mcuxClKey_Types.h:107
mcuxClKey_DstDataProvider_t dstKey
Provide destination information for the key.
Definition: mcuxClKey_Types.h:109
struct mcuxClKey_Descriptor mcuxClKey_Descriptor_t
Type of the key handle.
uint32_t mcuxClKey_Status_t
Type for Key component error codes.
Definition: mcuxClKey_Types.h:63
Type to map load and flush functions.
Definition: mcuxClKey_Types.h:138
struct mcuxClKey_SrcAuxDataProvider mcuxClKey_SrcAuxDataProvider_t
Type of source information structure.
mcuxClKey_Descriptor_t * mcuxClKey_Handle_t
Type of opaque key handle.
Definition: mcuxClKey_Types.h:115
uint32_t byteCount
Length field of the destination memory buffer.
Definition: mcuxClKey_Types.h:92
const struct mcuxClKey_Protection * protection
Define which load and flush mechanism shall be used.
Definition: mcuxClKey_Types.h:106
Top-level include file for the CSSv2 driver.
mcuxClKey_LoadLocation_t loadLocation
Defines which key is used.
Definition: mcuxClKey_Types.h:95
mcuxClKey_LoadFuncPtr_t loadFunc
Function pointer to a load function.
Definition: mcuxClKey_Types.h:139
struct mcuxClKey_Protection mcuxClKey_Protection_t
Type to map load and flush functions.
Definition of supported key types in mcuxClKey component.