blob: 20d79d8d83aeab0c497caeb1625a8a7c58e663e4 [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
Mateusz Starzyk2c09c9b2021-05-14 22:20:10 +020021#include <test/helpers.h>
22
Steven Cooreman37941cb2020-07-28 18:49:51 +020023#if defined(MBEDTLS_PSA_CRYPTO_DRIVERS) && defined(PSA_CRYPTO_DRIVER_TEST)
24#include "psa/crypto.h"
Ronald Cron8d310ad2020-12-15 15:17:20 +010025#include "psa_crypto_cipher.h"
Steven Cooremanacb5a102020-09-08 14:06:57 +020026#include "psa_crypto_core.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020027#include "mbedtls/cipher.h"
28
Steven Cooremanacb5a102020-09-08 14:06:57 +020029#include "test/drivers/cipher.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020030
31#include "test/random.h"
32
33#include <string.h>
34
Ronald Cron7f13fa22021-04-13 12:41:34 +020035mbedtls_test_driver_cipher_hooks_t mbedtls_test_driver_cipher_hooks =
36 MBEDTLS_TEST_DRIVER_CIPHER_INIT;
Steven Cooreman37941cb2020-07-28 18:49:51 +020037
gabor-mezei-arma9449a02021-03-25 11:17:10 +010038psa_status_t mbedtls_test_transparent_cipher_encrypt(
Steven Cooremanfe0ab552020-09-10 13:07:02 +020039 const psa_key_attributes_t *attributes,
gabor-mezei-arma9449a02021-03-25 11:17:10 +010040 const uint8_t *key_buffer,
41 size_t key_buffer_size,
Steven Cooremanfe0ab552020-09-10 13:07:02 +020042 psa_algorithm_t alg,
gabor-mezei-arma9449a02021-03-25 11:17:10 +010043 const uint8_t *input,
44 size_t input_length,
45 uint8_t *output,
46 size_t output_size,
47 size_t *output_length )
Steven Cooremanfe0ab552020-09-10 13:07:02 +020048{
Ronald Cron7f13fa22021-04-13 12:41:34 +020049 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020050
Ronald Cron7f13fa22021-04-13 12:41:34 +020051 if( mbedtls_test_driver_cipher_hooks.forced_output != NULL )
Steven Cooremanfe0ab552020-09-10 13:07:02 +020052 {
Ronald Cron7f13fa22021-04-13 12:41:34 +020053 if( output_size < mbedtls_test_driver_cipher_hooks.forced_output_length )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +020054 return PSA_ERROR_BUFFER_TOO_SMALL ;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020055
56 memcpy( output,
Ronald Cron7f13fa22021-04-13 12:41:34 +020057 mbedtls_test_driver_cipher_hooks.forced_output,
58 mbedtls_test_driver_cipher_hooks.forced_output_length );
59 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020060
Mateusz Starzyke36f5b12021-07-22 16:43:35 +020061 return mbedtls_test_driver_cipher_hooks.forced_status ;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020062 }
63
gabor-mezei-arma9449a02021-03-25 11:17:10 +010064 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +020065 return mbedtls_test_driver_cipher_hooks.forced_status ;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020066
gabor-mezei-arma9449a02021-03-25 11:17:10 +010067 psa_generate_random( output, PSA_CIPHER_IV_LENGTH( attributes->core.type, alg ) );
Steven Cooremanfe0ab552020-09-10 13:07:02 +020068
gabor-mezei-arma9449a02021-03-25 11:17:10 +010069 return( mbedtls_transparent_test_driver_cipher_encrypt(
70 attributes, key_buffer, key_buffer_size,
71 alg, input, input_length,
72 output, output_size, output_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +020073}
74
Ronald Cron7f13fa22021-04-13 12:41:34 +020075psa_status_t mbedtls_test_transparent_cipher_decrypt(
Steven Cooreman37941cb2020-07-28 18:49:51 +020076 const psa_key_attributes_t *attributes,
gabor-mezei-arma9449a02021-03-25 11:17:10 +010077 const uint8_t *key_buffer,
78 size_t key_buffer_size,
Steven Cooreman37941cb2020-07-28 18:49:51 +020079 psa_algorithm_t alg,
gabor-mezei-arma9449a02021-03-25 11:17:10 +010080 const uint8_t *input,
81 size_t input_length,
82 uint8_t *output,
83 size_t output_size,
84 size_t *output_length )
Steven Cooreman37941cb2020-07-28 18:49:51 +020085{
gabor-mezei-arma9449a02021-03-25 11:17:10 +010086 mbedtls_test_driver_cipher_hooks.hits++;
87
88 if( mbedtls_test_driver_cipher_hooks.forced_output != NULL )
89 {
90 if( output_size < mbedtls_test_driver_cipher_hooks.forced_output_length )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +020091 return PSA_ERROR_BUFFER_TOO_SMALL ;
gabor-mezei-arma9449a02021-03-25 11:17:10 +010092
93 memcpy( output,
94 mbedtls_test_driver_cipher_hooks.forced_output,
95 mbedtls_test_driver_cipher_hooks.forced_output_length );
96 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
97
Mateusz Starzyke36f5b12021-07-22 16:43:35 +020098 return mbedtls_test_driver_cipher_hooks.forced_status ;
gabor-mezei-arma9449a02021-03-25 11:17:10 +010099 }
100
101 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200102 return mbedtls_test_driver_cipher_hooks.forced_status ;
gabor-mezei-arma9449a02021-03-25 11:17:10 +0100103
104 return( mbedtls_transparent_test_driver_cipher_decrypt(
105 attributes, key_buffer, key_buffer_size,
106 alg, input, input_length,
107 output, output_size, output_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200108}
109
Ronald Cron7f13fa22021-04-13 12:41:34 +0200110psa_status_t mbedtls_test_transparent_cipher_encrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100111 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200112 const psa_key_attributes_t *attributes,
113 const uint8_t *key, size_t key_length,
114 psa_algorithm_t alg)
115{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200116 mbedtls_test_driver_cipher_hooks.hits++;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100117
118 /* Wiping the entire struct here, instead of member-by-member. This is
119 * useful for the test suite, since it gives a chance of catching memory
120 * corruption errors should the core not have allocated (enough) memory for
121 * our context struct. */
122 memset( operation, 0, sizeof( *operation ) );
123
Ronald Cron7f13fa22021-04-13 12:41:34 +0200124 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200125 return mbedtls_test_driver_cipher_hooks.forced_status ;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100126
Ronald Cron3522e322021-03-12 11:08:49 +0100127 return ( mbedtls_transparent_test_driver_cipher_encrypt_setup(
128 operation, attributes, key, key_length, alg ) );
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200129}
130
Ronald Cron7f13fa22021-04-13 12:41:34 +0200131psa_status_t mbedtls_test_transparent_cipher_decrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100132 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200133 const psa_key_attributes_t *attributes,
134 const uint8_t *key, size_t key_length,
135 psa_algorithm_t alg)
136{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200137 mbedtls_test_driver_cipher_hooks.hits++;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100138
Ronald Cron7f13fa22021-04-13 12:41:34 +0200139 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200140 return mbedtls_test_driver_cipher_hooks.forced_status ;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100141
Ronald Cron3522e322021-03-12 11:08:49 +0100142 return ( mbedtls_transparent_test_driver_cipher_decrypt_setup(
143 operation, attributes, key, key_length, alg ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200144}
145
Ronald Cron7f13fa22021-04-13 12:41:34 +0200146psa_status_t mbedtls_test_transparent_cipher_abort(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100147 mbedtls_transparent_test_driver_cipher_operation_t *operation)
Steven Cooreman37941cb2020-07-28 18:49:51 +0200148{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200149 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman89e54f22020-09-10 18:07:57 +0200150
Steven Cooreman8b122252020-09-03 15:30:32 +0200151 if( operation->alg == 0 )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200152 return PSA_SUCCESS ;
Steven Cooreman8b122252020-09-03 15:30:32 +0200153
Ronald Cron3522e322021-03-12 11:08:49 +0100154 mbedtls_transparent_test_driver_cipher_abort( operation );
Steven Cooreman8b122252020-09-03 15:30:32 +0200155
Ronald Cron8d310ad2020-12-15 15:17:20 +0100156 /* Wiping the entire struct here, instead of member-by-member. This is
157 * useful for the test suite, since it gives a chance of catching memory
158 * corruption errors should the core not have allocated (enough) memory for
159 * our context struct. */
Steven Cooreman5240e8b2020-09-09 11:51:45 +0200160 memset( operation, 0, sizeof( *operation ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200161
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200162 return mbedtls_test_driver_cipher_hooks.forced_status ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200163}
164
Ronald Cron7f13fa22021-04-13 12:41:34 +0200165psa_status_t mbedtls_test_transparent_cipher_set_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100166 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200167 const uint8_t *iv,
168 size_t iv_length)
169{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200170 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman8b122252020-09-03 15:30:32 +0200171
Ronald Cron7f13fa22021-04-13 12:41:34 +0200172 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200173 return mbedtls_test_driver_cipher_hooks.forced_status ;
Steven Cooreman89e54f22020-09-10 18:07:57 +0200174
Ronald Cron3522e322021-03-12 11:08:49 +0100175 return( mbedtls_transparent_test_driver_cipher_set_iv(
176 operation, iv, iv_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200177}
178
Ronald Cron7f13fa22021-04-13 12:41:34 +0200179psa_status_t mbedtls_test_transparent_cipher_update(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100180 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200181 const uint8_t *input,
182 size_t input_length,
183 uint8_t *output,
184 size_t output_size,
185 size_t *output_length)
186{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200187 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200188
Ronald Cron7f13fa22021-04-13 12:41:34 +0200189 if( mbedtls_test_driver_cipher_hooks.forced_output != NULL )
Steven Cooreman8b122252020-09-03 15:30:32 +0200190 {
Ronald Cron7f13fa22021-04-13 12:41:34 +0200191 if( output_size < mbedtls_test_driver_cipher_hooks.forced_output_length )
Steven Cooreman8b122252020-09-03 15:30:32 +0200192 return PSA_ERROR_BUFFER_TOO_SMALL;
193
Steven Cooremanacb5a102020-09-08 14:06:57 +0200194 memcpy( output,
Ronald Cron7f13fa22021-04-13 12:41:34 +0200195 mbedtls_test_driver_cipher_hooks.forced_output,
196 mbedtls_test_driver_cipher_hooks.forced_output_length );
197 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100198
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200199 return mbedtls_test_driver_cipher_hooks.forced_status ;
Steven Cooreman8b122252020-09-03 15:30:32 +0200200 }
Steven Cooreman37941cb2020-07-28 18:49:51 +0200201
Ronald Cron7f13fa22021-04-13 12:41:34 +0200202 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200203 return mbedtls_test_driver_cipher_hooks.forced_status ;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100204
Ronald Cron3522e322021-03-12 11:08:49 +0100205 return( mbedtls_transparent_test_driver_cipher_update(
206 operation, input, input_length,
207 output, output_size, output_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200208}
209
Ronald Cron7f13fa22021-04-13 12:41:34 +0200210psa_status_t mbedtls_test_transparent_cipher_finish(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100211 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200212 uint8_t *output,
213 size_t output_size,
214 size_t *output_length)
215{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200216 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200217
Ronald Cron7f13fa22021-04-13 12:41:34 +0200218 if( mbedtls_test_driver_cipher_hooks.forced_output != NULL )
Steven Cooreman8b122252020-09-03 15:30:32 +0200219 {
Ronald Cron7f13fa22021-04-13 12:41:34 +0200220 if( output_size < mbedtls_test_driver_cipher_hooks.forced_output_length )
Steven Cooreman8b122252020-09-03 15:30:32 +0200221 return PSA_ERROR_BUFFER_TOO_SMALL;
222
Steven Cooremanacb5a102020-09-08 14:06:57 +0200223 memcpy( output,
Ronald Cron7f13fa22021-04-13 12:41:34 +0200224 mbedtls_test_driver_cipher_hooks.forced_output,
225 mbedtls_test_driver_cipher_hooks.forced_output_length );
226 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100227
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200228 return mbedtls_test_driver_cipher_hooks.forced_status ;
Steven Cooreman8b122252020-09-03 15:30:32 +0200229 }
Steven Cooreman37941cb2020-07-28 18:49:51 +0200230
Ronald Cron7f13fa22021-04-13 12:41:34 +0200231 if( mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS )
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200232 return mbedtls_test_driver_cipher_hooks.forced_status ;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100233
Ronald Cron3522e322021-03-12 11:08:49 +0100234 return( mbedtls_transparent_test_driver_cipher_finish(
235 operation, output, output_size, output_length ) );
Steven Cooreman37941cb2020-07-28 18:49:51 +0200236}
237
238/*
239 * opaque versions, to do
240 */
Ronald Cron7f13fa22021-04-13 12:41:34 +0200241psa_status_t mbedtls_test_opaque_cipher_encrypt(
Steven Cooreman37941cb2020-07-28 18:49:51 +0200242 const psa_key_attributes_t *attributes,
243 const uint8_t *key, size_t key_length,
244 psa_algorithm_t alg,
245 const uint8_t *input, size_t input_length,
246 uint8_t *output, size_t output_size, size_t *output_length)
247{
248 (void) attributes;
249 (void) key;
250 (void) key_length;
251 (void) alg;
252 (void) input;
253 (void) input_length;
254 (void) output;
255 (void) output_size;
256 (void) output_length;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200257 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200258}
259
Ronald Cron7f13fa22021-04-13 12:41:34 +0200260psa_status_t mbedtls_test_opaque_cipher_decrypt(
Steven Cooreman37941cb2020-07-28 18:49:51 +0200261 const psa_key_attributes_t *attributes,
262 const uint8_t *key, size_t key_length,
263 psa_algorithm_t alg,
264 const uint8_t *input, size_t input_length,
265 uint8_t *output, size_t output_size, size_t *output_length)
266{
267 (void) attributes;
268 (void) key;
269 (void) key_length;
270 (void) alg;
271 (void) input;
272 (void) input_length;
273 (void) output;
274 (void) output_size;
275 (void) output_length;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200276 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200277}
278
Ronald Cron7f13fa22021-04-13 12:41:34 +0200279psa_status_t mbedtls_test_opaque_cipher_encrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100280 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200281 const psa_key_attributes_t *attributes,
282 const uint8_t *key, size_t key_length,
283 psa_algorithm_t alg)
284{
285 (void) operation;
286 (void) attributes;
287 (void) key;
288 (void) key_length;
289 (void) alg;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200290 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200291}
292
Ronald Cron7f13fa22021-04-13 12:41:34 +0200293psa_status_t mbedtls_test_opaque_cipher_decrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100294 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200295 const psa_key_attributes_t *attributes,
296 const uint8_t *key, size_t key_length,
297 psa_algorithm_t alg)
298{
299 (void) operation;
300 (void) attributes;
301 (void) key;
302 (void) key_length;
303 (void) alg;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200304 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200305}
306
Ronald Cron7f13fa22021-04-13 12:41:34 +0200307psa_status_t mbedtls_test_opaque_cipher_abort(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100308 mbedtls_opaque_test_driver_cipher_operation_t *operation )
Steven Cooreman37941cb2020-07-28 18:49:51 +0200309{
310 (void) operation;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200311 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200312}
313
Ronald Cron7f13fa22021-04-13 12:41:34 +0200314psa_status_t mbedtls_test_opaque_cipher_set_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100315 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200316 const uint8_t *iv,
317 size_t iv_length)
318{
319 (void) operation;
320 (void) iv;
321 (void) iv_length;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200322 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200323}
324
Ronald Cron7f13fa22021-04-13 12:41:34 +0200325psa_status_t mbedtls_test_opaque_cipher_update(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100326 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200327 const uint8_t *input,
328 size_t input_length,
329 uint8_t *output,
330 size_t output_size,
331 size_t *output_length)
332{
333 (void) operation;
334 (void) input;
335 (void) input_length;
336 (void) output;
337 (void) output_size;
338 (void) output_length;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200339 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200340}
341
Ronald Cron7f13fa22021-04-13 12:41:34 +0200342psa_status_t mbedtls_test_opaque_cipher_finish(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100343 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200344 uint8_t *output,
345 size_t output_size,
346 size_t *output_length)
347{
348 (void) operation;
349 (void) output;
350 (void) output_size;
351 (void) output_length;
Mateusz Starzyke36f5b12021-07-22 16:43:35 +0200352 return PSA_ERROR_NOT_SUPPORTED ;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200353}
354#endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */