MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClPkc_Types.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2021, 2023 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 
20 #ifndef MCUXCLPKC_TYPES_H
21 #define MCUXCLPKC_TYPES_H
22 
23 
24 #include <platform_specific_headers.h>
25 #include <mcuxClCore_Platform.h>
27 #include <mcuxCsslFlowProtection.h>
28 
29 
38 /**********************************************
39  * CONSTANTS
40  **********************************************/
41 /* None */
42 
43 
44 /**********************************************
45  * TYPEDEFS
46  **********************************************/
55 typedef uint32_t mcuxClPkc_Status_t;
56 
61 
62 #define MCUXCLPKC_STATUS_OK ((mcuxClPkc_Status_t) 0x0AAA2E03u)
63 #define MCUXCLPKC_STATUS_NOK ((mcuxClPkc_Status_t) 0x0AAA53FCu)
64  /* MCUXCLPKC_STATUS_ */
67 
68 
69 /**********************************************************/
70 /* Helper macros */
71 /**********************************************************/
78 #define MCUXCLPKC_ROUNDUP_SIZE(byteLen) \
79  (((uint32_t) (byteLen) + (uint32_t)MCUXCLPKC_WORDSIZE - (uint32_t)1u) & (~((uint32_t) MCUXCLPKC_WORDSIZE - (uint32_t)1u)))
80 
82 #define MCUXCLPKC_PACKARGS4(byte3_MSByte, byte2, byte1, byte0_LSByte) \
83  ( ((uint32_t) (byte3_MSByte) << 24) | ((uint32_t) (byte2) << 16) \
84  | ((uint32_t) (byte1) << 8) | ((uint32_t) (byte0_LSByte)) )
85 
87 #define MCUXCLPKC_PACKARGS2(hi8, lo8) \
88  ( ((uint16_t) (hi8) << 8) | ((uint16_t) (lo8)) )
89 
90 
91 /**********************************************************/
92 /* PKC information */
93 /**********************************************************/
94 #define MCUXCLPKC_RAM_START_ADDRESS PKC_RAM_ADDR
95 #define MCUXCLPKC_WORDSIZE 8u
96 
97  /* MCUXCLPKC_MISC_ */
101  /* mcuxClEcc_Macros */
105 
106 #endif /* #MCUXCLPKC_TYPES_H */
uint32_t mcuxClPkc_Status_t
Type for error codes used by PKC component functions.
Definition: mcuxClPkc_Types.h:55
Definition of function identifiers for the flow protection mechanism.
Provides the API for the CSSL flow protection mechanism.
mcuxClPkc_Status_t mcuxClPkc_Status_Protected_t
Deprecated type for error codes used by code-flow protected PKC component functions.
Definition: mcuxClPkc_Types.h:60
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition: mcuxCsslFlowProtection.h:81