blob: 295d47a6926912ea68882f98b293beed7a70c0c4 [file] [log] [blame]
Steven Cooreman37941cb2020-07-28 18:49:51 +02001/*
2 * Test driver for cipher functions.
3 * Currently only supports multi-part operations using AES-CTR.
4 */
Steven Cooreman3ec40182020-09-02 16:27:46 +02005/* Copyright The Mbed TLS Contributors
Steven Cooreman37941cb2020-07-28 18:49:51 +02006 * SPDX-License-Identifier: Apache-2.0
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
Steven Cooreman37941cb2020-07-28 18:49:51 +020019 */
20
21#if !defined(MBEDTLS_CONFIG_FILE)
22#include "mbedtls/config.h"
23#else
24#include MBEDTLS_CONFIG_FILE
25#endif
26
27#if defined(MBEDTLS_PSA_CRYPTO_DRIVERS) && defined(PSA_CRYPTO_DRIVER_TEST)
28#include "psa/crypto.h"
Ronald Cron8d310ad2020-12-15 15:17:20 +010029#include "psa_crypto_cipher.h"
Steven Cooremanacb5a102020-09-08 14:06:57 +020030#include "psa_crypto_core.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020031#include "mbedtls/cipher.h"
32
Steven Cooremanacb5a102020-09-08 14:06:57 +020033#include "test/drivers/cipher.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020034
35#include "test/random.h"
36
37#include <string.h>
38
Steven Cooreman5240e8b2020-09-09 11:51:45 +020039/* Test driver implements AES-CTR only. Its default behaviour (when its return
40 * status is not overridden through the hooks) is to take care of all AES-CTR
41 * operations, and return PSA_ERROR_NOT_SUPPORTED for all others.
Steven Cooremanacb5a102020-09-08 14:06:57 +020042 * Set test_driver_cipher_hooks.forced_status to PSA_ERROR_NOT_SUPPORTED to use
Steven Cooreman5240e8b2020-09-09 11:51:45 +020043 * fallback even for AES-CTR. */
Steven Cooremanacb5a102020-09-08 14:06:57 +020044test_driver_cipher_hooks_t test_driver_cipher_hooks = TEST_DRIVER_CIPHER_INIT;
Steven Cooreman37941cb2020-07-28 18:49:51 +020045
Steven Cooremanfe0ab552020-09-10 13:07:02 +020046static psa_status_t test_transparent_cipher_oneshot(
47 mbedtls_operation_t direction,
48 const psa_key_attributes_t *attributes,
49 const uint8_t *key, size_t key_length,
50 psa_algorithm_t alg,
51 const uint8_t *input, size_t input_length,
52 uint8_t *output, size_t output_size, size_t *output_length)
53{
54 test_driver_cipher_hooks.hits++;
55
56 /* Test driver supports AES-CTR only, to verify operation calls. */
57 if( alg != PSA_ALG_CTR ||
58 psa_get_key_type( attributes ) != PSA_KEY_TYPE_AES )
59 return( PSA_ERROR_NOT_SUPPORTED );
60
61 /* If test driver response code is not SUCCESS, we can return early */
62 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
63 return( test_driver_cipher_hooks.forced_status );
64
65 /* If test driver output is overridden, we don't need to do actual crypto */
66 if( test_driver_cipher_hooks.forced_output != NULL )
67 {
68 if( output_size < test_driver_cipher_hooks.forced_output_length )
69 return( PSA_ERROR_BUFFER_TOO_SMALL );
70
71 memcpy( output,
72 test_driver_cipher_hooks.forced_output,
73 test_driver_cipher_hooks.forced_output_length );
74 *output_length = test_driver_cipher_hooks.forced_output_length;
75
76 return( test_driver_cipher_hooks.forced_status );
77 }
78
79 /* Run AES-CTR using the cipher module */
80 {
81 mbedtls_test_rnd_pseudo_info rnd_info;
82 memset( &rnd_info, 0x5A, sizeof( mbedtls_test_rnd_pseudo_info ) );
83
84 const mbedtls_cipher_info_t *cipher_info =
85 mbedtls_cipher_info_from_values( MBEDTLS_CIPHER_ID_AES,
86 key_length * 8,
87 MBEDTLS_MODE_CTR );
88 mbedtls_cipher_context_t cipher;
89 int ret = 0;
90 uint8_t temp_output_buffer[16] = {0};
91 size_t temp_output_length = 0;
92
93 if( direction == MBEDTLS_ENCRYPT )
94 {
95 /* Oneshot encrypt needs to prepend the IV to the output */
96 if( output_size < ( input_length + 16 ) )
97 return( PSA_ERROR_BUFFER_TOO_SMALL );
98 }
99 else
100 {
101 /* Oneshot decrypt has the IV prepended to the input */
102 if( output_size < ( input_length - 16 ) )
103 return( PSA_ERROR_BUFFER_TOO_SMALL );
104 }
105
106 if( cipher_info == NULL )
107 return( PSA_ERROR_NOT_SUPPORTED );
108
109 mbedtls_cipher_init( &cipher );
110 ret = mbedtls_cipher_setup( &cipher, cipher_info );
111 if( ret != 0 )
112 goto exit;
113
114 ret = mbedtls_cipher_setkey( &cipher,
115 key,
116 key_length * 8, direction );
117 if( ret != 0 )
118 goto exit;
119
120 if( direction == MBEDTLS_ENCRYPT )
121 {
122 mbedtls_test_rnd_pseudo_info rnd_info;
123 memset( &rnd_info, 0x5A, sizeof( mbedtls_test_rnd_pseudo_info ) );
124
125 ret = mbedtls_test_rnd_pseudo_rand( &rnd_info,
126 temp_output_buffer,
127 16 );
128 if( ret != 0 )
129 goto exit;
130
131 ret = mbedtls_cipher_set_iv( &cipher, temp_output_buffer, 16 );
132 }
133 else
134 ret = mbedtls_cipher_set_iv( &cipher, input, 16 );
135
136 if( ret != 0 )
137 goto exit;
138
139 if( direction == MBEDTLS_ENCRYPT )
140 {
141 ret = mbedtls_cipher_update( &cipher,
142 input, input_length,
143 &output[16], output_length );
144 if( ret == 0 )
145 {
146 memcpy( output, temp_output_buffer, 16 );
147 *output_length += 16;
148 }
149 }
150 else
151 ret = mbedtls_cipher_update( &cipher,
152 &input[16], input_length - 16,
153 output, output_length );
154
155 if( ret != 0 )
156 goto exit;
157
158 ret = mbedtls_cipher_finish( &cipher,
159 temp_output_buffer,
160 &temp_output_length );
161
162exit:
163 if( ret != 0 )
164 {
165 *output_length = 0;
166 memset(output, 0, output_size);
167 }
168
169 mbedtls_cipher_free( &cipher );
170 return( mbedtls_to_psa_error( ret ) );
171 }
172}
173
Steven Cooreman37941cb2020-07-28 18:49:51 +0200174psa_status_t test_transparent_cipher_encrypt(
175 const psa_key_attributes_t *attributes,
176 const uint8_t *key, size_t key_length,
177 psa_algorithm_t alg,
178 const uint8_t *input, size_t input_length,
179 uint8_t *output, size_t output_size, size_t *output_length)
180{
Steven Cooremanfe0ab552020-09-10 13:07:02 +0200181 return (
182 test_transparent_cipher_oneshot(
183 MBEDTLS_ENCRYPT,
184 attributes,
185 key, key_length,
186 alg,
187 input, input_length,
188 output, output_size, output_length) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200189}
190
191psa_status_t test_transparent_cipher_decrypt(
192 const psa_key_attributes_t *attributes,
193 const uint8_t *key, size_t key_length,
194 psa_algorithm_t alg,
195 const uint8_t *input, size_t input_length,
196 uint8_t *output, size_t output_size, size_t *output_length)
197{
Steven Cooremanfe0ab552020-09-10 13:07:02 +0200198 return (
199 test_transparent_cipher_oneshot(
200 MBEDTLS_DECRYPT,
201 attributes,
202 key, key_length,
203 alg,
204 input, input_length,
205 output, output_size, output_length) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200206}
207
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200208psa_status_t test_transparent_cipher_encrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100209 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200210 const psa_key_attributes_t *attributes,
211 const uint8_t *key, size_t key_length,
212 psa_algorithm_t alg)
213{
Ronald Cron8d310ad2020-12-15 15:17:20 +0100214 test_driver_cipher_hooks.hits++;
215
216 /* Wiping the entire struct here, instead of member-by-member. This is
217 * useful for the test suite, since it gives a chance of catching memory
218 * corruption errors should the core not have allocated (enough) memory for
219 * our context struct. */
220 memset( operation, 0, sizeof( *operation ) );
221
222 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
223 return( test_driver_cipher_hooks.forced_status );
224
Ronald Cron3522e322021-03-12 11:08:49 +0100225 return ( mbedtls_transparent_test_driver_cipher_encrypt_setup(
226 operation, attributes, key, key_length, alg ) );
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200227}
228
Steven Cooreman37941cb2020-07-28 18:49:51 +0200229psa_status_t test_transparent_cipher_decrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100230 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200231 const psa_key_attributes_t *attributes,
232 const uint8_t *key, size_t key_length,
233 psa_algorithm_t alg)
234{
Ronald Cron8d310ad2020-12-15 15:17:20 +0100235 test_driver_cipher_hooks.hits++;
236
237 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
238 return( test_driver_cipher_hooks.forced_status );
239
Ronald Cron3522e322021-03-12 11:08:49 +0100240 return ( mbedtls_transparent_test_driver_cipher_decrypt_setup(
241 operation, attributes, key, key_length, alg ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200242}
243
244psa_status_t test_transparent_cipher_abort(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100245 mbedtls_transparent_test_driver_cipher_operation_t *operation)
Steven Cooreman37941cb2020-07-28 18:49:51 +0200246{
Steven Cooreman89e54f22020-09-10 18:07:57 +0200247 test_driver_cipher_hooks.hits++;
248
Steven Cooreman8b122252020-09-03 15:30:32 +0200249 if( operation->alg == 0 )
250 return( PSA_SUCCESS );
Steven Cooreman8b122252020-09-03 15:30:32 +0200251
Ronald Cron3522e322021-03-12 11:08:49 +0100252 mbedtls_transparent_test_driver_cipher_abort( operation );
Steven Cooreman8b122252020-09-03 15:30:32 +0200253
Ronald Cron8d310ad2020-12-15 15:17:20 +0100254 /* Wiping the entire struct here, instead of member-by-member. This is
255 * useful for the test suite, since it gives a chance of catching memory
256 * corruption errors should the core not have allocated (enough) memory for
257 * our context struct. */
Steven Cooreman5240e8b2020-09-09 11:51:45 +0200258 memset( operation, 0, sizeof( *operation ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200259
Ronald Cron8d310ad2020-12-15 15:17:20 +0100260 return( test_driver_cipher_hooks.forced_status );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200261}
262
263psa_status_t test_transparent_cipher_generate_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100264 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200265 uint8_t *iv,
266 size_t iv_size,
267 size_t *iv_length)
268{
Steven Cooremanacb5a102020-09-08 14:06:57 +0200269 test_driver_cipher_hooks.hits++;
Steven Cooreman8b122252020-09-03 15:30:32 +0200270
Steven Cooreman89e54f22020-09-10 18:07:57 +0200271 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
272 return( test_driver_cipher_hooks.forced_status );
273
Ronald Cron3522e322021-03-12 11:08:49 +0100274 return( mbedtls_transparent_test_driver_cipher_generate_iv(
275 operation, iv, iv_size, iv_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200276}
277
278psa_status_t test_transparent_cipher_set_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100279 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200280 const uint8_t *iv,
281 size_t iv_length)
282{
Steven Cooremanacb5a102020-09-08 14:06:57 +0200283 test_driver_cipher_hooks.hits++;
Steven Cooreman8b122252020-09-03 15:30:32 +0200284
Steven Cooreman89e54f22020-09-10 18:07:57 +0200285 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
286 return( test_driver_cipher_hooks.forced_status );
287
Ronald Cron3522e322021-03-12 11:08:49 +0100288 return( mbedtls_transparent_test_driver_cipher_set_iv(
289 operation, iv, iv_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200290}
291
292psa_status_t test_transparent_cipher_update(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100293 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200294 const uint8_t *input,
295 size_t input_length,
296 uint8_t *output,
297 size_t output_size,
298 size_t *output_length)
299{
Steven Cooremanacb5a102020-09-08 14:06:57 +0200300 test_driver_cipher_hooks.hits++;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200301
Steven Cooremanacb5a102020-09-08 14:06:57 +0200302 if( test_driver_cipher_hooks.forced_output != NULL )
Steven Cooreman8b122252020-09-03 15:30:32 +0200303 {
Steven Cooremanacb5a102020-09-08 14:06:57 +0200304 if( output_size < test_driver_cipher_hooks.forced_output_length )
Steven Cooreman8b122252020-09-03 15:30:32 +0200305 return PSA_ERROR_BUFFER_TOO_SMALL;
306
Steven Cooremanacb5a102020-09-08 14:06:57 +0200307 memcpy( output,
308 test_driver_cipher_hooks.forced_output,
309 test_driver_cipher_hooks.forced_output_length );
310 *output_length = test_driver_cipher_hooks.forced_output_length;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100311
312 return( test_driver_cipher_hooks.forced_status );
Steven Cooreman8b122252020-09-03 15:30:32 +0200313 }
Steven Cooreman37941cb2020-07-28 18:49:51 +0200314
Ronald Cron8d310ad2020-12-15 15:17:20 +0100315 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
316 return( test_driver_cipher_hooks.forced_status );
317
Ronald Cron3522e322021-03-12 11:08:49 +0100318 return( mbedtls_transparent_test_driver_cipher_update(
319 operation, input, input_length,
320 output, output_size, output_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200321}
322
323psa_status_t test_transparent_cipher_finish(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100324 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200325 uint8_t *output,
326 size_t output_size,
327 size_t *output_length)
328{
Steven Cooremanacb5a102020-09-08 14:06:57 +0200329 test_driver_cipher_hooks.hits++;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200330
Steven Cooremanacb5a102020-09-08 14:06:57 +0200331 if( test_driver_cipher_hooks.forced_output != NULL )
Steven Cooreman8b122252020-09-03 15:30:32 +0200332 {
Steven Cooremanacb5a102020-09-08 14:06:57 +0200333 if( output_size < test_driver_cipher_hooks.forced_output_length )
Steven Cooreman8b122252020-09-03 15:30:32 +0200334 return PSA_ERROR_BUFFER_TOO_SMALL;
335
Steven Cooremanacb5a102020-09-08 14:06:57 +0200336 memcpy( output,
337 test_driver_cipher_hooks.forced_output,
338 test_driver_cipher_hooks.forced_output_length );
339 *output_length = test_driver_cipher_hooks.forced_output_length;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100340
341 return( test_driver_cipher_hooks.forced_status );
Steven Cooreman8b122252020-09-03 15:30:32 +0200342 }
Steven Cooreman37941cb2020-07-28 18:49:51 +0200343
Ronald Cron8d310ad2020-12-15 15:17:20 +0100344 if( test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
345 return( test_driver_cipher_hooks.forced_status );
346
Ronald Cron3522e322021-03-12 11:08:49 +0100347 return( mbedtls_transparent_test_driver_cipher_finish(
348 operation, output, output_size, output_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200349}
350
351/*
352 * opaque versions, to do
353 */
354psa_status_t test_opaque_cipher_encrypt(
355 const psa_key_attributes_t *attributes,
356 const uint8_t *key, size_t key_length,
357 psa_algorithm_t alg,
358 const uint8_t *input, size_t input_length,
359 uint8_t *output, size_t output_size, size_t *output_length)
360{
361 (void) attributes;
362 (void) key;
363 (void) key_length;
364 (void) alg;
365 (void) input;
366 (void) input_length;
367 (void) output;
368 (void) output_size;
369 (void) output_length;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200370 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200371}
372
373psa_status_t test_opaque_cipher_decrypt(
374 const psa_key_attributes_t *attributes,
375 const uint8_t *key, size_t key_length,
376 psa_algorithm_t alg,
377 const uint8_t *input, size_t input_length,
378 uint8_t *output, size_t output_size, size_t *output_length)
379{
380 (void) attributes;
381 (void) key;
382 (void) key_length;
383 (void) alg;
384 (void) input;
385 (void) input_length;
386 (void) output;
387 (void) output_size;
388 (void) output_length;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200389 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200390}
391
392psa_status_t test_opaque_cipher_encrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100393 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200394 const psa_key_attributes_t *attributes,
395 const uint8_t *key, size_t key_length,
396 psa_algorithm_t alg)
397{
398 (void) operation;
399 (void) attributes;
400 (void) key;
401 (void) key_length;
402 (void) alg;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200403 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200404}
405
406psa_status_t test_opaque_cipher_decrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100407 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200408 const psa_key_attributes_t *attributes,
409 const uint8_t *key, size_t key_length,
410 psa_algorithm_t alg)
411{
412 (void) operation;
413 (void) attributes;
414 (void) key;
415 (void) key_length;
416 (void) alg;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200417 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200418}
419
420psa_status_t test_opaque_cipher_abort(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100421 mbedtls_opaque_test_driver_cipher_operation_t *operation )
Steven Cooreman37941cb2020-07-28 18:49:51 +0200422{
423 (void) operation;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200424 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200425}
426
427psa_status_t test_opaque_cipher_generate_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100428 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200429 uint8_t *iv,
430 size_t iv_size,
431 size_t *iv_length)
432{
433 (void) operation;
434 (void) iv;
435 (void) iv_size;
436 (void) iv_length;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200437 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200438}
439
440psa_status_t test_opaque_cipher_set_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100441 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200442 const uint8_t *iv,
443 size_t iv_length)
444{
445 (void) operation;
446 (void) iv;
447 (void) iv_length;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200448 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200449}
450
451psa_status_t test_opaque_cipher_update(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100452 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200453 const uint8_t *input,
454 size_t input_length,
455 uint8_t *output,
456 size_t output_size,
457 size_t *output_length)
458{
459 (void) operation;
460 (void) input;
461 (void) input_length;
462 (void) output;
463 (void) output_size;
464 (void) output_length;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200465 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200466}
467
468psa_status_t test_opaque_cipher_finish(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100469 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200470 uint8_t *output,
471 size_t output_size,
472 size_t *output_length)
473{
474 (void) operation;
475 (void) output;
476 (void) output_size;
477 (void) output_length;
Steven Cooremanacb5a102020-09-08 14:06:57 +0200478 return( PSA_ERROR_NOT_SUPPORTED );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200479}
480#endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */