MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClMac_Types.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020 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 
18 #ifndef MCUXCLMAC_TYPES_H_
19 #define MCUXCLMAC_TYPES_H_
20 
21 #include <stdint.h>
22 #include <stdbool.h>
23 #include <stddef.h>
24 
25 #include <mcuxClKey.h>
26 #include <mcuxClSession.h>
27 #include <mcuxClCss.h>
28 
36 /**********************************************
37  * CONSTANTS
38  **********************************************/
39 /* None */
40 
41 /**********************************************
42  * TYPEDEFS
43  **********************************************/
44 
48 typedef uint32_t mcuxClMac_Status_t;
49 
54 
55 #define MCUXCLMAC_ERRORCODE_OK ((mcuxClMac_Status_t) 0xE4E4E4E4u)
56 #define MCUXCLMAC_ERRORCODE_ERROR ((mcuxClMac_Status_t) 0xE4E44E4Eu)
57 #define MCUXCLMAC_ERRORCODE_FAULT_ATTACK ((mcuxClMac_Status_t) 0xE4E40F0Fu)
58 
59 
65 struct mcuxClMac_Mode;
66 
73 typedef struct mcuxClMac_Mode mcuxClMac_Mode_t;
74 
80 
95 
96 #define MCUXCL_HMAC_SIZE_OF_LENGTH_FIELD 8U
97 #define MCUXCL_HMAC_MIN_PADDING_LENGTH (MCUXCL_HMAC_SIZE_OF_LENGTH_FIELD + 1U)
98 #define MCUXCLMAC_GET_HMAC_INPUTBUFFER_LENGTH(dataLength) (((dataLength + MCUXCL_HMAC_MIN_PADDING_LENGTH) + (MCUXCLCSS_HASH_BLOCK_SIZE_SHA_256) - 1) / (MCUXCLCSS_HASH_BLOCK_SIZE_SHA_256)) * MCUXCLCSS_HASH_BLOCK_SIZE_SHA_256
99 
100 
106 struct mcuxClMac_Context;
107 
118 typedef struct mcuxClMac_Context mcuxClMac_Context_t;
119 
124 struct mcuxClMac_WaCpu_t;
125 
131  /* mcuxClMac_Types */
135 
136 #endif /* MCUXCLMAC_TYPES_H_ */
uint32_t mcuxClMac_Status_t
Type for Mac component error codes.
Definition: mcuxClMac_Types.h:48
struct mcuxClMac_Context mcuxClMac_Context_t
Mac context type.
Definition: mcuxClMac_Types.h:118
Top-level include file for the mcuxClKey component.
struct mcuxClMac_WaCpu_t mcuxClMac_WaCpu_t
Mac Cpu Work Area type.
Definition: mcuxClMac_Types.h:130
const mcuxClMac_Mode_t mcuxClMac_Mode_HMAC_SHA2_256
Mode definition for HMAC_SHA2_256.
struct mcuxClMac_Mode mcuxClMac_Mode_t
Mac Mode type.
Definition: mcuxClMac_Types.h:73
Top-level include file for the mcuxClSession component.
Top-level include file for the CSSv2 driver.
uint64_t mcuxClMac_Status_Protected_t
Type for error codes used by code-flow protected Mac component functions.
Definition: mcuxClMac_Types.h:53
const mcuxClMac_Mode_t mcuxClMac_Mode_CMAC
Mode definition for CMAC.