MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClMac_Functions.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2020-2026 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#ifndef MCUXCLMAC_FUNCTIONS_H_
40#define MCUXCLMAC_FUNCTIONS_H_
41
42#include <mcuxClConfig.h> // Exported features flags header
43#include <mcuxClSession_Types.h>
44#include <mcuxClKey_Types.h>
45#include <mcuxClMac_Types.h>
46#include <mcuxClCore_Platform.h>
47#include <mcuxClBuffer.h>
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
59
60/****************************************************************************/
61/* ONESHOT */
62/****************************************************************************/
63
70
141 mcuxClMac_Mode_t mode,
143 uint32_t inLength,
144 mcuxCl_Buffer_t pMac,
145 uint32_t * const pMacLength
146);
147 /* mcuxClMac_OneShot */
151
152#ifdef MCUXCL_FEATURE_MAC_SELFTEST
174MCUX_CSSL_FP_FUNCTION_DECL(mcuxClMac_selftest)
177 mcuxClMac_Mode_t mode,
178 mcuxClMac_Test_t test
179); /* selftest */
180#endif /* MCUXCL_FEATURE_MAC_SELFTEST */
181
182/****************************************************************************/
183/* MULTIPART */
184/****************************************************************************/
185
192
242 mcuxClMac_Context_t * const pContext,
245); /* init */
246
306 mcuxClMac_Context_t * const pContext,
308 uint32_t inLength
309); /* update */
310
351 mcuxClMac_Context_t * const pContext,
352 mcuxCl_Buffer_t pMac,
353 uint32_t * const pMacLength
354); /* finalize compute */
355 /* mcuxClMac_MultiPart */
359 /* mcuxClMac_Functions */
363
364#ifdef __cplusplus
365} /* extern "C" */
366#endif
367
368#endif /* MCUXCLMAC_FUNCTIONS_H_ */
Top-level include file for the mcuxClBuffer component.
Type definitions for the mcuxClKey component.
Type definitions for the mcuxClMac component.
Type definitions for the mcuxClSession component.
const uint8_t * mcuxCl_InputBuffer_t
Input buffer type.
Definition mcuxClBuffer_Pointer.h:58
uint8_t * mcuxCl_Buffer_t
Input/output buffer type.
Definition mcuxClBuffer_Pointer.h:67
mcuxClKey_Descriptor_t *const mcuxClKey_Handle_t
Key handle type.
Definition mcuxClKey_Types.h:111
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.
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.
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.
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.
const mcuxClMac_ModeDescriptor_t *const mcuxClMac_Mode_t
MAC mode/algorithm type.
Definition mcuxClMac_Types.h:87
uint32_t mcuxClMac_Status_t
Type for Mac component error codes.
Definition mcuxClMac_Types.h:64
struct mcuxClMac_Context mcuxClMac_Context_t
Mac context type.
Definition mcuxClMac_Types.h:142
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition mcuxClSession_Types.h:118
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition mcuxCsslFlowProtection.h:186
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition mcuxCsslFlowProtection.h:158