blob: 0f369bae116ef998076bb6db3675ff7b1fe73999 [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)
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020024# include "psa/crypto.h"
25# include "psa_crypto_cipher.h"
26# include "psa_crypto_core.h"
27# include "mbedtls/cipher.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020028
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020029# include "test/drivers/cipher.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020030
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020031# include "test/random.h"
Steven Cooreman37941cb2020-07-28 18:49:51 +020032
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020033# include <string.h>
Steven Cooreman37941cb2020-07-28 18:49:51 +020034
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
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020038psa_status_t
39mbedtls_test_transparent_cipher_encrypt(const psa_key_attributes_t *attributes,
40 const uint8_t *key_buffer,
41 size_t key_buffer_size,
42 psa_algorithm_t alg,
43 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
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020051 if (mbedtls_test_driver_cipher_hooks.forced_output != NULL) {
52 if (output_size < mbedtls_test_driver_cipher_hooks.forced_output_length)
53 return PSA_ERROR_BUFFER_TOO_SMALL;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020054
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020055 memcpy(output, mbedtls_test_driver_cipher_hooks.forced_output,
56 mbedtls_test_driver_cipher_hooks.forced_output_length);
Ronald Cron7f13fa22021-04-13 12:41:34 +020057 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020058
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020059 return mbedtls_test_driver_cipher_hooks.forced_status;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020060 }
61
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020062 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
63 return mbedtls_test_driver_cipher_hooks.forced_status;
Steven Cooremanfe0ab552020-09-10 13:07:02 +020064
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020065 psa_generate_random(output,
66 PSA_CIPHER_IV_LENGTH(attributes->core.type, alg));
Steven Cooremanfe0ab552020-09-10 13:07:02 +020067
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020068 return (mbedtls_transparent_test_driver_cipher_encrypt(
69 attributes, key_buffer, key_buffer_size, alg, input, input_length,
70 output, output_size, output_length));
Steven Cooreman37941cb2020-07-28 18:49:51 +020071}
72
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020073psa_status_t
74mbedtls_test_transparent_cipher_decrypt(const psa_key_attributes_t *attributes,
75 const uint8_t *key_buffer,
76 size_t key_buffer_size,
77 psa_algorithm_t alg,
78 const uint8_t *input,
79 size_t input_length,
80 uint8_t *output,
81 size_t output_size,
82 size_t *output_length)
Steven Cooreman37941cb2020-07-28 18:49:51 +020083{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020084 mbedtls_test_driver_cipher_hooks.hits++;
gabor-mezei-arma9449a02021-03-25 11:17:10 +010085
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020086 if (mbedtls_test_driver_cipher_hooks.forced_output != NULL) {
87 if (output_size < mbedtls_test_driver_cipher_hooks.forced_output_length)
88 return PSA_ERROR_BUFFER_TOO_SMALL;
gabor-mezei-arma9449a02021-03-25 11:17:10 +010089
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020090 memcpy(output, mbedtls_test_driver_cipher_hooks.forced_output,
91 mbedtls_test_driver_cipher_hooks.forced_output_length);
gabor-mezei-arma9449a02021-03-25 11:17:10 +010092 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
93
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020094 return mbedtls_test_driver_cipher_hooks.forced_status;
gabor-mezei-arma9449a02021-03-25 11:17:10 +010095 }
96
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +020097 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
98 return mbedtls_test_driver_cipher_hooks.forced_status;
gabor-mezei-arma9449a02021-03-25 11:17:10 +010099
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200100 return (mbedtls_transparent_test_driver_cipher_decrypt(
101 attributes, key_buffer, key_buffer_size, alg, input, input_length,
102 output, output_size, output_length));
Steven Cooreman37941cb2020-07-28 18:49:51 +0200103}
104
Ronald Cron7f13fa22021-04-13 12:41:34 +0200105psa_status_t mbedtls_test_transparent_cipher_encrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100106 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200107 const psa_key_attributes_t *attributes,
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200108 const uint8_t *key,
109 size_t key_length,
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200110 psa_algorithm_t alg)
111{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200112 mbedtls_test_driver_cipher_hooks.hits++;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100113
114 /* Wiping the entire struct here, instead of member-by-member. This is
115 * useful for the test suite, since it gives a chance of catching memory
116 * corruption errors should the core not have allocated (enough) memory for
117 * our context struct. */
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200118 memset(operation, 0, sizeof(*operation));
Ronald Cron8d310ad2020-12-15 15:17:20 +0100119
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200120 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
121 return mbedtls_test_driver_cipher_hooks.forced_status;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100122
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200123 return (mbedtls_transparent_test_driver_cipher_encrypt_setup(
124 operation, attributes, key, key_length, alg));
Steven Cooreman16afd3d2020-09-09 15:36:39 +0200125}
126
Ronald Cron7f13fa22021-04-13 12:41:34 +0200127psa_status_t mbedtls_test_transparent_cipher_decrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100128 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200129 const psa_key_attributes_t *attributes,
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200130 const uint8_t *key,
131 size_t key_length,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200132 psa_algorithm_t alg)
133{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200134 mbedtls_test_driver_cipher_hooks.hits++;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100135
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200136 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
137 return mbedtls_test_driver_cipher_hooks.forced_status;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100138
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200139 return (mbedtls_transparent_test_driver_cipher_decrypt_setup(
140 operation, attributes, key, key_length, alg));
Steven Cooreman37941cb2020-07-28 18:49:51 +0200141}
142
Ronald Cron7f13fa22021-04-13 12:41:34 +0200143psa_status_t mbedtls_test_transparent_cipher_abort(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100144 mbedtls_transparent_test_driver_cipher_operation_t *operation)
Steven Cooreman37941cb2020-07-28 18:49:51 +0200145{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200146 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman89e54f22020-09-10 18:07:57 +0200147
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200148 if (operation->alg == 0)
149 return PSA_SUCCESS;
Steven Cooreman8b122252020-09-03 15:30:32 +0200150
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200151 mbedtls_transparent_test_driver_cipher_abort(operation);
Steven Cooreman8b122252020-09-03 15:30:32 +0200152
Ronald Cron8d310ad2020-12-15 15:17:20 +0100153 /* Wiping the entire struct here, instead of member-by-member. This is
154 * useful for the test suite, since it gives a chance of catching memory
155 * corruption errors should the core not have allocated (enough) memory for
156 * our context struct. */
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200157 memset(operation, 0, sizeof(*operation));
Steven Cooreman37941cb2020-07-28 18:49:51 +0200158
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200159 return mbedtls_test_driver_cipher_hooks.forced_status;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200160}
161
Ronald Cron7f13fa22021-04-13 12:41:34 +0200162psa_status_t mbedtls_test_transparent_cipher_set_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100163 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200164 const uint8_t *iv,
165 size_t iv_length)
166{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200167 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman8b122252020-09-03 15:30:32 +0200168
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200169 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
170 return mbedtls_test_driver_cipher_hooks.forced_status;
Steven Cooreman89e54f22020-09-10 18:07:57 +0200171
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200172 return (mbedtls_transparent_test_driver_cipher_set_iv(operation, iv,
173 iv_length));
Steven Cooreman37941cb2020-07-28 18:49:51 +0200174}
175
Ronald Cron7f13fa22021-04-13 12:41:34 +0200176psa_status_t mbedtls_test_transparent_cipher_update(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100177 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200178 const uint8_t *input,
179 size_t input_length,
180 uint8_t *output,
181 size_t output_size,
182 size_t *output_length)
183{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200184 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200185
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200186 if (mbedtls_test_driver_cipher_hooks.forced_output != NULL) {
187 if (output_size < mbedtls_test_driver_cipher_hooks.forced_output_length)
Steven Cooreman8b122252020-09-03 15:30:32 +0200188 return PSA_ERROR_BUFFER_TOO_SMALL;
189
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200190 memcpy(output, mbedtls_test_driver_cipher_hooks.forced_output,
191 mbedtls_test_driver_cipher_hooks.forced_output_length);
Ronald Cron7f13fa22021-04-13 12:41:34 +0200192 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100193
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200194 return mbedtls_test_driver_cipher_hooks.forced_status;
Steven Cooreman8b122252020-09-03 15:30:32 +0200195 }
Steven Cooreman37941cb2020-07-28 18:49:51 +0200196
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200197 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
198 return mbedtls_test_driver_cipher_hooks.forced_status;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100199
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200200 return (mbedtls_transparent_test_driver_cipher_update(
201 operation, input, input_length, output, output_size, output_length));
Steven Cooreman37941cb2020-07-28 18:49:51 +0200202}
203
Ronald Cron7f13fa22021-04-13 12:41:34 +0200204psa_status_t mbedtls_test_transparent_cipher_finish(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100205 mbedtls_transparent_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200206 uint8_t *output,
207 size_t output_size,
208 size_t *output_length)
209{
Ronald Cron7f13fa22021-04-13 12:41:34 +0200210 mbedtls_test_driver_cipher_hooks.hits++;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200211
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200212 if (mbedtls_test_driver_cipher_hooks.forced_output != NULL) {
213 if (output_size < mbedtls_test_driver_cipher_hooks.forced_output_length)
Steven Cooreman8b122252020-09-03 15:30:32 +0200214 return PSA_ERROR_BUFFER_TOO_SMALL;
215
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200216 memcpy(output, mbedtls_test_driver_cipher_hooks.forced_output,
217 mbedtls_test_driver_cipher_hooks.forced_output_length);
Ronald Cron7f13fa22021-04-13 12:41:34 +0200218 *output_length = mbedtls_test_driver_cipher_hooks.forced_output_length;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100219
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200220 return mbedtls_test_driver_cipher_hooks.forced_status;
Steven Cooreman8b122252020-09-03 15:30:32 +0200221 }
Steven Cooreman37941cb2020-07-28 18:49:51 +0200222
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200223 if (mbedtls_test_driver_cipher_hooks.forced_status != PSA_SUCCESS)
224 return mbedtls_test_driver_cipher_hooks.forced_status;
Ronald Cron8d310ad2020-12-15 15:17:20 +0100225
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200226 return (mbedtls_transparent_test_driver_cipher_finish(
227 operation, output, output_size, output_length));
Steven Cooreman37941cb2020-07-28 18:49:51 +0200228}
229
230/*
231 * opaque versions, to do
232 */
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200233psa_status_t
234mbedtls_test_opaque_cipher_encrypt(const psa_key_attributes_t *attributes,
235 const uint8_t *key,
236 size_t key_length,
237 psa_algorithm_t alg,
238 const uint8_t *input,
239 size_t input_length,
240 uint8_t *output,
241 size_t output_size,
242 size_t *output_length)
Steven Cooreman37941cb2020-07-28 18:49:51 +0200243{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200244 (void)attributes;
245 (void)key;
246 (void)key_length;
247 (void)alg;
248 (void)input;
249 (void)input_length;
250 (void)output;
251 (void)output_size;
252 (void)output_length;
253 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200254}
255
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200256psa_status_t
257mbedtls_test_opaque_cipher_decrypt(const psa_key_attributes_t *attributes,
258 const uint8_t *key,
259 size_t key_length,
260 psa_algorithm_t alg,
261 const uint8_t *input,
262 size_t input_length,
263 uint8_t *output,
264 size_t output_size,
265 size_t *output_length)
Steven Cooreman37941cb2020-07-28 18:49:51 +0200266{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200267 (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;
276 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,
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200282 const uint8_t *key,
283 size_t key_length,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200284 psa_algorithm_t alg)
285{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200286 (void)operation;
287 (void)attributes;
288 (void)key;
289 (void)key_length;
290 (void)alg;
291 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200292}
293
Ronald Cron7f13fa22021-04-13 12:41:34 +0200294psa_status_t mbedtls_test_opaque_cipher_decrypt_setup(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100295 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200296 const psa_key_attributes_t *attributes,
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200297 const uint8_t *key,
298 size_t key_length,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200299 psa_algorithm_t alg)
300{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200301 (void)operation;
302 (void)attributes;
303 (void)key;
304 (void)key_length;
305 (void)alg;
306 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200307}
308
Ronald Cron7f13fa22021-04-13 12:41:34 +0200309psa_status_t mbedtls_test_opaque_cipher_abort(
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200310 mbedtls_opaque_test_driver_cipher_operation_t *operation)
Steven Cooreman37941cb2020-07-28 18:49:51 +0200311{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200312 (void)operation;
313 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200314}
315
Ronald Cron7f13fa22021-04-13 12:41:34 +0200316psa_status_t mbedtls_test_opaque_cipher_set_iv(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100317 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200318 const uint8_t *iv,
319 size_t iv_length)
320{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200321 (void)operation;
322 (void)iv;
323 (void)iv_length;
324 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200325}
326
Ronald Cron7f13fa22021-04-13 12:41:34 +0200327psa_status_t mbedtls_test_opaque_cipher_update(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100328 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200329 const uint8_t *input,
330 size_t input_length,
331 uint8_t *output,
332 size_t output_size,
333 size_t *output_length)
334{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200335 (void)operation;
336 (void)input;
337 (void)input_length;
338 (void)output;
339 (void)output_size;
340 (void)output_length;
341 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200342}
343
Ronald Cron7f13fa22021-04-13 12:41:34 +0200344psa_status_t mbedtls_test_opaque_cipher_finish(
Ronald Cron7cb9c3d2021-03-10 12:21:48 +0100345 mbedtls_opaque_test_driver_cipher_operation_t *operation,
Steven Cooreman37941cb2020-07-28 18:49:51 +0200346 uint8_t *output,
347 size_t output_size,
348 size_t *output_length)
349{
Mateusz Starzykc0eabdc2021-08-03 14:09:02 +0200350 (void)operation;
351 (void)output;
352 (void)output_size;
353 (void)output_length;
354 return PSA_ERROR_NOT_SUPPORTED;
Steven Cooreman37941cb2020-07-28 18:49:51 +0200355}
356#endif /* MBEDTLS_PSA_CRYPTO_DRIVERS && PSA_CRYPTO_DRIVER_TEST */