MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClOsccaSm2_ModeConstants.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2022-2023 NXP */
3/* */
4/* NXP Proprietary. 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 */
10/* license terms, then you may not retain, install, activate or otherwise */
11/* use the software. */
12/*--------------------------------------------------------------------------*/
13
21#ifndef MCUXCLOSCCASM2_MODECONSTANTS_H_
22#define MCUXCLOSCCASM2_MODECONSTANTS_H_
23
24#include <mcuxCsslAnalysis.h>
26#ifdef MCUXCL_FEATURE_SM2_SIGNATURE
27#include <mcuxClSignature_Types.h>
28#endif /* MCUXCL_FEATURE_SM2_SIGNATURE */
29#ifdef MCUXCL_FEATURE_KEY_GENERATION
30#include <mcuxClKey_Types.h>
31#endif /* MCUXCL_FEATURE_KEY_GENERATION */
32#ifdef MCUXCL_FEATURE_SM2_CIPHER
33#include <mcuxClCipher_Types.h>
34#endif /* MCUXCL_FEATURE_SM2_CIPHER */
35
36#ifdef __cplusplus
37extern "C"
38{
39#endif
40
41MCUX_CSSL_ANALYSIS_START_PATTERN_EXTERNAL_API_DECLARATIONS()
42
43#ifdef MCUXCL_FEATURE_SM2_INTERNAL
44
45/* The parameters for SM2 256-bit standard elliptic curves in the prime field */
46extern const mcuxClOsccaSm2_DomainParam_t mcuxClOsccaSm2_DomainParams_SM2P256_Std;
47
48/* The parameters for SM2 256-bit extend elliptic curves in the prime field */
49extern const mcuxClOsccaSm2_DomainParam_t mcuxClOsccaSm2_DomainParams_SM2P256_Ext;
50
51#ifdef MCUXCL_FEATURE_SM2_SIGNATURE
55extern const mcuxClSignature_ModeDescriptor_t mcuxClSignature_ModeDescriptor_SM2;
56
60static mcuxClSignature_Mode_t mcuxClSignature_Mode_SM2 =
61 &mcuxClSignature_ModeDescriptor_SM2;
62
63
64#ifdef MCUXCL_FEATURE_SIGNATURE_SELFTEST
68extern const mcuxClSignature_TestDescriptor_t mcuxClSignature_TestDescriptor_SM2_VerifyOnly;
69
73static mcuxClSignature_Test_t mcuxClSignature_Test_SM2_VerifyOnly =
74 &mcuxClSignature_TestDescriptor_SM2_VerifyOnly;
75
79extern const mcuxClSignature_TestDescriptor_t mcuxClSignature_TestDescriptor_SM2_SignVerify;
80
84static mcuxClSignature_Test_t mcuxClSignature_Test_SM2_SignVerify =
85 &mcuxClSignature_TestDescriptor_SM2_SignVerify;
86
87#endif /* MCUXCL_FEATURE_SIGNATURE_SELFTEST */
88
89#endif /* MCUXCL_FEATURE_SM2_SIGNATURE */
90
91#ifdef MCUXCL_FEATURE_KEY_GENERATION
92#ifdef MCUXCL_FEATURE_SM2_KEYGEN
96extern const mcuxClKey_GenerationDescriptor_t mcuxClKey_GenerationDescriptor_SM2;
97
101static mcuxClKey_Generation_t mcuxClKey_Generation_SM2 =
102 &mcuxClKey_GenerationDescriptor_SM2;
103#endif /* MCUXCL_FEATURE_SM2_KEYGEN */
104#endif /* MCUXCL_FEATURE_KEY_GENERATION */
105
106#ifdef MCUXCL_FEATURE_SM2_CIPHER
107
108extern const mcuxClCipher_ModeDescriptor_t mcuxClOscca_Cipher_ModeDesc_SM2_ENC;
109static mcuxClCipher_Mode_t mcuxClCipher_Mode_SM2_ENC =
110 &mcuxClOscca_Cipher_ModeDesc_SM2_ENC;
111
112extern const mcuxClCipher_ModeDescriptor_t mcuxClOscca_Cipher_ModeDesc_SM2_DEC;
113static mcuxClCipher_Mode_t mcuxClCipher_Mode_SM2_DEC =
114 &mcuxClOscca_Cipher_ModeDesc_SM2_DEC;
115
116
117#endif /* MCUXCL_FEATURE_SM2_CIPHER */
118
119#ifdef MCUXCL_FEATURE_SM2_KEYAGREEMENT
120extern const mcuxClKey_AgreementDescriptor_t mcuxClOsccaSm2_AgreementDesc_Initiator;
121static mcuxClKey_Agreement_t mcuxClOsccaSm2_Agreement_Initiator =
122 &mcuxClOsccaSm2_AgreementDesc_Initiator;
123
124extern const mcuxClKey_AgreementDescriptor_t mcuxClOsccaSm2_AgreementDesc_Responder;
125static mcuxClKey_Agreement_t mcuxClOsccaSm2_Agreement_Responder =
126 &mcuxClOsccaSm2_AgreementDesc_Responder;
127
128extern const mcuxClKey_TestDescriptor_t mcuxClKey_TestDescriptor_SM2_Agreement;
129static mcuxClKey_Test_t mcuxClKey_Test_SM2_Agreement =
130 &mcuxClKey_TestDescriptor_SM2_Agreement;
131#endif /* MCUXCL_FEATURE_SM2_KEYAGREEMENT */
132#endif /* MCUXCL_FEATURE_SM2_INTERNAL */
133
134MCUX_CSSL_ANALYSIS_STOP_PATTERN_EXTERNAL_API_DECLARATIONS()
135
136#ifdef __cplusplus
137} /* extern "C" */
138#endif
139
140#endif /* MCUXCLOSCCASM2_MODECONSTANTS_H_ */
Type definitions for the mcuxClCipher component.
Type definitions for the mcuxClKey component.
Type definitions of mcuxClOsccaSm2 component.
struct mcuxClCipher_ModeDescriptor mcuxClCipher_ModeDescriptor_t
Cipher mode/algorithm descriptor type.
Definition mcuxClCipher_Types.h:54
const mcuxClCipher_ModeDescriptor_t *const mcuxClCipher_Mode_t
Cipher mode/algorithm type.
Definition mcuxClCipher_Types.h:61
struct mcuxClKey_GenerationDescriptor mcuxClKey_GenerationDescriptor_t
Key generation descriptor type.
Definition mcuxClKey_Types.h:218
const mcuxClKey_GenerationDescriptor_t *const mcuxClKey_Generation_t
Key generation type.
Definition mcuxClKey_Types.h:225
const mcuxClSignature_TestDescriptor_t *const mcuxClSignature_Test_t
Signature selftest mode/algorithm type.
Definition mcuxClSignature_Types.h:83
struct mcuxClSignature_TestDescriptor mcuxClSignature_TestDescriptor_t
Signature selftest mode/algorithm descriptor type.
Definition mcuxClSignature_Types.h:76
const mcuxClSignature_ModeDescriptor_t *const mcuxClSignature_Mode_t
Signature mode/algorithm type.
Definition mcuxClSignature_Types.h:60
struct mcuxClSignature_ModeDescriptor mcuxClSignature_ModeDescriptor_t
Signature mode/algorithm descriptor type.
Definition mcuxClSignature_Types.h:53