MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEcc_WeierECC.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2022-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 
20 #ifndef MCUXCLECC_WEIERECC_H_
21 #define MCUXCLECC_WEIERECC_H_
22 
23 
25 #include <mcuxClSession.h>
26 #include <mcuxClKey.h>
27 #include <mcuxClEcc_Types.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
36 typedef struct {
37  const uint8_t *pP;
38  uint32_t pLen;
39  const uint8_t *pA;
40  const uint8_t *pB;
41  const uint8_t *pG;
42  const uint8_t *pN;
43  uint32_t nLen;
45 
46 
71  mcuxClSession_Handle_t pSession,
72  mcuxClEcc_Weier_DomainParams_t *pEccWeierDomainParams,
73  mcuxClEcc_Weier_BasicDomainParams_t *pEccWeierBasicDomainParams,
74  uint32_t options
75  );
76 
77 #define MCUXCLECC_OPTION_GENERATEPRECPOINT_YES (0x00000001u)
78 #define MCUXCLECC_OPTION_GENERATEPRECPOINT_NO (0x00000002u)
79 #define MCUXCLECC_OPTION_GENERATEPRECPOINT_MASK (MCUXCLECC_OPTION_GENERATEPRECPOINT_YES | MCUXCLECC_OPTION_GENERATEPRECPOINT_NO)
80 #define MCUXCLECC_OPTION_GENERATEPRECPOINT_OFFSET 0u
81 
82 
112  mcuxClKey_CustomType_t customType,
114  mcuxClKey_Size_t size,
115  void *pCustomParams
116  );
117 
118 
119 
120 #ifdef __cplusplus
121 } /* extern "C" */
122 #endif
123 
124 #endif /* MCUXCLECC_WEIERECC_H_ */
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.
Top-level include file for the mcuxClSession component.
uint16_t mcuxClKey_AlgorithmId_t
Type for algorithm based key id.
Definition: mcuxClKey_Types.h:52
mcuxClEcc_Status_t mcuxClEcc_WeierECC_GenerateDomainParams(mcuxClSession_Handle_t pSession, mcuxClEcc_Weier_DomainParams_t *pEccWeierDomainParams, mcuxClEcc_Weier_BasicDomainParams_t *pEccWeierBasicDomainParams, uint32_t options)
ECC Weierstrass custom domain parameter generation function.
Type definitions of mcuxClEcc component.
#define MCUX_CSSL_FP_FUNCTION_DECL(...)
Declaration of a flow protected function.
Definition: mcuxCsslFlowProtection.h:125
uint32_t mcuxClKey_Size_t
Type for algorithm based key size.
Definition: mcuxClKey_Types.h:57
struct mcuxClEcc_Weier_DomainParams mcuxClEcc_Weier_DomainParams_t
Type for Weierstrass ECC domain parameters.
Definition: mcuxClEcc_Types.h:120
mcuxClEcc_Status_t mcuxClEcc_WeierECC_GenerateCustomKeyType(mcuxClKey_CustomType_t customType, mcuxClKey_AlgorithmId_t algoId, mcuxClKey_Size_t size, void *pCustomParams)
Key type constructor.
#define MCUX_CSSL_FP_PROTECTED_TYPE(resultType)
Based on a given base type, builds a return type with flow protection.
Definition: mcuxCsslFlowProtection.h:81
Structure to define basic custom domain parameters for (short) Weierstrass curves with cofactor 1.
Definition: mcuxClEcc_WeierECC.h:36
uint32_t mcuxClEcc_Status_t
Type for mcuxClEcc component return codes.
Definition: mcuxClEcc_Types.h:48
Top-level include file for the mcuxClKey component.
mcuxClKey_TypeDescriptor_t * mcuxClKey_CustomType_t
Custom key type handle type.
Definition: mcuxClKey_Types.h:118