MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClRsa_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 MCUXCLRSA_FUNCTIONS_H_
20 #define MCUXCLRSA_FUNCTIONS_H_
21 
22 #include <mcuxClConfig.h> // Exported features flags header
23 #include <mcuxClSession.h>
24 #include <mcuxCsslFlowProtection.h>
26 #include <mcuxClKey.h>
27 #include <mcuxClRsa_Types.h>
28 #include <mcuxClCore_Buffer.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
120  mcuxClSession_Handle_t pSession,
121  const mcuxClRsa_Key * const pKey,
122  mcuxCl_InputBuffer_t pMessageOrDigest,
123  const uint32_t messageLength,
124  const mcuxClRsa_SignVerifyMode pPaddingMode,
125  const uint32_t saltLength,
126  const uint32_t options,
127  mcuxCl_Buffer_t pSignature
128 );
129 
203  mcuxClSession_Handle_t pSession,
204  const mcuxClRsa_Key * const pKey,
205  mcuxCl_InputBuffer_t pMessageOrDigest,
206  const uint32_t messageLength,
207  mcuxCl_Buffer_t pSignature,
208  const mcuxClRsa_SignVerifyMode pVerifyMode,
209  const uint32_t saltLength,
210  const uint32_t options,
211  mcuxCl_Buffer_t pOutput
212 );
213 
214 
215 
216 
286  mcuxClSession_Handle_t pSession,
287  mcuxClKey_Type_t type,
288  mcuxClKey_Protection_t protection,
289  mcuxClKey_Handle_t privKey,
290  uint8_t * pPrivData,
291  uint32_t * const pPrivDataLength,
292  mcuxClKey_Handle_t pubKey,
293  uint8_t * pPubData,
294  uint32_t * const pPubDataLength
295  );
296 
297 
367  mcuxClSession_Handle_t pSession,
368  mcuxClKey_Type_t type,
369  mcuxClKey_Protection_t protection,
370  mcuxClKey_Handle_t privKey,
371  uint8_t * pPrivData,
372  uint32_t * const pPrivDataLength,
373  mcuxClKey_Handle_t pubKey,
374  uint8_t * pPubData,
375  uint32_t * const pPubDataLength
376  );
377 
378  /* mcuxClRsa_Functions */
382 
383 #ifdef __cplusplus
384 } /* extern "C" */
385 #endif
386 
387 #endif /* MCUXCLRSA_FUNCTIONS_H_ */
388 
uint32_t mcuxClRsa_Status_t
Type for RSA status codes.
Definition: mcuxClRsa_Types.h:115
Structure type for Rsa key, specifying key type and key entries.
Definition: mcuxClRsa_Types.h:143
const mcuxClKey_TypeDescriptor_t * mcuxClKey_Type_t
Key type handle type.
Definition: mcuxClKey_Types.h:111
Top-level include file for the mcuxClKey component.
mcuxClRsa_Status_t mcuxClRsa_KeyGeneration_Crt(mcuxClSession_Handle_t pSession, mcuxClKey_Type_t type, mcuxClKey_Protection_t protection, mcuxClKey_Handle_t privKey, uint8_t *pPrivData, uint32_t *const pPrivDataLength, mcuxClKey_Handle_t pubKey, uint8_t *pPubData, uint32_t *const pPubDataLength)
Generates an RSA key in CRT format.
mcuxClKey_Descriptor_t *const mcuxClKey_Handle_t
Key handle type.
Definition: mcuxClKey_Types.h:88
mcuxClRsa_SignVerifyMode_t * mcuxClRsa_SignVerifyMode
Pointer type to Sign/Verify mode.
Definition: mcuxClRsa_Types.h:184
Provides the API for the CSSL flow protection mechanism.
const mcuxClKey_ProtectionDescriptor_t * mcuxClKey_Protection_t
Key protection mechanism type.
Definition: mcuxClKey_Types.h:141
Type definitions for the mcuxClRsa component.
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:125
mcuxClRsa_Status_t mcuxClRsa_verify(mcuxClSession_Handle_t pSession, const mcuxClRsa_Key *const pKey, mcuxCl_InputBuffer_t pMessageOrDigest, const uint32_t messageLength, mcuxCl_Buffer_t pSignature, const mcuxClRsa_SignVerifyMode pVerifyMode, const uint32_t saltLength, const uint32_t options, mcuxCl_Buffer_t pOutput)
RSA verify operation.
mcuxClRsa_Status_t mcuxClRsa_KeyGeneration_Plain(mcuxClSession_Handle_t pSession, mcuxClKey_Type_t type, mcuxClKey_Protection_t protection, mcuxClKey_Handle_t privKey, uint8_t *pPrivData, uint32_t *const pPrivDataLength, mcuxClKey_Handle_t pubKey, uint8_t *pPubData, uint32_t *const pPubDataLength)
RSA key generation of private plain key operation.
Top-level include file for the mcuxClSession component.
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition: mcuxClSession_Types.h:133
Definition of function identifiers for the flow protection mechanism.
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition: mcuxCsslFlowProtection.h:81
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
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
mcuxClRsa_Status_t mcuxClRsa_sign(mcuxClSession_Handle_t pSession, const mcuxClRsa_Key *const pKey, mcuxCl_InputBuffer_t pMessageOrDigest, const uint32_t messageLength, const mcuxClRsa_SignVerifyMode pPaddingMode, const uint32_t saltLength, const uint32_t options, mcuxCl_Buffer_t pSignature)
RSA sign operation.