PROV: Implement PEM to DER deserializer
[openssl.git] / providers / implementations / include / prov / implementations.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 #include <openssl/core.h>
11 #include <openssl/types.h>
12
13 /* Digests */
14 extern const OSSL_DISPATCH sha1_functions[];
15 extern const OSSL_DISPATCH sha224_functions[];
16 extern const OSSL_DISPATCH sha256_functions[];
17 extern const OSSL_DISPATCH sha384_functions[];
18 extern const OSSL_DISPATCH sha512_functions[];
19 extern const OSSL_DISPATCH sha512_224_functions[];
20 extern const OSSL_DISPATCH sha512_256_functions[];
21 extern const OSSL_DISPATCH sha3_224_functions[];
22 extern const OSSL_DISPATCH sha3_256_functions[];
23 extern const OSSL_DISPATCH sha3_384_functions[];
24 extern const OSSL_DISPATCH sha3_512_functions[];
25 extern const OSSL_DISPATCH keccak_kmac_128_functions[];
26 extern const OSSL_DISPATCH keccak_kmac_256_functions[];
27 extern const OSSL_DISPATCH shake_128_functions[];
28 extern const OSSL_DISPATCH shake_256_functions[];
29 extern const OSSL_DISPATCH blake2s256_functions[];
30 extern const OSSL_DISPATCH blake2b512_functions[];
31 extern const OSSL_DISPATCH md5_functions[];
32 extern const OSSL_DISPATCH md5_sha1_functions[];
33 extern const OSSL_DISPATCH sm3_functions[];
34 extern const OSSL_DISPATCH md2_functions[];
35 extern const OSSL_DISPATCH md4_functions[];
36 extern const OSSL_DISPATCH mdc2_functions[];
37 extern const OSSL_DISPATCH wp_functions[];
38 extern const OSSL_DISPATCH ripemd160_functions[];
39
40 /* Ciphers */
41 extern const OSSL_DISPATCH null_functions[];
42 extern const OSSL_DISPATCH aes256ecb_functions[];
43 extern const OSSL_DISPATCH aes192ecb_functions[];
44 extern const OSSL_DISPATCH aes128ecb_functions[];
45 extern const OSSL_DISPATCH aes256cbc_functions[];
46 extern const OSSL_DISPATCH aes192cbc_functions[];
47 extern const OSSL_DISPATCH aes128cbc_functions[];
48 extern const OSSL_DISPATCH aes256cbc_cts_functions[];
49 extern const OSSL_DISPATCH aes192cbc_cts_functions[];
50 extern const OSSL_DISPATCH aes128cbc_cts_functions[];
51 extern const OSSL_DISPATCH aes256ofb_functions[];
52 extern const OSSL_DISPATCH aes192ofb_functions[];
53 extern const OSSL_DISPATCH aes128ofb_functions[];
54 extern const OSSL_DISPATCH aes256cfb_functions[];
55 extern const OSSL_DISPATCH aes192cfb_functions[];
56 extern const OSSL_DISPATCH aes128cfb_functions[];
57 extern const OSSL_DISPATCH aes256cfb1_functions[];
58 extern const OSSL_DISPATCH aes192cfb1_functions[];
59 extern const OSSL_DISPATCH aes128cfb1_functions[];
60 extern const OSSL_DISPATCH aes256cfb8_functions[];
61 extern const OSSL_DISPATCH aes192cfb8_functions[];
62 extern const OSSL_DISPATCH aes128cfb8_functions[];
63 extern const OSSL_DISPATCH aes256ctr_functions[];
64 extern const OSSL_DISPATCH aes192ctr_functions[];
65 extern const OSSL_DISPATCH aes128ctr_functions[];
66 extern const OSSL_DISPATCH aes256xts_functions[];
67 extern const OSSL_DISPATCH aes128xts_functions[];
68 #ifndef OPENSSL_NO_OCB
69 extern const OSSL_DISPATCH aes256ocb_functions[];
70 extern const OSSL_DISPATCH aes192ocb_functions[];
71 extern const OSSL_DISPATCH aes128ocb_functions[];
72 #endif /* OPENSSL_NO_OCB */
73 extern const OSSL_DISPATCH aes256gcm_functions[];
74 extern const OSSL_DISPATCH aes192gcm_functions[];
75 extern const OSSL_DISPATCH aes128gcm_functions[];
76 extern const OSSL_DISPATCH aes256ccm_functions[];
77 extern const OSSL_DISPATCH aes192ccm_functions[];
78 extern const OSSL_DISPATCH aes128ccm_functions[];
79 extern const OSSL_DISPATCH aes256wrap_functions[];
80 extern const OSSL_DISPATCH aes192wrap_functions[];
81 extern const OSSL_DISPATCH aes128wrap_functions[];
82 extern const OSSL_DISPATCH aes256wrappad_functions[];
83 extern const OSSL_DISPATCH aes192wrappad_functions[];
84 extern const OSSL_DISPATCH aes128wrappad_functions[];
85 extern const OSSL_DISPATCH aes256cbc_hmac_sha1_functions[];
86 extern const OSSL_DISPATCH aes128cbc_hmac_sha1_functions[];
87 extern const OSSL_DISPATCH aes256cbc_hmac_sha256_functions[];
88 extern const OSSL_DISPATCH aes128cbc_hmac_sha256_functions[];
89
90 #ifndef OPENSSL_NO_ARIA
91 extern const OSSL_DISPATCH aria256gcm_functions[];
92 extern const OSSL_DISPATCH aria192gcm_functions[];
93 extern const OSSL_DISPATCH aria128gcm_functions[];
94 extern const OSSL_DISPATCH aria256ccm_functions[];
95 extern const OSSL_DISPATCH aria192ccm_functions[];
96 extern const OSSL_DISPATCH aria128ccm_functions[];
97 extern const OSSL_DISPATCH aria256ecb_functions[];
98 extern const OSSL_DISPATCH aria192ecb_functions[];
99 extern const OSSL_DISPATCH aria128ecb_functions[];
100 extern const OSSL_DISPATCH aria256cbc_functions[];
101 extern const OSSL_DISPATCH aria192cbc_functions[];
102 extern const OSSL_DISPATCH aria128cbc_functions[];
103 extern const OSSL_DISPATCH aria256ofb_functions[];
104 extern const OSSL_DISPATCH aria192ofb_functions[];
105 extern const OSSL_DISPATCH aria128ofb_functions[];
106 extern const OSSL_DISPATCH aria256cfb_functions[];
107 extern const OSSL_DISPATCH aria192cfb_functions[];
108 extern const OSSL_DISPATCH aria128cfb_functions[];
109 extern const OSSL_DISPATCH aria256cfb1_functions[];
110 extern const OSSL_DISPATCH aria192cfb1_functions[];
111 extern const OSSL_DISPATCH aria128cfb1_functions[];
112 extern const OSSL_DISPATCH aria256cfb8_functions[];
113 extern const OSSL_DISPATCH aria192cfb8_functions[];
114 extern const OSSL_DISPATCH aria128cfb8_functions[];
115 extern const OSSL_DISPATCH aria256ctr_functions[];
116 extern const OSSL_DISPATCH aria192ctr_functions[];
117 extern const OSSL_DISPATCH aria128ctr_functions[];
118 #endif /* OPENSSL_NO_ARIA */
119 #ifndef OPENSSL_NO_CAMELLIA
120 extern const OSSL_DISPATCH camellia256ecb_functions[];
121 extern const OSSL_DISPATCH camellia192ecb_functions[];
122 extern const OSSL_DISPATCH camellia128ecb_functions[];
123 extern const OSSL_DISPATCH camellia256cbc_functions[];
124 extern const OSSL_DISPATCH camellia192cbc_functions[];
125 extern const OSSL_DISPATCH camellia128cbc_functions[];
126 extern const OSSL_DISPATCH camellia256ofb_functions[];
127 extern const OSSL_DISPATCH camellia192ofb_functions[];
128 extern const OSSL_DISPATCH camellia128ofb_functions[];
129 extern const OSSL_DISPATCH camellia256cfb_functions[];
130 extern const OSSL_DISPATCH camellia192cfb_functions[];
131 extern const OSSL_DISPATCH camellia128cfb_functions[];
132 extern const OSSL_DISPATCH camellia256cfb1_functions[];
133 extern const OSSL_DISPATCH camellia192cfb1_functions[];
134 extern const OSSL_DISPATCH camellia128cfb1_functions[];
135 extern const OSSL_DISPATCH camellia256cfb8_functions[];
136 extern const OSSL_DISPATCH camellia192cfb8_functions[];
137 extern const OSSL_DISPATCH camellia128cfb8_functions[];
138 extern const OSSL_DISPATCH camellia256ctr_functions[];
139 extern const OSSL_DISPATCH camellia192ctr_functions[];
140 extern const OSSL_DISPATCH camellia128ctr_functions[];
141 #endif /* OPENSSL_NO_CAMELLIA */
142 #ifndef OPENSSL_NO_BF
143 extern const OSSL_DISPATCH blowfish128ecb_functions[];
144 extern const OSSL_DISPATCH blowfish128cbc_functions[];
145 extern const OSSL_DISPATCH blowfish64ofb64_functions[];
146 extern const OSSL_DISPATCH blowfish64cfb64_functions[];
147 #endif /* OPENSSL_NO_BF */
148 #ifndef OPENSSL_NO_IDEA
149 extern const OSSL_DISPATCH idea128ecb_functions[];
150 extern const OSSL_DISPATCH idea128cbc_functions[];
151 extern const OSSL_DISPATCH idea128ofb64_functions[];
152 extern const OSSL_DISPATCH idea128cfb64_functions[];
153 #endif /* OPENSSL_NO_IDEA */
154 #ifndef OPENSSL_NO_CAST
155 extern const OSSL_DISPATCH cast5128ecb_functions[];
156 extern const OSSL_DISPATCH cast5128cbc_functions[];
157 extern const OSSL_DISPATCH cast5128ofb64_functions[];
158 extern const OSSL_DISPATCH cast5128cfb64_functions[];
159 #endif /* OPENSSL_NO_CAST */
160 #ifndef OPENSSL_NO_SEED
161 extern const OSSL_DISPATCH seed128ecb_functions[];
162 extern const OSSL_DISPATCH seed128cbc_functions[];
163 extern const OSSL_DISPATCH seed128ofb128_functions[];
164 extern const OSSL_DISPATCH seed128cfb128_functions[];
165 #endif /* OPENSSL_NO_SEED */
166 #ifndef OPENSSL_NO_SM4
167 extern const OSSL_DISPATCH sm4128ecb_functions[];
168 extern const OSSL_DISPATCH sm4128cbc_functions[];
169 extern const OSSL_DISPATCH sm4128ctr_functions[];
170 extern const OSSL_DISPATCH sm4128ofb128_functions[];
171 extern const OSSL_DISPATCH sm4128cfb128_functions[];
172 #endif /* OPENSSL_NO_SM4 */
173 #ifndef OPENSSL_NO_RC5
174 extern const OSSL_DISPATCH rc5128ecb_functions[];
175 extern const OSSL_DISPATCH rc5128cbc_functions[];
176 extern const OSSL_DISPATCH rc5128ofb64_functions[];
177 extern const OSSL_DISPATCH rc5128cfb64_functions[];
178 #endif /* OPENSSL_NO_RC5 */
179 #ifndef OPENSSL_NO_RC2
180 extern const OSSL_DISPATCH rc2128ecb_functions[];
181 extern const OSSL_DISPATCH rc2128cbc_functions[];
182 extern const OSSL_DISPATCH rc240cbc_functions[];
183 extern const OSSL_DISPATCH rc264cbc_functions[];
184 extern const OSSL_DISPATCH rc2128cfb128_functions[];
185 extern const OSSL_DISPATCH rc2128ofb128_functions[];
186 #endif /* OPENSSL_NO_RC2 */
187 #ifndef OPENSSL_NO_DES
188 extern const OSSL_DISPATCH tdes_ede3_ecb_functions[];
189 extern const OSSL_DISPATCH tdes_ede3_cbc_functions[];
190 # ifndef FIPS_MODULE
191 extern const OSSL_DISPATCH tdes_ede3_ofb_functions[];
192 extern const OSSL_DISPATCH tdes_ede3_cfb_functions[];
193 extern const OSSL_DISPATCH tdes_ede3_cfb8_functions[];
194 extern const OSSL_DISPATCH tdes_ede3_cfb1_functions[];
195
196 extern const OSSL_DISPATCH tdes_ede2_ecb_functions[];
197 extern const OSSL_DISPATCH tdes_ede2_cbc_functions[];
198 extern const OSSL_DISPATCH tdes_ede2_ofb_functions[];
199 extern const OSSL_DISPATCH tdes_ede2_cfb_functions[];
200
201 extern const OSSL_DISPATCH tdes_desx_cbc_functions[];
202 extern const OSSL_DISPATCH tdes_wrap_cbc_functions[];
203
204 extern const OSSL_DISPATCH des_ecb_functions[];
205 extern const OSSL_DISPATCH des_cbc_functions[];
206 extern const OSSL_DISPATCH des_ofb64_functions[];
207 extern const OSSL_DISPATCH des_cfb64_functions[];
208 extern const OSSL_DISPATCH des_cfb1_functions[];
209 extern const OSSL_DISPATCH des_cfb8_functions[];
210 # endif /* FIPS_MODULE */
211 #endif /* OPENSSL_NO_DES */
212
213 #ifndef OPENSSL_NO_RC4
214 extern const OSSL_DISPATCH rc440_functions[];
215 extern const OSSL_DISPATCH rc4128_functions[];
216 # ifndef OPENSSL_NO_MD5
217 extern const OSSL_DISPATCH rc4_hmac_md5_functions[];
218 # endif /* OPENSSL_NO_MD5 */
219 #endif /* OPENSSL_NO_RC4 */
220 #ifndef OPENSSL_NO_CHACHA
221 extern const OSSL_DISPATCH chacha20_functions[];
222 # ifndef OPENSSL_NO_POLY1305
223 extern const OSSL_DISPATCH chacha20_poly1305_functions[];
224 # endif /* OPENSSL_NO_POLY1305 */
225 #endif /* OPENSSL_NO_CHACHA */
226
227
228 #ifndef OPENSSL_NO_SIV
229 extern const OSSL_DISPATCH aes128siv_functions[];
230 extern const OSSL_DISPATCH aes192siv_functions[];
231 extern const OSSL_DISPATCH aes256siv_functions[];
232 #endif /* OPENSSL_NO_SIV */
233
234 /* MACs */
235 extern const OSSL_DISPATCH blake2bmac_functions[];
236 extern const OSSL_DISPATCH blake2smac_functions[];
237 extern const OSSL_DISPATCH cmac_functions[];
238 extern const OSSL_DISPATCH gmac_functions[];
239 extern const OSSL_DISPATCH hmac_functions[];
240 extern const OSSL_DISPATCH kmac128_functions[];
241 extern const OSSL_DISPATCH kmac256_functions[];
242 extern const OSSL_DISPATCH siphash_functions[];
243 extern const OSSL_DISPATCH poly1305_functions[];
244
245 /* KDFs / PRFs */
246 extern const OSSL_DISPATCH kdf_pbkdf2_functions[];
247 #ifndef OPENSSL_NO_SCRYPT
248 extern const OSSL_DISPATCH kdf_scrypt_functions[];
249 #endif
250 extern const OSSL_DISPATCH kdf_tls1_prf_functions[];
251 extern const OSSL_DISPATCH kdf_hkdf_functions[];
252 extern const OSSL_DISPATCH kdf_sshkdf_functions[];
253 extern const OSSL_DISPATCH kdf_sskdf_functions[];
254 extern const OSSL_DISPATCH kdf_x963_kdf_functions[];
255 extern const OSSL_DISPATCH kdf_kbkdf_functions[];
256 #ifndef OPENSSL_NO_CMS
257 extern const OSSL_DISPATCH kdf_x942_kdf_functions[];
258 #endif
259 extern const OSSL_DISPATCH kdf_krb5kdf_functions[];
260
261 /* RNGs */
262 extern const OSSL_DISPATCH test_rng_functions[];
263 extern const OSSL_DISPATCH drbg_hash_functions[];
264 extern const OSSL_DISPATCH drbg_hmac_functions[];
265 extern const OSSL_DISPATCH drbg_ctr_functions[];
266 extern const OSSL_DISPATCH crngt_functions[];
267
268 /* Key management */
269 extern const OSSL_DISPATCH dh_keymgmt_functions[];
270 extern const OSSL_DISPATCH dsa_keymgmt_functions[];
271 extern const OSSL_DISPATCH rsa_keymgmt_functions[];
272 extern const OSSL_DISPATCH rsapss_keymgmt_functions[];
273 extern const OSSL_DISPATCH x25519_keymgmt_functions[];
274 extern const OSSL_DISPATCH x448_keymgmt_functions[];
275 extern const OSSL_DISPATCH ed25519_keymgmt_functions[];
276 extern const OSSL_DISPATCH ed448_keymgmt_functions[];
277 extern const OSSL_DISPATCH ec_keymgmt_functions[];
278
279 /* Key Exchange */
280 extern const OSSL_DISPATCH dh_keyexch_functions[];
281 extern const OSSL_DISPATCH x25519_keyexch_functions[];
282 extern const OSSL_DISPATCH x448_keyexch_functions[];
283 extern const OSSL_DISPATCH ecdh_keyexch_functions[];
284
285 /* Signature */
286 extern const OSSL_DISPATCH dsa_signature_functions[];
287 extern const OSSL_DISPATCH rsa_signature_functions[];
288 extern const OSSL_DISPATCH ed25519_signature_functions[];
289 extern const OSSL_DISPATCH ed448_signature_functions[];
290 extern const OSSL_DISPATCH ecdsa_signature_functions[];
291
292
293 /* Asym Cipher */
294 extern const OSSL_DISPATCH rsa_asym_cipher_functions[];
295
296 /* Serializers */
297 extern const OSSL_DISPATCH rsa_priv_text_serializer_functions[];
298 extern const OSSL_DISPATCH rsa_pub_text_serializer_functions[];
299 extern const OSSL_DISPATCH rsa_priv_der_serializer_functions[];
300 extern const OSSL_DISPATCH rsa_pub_der_serializer_functions[];
301 extern const OSSL_DISPATCH rsa_priv_pem_serializer_functions[];
302 extern const OSSL_DISPATCH rsa_pub_pem_serializer_functions[];
303
304 extern const OSSL_DISPATCH dh_priv_text_serializer_functions[];
305 extern const OSSL_DISPATCH dh_pub_text_serializer_functions[];
306 extern const OSSL_DISPATCH dh_param_text_serializer_functions[];
307 extern const OSSL_DISPATCH dh_priv_der_serializer_functions[];
308 extern const OSSL_DISPATCH dh_pub_der_serializer_functions[];
309 extern const OSSL_DISPATCH dh_param_der_serializer_functions[];
310 extern const OSSL_DISPATCH dh_priv_pem_serializer_functions[];
311 extern const OSSL_DISPATCH dh_pub_pem_serializer_functions[];
312 extern const OSSL_DISPATCH dh_param_pem_serializer_functions[];
313
314 extern const OSSL_DISPATCH dsa_priv_text_serializer_functions[];
315 extern const OSSL_DISPATCH dsa_pub_text_serializer_functions[];
316 extern const OSSL_DISPATCH dsa_param_text_serializer_functions[];
317 extern const OSSL_DISPATCH dsa_priv_der_serializer_functions[];
318 extern const OSSL_DISPATCH dsa_pub_der_serializer_functions[];
319 extern const OSSL_DISPATCH dsa_param_der_serializer_functions[];
320 extern const OSSL_DISPATCH dsa_priv_pem_serializer_functions[];
321 extern const OSSL_DISPATCH dsa_pub_pem_serializer_functions[];
322 extern const OSSL_DISPATCH dsa_param_pem_serializer_functions[];
323
324 extern const OSSL_DISPATCH x25519_priv_print_serializer_functions[];
325 extern const OSSL_DISPATCH x25519_pub_print_serializer_functions[];
326 extern const OSSL_DISPATCH x25519_priv_der_serializer_functions[];
327 extern const OSSL_DISPATCH x25519_pub_der_serializer_functions[];
328 extern const OSSL_DISPATCH x25519_priv_pem_serializer_functions[];
329 extern const OSSL_DISPATCH x25519_pub_pem_serializer_functions[];
330
331 extern const OSSL_DISPATCH x448_priv_print_serializer_functions[];
332 extern const OSSL_DISPATCH x448_pub_print_serializer_functions[];
333 extern const OSSL_DISPATCH x448_priv_der_serializer_functions[];
334 extern const OSSL_DISPATCH x448_pub_der_serializer_functions[];
335 extern const OSSL_DISPATCH x448_priv_pem_serializer_functions[];
336 extern const OSSL_DISPATCH x448_pub_pem_serializer_functions[];
337
338 extern const OSSL_DISPATCH ed25519_priv_print_serializer_functions[];
339 extern const OSSL_DISPATCH ed25519_pub_print_serializer_functions[];
340 extern const OSSL_DISPATCH ed25519_priv_der_serializer_functions[];
341 extern const OSSL_DISPATCH ed25519_pub_der_serializer_functions[];
342 extern const OSSL_DISPATCH ed25519_priv_pem_serializer_functions[];
343 extern const OSSL_DISPATCH ed25519_pub_pem_serializer_functions[];
344
345 extern const OSSL_DISPATCH ed448_priv_print_serializer_functions[];
346 extern const OSSL_DISPATCH ed448_pub_print_serializer_functions[];
347 extern const OSSL_DISPATCH ed448_priv_der_serializer_functions[];
348 extern const OSSL_DISPATCH ed448_pub_der_serializer_functions[];
349 extern const OSSL_DISPATCH ed448_priv_pem_serializer_functions[];
350 extern const OSSL_DISPATCH ed448_pub_pem_serializer_functions[];
351
352 extern const OSSL_DISPATCH ec_priv_text_serializer_functions[];
353 extern const OSSL_DISPATCH ec_pub_text_serializer_functions[];
354 extern const OSSL_DISPATCH ec_param_text_serializer_functions[];
355 extern const OSSL_DISPATCH ec_priv_der_serializer_functions[];
356 extern const OSSL_DISPATCH ec_pub_der_serializer_functions[];
357 extern const OSSL_DISPATCH ec_param_der_serializer_functions[];
358 extern const OSSL_DISPATCH ec_priv_pem_serializer_functions[];
359 extern const OSSL_DISPATCH ec_pub_pem_serializer_functions[];
360 extern const OSSL_DISPATCH ec_param_pem_serializer_functions[];
361
362 extern const OSSL_DISPATCH der_to_rsa_deserializer_functions[];
363 extern const OSSL_DISPATCH pem_to_der_deserializer_functions[];