MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClCipher_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
36
37#ifndef MCUXCLCIPHER_FUNCTIONS_H_
38#define MCUXCLCIPHER_FUNCTIONS_H_
39
40#include <mcuxClConfig.h> // Exported features flags header
41#include <mcuxClSession_Types.h>
42#include <mcuxClKey_Types.h>
43#include <mcuxClCipher_Types.h>
44#include <mcuxClCore_Platform.h>
45#include <mcuxClBuffer.h>
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51
58
59
60
77#ifdef MCUXCL_FEATURE_CIPHERMODES_DMA_NONBLOCKING
86#endif
115#ifdef MCUXCL_FEATURE_CIPHERMODES_DMA_NONBLOCKING
128#endif
139 uint32_t ivLength,
141 uint32_t inLength,
142 mcuxCl_Buffer_t pOut,
143 uint32_t * const pOutLength
144);
145
162#ifdef MCUXCL_FEATURE_CIPHERMODES_DMA_NONBLOCKING
171#endif
200#ifdef MCUXCL_FEATURE_CIPHERMODES_DMA_NONBLOCKING
213#endif
224 uint32_t ivLength,
226 uint32_t inLength,
227 mcuxCl_Buffer_t pOut,
228 uint32_t * const pOutLength
229);
230
231#ifdef MCUXCL_FEATURE_CIPHER_SELFTEST
251MCUX_CSSL_FP_FUNCTION_DECL(mcuxClCipher_selftest)
256);
257#endif /* MCUXCL_FEATURE_CIPHER_SELFTEST */
258
259
300 mcuxClCipher_Context_t * const pContext,
304 uint32_t ivLength
305); /* init encrypt */
306
347 mcuxClCipher_Context_t * const pContext,
351 uint32_t ivLength
352); /* init decrypt */
353
366#ifdef MCUXCL_FEATURE_CIPHERMODES_DMA_NONBLOCKING
375#endif
394#ifdef MCUXCL_FEATURE_CIPHERMODES_DMA_NONBLOCKING
409#endif
413 mcuxClCipher_Context_t * const pContext,
415 uint32_t inLength,
416 mcuxCl_Buffer_t pOut,
417 uint32_t * const pOutLength
418); /* update */
419
452 mcuxClCipher_Context_t * const pContext,
453 mcuxCl_Buffer_t pOut,
454 uint32_t * const pOutLength
455); /* finalize */
456
457
458
460
461
462#ifdef __cplusplus
463} /* extern "C" */
464#endif
465
466#endif /* MCUXCLCIPHER_FUNCTIONS_H_ */
Top-level include file for the mcuxClBuffer component.
Type definitions for the mcuxClCipher component.
Type definitions for the mcuxClKey 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
mcuxClCipher_Status_t mcuxClCipher_process(mcuxClSession_Handle_t session, mcuxClCipher_Context_t *const pContext, mcuxCl_InputBuffer_t pIn, uint32_t inLength, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength)
Multi-part encryption/decryption processing function.
mcuxClCipher_Status_t mcuxClCipher_encrypt(mcuxClSession_Handle_t session, mcuxClKey_Handle_t key, mcuxClCipher_Mode_t mode, mcuxCl_InputBuffer_t pIv, uint32_t ivLength, mcuxCl_InputBuffer_t pIn, uint32_t inLength, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength)
One-shot encryption function.
mcuxClCipher_Status_t mcuxClCipher_init_encrypt(mcuxClSession_Handle_t session, mcuxClCipher_Context_t *const pContext, mcuxClKey_Handle_t key, mcuxClCipher_Mode_t mode, mcuxCl_InputBuffer_t pIv, uint32_t ivLength)
Multi-part encryption initialization function.
mcuxClCipher_Status_t mcuxClCipher_decrypt(mcuxClSession_Handle_t session, mcuxClKey_Handle_t key, mcuxClCipher_Mode_t mode, mcuxCl_InputBuffer_t pIv, uint32_t ivLength, mcuxCl_InputBuffer_t pIn, uint32_t inLength, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength)
One-shot decryption function.
mcuxClCipher_Status_t mcuxClCipher_finish(mcuxClSession_Handle_t session, mcuxClCipher_Context_t *const pContext, mcuxCl_Buffer_t pOut, uint32_t *const pOutLength)
Multi-part encryption/decryption finalization function.
mcuxClCipher_Status_t mcuxClCipher_init_decrypt(mcuxClSession_Handle_t session, mcuxClCipher_Context_t *const pContext, mcuxClKey_Handle_t key, mcuxClCipher_Mode_t mode, mcuxCl_InputBuffer_t pIv, uint32_t ivLength)
Multi-part decryption initialization function.
const mcuxClCipher_TestDescriptor_t *const mcuxClCipher_Test_t
Cipher selftest mode/algorithm type.
Definition mcuxClCipher_Types.h:104
struct mcuxClCipher_Context mcuxClCipher_Context_t
Cipher context type.
Definition mcuxClCipher_Types.h:120
const mcuxClCipher_ModeDescriptor_t *const mcuxClCipher_Mode_t
Cipher mode/algorithm type.
Definition mcuxClCipher_Types.h:81
uint32_t mcuxClCipher_Status_t
Cipher status code.
Definition mcuxClCipher_Types.h:128
mcuxClKey_Descriptor_t *const mcuxClKey_Handle_t
Key handle type.
Definition mcuxClKey_Types.h:111
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