blob: ff8eeb64e20811335770fb7aa40deff8f7f8169e [file] [log] [blame]
Antonio de Angelis86b98312021-12-17 21:42:40 +01001From bff99675493709b07508b88fbc311d34fbb5d3cc Mon Sep 17 00:00:00 2001
2From: Salome Thirot <salome.thirot@arm.com>
3Date: Wed, 7 Jul 2021 10:24:43 +0100
4Subject: [PATCH 2/2] CC3XX: Hardcode entry points for the CC3XX driver
5
6Signed-off-by: Salome Thirot <salome.thirot@arm.com>
7Signed-off-by: Abbas Bracken Ziad <abbas.brackenziad@arm.com>
8Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
9Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
10---
11 .../psa/crypto_driver_contexts_composites.h | 9 +
12 .../psa/crypto_driver_contexts_primitives.h | 9 +
13 library/psa_crypto.c | 65 ++-
14 library/psa_crypto_driver_wrappers.c | 536 ++++++++++++++++++
15 library/psa_crypto_driver_wrappers.h | 29 +
16 5 files changed, 644 insertions(+), 4 deletions(-)
17
18diff --git a/include/psa/crypto_driver_contexts_composites.h b/include/psa/crypto_driver_contexts_composites.h
19index 3f1c8af4b..2fdf9561f 100644
20--- a/include/psa/crypto_driver_contexts_composites.h
21+++ b/include/psa/crypto_driver_contexts_composites.h
22@@ -41,6 +41,9 @@
23
24 /* Include the context structure definitions for those drivers that were
25 * declared during the autogeneration process. */
26+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
27+#include "cc3xx_crypto_primitives_private.h"
28+#endif
29
30 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
31 #include <libtestdriver1/include/psa/crypto.h>
32@@ -104,6 +107,9 @@ typedef union {
33 mbedtls_transparent_test_driver_mac_operation_t transparent_test_driver_ctx;
34 mbedtls_opaque_test_driver_mac_operation_t opaque_test_driver_ctx;
35 #endif
36+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
37+ cc3xx_mac_operation_t cc3xx_driver_ctx;
38+#endif
39 } psa_driver_mac_context_t;
40
41 typedef union {
42@@ -112,6 +118,9 @@ typedef union {
43 #if defined(PSA_CRYPTO_DRIVER_TEST)
44 mbedtls_transparent_test_driver_aead_operation_t transparent_test_driver_ctx;
45 #endif
46+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
47+ cc3xx_aead_operation_t cc3xx_driver_ctx;
48+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
49 } psa_driver_aead_context_t;
50
51 #endif /* PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H */
52diff --git a/include/psa/crypto_driver_contexts_primitives.h b/include/psa/crypto_driver_contexts_primitives.h
53index 2bb01ed43..2bc0bda70 100644
54--- a/include/psa/crypto_driver_contexts_primitives.h
55+++ b/include/psa/crypto_driver_contexts_primitives.h
56@@ -40,6 +40,9 @@
57
58 /* Include the context structure definitions for those drivers that were
59 * declared during the autogeneration process. */
60+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
61+#include "cc3xx_crypto_primitives_private.h"
62+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
63
64 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
65 #include <libtestdriver1/include/psa/crypto.h>
66@@ -102,6 +105,9 @@ typedef union {
67 #if defined(PSA_CRYPTO_DRIVER_TEST)
68 mbedtls_transparent_test_driver_hash_operation_t test_driver_ctx;
69 #endif
70+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
71+ cc3xx_hash_operation_t cc3xx_driver_ctx;
72+#endif
73 } psa_driver_hash_context_t;
74
75 typedef union {
76@@ -111,6 +117,9 @@ typedef union {
77 mbedtls_transparent_test_driver_cipher_operation_t transparent_test_driver_ctx;
78 mbedtls_opaque_test_driver_cipher_operation_t opaque_test_driver_ctx;
79 #endif
80+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
81+ cc3xx_cipher_operation_t cc3xx_driver_ctx;
82+#endif
83 } psa_driver_cipher_context_t;
84
85 #endif /* PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H */
86diff --git a/library/psa_crypto.c b/library/psa_crypto.c
87index 829ed452b..48377ffe4 100644
88--- a/library/psa_crypto.c
89+++ b/library/psa_crypto.c
90@@ -3073,6 +3073,25 @@ psa_status_t psa_asymmetric_encrypt( mbedtls_svc_key_id_t key,
91 goto exit;
92 }
93
94+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
95+ psa_key_attributes_t attributes = {
96+ .core = slot->attr
97+ };
98+
99+ status = psa_driver_wrapper_asymmetric_encrypt( &attributes,
100+ slot->key.data,
101+ slot->key.bytes,
102+ alg,
103+ input,
104+ input_length,
105+ salt,
106+ salt_length,
107+ output,
108+ output_size,
109+ output_length );
110+ goto exit;
111+#endif
112+
113 if( PSA_KEY_TYPE_IS_RSA( slot->attr.type ) )
114 {
115 #if defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT) || \
116@@ -3188,6 +3207,25 @@ psa_status_t psa_asymmetric_decrypt( mbedtls_svc_key_id_t key,
117 goto exit;
118 }
119
120+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
121+ psa_key_attributes_t attributes = {
122+ .core = slot->attr
123+ };
124+
125+ status = psa_driver_wrapper_asymmetric_decrypt( &attributes,
126+ slot->key.data,
127+ slot->key.bytes,
128+ alg,
129+ input,
130+ input_length,
131+ salt,
132+ salt_length,
133+ output,
134+ output_size,
135+ output_length );
136+ goto exit;
137+#endif
138+
139 if( slot->attr.type == PSA_KEY_TYPE_RSA_KEY_PAIR )
140 {
141 #if defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT) || \
142@@ -5499,11 +5537,30 @@ psa_status_t psa_raw_key_agreement( psa_algorithm_t alg,
143 if( status != PSA_SUCCESS )
144 goto exit;
145
146- status = psa_key_agreement_raw_internal( alg, slot,
147- peer_key, peer_key_length,
148- output, output_size,
149- output_length );
150+ psa_key_attributes_t attributes = {
151+ .core = slot->attr
152+ };
153
154+ status = psa_driver_wrapper_key_agreement( &attributes,
155+ slot->key.data,
156+ slot->key.bytes,
157+ peer_key,
158+ peer_key_length,
159+ output,
160+ output_size,
161+ output_length,
162+ alg );
163+
164+ if( status == PSA_ERROR_NOT_SUPPORTED )
165+ {
166+ status = psa_key_agreement_raw_internal( alg,
167+ slot,
168+ peer_key,
169+ peer_key_length,
170+ output,
171+ output_size,
172+ output_length);
173+ }
174 exit:
175 if( status != PSA_SUCCESS )
176 {
177diff --git a/library/psa_crypto_driver_wrappers.c b/library/psa_crypto_driver_wrappers.c
178index 8d8647862..eed2ce402 100644
179--- a/library/psa_crypto_driver_wrappers.c
180+++ b/library/psa_crypto_driver_wrappers.c
181@@ -44,6 +44,16 @@
182 #include "test/drivers/test_driver.h"
183 #endif /* PSA_CRYPTO_DRIVER_TEST */
184
185+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
186+#ifndef PSA_CRYPTO_DRIVER_PRESENT
187+#define PSA_CRYPTO_DRIVER_PRESENT
188+#endif
189+#ifndef PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT
190+#define PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT
191+#endif
192+#include "cc3xx.h"
193+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
194+
195 /* Repeat above block for each JSON-declared driver during autogeneration */
196 #endif /* MBEDTLS_PSA_CRYPTO_DRIVERS */
197
198@@ -57,6 +67,10 @@
199 #define PSA_CRYPTO_OPAQUE_TEST_DRIVER_ID (3)
200 #endif /* PSA_CRYPTO_DRIVER_TEST */
201
202+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
203+#define PSA_CRYPTO_CC3XX_DRIVER_ID (4)
204+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
205+
206 /* Support the 'old' SE interface when asked to */
207 #if defined(MBEDTLS_PSA_CRYPTO_SE_C)
208 /* PSA_CRYPTO_DRIVER_PRESENT is defined when either a new-style or old-style
209@@ -127,6 +141,21 @@ psa_status_t psa_driver_wrapper_sign_message(
210 /* Key is stored in the slot in export representation, so
211 * cycle through all known transparent accelerators */
212 #if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
213+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
214+ status = cc3xx_sign_message(
215+ attributes,
216+ key_buffer,
217+ key_buffer_size,
218+ alg,
219+ input,
220+ input_length,
221+ signature,
222+ signature_size,
223+ signature_length );
224+ /* Declared with fallback == true */
225+ if( status != PSA_ERROR_NOT_SUPPORTED )
226+ return( status );
227+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
228 #if defined(PSA_CRYPTO_DRIVER_TEST)
229 status = mbedtls_test_transparent_signature_sign_message(
230 attributes,
231@@ -201,6 +230,20 @@ psa_status_t psa_driver_wrapper_verify_message(
232 /* Key is stored in the slot in export representation, so
233 * cycle through all known transparent accelerators */
234 #if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
235+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
236+ status = cc3xx_verify_message(
237+ attributes,
238+ key_buffer,
239+ key_buffer_size,
240+ alg,
241+ input,
242+ input_length,
243+ signature,
244+ signature_length );
245+ /* Declared with fallback == true */
246+ if( status != PSA_ERROR_NOT_SUPPORTED )
247+ return( status );
248+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
249 #if defined(PSA_CRYPTO_DRIVER_TEST)
250 status = mbedtls_test_transparent_signature_verify_message(
251 attributes,
252@@ -288,6 +331,20 @@ psa_status_t psa_driver_wrapper_sign_hash(
253 /* Key is stored in the slot in export representation, so
254 * cycle through all known transparent accelerators */
255 #if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
256+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
257+ status = cc3xx_sign_hash( attributes,
258+ key_buffer,
259+ key_buffer_size,
260+ alg,
261+ hash,
262+ hash_length,
263+ signature,
264+ signature_size,
265+ signature_length );
266+ /* Declared with fallback == true */
267+ if( status != PSA_ERROR_NOT_SUPPORTED )
268+ return( status );
269+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
270 #if defined(PSA_CRYPTO_DRIVER_TEST)
271 status = mbedtls_test_transparent_signature_sign_hash( attributes,
272 key_buffer,
273@@ -372,6 +429,19 @@ psa_status_t psa_driver_wrapper_verify_hash(
274 /* Key is stored in the slot in export representation, so
275 * cycle through all known transparent accelerators */
276 #if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
277+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
278+ status = cc3xx_verify_hash( attributes,
279+ key_buffer,
280+ key_buffer_size,
281+ alg,
282+ hash,
283+ hash_length,
284+ signature,
285+ signature_length );
286+ /* Declared with fallback == true */
287+ if( status != PSA_ERROR_NOT_SUPPORTED )
288+ return( status );
289+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
290 #if defined(PSA_CRYPTO_DRIVER_TEST)
291 status = mbedtls_test_transparent_signature_verify_hash(
292 attributes,
293@@ -547,6 +617,14 @@ psa_status_t psa_driver_wrapper_generate_key(
294 if( PSA_KEY_TYPE_IS_ASYMMETRIC( attributes->core.type ) )
295 {
296 /* Cycle through all known transparent accelerators */
297+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
298+ status = cc3xx_generate_key(
299+ attributes, key_buffer, key_buffer_size,
300+ key_buffer_length );
301+ /* Declared with fallback == true */
302+ if( status != PSA_ERROR_NOT_SUPPORTED )
303+ break;
304+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
305 #if defined(PSA_CRYPTO_DRIVER_TEST)
306 status = mbedtls_test_transparent_generate_key(
307 attributes, key_buffer, key_buffer_size,
308@@ -758,6 +836,18 @@ psa_status_t psa_driver_wrapper_export_public_key(
309 /* Key is stored in the slot in export representation, so
310 * cycle through all known transparent accelerators */
311 #if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
312+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
313+ status = cc3xx_export_public_key(
314+ attributes,
315+ key_buffer,
316+ key_buffer_size,
317+ data,
318+ data_size,
319+ data_length );
320+ /* Declared with fallback == true */
321+ if( status != PSA_ERROR_NOT_SUPPORTED )
322+ return( status );
323+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
324 #if defined(PSA_CRYPTO_DRIVER_TEST)
325 status = mbedtls_test_transparent_export_public_key(
326 attributes,
327@@ -907,6 +997,22 @@ psa_status_t psa_driver_wrapper_cipher_encrypt(
328 if( status != PSA_ERROR_NOT_SUPPORTED )
329 return( status );
330 #endif /* PSA_CRYPTO_DRIVER_TEST */
331+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
332+ status = cc3xx_cipher_encrypt( attributes,
333+ key_buffer,
334+ key_buffer_size,
335+ alg,
336+ iv,
337+ iv_length,
338+ input,
339+ input_length,
340+ output,
341+ output_size,
342+ output_length );
343+ /* Declared with fallback == true */
344+ if( status != PSA_ERROR_NOT_SUPPORTED )
345+ return( status );
346+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
347 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
348
349 #if defined(MBEDTLS_PSA_BUILTIN_CIPHER)
350@@ -995,6 +1101,20 @@ psa_status_t psa_driver_wrapper_cipher_decrypt(
351 if( status != PSA_ERROR_NOT_SUPPORTED )
352 return( status );
353 #endif /* PSA_CRYPTO_DRIVER_TEST */
354+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
355+ status = cc3xx_cipher_decrypt( attributes,
356+ key_buffer,
357+ key_buffer_size,
358+ alg,
359+ input,
360+ input_length,
361+ output,
362+ output_size,
363+ output_length );
364+ /* Declared with fallback == true */
365+ if( status != PSA_ERROR_NOT_SUPPORTED )
366+ return( status );
367+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
368 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
369
370 #if defined(MBEDTLS_PSA_BUILTIN_CIPHER)
371@@ -1072,6 +1192,20 @@ psa_status_t psa_driver_wrapper_cipher_encrypt_setup(
372 if( status != PSA_ERROR_NOT_SUPPORTED )
373 return( status );
374 #endif /* PSA_CRYPTO_DRIVER_TEST */
375+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
376+ status = cc3xx_cipher_encrypt_setup(
377+ &operation->ctx.cc3xx_driver_ctx,
378+ attributes,
379+ key_buffer,
380+ key_buffer_size,
381+ alg );
382+ /* Declared with fallback == true */
383+ if( status == PSA_SUCCESS )
384+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
385+
386+ if( status != PSA_ERROR_NOT_SUPPORTED )
387+ return( status );
388+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
389 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
390 #if defined(MBEDTLS_PSA_BUILTIN_CIPHER)
391 /* Fell through, meaning no accelerator supports this operation */
392@@ -1145,6 +1279,20 @@ psa_status_t psa_driver_wrapper_cipher_decrypt_setup(
393 if( status != PSA_ERROR_NOT_SUPPORTED )
394 return( status );
395 #endif /* PSA_CRYPTO_DRIVER_TEST */
396+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
397+ status = cc3xx_cipher_decrypt_setup(
398+ &operation->ctx.cc3xx_driver_ctx,
399+ attributes,
400+ key_buffer,
401+ key_buffer_size,
402+ alg );
403+ /* Declared with fallback == true */
404+ if( status == PSA_SUCCESS )
405+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
406+
407+ if( status != PSA_ERROR_NOT_SUPPORTED )
408+ return( status );
409+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
410 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
411 #if defined(MBEDTLS_PSA_BUILTIN_CIPHER)
412 /* Fell through, meaning no accelerator supports this operation */
413@@ -1213,6 +1361,12 @@ psa_status_t psa_driver_wrapper_cipher_set_iv(
414 &operation->ctx.opaque_test_driver_ctx,
415 iv, iv_length ) );
416 #endif /* PSA_CRYPTO_DRIVER_TEST */
417+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
418+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
419+ return( cc3xx_cipher_set_iv(
420+ &operation->ctx.cc3xx_driver_ctx,
421+ iv, iv_length ) );
422+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
423 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
424 }
425
426@@ -1256,6 +1410,13 @@ psa_status_t psa_driver_wrapper_cipher_update(
427 input, input_length,
428 output, output_size, output_length ) );
429 #endif /* PSA_CRYPTO_DRIVER_TEST */
430+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
431+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
432+ return( cc3xx_cipher_update(
433+ &operation->ctx.cc3xx_driver_ctx,
434+ input, input_length,
435+ output, output_size, output_length ) );
436+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
437 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
438 }
439
440@@ -1296,6 +1457,12 @@ psa_status_t psa_driver_wrapper_cipher_finish(
441 &operation->ctx.opaque_test_driver_ctx,
442 output, output_size, output_length ) );
443 #endif /* PSA_CRYPTO_DRIVER_TEST */
444+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
445+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
446+ return( cc3xx_cipher_finish(
447+ &operation->ctx.cc3xx_driver_ctx,
448+ output, output_size, output_length ) );
449+#endif /* PSA_CRYPTO_DRIVER_CC3XX*/
450 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
451 }
452
453@@ -1336,6 +1503,15 @@ psa_status_t psa_driver_wrapper_cipher_abort(
454 sizeof( operation->ctx.opaque_test_driver_ctx ) );
455 return( status );
456 #endif /* PSA_CRYPTO_DRIVER_TEST */
457+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
458+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
459+ status = cc3xx_cipher_abort(
460+ &operation->ctx.cc3xx_driver_ctx );
461+ mbedtls_platform_zeroize(
462+ &operation->ctx.cc3xx_driver_ctx,
463+ sizeof( operation->ctx.cc3xx_driver_ctx ) );
464+ return( status );
465+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
466 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
467 }
468
469@@ -1363,6 +1539,12 @@ psa_status_t psa_driver_wrapper_hash_compute(
470 if( status != PSA_ERROR_NOT_SUPPORTED )
471 return( status );
472 #endif
473+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
474+ status = cc3xx_hash_compute(alg, input, input_length, hash, hash_size,
475+ hash_length);
476+ if (status != PSA_ERROR_NOT_SUPPORTED)
477+ return status;
478+#endif
479
480 /* If software fallback is compiled in, try fallback */
481 #if defined(MBEDTLS_PSA_BUILTIN_HASH)
482@@ -1399,6 +1581,16 @@ psa_status_t psa_driver_wrapper_hash_setup(
483 return( status );
484 #endif
485
486+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
487+ status = cc3xx_hash_setup(&operation->ctx.cc3xx_driver_ctx, alg);
488+ if( status == PSA_SUCCESS )
489+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
490+
491+ if( status != PSA_ERROR_NOT_SUPPORTED) {
492+ return( status );
493+ }
494+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
495+
496 /* If software fallback is compiled in, try fallback */
497 #if defined(MBEDTLS_PSA_BUILTIN_HASH)
498 status = mbedtls_psa_hash_setup( &operation->ctx.mbedtls_ctx, alg );
499@@ -1434,6 +1626,13 @@ psa_status_t psa_driver_wrapper_hash_clone(
500 &source_operation->ctx.test_driver_ctx,
501 &target_operation->ctx.test_driver_ctx ) );
502 #endif
503+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
504+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
505+ target_operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
506+ return( cc3xx_hash_clone(
507+ &source_operation->ctx.cc3xx_driver_ctx,
508+ &target_operation->ctx.cc3xx_driver_ctx ) );
509+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
510 default:
511 (void) target_operation;
512 return( PSA_ERROR_BAD_STATE );
513@@ -1458,6 +1657,12 @@ psa_status_t psa_driver_wrapper_hash_update(
514 &operation->ctx.test_driver_ctx,
515 input, input_length ) );
516 #endif
517+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
518+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
519+ return( cc3xx_hash_update(
520+ &operation->ctx.cc3xx_driver_ctx,
521+ input, input_length ) );
522+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
523 default:
524 (void) input;
525 (void) input_length;
526@@ -1484,6 +1689,12 @@ psa_status_t psa_driver_wrapper_hash_finish(
527 &operation->ctx.test_driver_ctx,
528 hash, hash_size, hash_length ) );
529 #endif
530+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
531+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
532+ return( cc3xx_hash_finish(
533+ &operation->ctx.cc3xx_driver_ctx,
534+ hash, hash_size, hash_length ) );
535+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
536 default:
537 (void) hash;
538 (void) hash_size;
539@@ -1506,6 +1717,11 @@ psa_status_t psa_driver_wrapper_hash_abort(
540 return( mbedtls_test_transparent_hash_abort(
541 &operation->ctx.test_driver_ctx ) );
542 #endif
543+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
544+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
545+ return( cc3xx_hash_abort(
546+ &operation->ctx.cc3xx_driver_ctx ) );
547+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
548 default:
549 return( PSA_ERROR_BAD_STATE );
550 }
551@@ -1543,6 +1759,18 @@ psa_status_t psa_driver_wrapper_aead_encrypt(
552 if( status != PSA_ERROR_NOT_SUPPORTED )
553 return( status );
554 #endif /* PSA_CRYPTO_DRIVER_TEST */
555+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
556+ status = cc3xx_aead_encrypt(
557+ attributes, key_buffer, key_buffer_size,
558+ alg,
559+ nonce, nonce_length,
560+ additional_data, additional_data_length,
561+ plaintext, plaintext_length,
562+ ciphertext, ciphertext_size, ciphertext_length );
563+
564+ if( status != PSA_ERROR_NOT_SUPPORTED )
565+ return( status );
566+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
567 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
568
569 /* Fell through, meaning no accelerator supports this operation */
570@@ -1595,6 +1823,18 @@ psa_status_t psa_driver_wrapper_aead_decrypt(
571 if( status != PSA_ERROR_NOT_SUPPORTED )
572 return( status );
573 #endif /* PSA_CRYPTO_DRIVER_TEST */
574+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
575+ status = cc3xx_aead_decrypt(
576+ attributes, key_buffer, key_buffer_size,
577+ alg,
578+ nonce, nonce_length,
579+ additional_data, additional_data_length,
580+ ciphertext, ciphertext_length,
581+ plaintext, plaintext_size, plaintext_length );
582+
583+ if( status != PSA_ERROR_NOT_SUPPORTED )
584+ return( status );
585+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
586 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
587
588 /* Fell through, meaning no accelerator supports this operation */
589@@ -1643,6 +1883,17 @@ psa_status_t psa_driver_wrapper_aead_encrypt_setup(
590 if( status != PSA_ERROR_NOT_SUPPORTED )
591 return( status );
592 #endif /* PSA_CRYPTO_DRIVER_TEST */
593+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
594+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
595+ status = cc3xx_aead_encrypt_setup(
596+ &operation->ctx.cc3xx_driver_ctx,
597+ attributes, key_buffer, key_buffer_size,
598+ alg );
599+
600+ /* Declared with fallback == true */
601+ if( status != PSA_ERROR_NOT_SUPPORTED )
602+ return( status );
603+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
604 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
605
606 /* Fell through, meaning no accelerator supports this operation */
607@@ -1692,6 +1943,18 @@ psa_status_t psa_driver_wrapper_aead_decrypt_setup(
608 if( status != PSA_ERROR_NOT_SUPPORTED )
609 return( status );
610 #endif /* PSA_CRYPTO_DRIVER_TEST */
611+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
612+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
613+ status = cc3xx_aead_decrypt_setup(
614+ &operation->ctx.cc3xx_driver_ctx,
615+ attributes,
616+ key_buffer, key_buffer_size,
617+ alg );
618+
619+ /* Declared with fallback == true */
620+ if( status != PSA_ERROR_NOT_SUPPORTED )
621+ return( status );
622+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
623 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
624
625 /* Fell through, meaning no accelerator supports this operation */
626@@ -1738,6 +2001,15 @@ psa_status_t psa_driver_wrapper_aead_set_nonce(
627 /* Add cases for opaque driver here */
628
629 #endif /* PSA_CRYPTO_DRIVER_TEST */
630+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
631+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
632+ return( cc3xx_aead_set_nonce(
633+ &operation->ctx.cc3xx_driver_ctx,
634+ nonce, nonce_length ) );
635+
636+ /* Add cases for opaque driver here */
637+
638+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
639 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
640 }
641
642@@ -1772,6 +2044,15 @@ psa_status_t psa_driver_wrapper_aead_set_lengths(
643 /* Add cases for opaque driver here */
644
645 #endif /* PSA_CRYPTO_DRIVER_TEST */
646+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
647+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
648+ return( cc3xx_aead_set_lengths(
649+ &operation->ctx.cc3xx_driver_ctx,
650+ ad_length, plaintext_length ) );
651+
652+ /* Add cases for opaque driver here */
653+
654+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
655 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
656 }
657
658@@ -1806,6 +2087,15 @@ psa_status_t psa_driver_wrapper_aead_update_ad(
659 /* Add cases for opaque driver here */
660
661 #endif /* PSA_CRYPTO_DRIVER_TEST */
662+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
663+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
664+ return( cc3xx_aead_update_ad(
665+ &operation->ctx.cc3xx_driver_ctx,
666+ input, input_length ) );
667+
668+ /* Add cases for opaque driver here */
669+
670+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
671 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
672 }
673
674@@ -1845,6 +2135,16 @@ psa_status_t psa_driver_wrapper_aead_update(
675 /* Add cases for opaque driver here */
676
677 #endif /* PSA_CRYPTO_DRIVER_TEST */
678+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
679+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
680+ return( cc3xx_aead_update(
681+ &operation->ctx.cc3xx_driver_ctx,
682+ input, input_length, output, output_size,
683+ output_length ) );
684+
685+ /* Add cases for opaque driver here */
686+
687+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
688 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
689 }
690
691@@ -1889,6 +2189,16 @@ psa_status_t psa_driver_wrapper_aead_finish(
692 /* Add cases for opaque driver here */
693
694 #endif /* PSA_CRYPTO_DRIVER_TEST */
695+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
696+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
697+ return( cc3xx_aead_finish(
698+ &operation->ctx.cc3xx_driver_ctx,
699+ ciphertext, ciphertext_size,
700+ ciphertext_length, tag, tag_size, tag_length ) );
701+
702+ /* Add cases for opaque driver here */
703+
704+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
705 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
706 }
707
708@@ -1953,6 +2263,16 @@ psa_status_t psa_driver_wrapper_aead_verify(
709 /* Add cases for opaque driver here */
710
711 #endif /* PSA_CRYPTO_DRIVER_TEST */
712+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
713+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
714+ return( cc3xx_aead_verify(
715+ &operation->ctx.cc3xx_driver_ctx,
716+ plaintext, plaintext_size,
717+ plaintext_length, tag, tag_length ) );
718+
719+ /* Add cases for opaque driver here */
720+
721+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
722 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
723 }
724
725@@ -1985,6 +2305,14 @@ psa_status_t psa_driver_wrapper_aead_abort(
726 /* Add cases for opaque driver here */
727
728 #endif /* PSA_CRYPTO_DRIVER_TEST */
729+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
730+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
731+ return( cc3xx_aead_abort(
732+ &operation->ctx.cc3xx_driver_ctx ) );
733+
734+ /* Add cases for opaque driver here */
735+
736+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
737 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
738 }
739
740@@ -2024,6 +2352,14 @@ psa_status_t psa_driver_wrapper_mac_compute(
741 if( status != PSA_ERROR_NOT_SUPPORTED )
742 return( status );
743 #endif /* PSA_CRYPTO_DRIVER_TEST */
744+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
745+ status = cc3xx_mac_compute(attributes, key_buffer, key_buffer_size, alg,
746+ input, input_length,
747+ mac, mac_size, mac_length);
748+ /* Declared with fallback == true */
749+ if( status != PSA_ERROR_NOT_SUPPORTED )
750+ return( status );
751+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
752 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
753 #if defined(MBEDTLS_PSA_BUILTIN_MAC)
754 /* Fell through, meaning no accelerator supports this operation */
755@@ -2092,6 +2428,17 @@ psa_status_t psa_driver_wrapper_mac_sign_setup(
756 if( status != PSA_ERROR_NOT_SUPPORTED )
757 return( status );
758 #endif /* PSA_CRYPTO_DRIVER_TEST */
759+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
760+ status = cc3xx_mac_sign_setup(
761+ &operation->ctx.cc3xx_driver_ctx,
762+ attributes,
763+ key_buffer, key_buffer_size,
764+ alg);
765+ if (status == PSA_SUCCESS)
766+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
767+ if (status != PSA_ERROR_NOT_SUPPORTED)
768+ return status;
769+#endif
770 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
771 #if defined(MBEDTLS_PSA_BUILTIN_MAC)
772 /* Fell through, meaning no accelerator supports this operation */
773@@ -2164,6 +2511,17 @@ psa_status_t psa_driver_wrapper_mac_verify_setup(
774 if( status != PSA_ERROR_NOT_SUPPORTED )
775 return( status );
776 #endif /* PSA_CRYPTO_DRIVER_TEST */
777+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
778+ status = cc3xx_mac_verify_setup(
779+ &operation->ctx.cc3xx_driver_ctx,
780+ attributes,
781+ key_buffer, key_buffer_size,
782+ alg);
783+ if (status == PSA_SUCCESS)
784+ operation->id = PSA_CRYPTO_CC3XX_DRIVER_ID;
785+ if (status != PSA_ERROR_NOT_SUPPORTED)
786+ return status;
787+#endif
788 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
789 #if defined(MBEDTLS_PSA_BUILTIN_MAC)
790 /* Fell through, meaning no accelerator supports this operation */
791@@ -2231,6 +2589,10 @@ psa_status_t psa_driver_wrapper_mac_update(
792 &operation->ctx.opaque_test_driver_ctx,
793 input, input_length ) );
794 #endif /* PSA_CRYPTO_DRIVER_TEST */
795+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
796+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
797+ return(cc3xx_mac_update(&operation->ctx.cc3xx_driver_ctx, input, input_length));
798+#endif
799 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
800 default:
801 (void) input;
802@@ -2265,6 +2627,11 @@ psa_status_t psa_driver_wrapper_mac_sign_finish(
803 &operation->ctx.opaque_test_driver_ctx,
804 mac, mac_size, mac_length ) );
805 #endif /* PSA_CRYPTO_DRIVER_TEST */
806+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
807+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
808+ return(cc3xx_mac_sign_finish(&operation->ctx.cc3xx_driver_ctx,
809+ mac, mac_size, mac_length));
810+#endif
811 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
812 default:
813 (void) mac;
814@@ -2299,6 +2666,12 @@ psa_status_t psa_driver_wrapper_mac_verify_finish(
815 &operation->ctx.opaque_test_driver_ctx,
816 mac, mac_length ) );
817 #endif /* PSA_CRYPTO_DRIVER_TEST */
818+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
819+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
820+ return(cc3xx_mac_verify_finish(
821+ &operation->ctx.cc3xx_driver_ctx,
822+ mac, mac_length));
823+#endif
824 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
825 default:
826 (void) mac;
827@@ -2326,10 +2699,173 @@ psa_status_t psa_driver_wrapper_mac_abort(
828 return( mbedtls_test_opaque_mac_abort(
829 &operation->ctx.opaque_test_driver_ctx ) );
830 #endif /* PSA_CRYPTO_DRIVER_TEST */
831+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
832+ case PSA_CRYPTO_CC3XX_DRIVER_ID:
833+ return(cc3xx_mac_abort(&operation->ctx.cc3xx_driver_ctx));
834+#endif
835 #endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
836 default:
837 return( PSA_ERROR_INVALID_ARGUMENT );
838 }
839 }
840
841+/*
842+ * Key agreement functions
843+ */
844+psa_status_t psa_driver_wrapper_key_agreement(
845+ const psa_key_attributes_t *attributes,
846+ const uint8_t *priv_key, size_t priv_key_size,
847+ const uint8_t *publ_key, size_t publ_key_size,
848+ uint8_t *output, size_t output_size, size_t *output_length,
849+ psa_algorithm_t alg )
850+{
851+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
852+
853+ psa_key_location_t location =
854+ PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime );
855+
856+ switch( location )
857+ {
858+ case PSA_KEY_LOCATION_LOCAL_STORAGE:
859+ /* Key is stored in the slot in export representation, so
860+ * cycle through all known transparent accelerators */
861+#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
862+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
863+ status = cc3xx_key_agreement( attributes,
864+ priv_key,
865+ priv_key_size,
866+ publ_key,
867+ publ_key_size,
868+ output,
869+ output_size,
870+ output_length,
871+ alg );
872+ return( status );
873+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
874+#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
875+ (void) status;
876+ return ( PSA_ERROR_NOT_SUPPORTED );
877+ default:
878+ /* Key is declared with a lifetime not known to us */
879+ (void) priv_key;
880+ (void) priv_key_size;
881+ (void) publ_key;
882+ (void) publ_key_size;
883+ (void) output;
884+ (void) output_size;
885+ (void) output_length;
886+ (void) alg;
887+
888+ return( PSA_ERROR_INVALID_ARGUMENT );
889+ }
890+}
891+
892+/*
893+ * Asymmetric operations
894+ */
895+psa_status_t psa_driver_wrapper_asymmetric_encrypt(const psa_key_attributes_t *attributes,
896+ const uint8_t *key_buffer,
897+ size_t key_buffer_size, psa_algorithm_t alg,
898+ const uint8_t *input, size_t input_length,
899+ const uint8_t *salt, size_t salt_length,
900+ uint8_t *output, size_t output_size,
901+ size_t *output_length)
902+{
903+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
904+
905+ psa_key_location_t location =
906+ PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime );
907+
908+ switch( location )
909+ {
910+ case PSA_KEY_LOCATION_LOCAL_STORAGE:
911+ /* Key is stored in the slot in export representation, so
912+ * cycle through all known transparent accelerators */
913+#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
914+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
915+ status = cc3xx_asymmetric_encrypt( attributes,
916+ key_buffer,
917+ key_buffer_size,
918+ alg,
919+ input,
920+ input_length,
921+ salt,
922+ salt_length,
923+ output,
924+ output_size,
925+ output_length );
926+ return( status );
927+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
928+#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
929+ (void) status;
930+ return ( PSA_ERROR_NOT_SUPPORTED );
931+ default:
932+ /* Key is declared with a lifetime not known to us */
933+ (void) key_buffer;
934+ (void) key_buffer_size;
935+ (void) alg;
936+ (void) input;
937+ (void) input_length;
938+ (void) salt;
939+ (void) salt_length;
940+ (void) output;
941+ (void) output_size;
942+ (void) output_length;
943+
944+ return( PSA_ERROR_INVALID_ARGUMENT );
945+ }
946+}
947+
948+psa_status_t psa_driver_wrapper_asymmetric_decrypt(const psa_key_attributes_t *attributes,
949+ const uint8_t *key_buffer,
950+ size_t key_buffer_size, psa_algorithm_t alg,
951+ const uint8_t *input, size_t input_length,
952+ const uint8_t *salt, size_t salt_length,
953+ uint8_t *output, size_t output_size,
954+ size_t *output_length)
955+{
956+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
957+
958+ psa_key_location_t location =
959+ PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime );
960+
961+ switch( location )
962+ {
963+ case PSA_KEY_LOCATION_LOCAL_STORAGE:
964+ /* Key is stored in the slot in export representation, so
965+ * cycle through all known transparent accelerators */
966+#if defined(PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT)
967+#if defined(PSA_CRYPTO_DRIVER_CC3XX)
968+ status = cc3xx_asymmetric_decrypt( attributes,
969+ key_buffer,
970+ key_buffer_size,
971+ alg,
972+ input,
973+ input_length,
974+ salt,
975+ salt_length,
976+ output,
977+ output_size,
978+ output_length );
979+ return( status );
980+#endif /* PSA_CRYPTO_DRIVER_CC3XX */
981+#endif /* PSA_CRYPTO_ACCELERATOR_DRIVER_PRESENT */
982+ (void) status;
983+ return( PSA_ERROR_NOT_SUPPORTED );
984+ default:
985+ /* Key is declared with a lifetime not known to us */
986+ (void) key_buffer;
987+ (void) key_buffer_size;
988+ (void) alg;
989+ (void) input;
990+ (void) input_length;
991+ (void) salt;
992+ (void) salt_length;
993+ (void) output;
994+ (void) output_size;
995+ (void) output_length;
996+
997+ return( PSA_ERROR_INVALID_ARGUMENT );
998+ }
999+}
1000 #endif /* MBEDTLS_PSA_CRYPTO_C */
1001diff --git a/library/psa_crypto_driver_wrappers.h b/library/psa_crypto_driver_wrappers.h
1002index e09e4ed70..9ebdb366e 100644
1003--- a/library/psa_crypto_driver_wrappers.h
1004+++ b/library/psa_crypto_driver_wrappers.h
1005@@ -329,6 +329,35 @@ psa_status_t psa_driver_wrapper_mac_verify_finish(
1006 psa_status_t psa_driver_wrapper_mac_abort(
1007 psa_mac_operation_t *operation );
1008
1009+/*
1010+ * Key agreement functions
1011+ */
1012+psa_status_t psa_driver_wrapper_key_agreement(
1013+ const psa_key_attributes_t *attributes,
1014+ const uint8_t *priv_key, size_t priv_key_size,
1015+ const uint8_t *publ_key, size_t peer_key_size,
1016+ uint8_t *output, size_t output_size, size_t *output_length,
1017+ psa_algorithm_t alg );
1018+
1019+/*
1020+ * Asymmetric operations
1021+ */
1022+psa_status_t psa_driver_wrapper_asymmetric_encrypt(const psa_key_attributes_t *attributes,
1023+ const uint8_t *key_buffer,
1024+ size_t key_buffer_size, psa_algorithm_t alg,
1025+ const uint8_t *input, size_t input_length,
1026+ const uint8_t *salt, size_t salt_length,
1027+ uint8_t *output, size_t output_size,
1028+ size_t *output_length);
1029+
1030+psa_status_t psa_driver_wrapper_asymmetric_decrypt(const psa_key_attributes_t *attributes,
1031+ const uint8_t *key_buffer,
1032+ size_t key_buffer_size, psa_algorithm_t alg,
1033+ const uint8_t *input, size_t input_length,
1034+ const uint8_t *salt, size_t salt_length,
1035+ uint8_t *output, size_t output_size,
1036+ size_t *output_length);
1037+
1038 #endif /* PSA_CRYPTO_DRIVER_WRAPPERS_H */
1039
1040 /* End of automatically generated file. */
1041--
10422.25.1
1043