MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClMac_Functions.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-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 
19 #ifndef MCUXCLMAC_FUNCTIONS_H_
20 #define MCUXCLMAC_FUNCTIONS_H_
21 
22 #include <mcuxClConfig.h> // Exported features flags header
23 #include <mcuxClSession_Types.h>
24 #include <mcuxClKey_Types.h>
25 #include <mcuxClMac_Types.h>
26 #include <mcuxClCore_Platform.h>
27 #include <mcuxClCore_Buffer.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
40 /****************************************************************************/
41 /* ONESHOT */
42 /****************************************************************************/
43 
86  mcuxClSession_Handle_t session,
88  mcuxClMac_Mode_t mode,
90  uint32_t inLength,
91  mcuxCl_Buffer_t pMac,
92  uint32_t * const pMacLength
93 );
94  /* mcuxClMac_OneShot */
98 
99 
100 /****************************************************************************/
101 /* MULTIPART */
102 /****************************************************************************/
103 
143  mcuxClSession_Handle_t session,
144  mcuxClMac_Context_t * const pContext,
145  mcuxClKey_Handle_t key,
146  mcuxClMac_Mode_t mode
147 ); /* init */
148 
182  mcuxClSession_Handle_t session,
183  mcuxClMac_Context_t * const pContext,
185  uint32_t inLength
186 ); /* update */
187 
223  mcuxClSession_Handle_t session,
224  mcuxClMac_Context_t * const pContext,
225  mcuxCl_Buffer_t pMac,
226  uint32_t * const pMacLength
227 ); /* finalize compute */
228  /* mcuxClMac_MultiPart */
232  /* mcuxClMac_Functions */
236 
237 #ifdef __cplusplus
238 } /* extern "C" */
239 #endif
240 
241 #endif /* MCUXCLMAC_FUNCTIONS_H_ */
uint32_t mcuxClMac_Status_t
Type for Mac component error codes.
Definition: mcuxClMac_Types.h:44
mcuxClMac_Status_t mcuxClMac_process(mcuxClSession_Handle_t session, mcuxClMac_Context_t *const pContext, mcuxCl_InputBuffer_t pIn, uint32_t inLength)
Data processing for a multipart MAC computation.
const mcuxClMac_ModeDescriptor_t *const mcuxClMac_Mode_t
MAC mode/algorithm type.
Definition: mcuxClMac_Types.h:67
const uint8_t *const mcuxCl_InputBuffer_t
Input buffer typeThis type provides a pointer to the memory location that should be used to read inpu...
Definition: mcuxClCore_Buffer.h:42
struct mcuxClMac_Context mcuxClMac_Context_t
Mac context type.
Definition: mcuxClMac_Types.h:118
mcuxClMac_Status_t mcuxClMac_compute(mcuxClSession_Handle_t session, mcuxClKey_Handle_t key, mcuxClMac_Mode_t mode, mcuxCl_InputBuffer_t pIn, uint32_t inLength, mcuxCl_Buffer_t pMac, uint32_t *const pMacLength)
One-shot message authentication code (MAC) computation function.
Type definitions for the mcuxClSession component.
Type definitions for the mcuxClMac component.
Type definitions for the mcuxClKey component.
mcuxClKey_Descriptor_t *const mcuxClKey_Handle_t
Key handle type.
Definition: mcuxClKey_Types.h:88
uint8_t *const mcuxCl_Buffer_t
Generic buffer typeThis type provides a pointer to the memory location that can be used for both read...
Definition: mcuxClCore_Buffer.h:51
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition: mcuxClSession_Types.h:133
mcuxClMac_Status_t mcuxClMac_finish(mcuxClSession_Handle_t session, mcuxClMac_Context_t *const pContext, mcuxCl_Buffer_t pMac, uint32_t *const pMacLength)
Finalize a MAC generation for a multipart MAC computation.
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:125
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition: mcuxCsslFlowProtection.h:81
mcuxClMac_Status_t mcuxClMac_init(mcuxClSession_Handle_t session, mcuxClMac_Context_t *const pContext, mcuxClKey_Handle_t key, mcuxClMac_Mode_t mode)
Initialization for a multipart MAC computation.