 |
API参考
|
浏览该文件的文档.
27#ifndef CRYPT_PARAMS_KEY_H
28#define CRYPT_PARAMS_KEY_H
36#define CRYPT_PARAM_PKEY_BASE 0
37#define CRYPT_PARAM_PKEY_ENCODE_PUBKEY (CRYPT_PARAM_PKEY_BASE + 1)
38#define CRYPT_PARAM_PKEY_PROCESS_FUNC (CRYPT_PARAM_PKEY_BASE + 2)
39#define CRYPT_PARAM_PKEY_PROCESS_ARGS (CRYPT_PARAM_PKEY_BASE + 3)
40#define CRYPT_PARAM_PKEY_HE_CIPHERTEXT1 (CRYPT_PARAM_PKEY_BASE + 4)
41#define CRYPT_PARAM_PKEY_HE_CIPHERTEXT2 (CRYPT_PARAM_PKEY_BASE + 5)
42#define CRYPT_PARAM_PKEY_SIG_PAD_MODE (CRYPT_PARAM_PKEY_BASE + 6)
43#define CRYPT_PARAM_PKEY_SIG_PAD_DIGEST (CRYPT_PARAM_PKEY_BASE + 7)
45#define CRYPT_PARAM_KDF_BASE 100
46#define CRYPT_PARAM_KDF_PASSWORD (CRYPT_PARAM_KDF_BASE + 1)
47#define CRYPT_PARAM_KDF_MAC_ID (CRYPT_PARAM_KDF_BASE + 2)
48#define CRYPT_PARAM_KDF_SALT (CRYPT_PARAM_KDF_BASE + 3)
49#define CRYPT_PARAM_KDF_ITER (CRYPT_PARAM_KDF_BASE + 4)
50#define CRYPT_PARAM_KDF_MODE (CRYPT_PARAM_KDF_BASE + 5)
51#define CRYPT_PARAM_KDF_KEY (CRYPT_PARAM_KDF_BASE + 6)
52#define CRYPT_PARAM_KDF_PRK (CRYPT_PARAM_KDF_BASE + 7)
53#define CRYPT_PARAM_KDF_INFO (CRYPT_PARAM_KDF_BASE + 8)
54#define CRYPT_PARAM_KDF_EXLEN (CRYPT_PARAM_KDF_BASE + 9)
55#define CRYPT_PARAM_KDF_LABEL (CRYPT_PARAM_KDF_BASE + 11)
56#define CRYPT_PARAM_KDF_SEED (CRYPT_PARAM_KDF_BASE + 12)
57#define CRYPT_PARAM_KDF_N (CRYPT_PARAM_KDF_BASE + 13)
58#define CRYPT_PARAM_KDF_P (CRYPT_PARAM_KDF_BASE + 14)
59#define CRYPT_PARAM_KDF_R (CRYPT_PARAM_KDF_BASE + 15)
61#define CRYPT_PARAM_EC_BASE 200
62#define CRYPT_PARAM_EC_PUBKEY (CRYPT_PARAM_EC_BASE + 1)
63#define CRYPT_PARAM_EC_PRVKEY (CRYPT_PARAM_EC_BASE + 2)
64#define CRYPT_PARAM_EC_P (CRYPT_PARAM_EC_BASE + 3)
65#define CRYPT_PARAM_EC_A (CRYPT_PARAM_EC_BASE + 4)
66#define CRYPT_PARAM_EC_B (CRYPT_PARAM_EC_BASE + 5)
67#define CRYPT_PARAM_EC_N (CRYPT_PARAM_EC_BASE + 6)
68#define CRYPT_PARAM_EC_H (CRYPT_PARAM_EC_BASE + 7)
69#define CRYPT_PARAM_EC_X (CRYPT_PARAM_EC_BASE + 8)
70#define CRYPT_PARAM_EC_Y (CRYPT_PARAM_EC_BASE + 9)
71#define CRYPT_PARAM_EC_CURVE_ID (CRYPT_PARAM_EC_BASE + 10)
73#define CRYPT_PARAM_DH_BASE 300
74#define CRYPT_PARAM_DH_PUBKEY (CRYPT_PARAM_DH_BASE + 1)
75#define CRYPT_PARAM_DH_PRVKEY (CRYPT_PARAM_DH_BASE + 2)
76#define CRYPT_PARAM_DH_P (CRYPT_PARAM_DH_BASE + 3)
77#define CRYPT_PARAM_DH_Q (CRYPT_PARAM_DH_BASE + 4)
78#define CRYPT_PARAM_DH_G (CRYPT_PARAM_DH_BASE + 5)
80#define CRYPT_PARAM_DSA_BASE 400
81#define CRYPT_PARAM_DSA_PUBKEY (CRYPT_PARAM_DSA_BASE + 1)
82#define CRYPT_PARAM_DSA_PRVKEY (CRYPT_PARAM_DSA_BASE + 2)
83#define CRYPT_PARAM_DSA_P (CRYPT_PARAM_DSA_BASE + 3)
84#define CRYPT_PARAM_DSA_Q (CRYPT_PARAM_DSA_BASE + 4)
85#define CRYPT_PARAM_DSA_G (CRYPT_PARAM_DSA_BASE + 5)
86#define CRYPT_PARAM_DSA_ALGID (CRYPT_PARAM_DSA_BASE + 6)
87#define CRYPT_PARAM_DSA_PBITS (CRYPT_PARAM_DSA_BASE + 7)
88#define CRYPT_PARAM_DSA_QBITS (CRYPT_PARAM_DSA_BASE + 8)
89#define CRYPT_PARAM_DSA_SEEDLEN (CRYPT_PARAM_DSA_BASE + 9)
90#define CRYPT_PARAM_DSA_GINDEX (CRYPT_PARAM_DSA_BASE + 10)
92#define CRYPT_PARAM_PAILLIER_BASE 500
93#define CRYPT_PARAM_PAILLIER_N (CRYPT_PARAM_PAILLIER_BASE + 1)
94#define CRYPT_PARAM_PAILLIER_G (CRYPT_PARAM_PAILLIER_BASE + 2)
95#define CRYPT_PARAM_PAILLIER_N2 (CRYPT_PARAM_PAILLIER_BASE + 3)
96#define CRYPT_PARAM_PAILLIER_LAMBDA (CRYPT_PARAM_PAILLIER_BASE + 4)
97#define CRYPT_PARAM_PAILLIER_MU (CRYPT_PARAM_PAILLIER_BASE + 5)
98#define CRYPT_PARAM_PAILLIER_P (CRYPT_PARAM_PAILLIER_BASE + 6)
99#define CRYPT_PARAM_PAILLIER_Q (CRYPT_PARAM_PAILLIER_BASE + 7)
100#define CRYPT_PARAM_PAILLIER_BITS (CRYPT_PARAM_PAILLIER_BASE + 8)
102#define CRYPT_PARAM_RAND_BASE 600
103#define CRYPT_PARAM_RAND_SEEDCTX (CRYPT_PARAM_RAND_BASE + 1)
104#define CRYPT_PARAM_RAND_PR (CRYPT_PARAM_RAND_BASE + 2)
105#define CRYPT_PARAM_RAND_SEED_GETENTROPY (CRYPT_PARAM_RAND_BASE + 3)
106#define CRYPT_PARAM_RAND_SEED_CLEANENTROPY (CRYPT_PARAM_RAND_BASE + 4)
107#define CRYPT_PARAM_RAND_SEED_GETNONCE (CRYPT_PARAM_RAND_BASE + 5)
108#define CRYPT_PARAM_RAND_SEED_CLEANNONCE (CRYPT_PARAM_RAND_BASE + 6)
109#define CRYPT_PARAM_RAND_RESEED_INTERVAL (CRYPT_PARAM_RAND_BASE + 7)
110#define CRYPT_PARAM_RAND_RESEED_TIME (CRYPT_PARAM_RAND_BASE + 8)
112#define CRYPT_PARAM_CURVE25519_BASE 700
113#define CRYPT_PARAM_CURVE25519_PUBKEY (CRYPT_PARAM_CURVE25519_BASE + 1)
114#define CRYPT_PARAM_CURVE25519_PRVKEY (CRYPT_PARAM_CURVE25519_BASE + 2)
116#define CRYPT_PARAM_ELGAMAL_BASE 800
117#define CRYPT_PARAM_ELGAMAL_P (CRYPT_PARAM_ELGAMAL_BASE + 1)
118#define CRYPT_PARAM_ELGAMAL_G (CRYPT_PARAM_ELGAMAL_BASE + 2)
119#define CRYPT_PARAM_ELGAMAL_X (CRYPT_PARAM_ELGAMAL_BASE + 3)
120#define CRYPT_PARAM_ELGAMAL_Y (CRYPT_PARAM_ELGAMAL_BASE + 4)
121#define CRYPT_PARAM_ELGAMAL_Q (CRYPT_PARAM_ELGAMAL_BASE + 5)
122#define CRYPT_PARAM_ELGAMAL_BITS (CRYPT_PARAM_ELGAMAL_BASE + 6)
123#define CRYPT_PARAM_ELGAMAL_KBITS (CRYPT_PARAM_ELGAMAL_BASE + 7)
125#define CRYPT_PARAM_RSA_BASE 900
126#define CRYPT_PARAM_RSA_N (CRYPT_PARAM_RSA_BASE + 1)
127#define CRYPT_PARAM_RSA_E (CRYPT_PARAM_RSA_BASE + 2)
128#define CRYPT_PARAM_RSA_D (CRYPT_PARAM_RSA_BASE + 3)
129#define CRYPT_PARAM_RSA_P (CRYPT_PARAM_RSA_BASE + 4)
130#define CRYPT_PARAM_RSA_Q (CRYPT_PARAM_RSA_BASE + 5)
131#define CRYPT_PARAM_RSA_DQ (CRYPT_PARAM_RSA_BASE + 6)
132#define CRYPT_PARAM_RSA_DP (CRYPT_PARAM_RSA_BASE + 7)
133#define CRYPT_PARAM_RSA_QINV (CRYPT_PARAM_RSA_BASE + 8)
134#define CRYPT_PARAM_RSA_BITS (CRYPT_PARAM_RSA_BASE + 9)
135#define CRYPT_PARAM_RSA_SALTLEN (CRYPT_PARAM_RSA_BASE + 10)
136#define CRYPT_PARAM_RSA_MD_ID (CRYPT_PARAM_RSA_BASE + 11)
137#define CRYPT_PARAM_RSA_MGF1_ID (CRYPT_PARAM_RSA_BASE + 12)
138#define CRYPT_PARAM_RSA_XP (CRYPT_PARAM_RSA_BASE + 13)
139#define CRYPT_PARAM_RSA_XQ (CRYPT_PARAM_RSA_BASE + 14)
140#define CRYPT_PARAM_RSA_XP1 (CRYPT_PARAM_RSA_BASE + 15)
141#define CRYPT_PARAM_RSA_XP2 (CRYPT_PARAM_RSA_BASE + 16)
142#define CRYPT_PARAM_RSA_XQ1 (CRYPT_PARAM_RSA_BASE + 17)
143#define CRYPT_PARAM_RSA_XQ2 (CRYPT_PARAM_RSA_BASE + 18)
145#define CRYPT_PARAM_ML_KEM_BASE 1400
146#define CRYPT_PARAM_ML_KEM_PRVKEY (CRYPT_PARAM_ML_KEM_BASE + 1)
147#define CRYPT_PARAM_ML_KEM_PUBKEY (CRYPT_PARAM_ML_KEM_BASE + 2)
148#define CRYPT_PARAM_ML_KEM_PRVKEY_SEED (CRYPT_PARAM_ML_KEM_BASE + 3)
150#define CRYPT_PARAM_ML_DSA_BASE 1500
151#define CRYPT_PARAM_ML_DSA_PRVKEY (CRYPT_PARAM_ML_DSA_BASE + 1)
152#define CRYPT_PARAM_ML_DSA_PUBKEY (CRYPT_PARAM_ML_DSA_BASE + 2)
153#define CRYPT_PARAM_ML_DSA_PRVKEY_SEED (CRYPT_PARAM_ML_DSA_BASE + 3)
155#define CRYPT_PARAM_HYBRID_BASE 1600
156#define CRYPT_PARAM_HYBRID_PRVKEY (CRYPT_PARAM_HYBRID_BASE + 1)
157#define CRYPT_PARAM_HYBRID_PUBKEY (CRYPT_PARAM_HYBRID_BASE + 2)
159#define CRYPT_PARAM_SLH_DSA_BASE 1700
160#define CRYPT_PARAM_SLH_DSA_PRV_SEED (CRYPT_PARAM_SLH_DSA_BASE + 1)
161#define CRYPT_PARAM_SLH_DSA_PRV_PRF (CRYPT_PARAM_SLH_DSA_BASE + 2)
162#define CRYPT_PARAM_SLH_DSA_PUB_SEED (CRYPT_PARAM_SLH_DSA_BASE + 3)
163#define CRYPT_PARAM_SLH_DSA_PUB_ROOT (CRYPT_PARAM_SLH_DSA_BASE + 4)
165#define CRYPT_PARAM_MD_BASE 1800
166#define CRYPT_PARAM_MD_DIGEST_SIZE (CRYPT_PARAM_MD_BASE + 1)
167#define CRYPT_PARAM_MD_BLOCK_SIZE (CRYPT_PARAM_MD_BASE + 2)
168#define CRYPT_PARAM_MD_ATTR (CRYPT_PARAM_MD_BASE + 3)
170#define CRYPT_PARAM_XMSS_BASE 1950
171#define CRYPT_PARAM_XMSS_PRV_INDEX (CRYPT_PARAM_XMSS_BASE + 1)
172#define CRYPT_PARAM_XMSS_PRV_SEED (CRYPT_PARAM_XMSS_BASE + 2)
173#define CRYPT_PARAM_XMSS_PRV_PRF (CRYPT_PARAM_XMSS_BASE + 3)
174#define CRYPT_PARAM_XMSS_PUB_SEED (CRYPT_PARAM_XMSS_BASE + 4)
175#define CRYPT_PARAM_XMSS_PUB_ROOT (CRYPT_PARAM_XMSS_BASE + 5)
176#define CRYPT_PARAM_XMSS_XDR_TYPE (CRYPT_PARAM_XMSS_BASE + 6)
178#define CRYPT_PARAM_FRODOKEM_BASE 2000
179#define CRYPT_PARAM_FRODOKEM_PRVKEY (CRYPT_PARAM_FRODOKEM_BASE + 1)
180#define CRYPT_PARAM_FRODOKEM_PUBKEY (CRYPT_PARAM_FRODOKEM_BASE + 2)
182#define CRYPT_PARAM_MCELIECE_BASE 2050
183#define CRYPT_PARAM_MCELIECE_PRVKEY (CRYPT_PARAM_MCELIECE_BASE + 1)
184#define CRYPT_PARAM_MCELIECE_PUBKEY (CRYPT_PARAM_MCELIECE_BASE + 2)
186#define CRYPT_PARAM_DECODE_BASE 4000
187#define CRYPT_PARAM_DECODE_OUTPUT_FORMAT (CRYPT_PARAM_DECODE_BASE + 1)
188#define CRYPT_PARAM_DECODE_OUTPUT_TYPE (CRYPT_PARAM_DECODE_BASE + 2)
189#define CRYPT_PARAM_DECODE_PASSWORD (CRYPT_PARAM_DECODE_BASE + 3)
190#define CRYPT_PARAM_DECODE_KEY_TYPE (CRYPT_PARAM_DECODE_BASE + 4)
191#define CRYPT_PARAM_DECODE_BUFFER_DATA (CRYPT_PARAM_DECODE_BASE + 5)
192#define CRYPT_PARAM_DECODE_OBJECT_DATA (CRYPT_PARAM_DECODE_BASE + 6)
193#define CRYPT_PARAM_DECODE_OBJECT_TYPE (CRYPT_PARAM_DECODE_BASE + 7)
194#define CRYPT_PARAM_DECODE_PKEY_EXPORT_METHOD_FUNC (CRYPT_PARAM_DECODE_BASE + 8)
195#define CRYPT_PARAM_DECODE_PKEY_DUP_METHOD_FUNC (CRYPT_PARAM_DECODE_BASE + 9)
196#define CRYPT_PARAM_DECODE_PKEY_FREE_METHOD_FUNC (CRYPT_PARAM_DECODE_BASE + 10)
197#define CRYPT_PARAM_DECODE_LIB_CTX (CRYPT_PARAM_DECODE_BASE + 11)
198#define CRYPT_PARAM_DECODE_TARGET_ATTR_NAME (CRYPT_PARAM_DECODE_BASE + 12)
199#define CRYPT_PARAM_DECODE_PROVIDER_CTX (CRYPT_PARAM_DECODE_BASE + 13)
200#define CRYPT_PARAM_DECODE_FLAG_FREE_OUTDATA (CRYPT_PARAM_DECODE_BASE + 14)
202#define CRYPT_PARAM_CIPHER_BASE 4600
203#define CRYPT_PARAM_CIPHER_AEAD_IV_LEN (CRYPT_PARAM_CIPHER_BASE + 1)
205#define CRYPT_PARAM_MAC_BASE 4700
206#define CRYPT_PARAM_MAC_MAC_DIGEST (CRYPT_PARAM_MAC_BASE + 1)
208#define CRYPT_PARAM_CAP_TLS_GROUP_BASE 5000
209#define CRYPT_PARAM_CAP_TLS_GROUP_IANA_GROUP_NAME (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 1)
210#define CRYPT_PARAM_CAP_TLS_GROUP_IANA_GROUP_ID (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 2)
211#define CRYPT_PARAM_CAP_TLS_GROUP_PARA_ID (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 3)
212#define CRYPT_PARAM_CAP_TLS_GROUP_ALG_ID (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 4)
213#define CRYPT_PARAM_CAP_TLS_GROUP_SEC_BITS (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 5)
214#define CRYPT_PARAM_CAP_TLS_GROUP_VERSION_BITS (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 6)
215#define CRYPT_PARAM_CAP_TLS_GROUP_IS_KEM (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 7)
216#define CRYPT_PARAM_CAP_TLS_GROUP_PUBKEY_LEN (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 8)
217#define CRYPT_PARAM_CAP_TLS_GROUP_SHAREDKEY_LEN (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 9)
218#define CRYPT_PARAM_CAP_TLS_GROUP_CIPHERTEXT_LEN (CRYPT_PARAM_CAP_TLS_GROUP_BASE + 10)
220#define CRYPT_PARAM_CAP_TLS_SIGNALG_BASE 5100
221#define CRYPT_PARAM_CAP_TLS_SIGNALG_IANA_SIGN_NAME (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 1)
222#define CRYPT_PARAM_CAP_TLS_SIGNALG_IANA_SIGN_ID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 2)
223#define CRYPT_PARAM_CAP_TLS_SIGNALG_KEY_TYPE (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 3)
224#define CRYPT_PARAM_CAP_TLS_SIGNALG_KEY_TYPE_OID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 4)
225#define CRYPT_PARAM_CAP_TLS_SIGNALG_KEY_TYPE_NAME (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 5)
226#define CRYPT_PARAM_CAP_TLS_SIGNALG_PARA_ID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 6)
227#define CRYPT_PARAM_CAP_TLS_SIGNALG_PARA_OID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 7)
228#define CRYPT_PARAM_CAP_TLS_SIGNALG_PARA_NAME (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 8)
229#define CRYPT_PARAM_CAP_TLS_SIGNALG_SIGNWITHMD_ID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 9)
230#define CRYPT_PARAM_CAP_TLS_SIGNALG_SIGNWITHMD_OID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 10)
231#define CRYPT_PARAM_CAP_TLS_SIGNALG_SIGNWITHMD_NAME (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 11)
232#define CRYPT_PARAM_CAP_TLS_SIGNALG_SIGN_ID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 12)
233#define CRYPT_PARAM_CAP_TLS_SIGNALG_MD_ID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 13)
234#define CRYPT_PARAM_CAP_TLS_SIGNALG_MD_OID (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 14)
235#define CRYPT_PARAM_CAP_TLS_SIGNALG_MD_NAME (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 15)
236#define CRYPT_PARAM_CAP_TLS_SIGNALG_SEC_BITS (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 16)
237#define CRYPT_PARAM_CAP_TLS_SIGNALG_CHAIN_VERSION_BITS (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 17)
238#define CRYPT_PARAM_CAP_TLS_SIGNALG_CERT_VERSION_BITS (CRYPT_PARAM_CAP_TLS_SIGNALG_BASE + 18)
240#define CRYPT_PARAM_CMVP_BASE 5200
241#define CRYPT_PARAM_CMVP_LOG_FUNC (CRYPT_PARAM_CMVP_BASE + 1)
242#define CRYPT_PARAM_CMVP_SELFTEST_TYPE (CRYPT_PARAM_CMVP_BASE + 2)
243#define CRYPT_PARAM_CMVP_RANDOM (CRYPT_PARAM_CMVP_BASE + 3)
244#define CRYPT_PARAM_CMVP_INTERNAL_LIBCTX_FLAG (CRYPT_PARAM_CMVP_BASE + 4)
246#define CRYPT_PARAM_SM9_BASE 5300
247#define CRYPT_PARAM_SM9_USER_ID (CRYPT_PARAM_SM9_BASE + 1)
248#define CRYPT_PARAM_SM9_MASTER_KEY (CRYPT_PARAM_SM9_BASE + 2)
249#define CRYPT_PARAM_SM9_USER_KEY (CRYPT_PARAM_SM9_BASE + 3)
250#define CRYPT_PARAM_SM9_KEY_TYPE (CRYPT_PARAM_SM9_BASE + 4)
251#define CRYPT_PARAM_SM9_MASTER_PUB_KEY (CRYPT_PARAM_SM9_BASE + 5)