1 /**
2  * This file is intended to be used to build PSA test driver libraries. It is
3  * intended to be appended by the test build system to the crypto_config.h file
4  * of the Mbed TLS library the test library will be linked to. It mirrors the
5  * PSA_ACCEL_* macros defining the cryptographic operations the test library
6  * supports.
7  */
8 
9 #include "psa/crypto_legacy.h"
10 
11 #if defined(PSA_WANT_ALG_CBC_NO_PADDING)
12 #if defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING)
13 #undef MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING
14 #else
15 #define MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING 1
16 #endif
17 #endif
18 
19 #if defined(PSA_WANT_ALG_CBC_PKCS7)
20 #if defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7)
21 #undef MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7
22 #else
23 #define MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7 1
24 #endif
25 #endif
26 
27 #if defined(PSA_WANT_ALG_CFB)
28 #if defined(MBEDTLS_PSA_ACCEL_ALG_CFB)
29 #undef MBEDTLS_PSA_ACCEL_ALG_CFB
30 #else
31 #define MBEDTLS_PSA_ACCEL_ALG_CFB 1
32 #endif
33 #endif
34 
35 #if defined(PSA_WANT_ALG_CMAC)
36 #if defined(MBEDTLS_PSA_ACCEL_ALG_CMAC)
37 #undef MBEDTLS_PSA_ACCEL_ALG_CMAC
38 #else
39 #define MBEDTLS_PSA_ACCEL_ALG_CMAC 1
40 #endif
41 #endif
42 
43 #if defined(PSA_WANT_ALG_CTR)
44 #if defined(MBEDTLS_PSA_ACCEL_ALG_CTR)
45 #undef MBEDTLS_PSA_ACCEL_ALG_CTR
46 #else
47 #define MBEDTLS_PSA_ACCEL_ALG_CTR 1
48 #endif
49 #endif
50 
51 #if defined(PSA_WANT_ALG_STREAM_CIPHER)
52 #if defined(MBEDTLS_PSA_ACCEL_ALG_STREAM_CIPHER)
53 #undef MBEDTLS_PSA_ACCEL_ALG_STREAM_CIPHER
54 #else
55 #define MBEDTLS_PSA_ACCEL_ALG_STREAM_CIPHER 1
56 #endif
57 #endif
58 
59 #if defined(PSA_WANT_ALG_ECB_NO_PADDING)
60 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING)
61 #undef MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING
62 #else
63 #define MBEDTLS_PSA_ACCEL_ALG_ECB_NO_PADDING 1
64 #endif
65 #endif
66 
67 #if defined(PSA_WANT_ECC_BRAINPOOL_P_R1_256)
68 #if defined(MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256)
69 #undef MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256
70 #else
71 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256 1
72 #endif
73 #endif
74 
75 #if defined(PSA_WANT_ECC_BRAINPOOL_P_R1_384)
76 #if defined(MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384)
77 #undef MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384
78 #else
79 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384 1
80 #endif
81 #endif
82 
83 #if defined(PSA_WANT_ECC_BRAINPOOL_P_R1_512)
84 #if defined(MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512)
85 #undef MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512
86 #else
87 #define MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512 1
88 #endif
89 #endif
90 
91 #if defined(PSA_WANT_ECC_MONTGOMERY_255)
92 #if defined(MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255)
93 #undef MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255
94 #else
95 #define MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255 1
96 #endif
97 #endif
98 
99 #if defined(PSA_WANT_ECC_MONTGOMERY_448)
100 #if defined(MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448)
101 #undef MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448
102 #else
103 #define MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448 1
104 #endif
105 #endif
106 
107 #if defined(PSA_WANT_ECC_SECP_K1_192)
108 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192)
109 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192
110 #else
111 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192 1
112 #endif
113 #endif
114 
115 #if defined(PSA_WANT_ECC_SECP_K1_224)
116 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224)
117 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224
118 #else
119 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224 1
120 #endif
121 #endif
122 
123 #if defined(PSA_WANT_ECC_SECP_K1_256)
124 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256)
125 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256
126 #else
127 #define MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256 1
128 #endif
129 #endif
130 
131 #if defined(PSA_WANT_ECC_SECP_R1_192)
132 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192)
133 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192
134 #else
135 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192 1
136 #endif
137 #endif
138 
139 #if defined(PSA_WANT_ECC_SECP_R1_224)
140 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224)
141 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224
142 #else
143 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224 1
144 #endif
145 #endif
146 
147 #if defined(PSA_WANT_ECC_SECP_R1_256)
148 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256)
149 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256
150 #else
151 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256 1
152 #endif
153 #endif
154 
155 #if defined(PSA_WANT_ECC_SECP_R1_384)
156 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384)
157 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384
158 #else
159 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384 1
160 #endif
161 #endif
162 
163 #if defined(PSA_WANT_ECC_SECP_R1_521)
164 #if defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521)
165 #undef MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521
166 #else
167 #define MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521 1
168 #endif
169 #endif
170 
171 #if defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA)
172 #if defined(MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA)
173 #undef MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA
174 #else
175 #define MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA 1
176 #endif
177 #endif
178 
179 #if defined(PSA_WANT_ALG_ECDSA)
180 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA)
181 #undef MBEDTLS_PSA_ACCEL_ALG_ECDSA
182 #else
183 #define MBEDTLS_PSA_ACCEL_ALG_ECDSA 1
184 #endif
185 #endif
186 
187 #if defined(PSA_WANT_ALG_ECDH)
188 #if defined(MBEDTLS_PSA_ACCEL_ALG_ECDH)
189 #undef MBEDTLS_PSA_ACCEL_ALG_ECDH
190 #else
191 #define MBEDTLS_PSA_ACCEL_ALG_ECDH 1
192 #endif
193 #endif
194 
195 #if defined(PSA_WANT_DH_RFC7919_2048)
196 #if defined(MBEDTLS_PSA_ACCEL_DH_RFC7919_2048)
197 #undef MBEDTLS_PSA_ACCEL_DH_RFC7919_2048
198 #else
199 #define MBEDTLS_PSA_ACCEL_DH_RFC7919_2048
200 #endif
201 #endif
202 
203 #if defined(PSA_WANT_DH_RFC7919_3072)
204 #if defined(MBEDTLS_PSA_ACCEL_DH_RFC7919_3072)
205 #undef MBEDTLS_PSA_ACCEL_DH_RFC7919_3072
206 #else
207 #define MBEDTLS_PSA_ACCEL_DH_RFC7919_3072
208 #endif
209 #endif
210 
211 #if defined(PSA_WANT_DH_RFC7919_4096)
212 #if defined(MBEDTLS_PSA_ACCEL_DH_RFC7919_4096)
213 #undef MBEDTLS_PSA_ACCEL_DH_RFC7919_4096
214 #else
215 #define MBEDTLS_PSA_ACCEL_DH_RFC7919_4096
216 #endif
217 #endif
218 
219 #if defined(PSA_WANT_DH_RFC7919_6144)
220 #if defined(MBEDTLS_PSA_ACCEL_DH_RFC7919_6144)
221 #undef MBEDTLS_PSA_ACCEL_DH_RFC7919_6144
222 #else
223 #define MBEDTLS_PSA_ACCEL_DH_RFC7919_6144
224 #endif
225 #endif
226 
227 #if defined(PSA_WANT_DH_RFC7919_8192)
228 #if defined(MBEDTLS_PSA_ACCEL_DH_RFC7919_8192)
229 #undef MBEDTLS_PSA_ACCEL_DH_RFC7919_8192
230 #else
231 #define MBEDTLS_PSA_ACCEL_DH_RFC7919_8192
232 #endif
233 #endif
234 
235 #if defined(PSA_WANT_ALG_FFDH)
236 #if defined(MBEDTLS_PSA_ACCEL_ALG_FFDH)
237 #undef MBEDTLS_PSA_ACCEL_ALG_FFDH
238 #else
239 #define MBEDTLS_PSA_ACCEL_ALG_FFDH 1
240 #endif
241 #endif
242 
243 #if defined(PSA_WANT_ALG_MD5)
244 #if defined(MBEDTLS_PSA_ACCEL_ALG_MD5)
245 #undef MBEDTLS_PSA_ACCEL_ALG_MD5
246 #else
247 #define MBEDTLS_PSA_ACCEL_ALG_MD5 1
248 #endif
249 #endif
250 
251 #if defined(PSA_WANT_ALG_OFB)
252 #if defined(MBEDTLS_PSA_ACCEL_ALG_OFB)
253 #undef MBEDTLS_PSA_ACCEL_ALG_OFB
254 #else
255 #define MBEDTLS_PSA_ACCEL_ALG_OFB 1
256 #endif
257 #endif
258 
259 #if defined(PSA_WANT_ALG_RIPEMD160)
260 #if defined(MBEDTLS_PSA_ACCEL_ALG_RIPEMD160)
261 #undef MBEDTLS_PSA_ACCEL_ALG_RIPEMD160
262 #else
263 #define MBEDTLS_PSA_ACCEL_ALG_RIPEMD160 1
264 #endif
265 #endif
266 
267 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
268 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN)
269 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN
270 #else
271 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN 1
272 #endif
273 #endif
274 
275 #if defined(PSA_WANT_ALG_RSA_PSS)
276 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PSS)
277 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PSS
278 #else
279 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PSS 1
280 #endif
281 #endif
282 
283 #if defined(PSA_WANT_ALG_SHA_1)
284 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_1)
285 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_1
286 #else
287 #define MBEDTLS_PSA_ACCEL_ALG_SHA_1 1
288 #endif
289 #endif
290 
291 #if defined(PSA_WANT_ALG_SHA_224)
292 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_224)
293 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_224
294 #else
295 #define MBEDTLS_PSA_ACCEL_ALG_SHA_224 1
296 #endif
297 #endif
298 
299 #if defined(PSA_WANT_ALG_SHA_256)
300 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_256)
301 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_256
302 #else
303 #define MBEDTLS_PSA_ACCEL_ALG_SHA_256 1
304 #endif
305 #endif
306 
307 #if defined(PSA_WANT_ALG_SHA_384)
308 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_384)
309 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_384
310 #else
311 #define MBEDTLS_PSA_ACCEL_ALG_SHA_384 1
312 #endif
313 #endif
314 
315 #if defined(PSA_WANT_ALG_SHA_512)
316 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA_512)
317 #undef MBEDTLS_PSA_ACCEL_ALG_SHA_512
318 #else
319 #define MBEDTLS_PSA_ACCEL_ALG_SHA_512 1
320 #endif
321 #endif
322 
323 #if defined(PSA_WANT_ALG_SHA3_224)
324 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA3_224)
325 #undef MBEDTLS_PSA_ACCEL_ALG_SHA3_224
326 #else
327 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_224 1
328 #endif
329 #endif
330 
331 #if defined(PSA_WANT_ALG_SHA3_256)
332 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA3_256)
333 #undef MBEDTLS_PSA_ACCEL_ALG_SHA3_256
334 #else
335 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_256 1
336 #endif
337 #endif
338 
339 #if defined(PSA_WANT_ALG_SHA3_384)
340 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA3_384)
341 #undef MBEDTLS_PSA_ACCEL_ALG_SHA3_384
342 #else
343 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_384 1
344 #endif
345 #endif
346 
347 #if defined(PSA_WANT_ALG_SHA3_512)
348 #if defined(MBEDTLS_PSA_ACCEL_ALG_SHA3_512)
349 #undef MBEDTLS_PSA_ACCEL_ALG_SHA3_512
350 #else
351 #define MBEDTLS_PSA_ACCEL_ALG_SHA3_512 1
352 #endif
353 #endif
354 
355 #if defined(PSA_WANT_ALG_XTS)
356 #if defined(MBEDTLS_PSA_ACCEL_ALG_XTS)
357 #undef MBEDTLS_PSA_ACCEL_ALG_XTS
358 #else
359 #define MBEDTLS_PSA_ACCEL_ALG_XTS 1
360 #endif
361 #endif
362 
363 #if defined(PSA_WANT_ALG_CHACHA20_POLY1305)
364 #if defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305)
365 #undef MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305
366 #else
367 #define MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 1
368 #endif
369 #endif
370 
371 #if defined(PSA_WANT_ALG_JPAKE)
372 #if defined(MBEDTLS_PSA_ACCEL_ALG_JPAKE)
373 #undef MBEDTLS_PSA_ACCEL_ALG_JPAKE
374 #else
375 #define MBEDTLS_PSA_ACCEL_ALG_JPAKE 1
376 #endif
377 #endif
378 
379 #if defined(PSA_WANT_KEY_TYPE_AES)
380 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)
381 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_AES
382 #else
383 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_AES 1
384 #endif
385 #endif
386 
387 #if defined(PSA_WANT_KEY_TYPE_ARIA)
388 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA)
389 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA
390 #else
391 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA 1
392 #endif
393 #endif
394 
395 #if defined(PSA_WANT_KEY_TYPE_CAMELLIA)
396 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA)
397 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA
398 #else
399 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA 1
400 #endif
401 #endif
402 
403 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC)
404 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_BASIC)
405 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_BASIC
406 #else
407 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_BASIC 1
408 #endif
409 #endif
410 
411 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT)
412 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_IMPORT)
413 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_IMPORT
414 #else
415 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1
416 #endif
417 #endif
418 
419 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT)
420 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_EXPORT)
421 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_EXPORT
422 #else
423 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1
424 #endif
425 #endif
426 
427 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE)
428 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_GENERATE)
429 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_GENERATE
430 #else
431 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1
432 #endif
433 #endif
434 
435 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_DERIVE)
436 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_DERIVE)
437 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_DERIVE
438 #else
439 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR_DERIVE 1
440 #endif
441 #endif
442 
443 #if defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_BASIC)
444 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_BASIC)
445 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_BASIC
446 #else
447 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_BASIC 1
448 #endif
449 #endif
450 
451 #if defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_IMPORT)
452 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_IMPORT)
453 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_IMPORT
454 #else
455 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_IMPORT 1
456 #endif
457 #endif
458 
459 #if defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_EXPORT)
460 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_EXPORT)
461 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_EXPORT
462 #else
463 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_EXPORT 1
464 #endif
465 #endif
466 
467 #if defined(PSA_WANT_KEY_TYPE_DH_KEY_PAIR_GENERATE)
468 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_GENERATE)
469 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_GENERATE
470 #else
471 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_KEY_PAIR_GENERATE 1
472 #endif
473 #endif
474 
475 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC)
476 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_BASIC)
477 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_BASIC
478 #else
479 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_BASIC 1
480 #endif
481 #endif
482 
483 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT)
484 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_IMPORT)
485 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_IMPORT
486 #else
487 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_IMPORT 1
488 #endif
489 #endif
490 
491 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT)
492 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_EXPORT)
493 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_EXPORT
494 #else
495 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_EXPORT 1
496 #endif
497 #endif
498 
499 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE)
500 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_GENERATE)
501 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_GENERATE
502 #else
503 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR_GENERATE 1
504 #endif
505 #endif
506 
507 #if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
508 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY)
509 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY
510 #else
511 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY 1
512 #endif
513 #endif
514 
515 #if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
516 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY)
517 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY
518 #else
519 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY 1
520 #endif
521 #endif
522 
523 #if defined(PSA_WANT_KEY_TYPE_DH_PUBLIC_KEY)
524 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_PUBLIC_KEY)
525 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_PUBLIC_KEY
526 #else
527 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DH_PUBLIC_KEY 1
528 #endif
529 #endif
530 
531 #if defined(PSA_WANT_KEY_TYPE_CHACHA20)
532 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20)
533 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20
534 #else
535 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20 1
536 #endif
537 #endif
538 
539 
540 #if defined(PSA_WANT_ALG_TLS12_PRF)
541 #if defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF)
542 #undef MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF
543 #else
544 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF 1
545 #endif
546 #endif
547 
548 #if defined(PSA_WANT_ALG_TLS12_PSK_TO_MS)
549 #if defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS)
550 #undef MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS
551 #else
552 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS 1
553 #endif
554 #endif
555 
556 #if defined(PSA_WANT_ALG_TLS12_ECJPAKE_TO_PMS)
557 #if defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_ECJPAKE_TO_PMS)
558 #undef MBEDTLS_PSA_ACCEL_ALG_TLS12_ECJPAKE_TO_PMS
559 #else
560 #define MBEDTLS_PSA_ACCEL_ALG_TLS12_ECJPAKE_TO_PMS 1
561 #endif
562 #endif
563 
564 #if defined(PSA_WANT_ALG_GCM)
565 #if defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
566 #undef MBEDTLS_PSA_ACCEL_ALG_GCM
567 #else
568 #define MBEDTLS_PSA_ACCEL_ALG_GCM 1
569 #endif
570 #endif
571 
572 #if defined(PSA_WANT_ALG_CCM)
573 #if defined(MBEDTLS_PSA_ACCEL_ALG_CCM)
574 #undef MBEDTLS_PSA_ACCEL_ALG_CCM
575 #else
576 #define MBEDTLS_PSA_ACCEL_ALG_CCM 1
577 #endif
578 #endif
579 
580 #if defined(PSA_WANT_ALG_CCM_STAR_NO_TAG)
581 #if defined(MBEDTLS_PSA_ACCEL_ALG_CCM_STAR_NO_TAG)
582 #undef MBEDTLS_PSA_ACCEL_ALG_CCM_STAR_NO_TAG
583 #else
584 #define MBEDTLS_PSA_ACCEL_ALG_CCM_STAR_NO_TAG 1
585 #endif
586 #endif
587 
588 #if defined(PSA_WANT_ALG_CBC_MAC)
589 #if defined(MBEDTLS_PSA_ACCEL_ALG_CBC_MAC)
590 #undef MBEDTLS_PSA_ACCEL_ALG_CBC_MAC
591 #else
592 #define MBEDTLS_PSA_ACCEL_ALG_CBC_MAC 1
593 #endif
594 #endif
595 
596 #if defined(PSA_WANT_ALG_HMAC)
597 #if defined(MBEDTLS_PSA_ACCEL_ALG_HMAC)
598 #undef MBEDTLS_PSA_ACCEL_ALG_HMAC
599 #else
600 #define MBEDTLS_PSA_ACCEL_ALG_HMAC 1
601 #endif
602 #endif
603 
604 #if defined(PSA_WANT_ALG_HKDF)
605 #if defined(MBEDTLS_PSA_ACCEL_ALG_HKDF)
606 #undef MBEDTLS_PSA_ACCEL_ALG_HKDF
607 #else
608 #define MBEDTLS_PSA_ACCEL_ALG_HKDF 1
609 #endif
610 #endif
611 
612 #if defined(PSA_WANT_ALG_HKDF_EXTRACT)
613 #if defined(MBEDTLS_PSA_ACCEL_ALG_HKDF_EXTRACT)
614 #undef MBEDTLS_PSA_ACCEL_ALG_HKDF_EXTRACT
615 #else
616 #define MBEDTLS_PSA_ACCEL_ALG_HKDF_EXTRACT 1
617 #endif
618 #endif
619 
620 #if defined(PSA_WANT_ALG_HKDF_EXPAND)
621 #if defined(MBEDTLS_PSA_ACCEL_ALG_HKDF_EXPAND)
622 #undef MBEDTLS_PSA_ACCEL_ALG_HKDF_EXPAND
623 #else
624 #define MBEDTLS_PSA_ACCEL_ALG_HKDF_EXPAND 1
625 #endif
626 #endif
627 
628 #if defined(PSA_WANT_ALG_RSA_OAEP)
629 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP)
630 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP
631 #else
632 #define MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP 1
633 #endif
634 #endif
635 
636 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_CRYPT)
637 #if defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT)
638 #undef MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT
639 #else
640 #define MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT 1
641 #endif
642 #endif
643 
644 #if defined(PSA_WANT_KEY_TYPE_DERIVE)
645 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DERIVE)
646 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DERIVE
647 #else
648 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DERIVE 1
649 #endif
650 #endif
651 
652 #if defined(PSA_WANT_KEY_TYPE_HMAC)
653 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_HMAC)
654 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_HMAC
655 #else
656 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_HMAC 1
657 #endif
658 #endif
659 
660 #if defined(PSA_WANT_KEY_TYPE_DES)
661 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DES)
662 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_DES
663 #else
664 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_DES 1
665 #endif
666 #endif
667 
668 #if defined(PSA_WANT_KEY_TYPE_RAW_DATA)
669 #if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RAW_DATA)
670 #undef MBEDTLS_PSA_ACCEL_KEY_TYPE_RAW_DATA
671 #else
672 #define MBEDTLS_PSA_ACCEL_KEY_TYPE_RAW_DATA 1
673 #endif
674 #endif
675