MCUX CLNS MCUX Crypto Library Normal Secure |

mcuxClEcc_Functions.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2020-2021 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
20 #ifndef MCUXCLECC_FUNCTIONS_H_
21 #define MCUXCLECC_FUNCTIONS_H_
22
23
24 #include <stdint.h>
25 #include <mcuxClSession.h>
26 #include <mcuxCsslFlowProtection.h>
27
28 #include <mcuxClEcc_Types.h>
29
30 #include <mcuxClKey.h>
31
32
33 /**********************************************************/
34 /* Public APIs of mcuxClEcc */
35 /**********************************************************/
50 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_KeyGen)
51 mcuxClEcc_Status_Protected_t mcuxClEcc_KeyGen(
52 mcuxClSession_Handle_t pSession,
53 const mcuxClEcc_KeyGen_Param_t * pParam
54 );
55
63 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_Sign)
64 mcuxClEcc_Status_Protected_t mcuxClEcc_Sign(
65 mcuxClSession_Handle_t pSession,
66 const mcuxClEcc_Sign_Param_t * pParam
67 );
68
69 #if 0
70
75 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_CalcPrecomputedPoint)
76 mcuxClEcc_Status_Protected_t mcuxClEcc_CalcPrecomputedPoint(
77 uint8_t * pPkcWorkarea,
78 const mcuxClEcc_CalcPrecomputedPoint_Param_t * pParam
79 );
80 #endif
81
88 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_Verify)
89 mcuxClEcc_Status_Protected_t mcuxClEcc_Verify(
90 mcuxClSession_Handle_t pSession,
91 const mcuxClEcc_Verify_Param_t * pParam
92 );
93
122 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_PointMult)
123 mcuxClEcc_Status_Protected_t mcuxClEcc_PointMult(
124 mcuxClSession_Handle_t pSession,
125 const mcuxClEcc_PointMult_Param_t * pParam
126 );
127
154 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_Mont_DhKeyGeneration)
155 mcuxClEcc_Status_Protected_t mcuxClEcc_Mont_DhKeyGeneration(
156 mcuxClSession_Handle_t session,
157 mcuxClKey_Type_t type,
158 mcuxClKey_Protection_t protection,
159 mcuxClKey_Handle_t privKey,
160 uint8_t * pPrivData,
161 uint32_t * const pPrivDataSize,
162 mcuxClKey_Handle_t pubKey,
163 uint8_t * pPubData,
164 uint32_t * const pPubDataSize
165 );
166
167
192 MCUX_CSSL_FP_FUNCTION_DECL(mcuxClEcc_Mont_DhKeyAgreement)
193 mcuxClEcc_Status_Protected_t mcuxClEcc_Mont_DhKeyAgreement(
194 mcuxClSession_Handle_t session,
195 mcuxClKey_Handle_t key,
196 mcuxClKey_Handle_t otherKey,
197 uint8_t * pOut,
198 uint32_t * const pOutSize
199 ); /* mcuxClEcc_Functions */
203
204
205 #endif /* MCUXCLECC_FUNCTIONS_H_ */
mcuxClEcc_Sign_Param_t
Parameter structure for function mcuxClEcc_Sign.
Definition: mcuxClEcc_Types.h:147
mcuxClSession_Handle_t
mcuxClSession_Descriptor_t *const mcuxClSession_Handle_t
Type for mcuxClSession Handle.
Definition: mcuxClSession_Types.h:110
mcuxClEcc_PointMult
mcuxClEcc_Status_Protected_t mcuxClEcc_PointMult(mcuxClSession_Handle_t pSession, const mcuxClEcc_PointMult_Param_t *pParam)
implements ECC point multiplication.
mcuxClEcc_KeyGen_Param_t
Parameter structure for function mcuxClEcc_KeyGen.
Definition: mcuxClEcc_Types.h:135
mcuxClEcc_Mont_DhKeyGeneration
mcuxClEcc_Status_Protected_t mcuxClEcc_Mont_DhKeyGeneration(mcuxClSession_Handle_t session, mcuxClKey_Type_t type, mcuxClKey_Protection_t protection, mcuxClKey_Handle_t privKey, uint8_t *pPrivData, uint32_t *const pPrivDataSize, mcuxClKey_Handle_t pubKey, uint8_t *pPubData, uint32_t *const pPubDataSize)
implements ECC key pair generation step for a MontDh key agreement according to rfc7748.
mcuxClEcc_Status_Protected_t
uint64_t mcuxClEcc_Status_Protected_t
Type for mcuxClEcc component return codes.
Definition: mcuxClEcc_Types.h:41
mcuxClKey_Descriptor
Type of the key handle.
Definition: mcuxClKey_Types.h:104
mcuxClKey_Type
Type to map algorithm id and size.
Definition: mcuxClKey_KeyTypes.h:53
mcuxClKey.h
Top-level include file for the mcuxClKey component.
mcuxClEcc_Sign
mcuxClEcc_Status_Protected_t mcuxClEcc_Sign(mcuxClSession_Handle_t pSession, const mcuxClEcc_Sign_Param_t *pParam)
implements ECDSA signature generation.
mcuxClEcc_Mont_DhKeyAgreement
mcuxClEcc_Status_Protected_t mcuxClEcc_Mont_DhKeyAgreement(mcuxClSession_Handle_t session, mcuxClKey_Handle_t key, mcuxClKey_Handle_t otherKey, uint8_t *pOut, uint32_t *const pOutSize)
implements ECC key agreement according to rfc7748.
mcuxClEcc_Verify_Param_t
Parameter structure for function mcuxClEcc_Verify.
Definition: mcuxClEcc_Types.h:177
mcuxClEcc_KeyGen
mcuxClEcc_Status_Protected_t mcuxClEcc_KeyGen(mcuxClSession_Handle_t pSession, const mcuxClEcc_KeyGen_Param_t *pParam)
implements ECDSA key generation.
mcuxClKey_Protection
Type to map load and flush functions.
Definition: mcuxClKey_Types.h:138
mcuxClSession.h
Top-level include file for the mcuxClSession component.
mcuxCsslFlowProtection.h
Provides the API for the CSSL flow protection mechanism.
mcuxClEcc_Verify
mcuxClEcc_Status_Protected_t mcuxClEcc_Verify(mcuxClSession_Handle_t pSession, const mcuxClEcc_Verify_Param_t *pParam)
implements ECDSA signature verification.
mcuxClEcc_Types.h
Type definitions of mcuxClEcc component.
MCUX_CSSL_FP_FUNCTION_DECL
#define MCUX_CSSL_FP_FUNCTION_DECL(id)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:119
mcuxClEcc_PointMult_Param_t
Parameter structure for function mcuxClEcc_PointMult.
Definition: mcuxClEcc_Types.h:199