4bc151c16227a6907e0f2ea51ada81233f386457
[openssl.git] / include / openssl / core_names.h
1 /*
2  * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 #ifndef OPENSSL_CORE_NAMES_H
11 # define OPENSSL_CORE_NAMES_H
12
13 # ifdef __cplusplus
14 extern "C" {
15 # endif
16
17 /* Well known parameter names that Providers can define */
18 #define OSSL_PROV_PARAM_NAME            "name"                /* utf8_string */
19 #define OSSL_PROV_PARAM_VERSION         "version"             /* utf8_string */
20 #define OSSL_PROV_PARAM_BUILDINFO       "buildinfo"           /* utf8_string */
21 #define OSSL_PROV_PARAM_MODULE_FILENAME "module-filename"     /* octet_string */
22
23 /* Self test callback parameters */
24 #define OSSL_PROV_PARAM_SELF_TEST_PHASE  "st-phase" /* utf8_string */
25 #define OSSL_PROV_PARAM_SELF_TEST_TYPE   "st-type"  /* utf8_string */
26 #define OSSL_PROV_PARAM_SELF_TEST_DESC   "st-desc"  /* utf8_string */
27
28 /*
29  * Algorithm parameters
30  * If "engine" or "properties" are specified, they should always be paired
31  * with the algorithm type.
32  */
33 #define OSSL_ALG_PARAM_DIGEST       "digest"    /* utf8_string */
34 #define OSSL_ALG_PARAM_CIPHER       "cipher"    /* utf8_string */
35 #define OSSL_ALG_PARAM_MAC          "mac"       /* utf8_string */
36 #define OSSL_ALG_PARAM_PROPERTIES   "properties"/* utf8_string */
37
38 /* cipher parameters */
39 #define OSSL_CIPHER_PARAM_PADDING              "padding"    /* uint */
40 #define OSSL_CIPHER_PARAM_MODE                 "mode"       /* uint */
41 #define OSSL_CIPHER_PARAM_BLOCK_SIZE           "blocksize" /* size_t */
42 #define OSSL_CIPHER_PARAM_FLAGS                "flags"      /* ulong */
43 #define OSSL_CIPHER_PARAM_KEYLEN               "keylen"     /* size_t */
44 #define OSSL_CIPHER_PARAM_IVLEN                "ivlen"      /* size_t */
45 #define OSSL_CIPHER_PARAM_IV                   "iv"         /* octet_string OR octet_ptr */
46 #define OSSL_CIPHER_PARAM_NUM                  "num"        /* uint */
47 #define OSSL_CIPHER_PARAM_ROUNDS               "rounds"     /* uint */
48 #define OSSL_CIPHER_PARAM_AEAD_TAG             "tag"        /* octet_string */
49 #define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD        "tlsaad"     /* octet_string */
50 #define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD    "tlsaadpad"  /* size_t */
51 #define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED   "tlsivfixed" /* octet_string */
52 #define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen" /* octet_string */
53 #define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv" /* octet_string */
54 #define OSSL_CIPHER_PARAM_AEAD_IVLEN           OSSL_CIPHER_PARAM_IVLEN
55 #define OSSL_CIPHER_PARAM_AEAD_TAGLEN          "taglen"     /* size_t */
56 #define OSSL_CIPHER_PARAM_AEAD_MAC_KEY         "mackey"     /* octet_string */
57 #define OSSL_CIPHER_PARAM_RANDOM_KEY           "randkey"    /* octet_string */
58 #define OSSL_CIPHER_PARAM_RC2_KEYBITS          "keybits"    /* size_t */
59 #define OSSL_CIPHER_PARAM_SPEED                "speed"      /* uint */
60 /* For passing the AlgorithmIdentifier parameter in DER form */
61 #define OSSL_CIPHER_PARAM_ALG_ID               "alg_id_param" /* octet_string */
62
63 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT                    \
64     "tls1multi_maxsndfrag" /* uint */
65 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE                          \
66     "tls1multi_maxbufsz"   /* size_t */
67 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE                           \
68     "tls1multi_interleave" /* uint */
69 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD                                  \
70     "tls1multi_aad"        /* octet_string */
71 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN                          \
72     "tls1multi_aadpacklen" /* uint */
73 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC                                  \
74     "tls1multi_enc"        /* octet_string */
75 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN                               \
76     "tls1multi_encin"      /* octet_string */
77 #define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN                              \
78     "tls1multi_enclen"     /* size_t */
79
80 /* digest parameters */
81 #define OSSL_DIGEST_PARAM_XOFLEN     "xoflen"    /* size_t */
82 #define OSSL_DIGEST_PARAM_SSL3_MS    "ssl3-ms"   /* octet string */
83 #define OSSL_DIGEST_PARAM_PAD_TYPE   "pad_type"  /* uint */
84 #define OSSL_DIGEST_PARAM_MICALG     "micalg"    /* utf8 string */
85 #define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize" /* size_t */
86 #define OSSL_DIGEST_PARAM_SIZE       "size"      /* size_t */
87 #define OSSL_DIGEST_PARAM_FLAGS      "flags"     /* ulong */
88
89 /* Known DIGEST names (not a complete list) */
90 #define OSSL_DIGEST_NAME_MD5            "MD5"
91 #define OSSL_DIGEST_NAME_MD5_SHA1       "MD5-SHA1"
92 #define OSSL_DIGEST_NAME_SHA1           "SHA1"
93 #define OSSL_DIGEST_NAME_SHA2_224       "SHA2-224"
94 #define OSSL_DIGEST_NAME_SHA2_256       "SHA2-256"
95 #define OSSL_DIGEST_NAME_SHA2_384       "SHA2-384"
96 #define OSSL_DIGEST_NAME_SHA2_512       "SHA2-512"
97 #define OSSL_DIGEST_NAME_MD2            "MD2"
98 #define OSSL_DIGEST_NAME_MD4            "MD4"
99 #define OSSL_DIGEST_NAME_MDC2           "MDC2"
100 #define OSSL_DIGEST_NAME_RIPEMD160      "RIPEMD160"
101 #define OSSL_DIGEST_NAME_SHA3_224       "SHA3-224"
102 #define OSSL_DIGEST_NAME_SHA3_256       "SHA3-256"
103 #define OSSL_DIGEST_NAME_SHA3_384       "SHA3-384"
104 #define OSSL_DIGEST_NAME_SHA3_512       "SHA3-512"
105 #define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
106 #define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
107
108 /* MAC parameters */
109 #define OSSL_MAC_PARAM_KEY          "key"        /* octet string */
110 #define OSSL_MAC_PARAM_IV           "iv"         /* octet string */
111 #define OSSL_MAC_PARAM_CUSTOM       "custom"     /* utf8 string */
112 #define OSSL_MAC_PARAM_SALT         "salt"       /* octet string */
113 #define OSSL_MAC_PARAM_XOF          "xof"        /* int, 0 or 1 */
114 #define OSSL_MAC_PARAM_FLAGS        "flags"      /* int */
115 /*
116  * If "engine" or "properties" are specified, they should always be paired
117  * with "cipher" or "digest".
118  */
119 #define OSSL_MAC_PARAM_CIPHER       OSSL_ALG_PARAM_CIPHER     /* utf8 string */
120 #define OSSL_MAC_PARAM_DIGEST       OSSL_ALG_PARAM_DIGEST     /* utf8 string */
121 #define OSSL_MAC_PARAM_PROPERTIES   OSSL_ALG_PARAM_PROPERTIES /* utf8 string */
122 #define OSSL_MAC_PARAM_SIZE         "size"       /* size_t */
123
124 /* Known MAC names (not a complete list) */
125 #define OSSL_MAC_NAME_CMAC          "CMAC"
126 #define OSSL_MAC_NAME_HMAC          "HMAC"
127 #define OSSL_MAC_NAME_KMAC128       "KMAC128"
128 #define OSSL_MAC_NAME_KMAC256       "KMAC256"
129
130 /* KDF / PRF parameters */
131 #define OSSL_KDF_PARAM_SECRET       "secret"    /* octet string */
132 #define OSSL_KDF_PARAM_KEY          "key"       /* octet string */
133 #define OSSL_KDF_PARAM_SALT         "salt"      /* octet string */
134 #define OSSL_KDF_PARAM_PASSWORD     "pass"      /* octet string */
135 #define OSSL_KDF_PARAM_DIGEST       OSSL_ALG_PARAM_DIGEST     /* utf8 string */
136 #define OSSL_KDF_PARAM_CIPHER       OSSL_ALG_PARAM_CIPHER     /* utf8 string */
137 #define OSSL_KDF_PARAM_MAC          OSSL_ALG_PARAM_MAC        /* utf8 string */
138 #define OSSL_KDF_PARAM_MAC_SIZE     "maclen"    /* size_t */
139 #define OSSL_KDF_PARAM_PROPERTIES   OSSL_ALG_PARAM_PROPERTIES /* utf8 string */
140 #define OSSL_KDF_PARAM_ITER         "iter"      /* unsigned int */
141 #define OSSL_KDF_PARAM_MODE         "mode"      /* utf8 string or int */
142 #define OSSL_KDF_PARAM_PKCS5        "pkcs5"     /* int */
143 #define OSSL_KDF_PARAM_UKM          "ukm"       /* octet string */
144 #define OSSL_KDF_PARAM_CEK_ALG      "cekalg"    /* utf8 string */
145 #define OSSL_KDF_PARAM_SCRYPT_N     "n"         /* uint64_t */
146 #define OSSL_KDF_PARAM_SCRYPT_R     "r"         /* uint32_t */
147 #define OSSL_KDF_PARAM_SCRYPT_P     "p"         /* uint32_t */
148 #define OSSL_KDF_PARAM_SCRYPT_MAXMEM "maxmem_bytes" /* uint64_t */
149 #define OSSL_KDF_PARAM_INFO         "info"      /* octet string */
150 #define OSSL_KDF_PARAM_SEED         "seed"      /* octet string */
151 #define OSSL_KDF_PARAM_SSHKDF_XCGHASH "xcghash" /* octet string */
152 #define OSSL_KDF_PARAM_SSHKDF_SESSION_ID "session_id" /* octet string */
153 #define OSSL_KDF_PARAM_SSHKDF_TYPE  "type"      /* int */
154 #define OSSL_KDF_PARAM_SIZE         "size"      /* size_t */
155 #define OSSL_KDF_PARAM_CIPHER       OSSL_ALG_PARAM_CIPHER     /* utf8 string */
156 #define OSSL_KDF_PARAM_CONSTANT     "constant"  /* octet string */
157
158 /* Known KDF names */
159 #define OSSL_KDF_NAME_HKDF          "HKDF"
160 #define OSSL_KDF_NAME_PBKDF2        "PBKDF2"
161 #define OSSL_KDF_NAME_SCRYPT        "SCRYPT"
162 #define OSSL_KDF_NAME_SSHKDF        "SSHKDF"
163 #define OSSL_KDF_NAME_SSKDF         "SSKDF"
164 #define OSSL_KDF_NAME_TLS1_PRF      "TLS1-PRF"
165 #define OSSL_KDF_NAME_X942KDF       "X942KDF"
166 #define OSSL_KDF_NAME_X963KDF       "X963KDF"
167 #define OSSL_KDF_NAME_KBKDF         "KBKDF"
168 #define OSSL_KDF_NAME_KRB5KDF       "KRB5KDF"
169
170 /* PKEY parameters */
171 /* Common PKEY parameters */
172 #define OSSL_PKEY_PARAM_BITS                "bits" /* integer */
173 #define OSSL_PKEY_PARAM_MAX_SIZE            "max-size" /* integer */
174 #define OSSL_PKEY_PARAM_SECURITY_BITS       "security-bits" /* integer */
175 #define OSSL_PKEY_PARAM_DIGEST              OSSL_ALG_PARAM_DIGEST
176 #define OSSL_PKEY_PARAM_PROPERTIES          OSSL_ALG_PARAM_PROPERTIES
177 #define OSSL_PKEY_PARAM_DEFAULT_DIGEST      "default-digest" /* utf8 string */
178 #define OSSL_PKEY_PARAM_MANDATORY_DIGEST    "mandatory-digest" /* utf8 string */
179 #define OSSL_PKEY_PARAM_PAD_MODE            "pad-mode"
180 #define OSSL_PKEY_PARAM_DIGEST              OSSL_ALG_PARAM_DIGEST
181 #define OSSL_PKEY_PARAM_PROPERTIES          OSSL_ALG_PARAM_PROPERTIES
182 #define OSSL_PKEY_PARAM_DIGEST_SIZE         "digest-size"
183 #define OSSL_PKEY_PARAM_MGF1_DIGEST         "mgf1-digest"
184 #define OSSL_PKEY_PARAM_MGF1_PROPERTIES     "mgf1-properties"
185
186 /* Diffie-Hellman/DSA public/private key */
187 #define OSSL_PKEY_PARAM_PUB_KEY             "pub"
188 #define OSSL_PKEY_PARAM_PRIV_KEY            "priv"
189
190 /* Diffie-Hellman/DSA Parameters */
191 #define OSSL_PKEY_PARAM_FFC_P        "p"
192 #define OSSL_PKEY_PARAM_FFC_G        "g"
193 #define OSSL_PKEY_PARAM_FFC_Q        "q"
194 #define OSSL_PKEY_PARAM_FFC_GINDEX   "gindex"
195 #define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
196 #define OSSL_PKEY_PARAM_FFC_SEED     "seed"
197 #define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
198 #define OSSL_PKEY_PARAM_FFC_H        "hindex"
199 #define OSSL_PKEY_PARAM_FFC_GROUP    "group"
200
201 #define OSSL_PKEY_PARAM_FFC_GINDEX   "gindex"
202 #define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
203 #define OSSL_PKEY_PARAM_FFC_SEED     "seed"
204 #define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
205 #define OSSL_PKEY_PARAM_FFC_H        "hindex"
206
207 /* Diffie-Hellman params */
208 #define OSSL_PKEY_PARAM_FFC_GROUP    "group"
209 #define OSSL_PKEY_PARAM_FFC_GENERATOR "safeprime-generator"
210 #define OSSL_PKEY_PARAM_DH_PRIV_LEN   "priv_len"
211
212 /* Elliptic Curve Domain Parameters */
213 #define OSSL_PKEY_PARAM_EC_NAME      "curve-name"
214
215 /* Elliptic Curve Key Parameters */
216 #define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
217 #define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH \
218     OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
219
220 /* RSA Keys */
221 /*
222  * n, e, d are the usual public and private key components
223  *
224  * rsa-num is the number of factors, including p and q
225  * rsa-factor is used for each factor: p, q, r_i (i = 3, ...)
226  * rsa-exponent is used for each exponent: dP, dQ, d_i (i = 3, ...)
227  * rsa-coefficient is used for each coefficient: qInv, t_i (i = 3, ...)
228  *
229  * The number of rsa-factor items must be equal to the number of rsa-exponent
230  * items, and the number of rsa-coefficients must be one less.
231  * (the base i for the coefficients is 2, not 1, at least as implied by
232  * RFC 8017)
233  */
234 #define OSSL_PKEY_PARAM_RSA_N           "n"
235 #define OSSL_PKEY_PARAM_RSA_E           "e"
236 #define OSSL_PKEY_PARAM_RSA_D           "d"
237 #define OSSL_PKEY_PARAM_RSA_FACTOR      "rsa-factor"
238 #define OSSL_PKEY_PARAM_RSA_EXPONENT    "rsa-exponent"
239 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
240 #define OSSL_PKEY_PARAM_RSA_FACTOR1      OSSL_PKEY_PARAM_RSA_FACTOR"1"
241 #define OSSL_PKEY_PARAM_RSA_FACTOR2      OSSL_PKEY_PARAM_RSA_FACTOR"2"
242 #define OSSL_PKEY_PARAM_RSA_FACTOR3      OSSL_PKEY_PARAM_RSA_FACTOR"3"
243 #define OSSL_PKEY_PARAM_RSA_FACTOR4      OSSL_PKEY_PARAM_RSA_FACTOR"4"
244 #define OSSL_PKEY_PARAM_RSA_FACTOR5      OSSL_PKEY_PARAM_RSA_FACTOR"5"
245 #define OSSL_PKEY_PARAM_RSA_FACTOR6      OSSL_PKEY_PARAM_RSA_FACTOR"6"
246 #define OSSL_PKEY_PARAM_RSA_FACTOR7      OSSL_PKEY_PARAM_RSA_FACTOR"7"
247 #define OSSL_PKEY_PARAM_RSA_FACTOR8      OSSL_PKEY_PARAM_RSA_FACTOR"8"
248 #define OSSL_PKEY_PARAM_RSA_FACTOR9      OSSL_PKEY_PARAM_RSA_FACTOR"9"
249 #define OSSL_PKEY_PARAM_RSA_FACTOR10     OSSL_PKEY_PARAM_RSA_FACTOR"10"
250 #define OSSL_PKEY_PARAM_RSA_EXPONENT1    OSSL_PKEY_PARAM_RSA_EXPONENT"1"
251 #define OSSL_PKEY_PARAM_RSA_EXPONENT2    OSSL_PKEY_PARAM_RSA_EXPONENT"2"
252 #define OSSL_PKEY_PARAM_RSA_EXPONENT3    OSSL_PKEY_PARAM_RSA_EXPONENT"3"
253 #define OSSL_PKEY_PARAM_RSA_EXPONENT4    OSSL_PKEY_PARAM_RSA_EXPONENT"4"
254 #define OSSL_PKEY_PARAM_RSA_EXPONENT5    OSSL_PKEY_PARAM_RSA_EXPONENT"5"
255 #define OSSL_PKEY_PARAM_RSA_EXPONENT6    OSSL_PKEY_PARAM_RSA_EXPONENT"6"
256 #define OSSL_PKEY_PARAM_RSA_EXPONENT7    OSSL_PKEY_PARAM_RSA_EXPONENT"7"
257 #define OSSL_PKEY_PARAM_RSA_EXPONENT8    OSSL_PKEY_PARAM_RSA_EXPONENT"8"
258 #define OSSL_PKEY_PARAM_RSA_EXPONENT9    OSSL_PKEY_PARAM_RSA_EXPONENT"9"
259 #define OSSL_PKEY_PARAM_RSA_EXPONENT10   OSSL_PKEY_PARAM_RSA_EXPONENT"10"
260 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT1 OSSL_PKEY_PARAM_RSA_COEFFICIENT"1"
261 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT2 OSSL_PKEY_PARAM_RSA_COEFFICIENT"2"
262 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT3 OSSL_PKEY_PARAM_RSA_COEFFICIENT"3"
263 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT4 OSSL_PKEY_PARAM_RSA_COEFFICIENT"4"
264 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT5 OSSL_PKEY_PARAM_RSA_COEFFICIENT"5"
265 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT6 OSSL_PKEY_PARAM_RSA_COEFFICIENT"6"
266 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT7 OSSL_PKEY_PARAM_RSA_COEFFICIENT"7"
267 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT8 OSSL_PKEY_PARAM_RSA_COEFFICIENT"8"
268 #define OSSL_PKEY_PARAM_RSA_COEFFICIENT9 OSSL_PKEY_PARAM_RSA_COEFFICIENT"9"
269
270
271 /* Key generation parameters */
272 #define OSSL_PKEY_PARAM_RSA_BITS        OSSL_PKEY_PARAM_BITS
273 #define OSSL_PKEY_PARAM_RSA_PRIMES      "primes"
274
275 /* Key generation parameters */
276 #define OSSL_PKEY_PARAM_FFC_TYPE         "type"
277 #define OSSL_PKEY_PARAM_FFC_PBITS        "pbits"
278 #define OSSL_PKEY_PARAM_FFC_QBITS        "qbits"
279 #define OSSL_PKEY_PARAM_FFC_DIGEST       OSSL_PKEY_PARAM_DIGEST
280 #define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
281
282 /* Key Exchange parameters */
283
284 #define OSSL_EXCHANGE_PARAM_PAD                   "pad" /* uint */
285 #define OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE "ecdh-cofactor-mode" /* int */
286 #define OSSL_EXCHANGE_PARAM_KDF_TYPE              "kdf-type" /* utf8_string */
287 #define OSSL_EXCHANGE_PARAM_KDF_DIGEST            "kdf-digest" /* utf8_string */
288 #define OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS      "kdf-digest-props" /* utf8_string */
289 #define OSSL_EXCHANGE_PARAM_KDF_OUTLEN            "kdf-outlen" /* size_t */
290
291 /*
292  * TODO(3.0): improve this pattern
293  *
294  * Currently the sole internal user of OSSL_EXCHANGE_PARAM_KDF_UKM is
295  * EVP_PKEY_CTX_{set0,get0}_ecdh_kdf_ukm():
296  *      OSSL_EXCHANGE_PARAM_KDF_UKM is handled as a octet_string on set0,
297  *      and as an octet_ptr on get0.
298  *
299  * This pattern is borrowed from the handling of
300  * OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL in
301  * EVP_PKEY_CTX_{set0,get0}_rsa_oaep_label().
302  */
303 #define OSSL_EXCHANGE_PARAM_KDF_UKM               "kdf-ukm" /* see note above */
304 #define OSSL_EXCHANGE_PARAM_KDF_UKM_LEN           "kdf-ukm-len" /* size_t */
305
306 /* Signature parameters */
307 #define OSSL_SIGNATURE_PARAM_ALGORITHM_ID       "algorithm-id"
308 #define OSSL_SIGNATURE_PARAM_PAD_MODE           OSSL_PKEY_PARAM_PAD_MODE
309 #define OSSL_SIGNATURE_PARAM_DIGEST             OSSL_PKEY_PARAM_DIGEST
310 #define OSSL_SIGNATURE_PARAM_PROPERTIES         OSSL_PKEY_PARAM_PROPERTIES
311 #define OSSL_SIGNATURE_PARAM_PSS_SALTLEN        "pss-saltlen"
312 #define OSSL_SIGNATURE_PARAM_MGF1_DIGEST        OSSL_PKEY_PARAM_MGF1_DIGEST
313 #define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES    \
314     OSSL_PKEY_PARAM_MGF1_PROPERTIES
315 #define OSSL_SIGNATURE_PARAM_DIGEST_SIZE        OSSL_PKEY_PARAM_DIGEST_SIZE
316 #define OSSL_SIGNATURE_PARAM_KAT                "kat"
317
318 /* Asym cipher parameters */
319 #define OSSL_ASYM_CIPHER_PARAM_PAD_MODE                 OSSL_PKEY_PARAM_PAD_MODE
320 #define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST              \
321     OSSL_PKEY_PARAM_MGF1_DIGEST
322 #define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS        \
323     OSSL_PKEY_PARAM_MGF1_PROPERTIES
324 #define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST              OSSL_ALG_PARAM_DIGEST
325 #define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS        "digest-props"
326 #define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL               "oaep-label"
327 #define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL_LEN           "oaep-label-len"
328 #define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION       "tls-client-version"
329 #define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION   "tls-negotiated-version"
330
331 /*
332  * Serializer parameters
333  */
334 /* The passphrase may be passed as a utf8 string or an octet string */
335 #define OSSL_SERIALIZER_PARAM_CIPHER            OSSL_ALG_PARAM_CIPHER
336 #define OSSL_SERIALIZER_PARAM_PROPERTIES        OSSL_ALG_PARAM_PROPERTIES
337 #define OSSL_SERIALIZER_PARAM_PASS              "passphrase"
338
339 /* Passphrase callback parameters */
340 #define OSSL_PASSPHRASE_PARAM_INFO              "info"
341
342 /* Keygen callback parameters, from provider to libcrypto */
343 #define OSSL_GEN_PARAM_POTENTIAL            "potential" /* integer */
344 #define OSSL_GEN_PARAM_ITERATION            "iteration" /* integer */
345
346 # ifdef __cplusplus
347 }
348 # endif
349
350 #endif