mbed TLS v3.1.0
config_psa.h
Go to the documentation of this file.
1 
13 /*
14  * Copyright The Mbed TLS Contributors
15  * SPDX-License-Identifier: Apache-2.0
16  *
17  * Licensed under the Apache License, Version 2.0 (the "License"); you may
18  * not use this file except in compliance with the License.
19  * You may obtain a copy of the License at
20  *
21  * http://www.apache.org/licenses/LICENSE-2.0
22  *
23  * Unless required by applicable law or agreed to in writing, software
24  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
25  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26  * See the License for the specific language governing permissions and
27  * limitations under the License.
28  */
29 
30 #ifndef MBEDTLS_CONFIG_PSA_H
31 #define MBEDTLS_CONFIG_PSA_H
32 
33 #if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
34 #ifdef _RTE_
35 #include "mbedTLS_crypto_config.h"
36 #else
38 #endif
39 #endif /* defined(MBEDTLS_PSA_CRYPTO_CONFIG) */
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 
46 
47 /****************************************************************/
48 /* De facto synonyms */
49 /****************************************************************/
50 
51 #if defined(PSA_WANT_ALG_ECDSA_ANY) && !defined(PSA_WANT_ALG_ECDSA)
52 #define PSA_WANT_ALG_ECDSA PSA_WANT_ALG_ECDSA_ANY
53 #elif !defined(PSA_WANT_ALG_ECDSA_ANY) && defined(PSA_WANT_ALG_ECDSA)
54 #define PSA_WANT_ALG_ECDSA_ANY PSA_WANT_ALG_ECDSA
55 #endif
56 
57 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
58 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW
59 #elif !defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW) && defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
60 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW PSA_WANT_ALG_RSA_PKCS1V15_SIGN
61 #endif
62 
63 #if defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && !defined(PSA_WANT_ALG_RSA_PSS)
64 #define PSA_WANT_ALG_RSA_PSS PSA_WANT_ALG_RSA_PSS_ANY_SALT
65 #elif !defined(PSA_WANT_ALG_RSA_PSS_ANY_SALT) && defined(PSA_WANT_ALG_RSA_PSS)
66 #define PSA_WANT_ALG_RSA_PSS_ANY_SALT PSA_WANT_ALG_RSA_PSS
67 #endif
68 
69 
70 
71 /****************************************************************/
72 /* Require built-in implementations based on PSA requirements */
73 /****************************************************************/
74 
75 #if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
76 
77 #if defined(PSA_WANT_ALG_DETERMINISTIC_ECDSA)
78 #if !defined(MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA)
79 #define MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA 1
80 #define MBEDTLS_ECDSA_DETERMINISTIC
81 #define MBEDTLS_ECDSA_C
82 #define MBEDTLS_HMAC_DRBG_C
83 #define MBEDTLS_MD_C
84 #endif /* !MBEDTLS_PSA_ACCEL_ALG_DETERMINISTIC_ECDSA */
85 #endif /* PSA_WANT_ALG_DETERMINISTIC_ECDSA */
86 
87 #if defined(PSA_WANT_ALG_ECDH)
88 #if !defined(MBEDTLS_PSA_ACCEL_ALG_ECDH)
89 #define MBEDTLS_PSA_BUILTIN_ALG_ECDH 1
90 #define MBEDTLS_ECDH_C
91 #define MBEDTLS_ECP_C
92 #define MBEDTLS_BIGNUM_C
93 #endif /* !MBEDTLS_PSA_ACCEL_ALG_ECDH */
94 #endif /* PSA_WANT_ALG_ECDH */
95 
96 #if defined(PSA_WANT_ALG_ECDSA)
97 #if !defined(MBEDTLS_PSA_ACCEL_ALG_ECDSA)
98 #define MBEDTLS_PSA_BUILTIN_ALG_ECDSA 1
99 #define MBEDTLS_ECDSA_C
100 #define MBEDTLS_ECP_C
101 #define MBEDTLS_BIGNUM_C
102 #define MBEDTLS_ASN1_PARSE_C
103 #define MBEDTLS_ASN1_WRITE_C
104 #endif /* !MBEDTLS_PSA_ACCEL_ALG_ECDSA */
105 #endif /* PSA_WANT_ALG_ECDSA */
106 
107 #if defined(PSA_WANT_ALG_HKDF)
108 #if !defined(MBEDTLS_PSA_ACCEL_ALG_HKDF)
109 #define MBEDTLS_PSA_BUILTIN_ALG_HMAC 1
110 #define MBEDTLS_PSA_BUILTIN_ALG_HKDF 1
111 #endif /* !MBEDTLS_PSA_ACCEL_ALG_HKDF */
112 #endif /* PSA_WANT_ALG_HKDF */
113 
114 #if defined(PSA_WANT_ALG_HMAC)
115 #if !defined(MBEDTLS_PSA_ACCEL_ALG_HMAC)
116 #define MBEDTLS_PSA_BUILTIN_ALG_HMAC 1
117 #endif /* !MBEDTLS_PSA_ACCEL_ALG_HMAC */
118 #endif /* PSA_WANT_ALG_HMAC */
119 
120 #if defined(PSA_WANT_ALG_MD5) && !defined(MBEDTLS_PSA_ACCEL_ALG_MD5)
121 #define MBEDTLS_PSA_BUILTIN_ALG_MD5 1
122 #define MBEDTLS_MD5_C
123 #endif
124 
125 #if defined(PSA_WANT_ALG_RIPEMD160) && !defined(MBEDTLS_PSA_ACCEL_ALG_RIPEMD160)
126 #define MBEDTLS_PSA_BUILTIN_ALG_RIPEMD160 1
127 #define MBEDTLS_RIPEMD160_C
128 #endif
129 
130 #if defined(PSA_WANT_ALG_RSA_OAEP)
131 #if !defined(MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP)
132 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_OAEP 1
133 #define MBEDTLS_RSA_C
134 #define MBEDTLS_BIGNUM_C
135 #define MBEDTLS_OID_C
136 #define MBEDTLS_PKCS1_V21
137 #define MBEDTLS_MD_C
138 #endif /* !MBEDTLS_PSA_ACCEL_ALG_RSA_OAEP */
139 #endif /* PSA_WANT_ALG_RSA_OAEP */
140 
141 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_CRYPT)
142 #if !defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT)
143 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT 1
144 #define MBEDTLS_RSA_C
145 #define MBEDTLS_BIGNUM_C
146 #define MBEDTLS_OID_C
147 #define MBEDTLS_PKCS1_V15
148 #endif /* !MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT */
149 #endif /* PSA_WANT_ALG_RSA_PKCS1V15_CRYPT */
150 
151 #if defined(PSA_WANT_ALG_RSA_PKCS1V15_SIGN)
152 #if !defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN)
153 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_SIGN 1
154 #define MBEDTLS_RSA_C
155 #define MBEDTLS_BIGNUM_C
156 #define MBEDTLS_OID_C
157 #define MBEDTLS_PKCS1_V15
158 #define MBEDTLS_MD_C
159 #endif /* !MBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN */
160 #endif /* PSA_WANT_ALG_RSA_PKCS1V15_SIGN */
161 
162 #if defined(PSA_WANT_ALG_RSA_PSS)
163 #if !defined(MBEDTLS_PSA_ACCEL_ALG_RSA_PSS)
164 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_PSS 1
165 #define MBEDTLS_RSA_C
166 #define MBEDTLS_BIGNUM_C
167 #define MBEDTLS_OID_C
168 #define MBEDTLS_PKCS1_V21
169 #define MBEDTLS_MD_C
170 #endif /* !MBEDTLS_PSA_ACCEL_ALG_RSA_PSS */
171 #endif /* PSA_WANT_ALG_RSA_PSS */
172 
173 #if defined(PSA_WANT_ALG_SHA_1) && !defined(MBEDTLS_PSA_ACCEL_ALG_SHA_1)
174 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_1 1
175 #define MBEDTLS_SHA1_C
176 #endif
177 
178 #if defined(PSA_WANT_ALG_SHA_224) && !defined(MBEDTLS_PSA_ACCEL_ALG_SHA_224)
179 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_224 1
180 #define MBEDTLS_SHA224_C
181 #endif
182 
183 #if defined(PSA_WANT_ALG_SHA_256) && !defined(MBEDTLS_PSA_ACCEL_ALG_SHA_256)
184 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_256 1
185 #define MBEDTLS_SHA256_C
186 #endif
187 
188 #if defined(PSA_WANT_ALG_SHA_384) && !defined(MBEDTLS_PSA_ACCEL_ALG_SHA_384)
189 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_384 1
190 #define MBEDTLS_SHA384_C
191 #endif
192 
193 #if defined(PSA_WANT_ALG_SHA_512) && !defined(MBEDTLS_PSA_ACCEL_ALG_SHA_512)
194 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_512 1
195 #define MBEDTLS_SHA512_C
196 #endif
197 
198 #if defined(PSA_WANT_ALG_TLS12_PRF)
199 #if !defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF)
200 #define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF 1
201 #endif /* !MBEDTLS_PSA_ACCEL_ALG_TLS12_PRF */
202 #endif /* PSA_WANT_ALG_TLS12_PRF */
203 
204 #if defined(PSA_WANT_ALG_TLS12_PSK_TO_MS)
205 #if !defined(MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS)
206 #define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PSK_TO_MS 1
207 #endif /* !MBEDTLS_PSA_ACCEL_ALG_TLS12_PSK_TO_MS */
208 #endif /* PSA_WANT_ALG_TLS12_PSK_TO_MS */
209 
210 #if defined(PSA_WANT_KEY_TYPE_ECC_KEY_PAIR)
211 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR)
212 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR 1
213 #define MBEDTLS_ECP_C
214 #define MBEDTLS_BIGNUM_C
215 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_KEY_PAIR */
216 #endif /* PSA_WANT_KEY_TYPE_ECC_KEY_PAIR */
217 
218 #if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
219 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY)
220 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_PUBLIC_KEY 1
221 #define MBEDTLS_ECP_C
222 #define MBEDTLS_BIGNUM_C
223 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_ECC_PUBLIC_KEY */
224 #endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY */
225 
226 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR)
227 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR)
228 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_KEY_PAIR 1
229 #define MBEDTLS_RSA_C
230 #define MBEDTLS_BIGNUM_C
231 #define MBEDTLS_OID_C
232 #define MBEDTLS_GENPRIME
233 #define MBEDTLS_PK_PARSE_C
234 #define MBEDTLS_PK_WRITE_C
235 #define MBEDTLS_PK_C
236 #define MBEDTLS_ASN1_PARSE_C
237 #define MBEDTLS_ASN1_WRITE_C
238 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR */
239 #endif /* PSA_WANT_KEY_TYPE_RSA_KEY_PAIR */
240 
241 #if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
242 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY)
243 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_PUBLIC_KEY 1
244 #define MBEDTLS_RSA_C
245 #define MBEDTLS_BIGNUM_C
246 #define MBEDTLS_OID_C
247 #define MBEDTLS_PK_PARSE_C
248 #define MBEDTLS_PK_WRITE_C
249 #define MBEDTLS_PK_C
250 #define MBEDTLS_ASN1_PARSE_C
251 #define MBEDTLS_ASN1_WRITE_C
252 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY */
253 #endif /* PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY */
254 
255 /* If any of the block modes are requested that don't have an
256  * associated HW assist, define PSA_HAVE_SOFT_BLOCK_MODE for checking
257  * in the block cipher key types. */
258 #if (defined(PSA_WANT_ALG_CTR) && !defined(MBEDTLS_PSA_ACCEL_ALG_CTR)) || \
259  (defined(PSA_WANT_ALG_CFB) && !defined(MBEDTLS_PSA_ACCEL_ALG_CFB)) || \
260  (defined(PSA_WANT_ALG_OFB) && !defined(MBEDTLS_PSA_ACCEL_ALG_OFB)) || \
261  (defined(PSA_WANT_ALG_XTS) && !defined(MBEDTLS_PSA_ACCEL_ALG_XTS)) || \
262  defined(PSA_WANT_ALG_ECB_NO_PADDING) || \
263  (defined(PSA_WANT_ALG_CBC_NO_PADDING) && \
264  !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING)) || \
265  (defined(PSA_WANT_ALG_CBC_PKCS7) && \
266  !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7)) || \
267  (defined(PSA_WANT_ALG_CMAC) && !defined(MBEDTLS_PSA_ACCEL_ALG_CMAC))
268 #define PSA_HAVE_SOFT_BLOCK_MODE 1
269 #endif
270 
271 #if (defined(PSA_WANT_ALG_GCM) && !defined(MBEDTLS_PSA_ACCEL_ALG_GCM)) || \
272  (defined(PSA_WANT_ALG_CCM) && !defined(MBEDTLS_PSA_ACCEL_ALG_CCM))
273 #define PSA_HAVE_SOFT_BLOCK_AEAD 1
274 #endif
275 
276 #if defined(PSA_WANT_KEY_TYPE_AES)
277 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)
278 #define PSA_HAVE_SOFT_KEY_TYPE_AES 1
279 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_AES */
280 #if defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
281  defined(PSA_HAVE_SOFT_BLOCK_MODE) || \
282  defined(PSA_HAVE_SOFT_BLOCK_AEAD)
283 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_AES 1
284 #define MBEDTLS_AES_C
285 #endif /* PSA_HAVE_SOFT_KEY_TYPE_AES || PSA_HAVE_SOFT_BLOCK_MODE */
286 #endif /* PSA_WANT_KEY_TYPE_AES */
287 
288 #if defined(PSA_WANT_KEY_TYPE_ARIA)
289 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA)
290 #define PSA_HAVE_SOFT_KEY_TYPE_ARIA 1
291 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_ARIA */
292 #if defined(PSA_HAVE_SOFT_KEY_TYPE_ARIA) || \
293  defined(PSA_HAVE_SOFT_BLOCK_MODE) || \
294  defined(PSA_HAVE_SOFT_BLOCK_AEAD)
295 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ARIA 1
296 #define MBEDTLS_ARIA_C
297 #endif /* PSA_HAVE_SOFT_KEY_TYPE_ARIA || PSA_HAVE_SOFT_BLOCK_MODE */
298 #endif /* PSA_WANT_KEY_TYPE_ARIA */
299 
300 #if defined(PSA_WANT_KEY_TYPE_CAMELLIA)
301 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA)
302 #define PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA 1
303 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_CAMELLIA */
304 #if defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA) || \
305  defined(PSA_HAVE_SOFT_BLOCK_MODE) || \
306  defined(PSA_HAVE_SOFT_BLOCK_AEAD)
307 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_CAMELLIA 1
308 #define MBEDTLS_CAMELLIA_C
309 #endif /* PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA || PSA_HAVE_SOFT_BLOCK_MODE */
310 #endif /* PSA_WANT_KEY_TYPE_CAMELLIA */
311 
312 #if defined(PSA_WANT_KEY_TYPE_DES)
313 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_DES)
314 #define PSA_HAVE_SOFT_KEY_TYPE_DES 1
315 #endif /* !MBEDTLS_PSA_ACCEL_KEY_TYPE_DES */
316 #if defined(PSA_HAVE_SOFT_KEY_TYPE_DES) || \
317  defined(PSA_HAVE_SOFT_BLOCK_MODE)
318 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES 1
319 #define MBEDTLS_DES_C
320 #endif /*PSA_HAVE_SOFT_KEY_TYPE_DES || PSA_HAVE_SOFT_BLOCK_MODE */
321 #endif /* PSA_WANT_KEY_TYPE_DES */
322 
323 #if defined(PSA_WANT_KEY_TYPE_CHACHA20)
324 #if !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_CHACHA20)
325 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_CHACHA20 1
326 #define MBEDTLS_CHACHA20_C
327 #endif
328 #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */
329 
330 /* If any of the software block ciphers are selected, define
331  * PSA_HAVE_SOFT_BLOCK_CIPHER, which can be used in any of these
332  * situations. */
333 #if defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
334  defined(PSA_HAVE_SOFT_KEY_TYPE_ARIA) || \
335  defined(PSA_HAVE_SOFT_KEY_TYPE_DES) || \
336  defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
337 #define PSA_HAVE_SOFT_BLOCK_CIPHER 1
338 #endif
339 
340 #if defined(PSA_WANT_ALG_STREAM_CIPHER)
341 #define MBEDTLS_PSA_BUILTIN_ALG_STREAM_CIPHER 1
342 #endif /* PSA_WANT_ALG_STREAM_CIPHER */
343 
344 #if defined(PSA_WANT_ALG_CBC_MAC)
345 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_MAC)
346 #error "CBC-MAC is not yet supported via the PSA API in Mbed TLS."
347 #define MBEDTLS_PSA_BUILTIN_ALG_CBC_MAC 1
348 #endif /* !MBEDTLS_PSA_ACCEL_ALG_CBC_MAC */
349 #endif /* PSA_WANT_ALG_CBC_MAC */
350 
351 #if defined(PSA_WANT_ALG_CMAC)
352 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CMAC) || \
353  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
354 #define MBEDTLS_PSA_BUILTIN_ALG_CMAC 1
355 #define MBEDTLS_CMAC_C
356 #endif /* !MBEDTLS_PSA_ACCEL_ALG_CMAC */
357 #endif /* PSA_WANT_ALG_CMAC */
358 
359 #if defined(PSA_WANT_ALG_CTR)
360 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CTR) || \
361  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
362 #define MBEDTLS_PSA_BUILTIN_ALG_CTR 1
363 #define MBEDTLS_CIPHER_MODE_CTR
364 #endif
365 #endif /* PSA_WANT_ALG_CTR */
366 
367 #if defined(PSA_WANT_ALG_CFB)
368 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CFB) || \
369  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
370 #define MBEDTLS_PSA_BUILTIN_ALG_CFB 1
371 #define MBEDTLS_CIPHER_MODE_CFB
372 #endif
373 #endif /* PSA_WANT_ALG_CFB */
374 
375 #if defined(PSA_WANT_ALG_OFB)
376 #if !defined(MBEDTLS_PSA_ACCEL_ALG_OFB) || \
377  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
378 #define MBEDTLS_PSA_BUILTIN_ALG_OFB 1
379 #define MBEDTLS_CIPHER_MODE_OFB
380 #endif
381 #endif /* PSA_WANT_ALG_OFB */
382 
383 #if defined(PSA_WANT_ALG_XTS)
384 #if !defined(MBEDTLS_PSA_ACCEL_ALG_XTS) || \
385  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
386 #define MBEDTLS_PSA_BUILTIN_ALG_XTS 1
387 #define MBEDTLS_CIPHER_MODE_XTS
388 #endif
389 #endif /* PSA_WANT_ALG_XTS */
390 
391 #if defined(PSA_WANT_ALG_ECB_NO_PADDING)
392 #define MBEDTLS_PSA_BUILTIN_ALG_ECB_NO_PADDING 1
393 #endif
394 
395 #if defined(PSA_WANT_ALG_CBC_NO_PADDING)
396 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_NO_PADDING) || \
397  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
398 #define MBEDTLS_CIPHER_MODE_CBC
399 #define MBEDTLS_PSA_BUILTIN_ALG_CBC_NO_PADDING 1
400 #endif
401 #endif /* PSA_WANT_ALG_CBC_NO_PADDING */
402 
403 #if defined(PSA_WANT_ALG_CBC_PKCS7)
404 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CBC_PKCS7) || \
405  defined(PSA_HAVE_SOFT_BLOCK_CIPHER)
406 #define MBEDTLS_CIPHER_MODE_CBC
407 #define MBEDTLS_PSA_BUILTIN_ALG_CBC_PKCS7 1
408 #define MBEDTLS_CIPHER_PADDING_PKCS7
409 #endif
410 #endif /* PSA_WANT_ALG_CBC_PKCS7 */
411 
412 #if defined(PSA_WANT_ALG_CCM)
413 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CCM) || \
414  defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
415  defined(PSA_HAVE_SOFT_KEY_TYPE_ARIA) || \
416  defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
417 #define MBEDTLS_PSA_BUILTIN_ALG_CCM 1
418 #define MBEDTLS_CCM_C
419 #endif
420 #endif /* PSA_WANT_ALG_CCM */
421 
422 #if defined(PSA_WANT_ALG_GCM)
423 #if !defined(MBEDTLS_PSA_ACCEL_ALG_GCM) || \
424  defined(PSA_HAVE_SOFT_KEY_TYPE_AES) || \
425  defined(PSA_HAVE_SOFT_KEY_TYPE_ARIA) || \
426  defined(PSA_HAVE_SOFT_KEY_TYPE_CAMELLIA)
427 #define MBEDTLS_PSA_BUILTIN_ALG_GCM 1
428 #define MBEDTLS_GCM_C
429 #endif
430 #endif /* PSA_WANT_ALG_GCM */
431 
432 #if defined(PSA_WANT_ALG_CHACHA20_POLY1305)
433 #if !defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305)
434 #if defined(PSA_WANT_KEY_TYPE_CHACHA20)
435 #define MBEDTLS_CHACHAPOLY_C
436 #define MBEDTLS_POLY1305_C
437 #define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1
438 #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */
439 #endif /* !MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 */
440 #endif /* PSA_WANT_ALG_CHACHA20_POLY1305 */
441 
442 #if defined(PSA_WANT_ECC_BRAINPOOL_P_R1_256)
443 #if !defined(MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256)
444 #define MBEDTLS_ECP_DP_BP256R1_ENABLED
445 #define MBEDTLS_PSA_BUILTIN_ECC_BRAINPOOL_P_R1_256 1
446 #endif /* !MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_256 */
447 #endif /* PSA_WANT_ECC_BRAINPOOL_P_R1_256 */
448 
449 #if defined(PSA_WANT_ECC_BRAINPOOL_P_R1_384)
450 #if !defined(MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384)
451 #define MBEDTLS_ECP_DP_BP384R1_ENABLED
452 #define MBEDTLS_PSA_BUILTIN_ECC_BRAINPOOL_P_R1_384 1
453 #endif /* !MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_384 */
454 #endif /* PSA_WANT_ECC_BRAINPOOL_P_R1_384 */
455 
456 #if defined(PSA_WANT_ECC_BRAINPOOL_P_R1_512)
457 #if !defined(MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512)
458 #define MBEDTLS_ECP_DP_BP512R1_ENABLED
459 #define MBEDTLS_PSA_BUILTIN_ECC_BRAINPOOL_P_R1_512 1
460 #endif /* !MBEDTLS_PSA_ACCEL_ECC_BRAINPOOL_P_R1_512 */
461 #endif /* PSA_WANT_ECC_BRAINPOOL_P_R1_512 */
462 
463 #if defined(PSA_WANT_ECC_MONTGOMERY_255)
464 #if !defined(MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255)
465 #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
466 #define MBEDTLS_PSA_BUILTIN_ECC_MONTGOMERY_255 1
467 #endif /* !MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_255 */
468 #endif /* PSA_WANT_ECC_MONTGOMERY_255 */
469 
470 #if defined(PSA_WANT_ECC_MONTGOMERY_448)
471 #if !defined(MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448)
472 #define MBEDTLS_ECP_DP_CURVE448_ENABLED
473 #define MBEDTLS_PSA_BUILTIN_ECC_MONTGOMERY_448 1
474 #endif /* !MBEDTLS_PSA_ACCEL_ECC_MONTGOMERY_448 */
475 #endif /* PSA_WANT_ECC_MONTGOMERY_448 */
476 
477 #if defined(PSA_WANT_ECC_SECP_R1_192)
478 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192)
479 #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
480 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_192 1
481 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_R1_192 */
482 #endif /* PSA_WANT_ECC_SECP_R1_192 */
483 
484 #if defined(PSA_WANT_ECC_SECP_R1_224)
485 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224)
486 #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
487 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_224 1
488 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_R1_224 */
489 #endif /* PSA_WANT_ECC_SECP_R1_224 */
490 
491 #if defined(PSA_WANT_ECC_SECP_R1_256)
492 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256)
493 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
494 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_256 1
495 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_R1_256 */
496 #endif /* PSA_WANT_ECC_SECP_R1_256 */
497 
498 #if defined(PSA_WANT_ECC_SECP_R1_384)
499 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384)
500 #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
501 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_384 1
502 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_R1_384 */
503 #endif /* PSA_WANT_ECC_SECP_R1_384 */
504 
505 #if defined(PSA_WANT_ECC_SECP_R1_521)
506 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521)
507 #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
508 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_521 1
509 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_R1_521 */
510 #endif /* PSA_WANT_ECC_SECP_R1_521 */
511 
512 #if defined(PSA_WANT_ECC_SECP_K1_192)
513 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192)
514 #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
515 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_K1_192 1
516 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_K1_192 */
517 #endif /* PSA_WANT_ECC_SECP_K1_192 */
518 
519 #if defined(PSA_WANT_ECC_SECP_K1_224)
520 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224)
521 /*
522  * SECP224K1 is buggy via the PSA API in Mbed TLS
523  * (https://github.com/ARMmbed/mbedtls/issues/3541).
524  */
525 #error "SECP224K1 is buggy via the PSA API in Mbed TLS."
526 #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
527 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_K1_224 1
528 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_K1_224 */
529 #endif /* PSA_WANT_ECC_SECP_K1_224 */
530 
531 #if defined(PSA_WANT_ECC_SECP_K1_256)
532 #if !defined(MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256)
533 #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
534 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_K1_256 1
535 #endif /* !MBEDTLS_PSA_ACCEL_ECC_SECP_K1_256 */
536 #endif /* PSA_WANT_ECC_SECP_K1_256 */
537 
538 
539 
540 /****************************************************************/
541 /* Infer PSA requirements from Mbed TLS capabilities */
542 /****************************************************************/
543 
544 #else /* MBEDTLS_PSA_CRYPTO_CONFIG */
545 
546 /*
547  * Ensure PSA_WANT_* defines are setup properly if MBEDTLS_PSA_CRYPTO_CONFIG
548  * is not defined
549  */
550 
551 #if defined(MBEDTLS_CCM_C)
552 #define MBEDTLS_PSA_BUILTIN_ALG_CCM 1
553 #define PSA_WANT_ALG_CCM 1
554 #endif /* MBEDTLS_CCM_C */
555 
556 #if defined(MBEDTLS_CMAC_C)
557 #define MBEDTLS_PSA_BUILTIN_ALG_CMAC 1
558 #define PSA_WANT_ALG_CMAC 1
559 #endif /* MBEDTLS_CMAC_C */
560 
561 #if defined(MBEDTLS_ECDH_C)
562 #define MBEDTLS_PSA_BUILTIN_ALG_ECDH 1
563 #define PSA_WANT_ALG_ECDH 1
564 #endif /* MBEDTLS_ECDH_C */
565 
566 #if defined(MBEDTLS_ECDSA_C)
567 #define MBEDTLS_PSA_BUILTIN_ALG_ECDSA 1
568 #define PSA_WANT_ALG_ECDSA 1
569 #define PSA_WANT_ALG_ECDSA_ANY 1
570 
571 // Only add in DETERMINISTIC support if ECDSA is also enabled
572 #if defined(MBEDTLS_ECDSA_DETERMINISTIC)
573 #define MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA 1
574 #define PSA_WANT_ALG_DETERMINISTIC_ECDSA 1
575 #endif /* MBEDTLS_ECDSA_DETERMINISTIC */
576 
577 #endif /* MBEDTLS_ECDSA_C */
578 
579 #if defined(MBEDTLS_ECP_C)
580 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR 1
581 #define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR 1
582 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_PUBLIC_KEY 1
583 #define PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY 1
584 #endif /* MBEDTLS_ECP_C */
585 
586 #if defined(MBEDTLS_GCM_C)
587 #define MBEDTLS_PSA_BUILTIN_ALG_GCM 1
588 #define PSA_WANT_ALG_GCM 1
589 #endif /* MBEDTLS_GCM_C */
590 
591 #if defined(MBEDTLS_HKDF_C)
592 #define MBEDTLS_PSA_BUILTIN_ALG_HMAC 1
593 #define PSA_WANT_ALG_HMAC 1
594 #define MBEDTLS_PSA_BUILTIN_ALG_HKDF 1
595 #define PSA_WANT_ALG_HKDF 1
596 #endif /* MBEDTLS_HKDF_C */
597 
598 #if defined(MBEDTLS_MD_C)
599 #define MBEDTLS_PSA_BUILTIN_ALG_HMAC 1
600 #define PSA_WANT_ALG_HMAC 1
601 #define PSA_WANT_KEY_TYPE_HMAC
602 #define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF 1
603 #define PSA_WANT_ALG_TLS12_PRF 1
604 #define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PSK_TO_MS 1
605 #define PSA_WANT_ALG_TLS12_PSK_TO_MS 1
606 #endif /* MBEDTLS_MD_C */
607 
608 #if defined(MBEDTLS_MD5_C)
609 #define MBEDTLS_PSA_BUILTIN_ALG_MD5 1
610 #define PSA_WANT_ALG_MD5 1
611 #endif
612 
613 #if defined(MBEDTLS_RIPEMD160_C)
614 #define MBEDTLS_PSA_BUILTIN_ALG_RIPEMD160 1
615 #define PSA_WANT_ALG_RIPEMD160 1
616 #endif
617 
618 #if defined(MBEDTLS_RSA_C)
619 #if defined(MBEDTLS_PKCS1_V15)
620 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT 1
621 #define PSA_WANT_ALG_RSA_PKCS1V15_CRYPT 1
622 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_SIGN 1
623 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN 1
624 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN_RAW 1
625 #endif /* MBEDTLS_PKCS1_V15 */
626 #if defined(MBEDTLS_PKCS1_V21)
627 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_OAEP 1
628 #define PSA_WANT_ALG_RSA_OAEP 1
629 #define MBEDTLS_PSA_BUILTIN_ALG_RSA_PSS 1
630 #define PSA_WANT_ALG_RSA_PSS 1
631 #endif /* MBEDTLS_PKCS1_V21 */
632 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_KEY_PAIR 1
633 #define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR 1
634 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_PUBLIC_KEY 1
635 #define PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY 1
636 #endif /* MBEDTLS_RSA_C */
637 
638 #if defined(MBEDTLS_SHA1_C)
639 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_1 1
640 #define PSA_WANT_ALG_SHA_1 1
641 #endif
642 
643 #if defined(MBEDTLS_SHA224_C)
644 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_224 1
645 #define PSA_WANT_ALG_SHA_224 1
646 #endif
647 
648 #if defined(MBEDTLS_SHA256_C)
649 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_256 1
650 #define PSA_WANT_ALG_SHA_256 1
651 #endif
652 
653 #if defined(MBEDTLS_SHA384_C)
654 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_384 1
655 #define PSA_WANT_ALG_SHA_384 1
656 #endif
657 
658 #if defined(MBEDTLS_SHA512_C)
659 #define MBEDTLS_PSA_BUILTIN_ALG_SHA_512 1
660 #define PSA_WANT_ALG_SHA_512 1
661 #endif
662 
663 #if defined(MBEDTLS_AES_C)
664 #define PSA_WANT_KEY_TYPE_AES 1
665 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_AES 1
666 #endif
667 
668 #if defined(MBEDTLS_ARIA_C)
669 #define PSA_WANT_KEY_TYPE_ARIA 1
670 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ARIA 1
671 #endif
672 
673 #if defined(MBEDTLS_CAMELLIA_C)
674 #define PSA_WANT_KEY_TYPE_CAMELLIA 1
675 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_CAMELLIA 1
676 #endif
677 
678 #if defined(MBEDTLS_DES_C)
679 #define PSA_WANT_KEY_TYPE_DES 1
680 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_DES 1
681 #endif
682 
683 #if defined(MBEDTLS_CHACHA20_C)
684 #define PSA_WANT_KEY_TYPE_CHACHA20 1
685 #define PSA_WANT_ALG_STREAM_CIPHER 1
686 #define MBEDTLS_PSA_BUILTIN_KEY_TYPE_CHACHA20 1
687 #define MBEDTLS_PSA_BUILTIN_ALG_STREAM_CIPHER 1
688 #if defined(MBEDTLS_CHACHAPOLY_C)
689 #define PSA_WANT_ALG_CHACHA20_POLY1305 1
690 #define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1
691 #endif
692 #endif
693 
694 #if defined(MBEDTLS_CIPHER_MODE_CBC)
695 #define MBEDTLS_PSA_BUILTIN_ALG_CBC_NO_PADDING 1
696 #define PSA_WANT_ALG_CBC_NO_PADDING 1
697 #if defined(MBEDTLS_CIPHER_PADDING_PKCS7)
698 #define MBEDTLS_PSA_BUILTIN_ALG_CBC_PKCS7 1
699 #define PSA_WANT_ALG_CBC_PKCS7 1
700 #endif
701 #endif
702 
703 #if defined(MBEDTLS_AES_C) || defined(MBEDTLS_DES_C) || \
704  defined(MBEDTLS_ARIA_C) || defined(MBEDTLS_CAMELLIA_C)
705 #define MBEDTLS_PSA_BUILTIN_ALG_ECB_NO_PADDING 1
706 #define PSA_WANT_ALG_ECB_NO_PADDING 1
707 #endif
708 
709 #if defined(MBEDTLS_CIPHER_MODE_CFB)
710 #define MBEDTLS_PSA_BUILTIN_ALG_CFB 1
711 #define PSA_WANT_ALG_CFB 1
712 #endif
713 
714 #if defined(MBEDTLS_CIPHER_MODE_CTR)
715 #define MBEDTLS_PSA_BUILTIN_ALG_CTR 1
716 #define PSA_WANT_ALG_CTR 1
717 #endif
718 
719 #if defined(MBEDTLS_CIPHER_MODE_OFB)
720 #define MBEDTLS_PSA_BUILTIN_ALG_OFB 1
721 #define PSA_WANT_ALG_OFB 1
722 #endif
723 
724 #if defined(MBEDTLS_CIPHER_MODE_XTS)
725 #define MBEDTLS_PSA_BUILTIN_ALG_XTS 1
726 #define PSA_WANT_ALG_XTS 1
727 #endif
728 
729 #if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)
730 #define MBEDTLS_PSA_BUILTIN_ECC_BRAINPOOL_P_R1_256 1
731 #define PSA_WANT_ECC_BRAINPOOL_P_R1_256
732 #endif
733 
734 #if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED)
735 #define MBEDTLS_PSA_BUILTIN_ECC_BRAINPOOL_P_R1_384 1
736 #define PSA_WANT_ECC_BRAINPOOL_P_R1_384
737 #endif
738 
739 #if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED)
740 #define MBEDTLS_PSA_BUILTIN_ECC_BRAINPOOL_P_R1_512 1
741 #define PSA_WANT_ECC_BRAINPOOL_P_R1_512
742 #endif
743 
744 #if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
745 #define MBEDTLS_PSA_BUILTIN_ECC_MONTGOMERY_255 1
746 #define PSA_WANT_ECC_MONTGOMERY_255
747 #endif
748 
749 #if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
750 #define MBEDTLS_PSA_BUILTIN_ECC_MONTGOMERY_448 1
751 #define PSA_WANT_ECC_MONTGOMERY_448
752 #endif
753 
754 #if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
755 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_192 1
756 #define PSA_WANT_ECC_SECP_R1_192
757 #endif
758 
759 #if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
760 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_224 1
761 #define PSA_WANT_ECC_SECP_R1_224
762 #endif
763 
764 #if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
765 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_256 1
766 #define PSA_WANT_ECC_SECP_R1_256
767 #endif
768 
769 #if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
770 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_384 1
771 #define PSA_WANT_ECC_SECP_R1_384
772 #endif
773 
774 #if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
775 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_521 1
776 #define PSA_WANT_ECC_SECP_R1_521
777 #endif
778 
779 #if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
780 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_K1_192 1
781 #define PSA_WANT_ECC_SECP_K1_192
782 #endif
783 
784 /* SECP224K1 is buggy via the PSA API (https://github.com/ARMmbed/mbedtls/issues/3541) */
785 #if 0 && defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
786 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_K1_224 1
787 #define PSA_WANT_ECC_SECP_K1_224
788 #endif
789 
790 #if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
791 #define MBEDTLS_PSA_BUILTIN_ECC_SECP_K1_256 1
792 #define PSA_WANT_ECC_SECP_K1_256
793 #endif
794 
795 #endif /* MBEDTLS_PSA_CRYPTO_CONFIG */
796 
797 /* These features are always enabled. */
798 #define PSA_WANT_KEY_TYPE_DERIVE 1
799 #define PSA_WANT_KEY_TYPE_RAW_DATA 1
800 
801 #ifdef __cplusplus
802 }
803 #endif
804 
805 #endif /* MBEDTLS_CONFIG_PSA_H */
PSA crypto configuration options (set of defines)