MCUX CLNS MCUX Crypto Library Normal Secure |

mcuxClCss_Hmac.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
29 #ifndef MCUXCLCSS_HMAC_H_
30 #define MCUXCLCSS_HMAC_H_
31
32 #include <mcuxClCss_Common.h> // Common functionality
33
34 /**********************************************
35 * MACROS
36 **********************************************/
49 #define MCUXCLCSS_HMAC_EXTERNAL_KEY_ENABLE 1U
50 #define MCUXCLCSS_HMAC_EXTERNAL_KEY_DISABLE 0U
51
55 #define MCUXCLCSS_HMAC_PADDED_KEY_SIZE ((size_t) 64U)
56 #define MCUXCLCSS_HMAC_OUTPUT_SIZE ((size_t) 32U)
57
61 /**********************************************
62 * TYPEDEFS
63 **********************************************/
64
75 typedef union
76 {
77 struct
78 {
79 uint32_t value;
80 } word;
81 struct
82 {
83 uint32_t :13;
84 uint32_t extkey :1;
85 uint32_t :18;
86 } bits;
87 } mcuxClCss_HmacOption_t;
92 /**********************************************
93 * FUNCTIONS
94 **********************************************/
147 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClCss_Hmac_Async)
148 MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Hmac_Async(
149 mcuxClCss_HmacOption_t options,
150 mcuxClCss_KeyIndex_t keyIdx,
151 uint8_t const * pPaddedKey,
152 uint8_t const * pInput,
153 size_t inputLength,
154 uint8_t * pOutput
155 );
156
157 #endif /* MCUXCLCSS_HMAC_H_ */
158
MCUXCLCSS_API
#define MCUXCLCSS_API
Marks a function as a public API function of the mcuxClCss component.
Definition: mcuxClCss_Common.h:40
mcuxClCss_KeyIndex_t
uint8_t mcuxClCss_KeyIndex_t
Type for CSS keystore indices.
Definition: mcuxClCss_Types.h:193
mcuxClCss_Common.h
CSSv2 header for common functionality.
mcuxClCss_HmacOption_t::value
uint32_t value
Accesses the bit field as a full word.
Definition: mcuxClCss_Hmac.h:79
mcuxClCss_Hmac_Async
MCUXCLCSS_API mcuxClCss_Status_Protected_t mcuxClCss_Hmac_Async(mcuxClCss_HmacOption_t options, mcuxClCss_KeyIndex_t keyIdx, uint8_t const *pPaddedKey, uint8_t const *pInput, size_t inputLength, uint8_t *pOutput)
Performs HMAC with SHA-256.
mcuxClCss_HmacOption_t::extkey
uint32_t extkey
Whether an external key should be used.
Definition: mcuxClCss_Hmac.h:84
mcuxClCss_HmacOption_t
Command option bit field for mcuxClCss_Hmac_Async.
Definition: mcuxClCss_Hmac.h:75
MCUX_CSSL_FP_FUNCTION_DECL
#define MCUX_CSSL_FP_FUNCTION_DECL(id)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:119
mcuxClCss_Status_Protected_t
uint64_t mcuxClCss_Status_Protected_t
Type for CSS driver protected status codes.
Definition: mcuxClCss_Types.h:183