MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClPkc_Types.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2021, 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
40#ifndef MCUXCLPKC_TYPES_H
41#define MCUXCLPKC_TYPES_H
42
43
44#include <mcuxClCore_Platform.h>
46#include <mcuxClCore_Macros.h>
48
49
56
57
58/**********************************************
59 * CONSTANTS
60 **********************************************/
61
62
63/**********************************************
64 * TYPEDEFS
65 **********************************************/
74typedef uint32_t mcuxClPkc_Status_t;
75
80
81#define MCUXCLPKC_STATUS_OK ((mcuxClPkc_Status_t) 0x0AAA2E03u)
82#define MCUXCLPKC_STATUS_NOK ((mcuxClPkc_Status_t) 0x0AAA53FCu) /* MCUXCLPKC_STATUS_ */
86
87
88/**********************************************************/
89/* Helper macros */
90/**********************************************************/
96
98#define MCUXCLPKC_ALIGN_TO_PKC_WORDSIZE(size) \
99 MCUXCLCORE_ALIGN_TO_WORDSIZE(MCUXCLPKC_WORDSIZE, size)
100
102#define MCUXCLPKC_PACKARGS4(byte3_MSByte, byte2, byte1, byte0_LSByte) \
103 ( ((uint32_t) (byte3_MSByte) << 24u) | ((uint32_t) (byte2) << 16u) \
104 | ((uint32_t) (byte1) << 8u) | ((uint32_t) (byte0_LSByte)) )
105
107#define MCUXCLPKC_PACKARGS2(hi8, lo8) \
108 ( ((uint16_t) (hi8) << 8u) | ((uint16_t) (lo8)) )
109
110
111/**********************************************************/
112/* PKC information */
113/**********************************************************/
114#define MCUXCLPKC_WORDSIZE 8u
115
116 /* MCUXCLPKC_MISC_ */
120 /* mcuxClEcc_Macros */
124
125#endif /* #MCUXCLPKC_TYPES_H */
Definition of function identifiers for the flow protection mechanism.
Definition of macros.
Provides the API for the CSSL flow protection mechanism.
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition mcuxCsslFlowProtection.h:101
uint32_t mcuxClPkc_Status_t
Type for error codes used by PKC component functions.
Definition mcuxClPkc_Types.h:74
mcuxClPkc_Status_t mcuxClPkc_Status_Protected_t
Deprecated type for error codes used by code-flow protected PKC component functions.
Definition mcuxClPkc_Types.h:79