blob: 5ab9d4665330402a6915de9140de7bde1dc8e7dd [file] [log] [blame]
Louis Mayencourt7a36f782018-09-24 14:00:57 +01001/*
Antonio de Angelis04debbd2019-10-14 12:12:52 +01002 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
Louis Mayencourt7a36f782018-09-24 14:00:57 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
Jamie Fox0e54ebc2019-04-09 14:21:04 +01008#include <stddef.h>
9#include <stdint.h>
Louis Mayencourt7a36f782018-09-24 14:00:57 +010010
Summer Qin4b1d03b2019-07-02 14:56:08 +080011/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
Antonio de Angelis4743e672019-04-11 11:38:48 +010012 * integrity checks but this will have to be revised
13 * when the full set of error codes mandated by PSA FF
14 * is available.
15 */
Jamie Fox0e54ebc2019-04-09 14:21:04 +010016#include "tfm_mbedcrypto_include.h"
Antonio de Angelis4743e672019-04-11 11:38:48 +010017
Jamie Fox0e54ebc2019-04-09 14:21:04 +010018#include "tfm_crypto_api.h"
19#include "tfm_crypto_defs.h"
Soby Mathewd8abdfd2020-10-14 10:28:01 +010020#include "tfm_crypto_private.h"
Louis Mayencourt7a36f782018-09-24 14:00:57 +010021
22/*!
23 * \defgroup public_psa Public functions, PSA
24 *
25 */
26
27/*!@{*/
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000028psa_status_t tfm_crypto_mac_sign_setup(psa_invec in_vec[],
29 size_t in_len,
30 psa_outvec out_vec[],
31 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +010032{
Kevin Peng96f802e2019-12-26 16:10:25 +080033#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +010034 return PSA_ERROR_NOT_SUPPORTED;
35#else
Antonio de Angelis4743e672019-04-11 11:38:48 +010036 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010037 psa_mac_operation_t *operation = NULL;
38
Soby Mathewd8abdfd2020-10-14 10:28:01 +010039 CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 1, 1);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000040
Antonio de Angelis4743e672019-04-11 11:38:48 +010041 if ((out_vec[0].len != sizeof(uint32_t)) ||
42 (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +080043 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000044 }
Antonio de Angelis4743e672019-04-11 11:38:48 +010045 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010046 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +010047 uint32_t *handle_out = out_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010048 psa_key_handle_t key_handle = iov->key_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +010049 psa_algorithm_t alg = iov->alg;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000050
Antonio de Angelis60a6fe62019-06-18 15:27:34 +010051 status = tfm_crypto_check_handle_owner(key_handle, NULL);
52 if (status != PSA_SUCCESS) {
53 return status;
54 }
55
Jamie Fox0e54ebc2019-04-09 14:21:04 +010056 /* Init the handle in the operation with the one passed from the iov */
57 *handle_out = iov->op_handle;
58
59 /* Allocate the operation context in the secure world */
60 status = tfm_crypto_operation_alloc(TFM_CRYPTO_MAC_OPERATION,
61 &handle,
62 (void **)&operation);
63 if (status != PSA_SUCCESS) {
64 return status;
Antonio de Angelis4743e672019-04-11 11:38:48 +010065 }
Jamie Fox0e54ebc2019-04-09 14:21:04 +010066
67 *handle_out = handle;
68
69 status = psa_mac_sign_setup(operation, key_handle, alg);
70 if (status != PSA_SUCCESS) {
71 /* Release the operation context, ignore if the operation fails. */
72 (void)tfm_crypto_operation_release(handle_out);
73 return status;
74 }
75
76 return PSA_SUCCESS;
Antonio de Angelis7740b382019-07-16 10:59:25 +010077#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +010078}
79
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000080psa_status_t tfm_crypto_mac_verify_setup(psa_invec in_vec[],
81 size_t in_len,
82 psa_outvec out_vec[],
83 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +010084{
Kevin Peng96f802e2019-12-26 16:10:25 +080085#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +010086 return PSA_ERROR_NOT_SUPPORTED;
87#else
Antonio de Angelis4743e672019-04-11 11:38:48 +010088 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010089 psa_mac_operation_t *operation = NULL;
90
Soby Mathewd8abdfd2020-10-14 10:28:01 +010091 CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 1, 1);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000092
Antonio de Angelis4743e672019-04-11 11:38:48 +010093 if ((out_vec[0].len != sizeof(uint32_t)) ||
94 (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +080095 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000096 }
Antonio de Angelis4743e672019-04-11 11:38:48 +010097 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010098 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +010099 uint32_t *handle_out = out_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100100 psa_key_handle_t key_handle = iov->key_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100101 psa_algorithm_t alg = iov->alg;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000102
Antonio de Angelis60a6fe62019-06-18 15:27:34 +0100103 status = tfm_crypto_check_handle_owner(key_handle, NULL);
104 if (status != PSA_SUCCESS) {
105 return status;
106 }
107
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100108 /* Init the handle in the operation with the one passed from the iov */
109 *handle_out = iov->op_handle;
110
111 /* Allocate the operation context in the secure world */
112 status = tfm_crypto_operation_alloc(TFM_CRYPTO_MAC_OPERATION,
113 &handle,
114 (void **)&operation);
115 if (status != PSA_SUCCESS) {
116 return status;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100117 }
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100118
119 *handle_out = handle;
120
121 status = psa_mac_verify_setup(operation, key_handle, alg);
122 if (status != PSA_SUCCESS) {
123 /* Release the operation context, ignore if the operation fails. */
124 (void)tfm_crypto_operation_release(handle_out);
125 return status;
126 }
127
128 return PSA_SUCCESS;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100129#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100130}
131
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000132psa_status_t tfm_crypto_mac_update(psa_invec in_vec[],
133 size_t in_len,
134 psa_outvec out_vec[],
135 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100136{
Kevin Peng96f802e2019-12-26 16:10:25 +0800137#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100138 return PSA_ERROR_NOT_SUPPORTED;
139#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000140 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100141 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100142
Soby Mathewd8abdfd2020-10-14 10:28:01 +0100143 CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 1, 1);
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100144
Antonio de Angelis4743e672019-04-11 11:38:48 +0100145 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
146 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800147 return PSA_ERROR_CONNECTION_REFUSED;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100148 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100149 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100150 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100151 uint32_t *handle_out = out_vec[0].base;
152 const uint8_t *input = in_vec[1].base;
153 size_t input_length = in_vec[1].len;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100154
Antonio de Angelis4743e672019-04-11 11:38:48 +0100155 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100156 *handle_out = iov->op_handle;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000157
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100158 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000159 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100160 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100161 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000162 if (status != PSA_SUCCESS) {
163 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100164 }
165
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100166 status = psa_mac_update(operation, input, input_length);
167 if (status != PSA_SUCCESS) {
168 /* Release the operation context, ignore if the operation fails. */
169 (void)tfm_crypto_operation_release(handle_out);
170 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100171 }
172
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000173 return PSA_SUCCESS;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100174#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100175}
176
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000177psa_status_t tfm_crypto_mac_sign_finish(psa_invec in_vec[],
178 size_t in_len,
179 psa_outvec out_vec[],
180 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100181{
Kevin Peng96f802e2019-12-26 16:10:25 +0800182#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100183 return PSA_ERROR_NOT_SUPPORTED;
184#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000185 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100186 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100187
Soby Mathewd8abdfd2020-10-14 10:28:01 +0100188 CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 1, 2);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000189
Antonio de Angelis4743e672019-04-11 11:38:48 +0100190 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
191 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800192 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000193 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100194 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100195 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100196 uint32_t *handle_out = out_vec[0].base;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000197 uint8_t *mac = out_vec[1].base;
198 size_t mac_size = out_vec[1].len;
199
Antonio de Angelis4743e672019-04-11 11:38:48 +0100200 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100201 *handle_out = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100202
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000203 /* Initialise mac_length to zero */
204 out_vec[1].len = 0;
205
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100206 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000207 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100208 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100209 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000210 if (status != PSA_SUCCESS) {
211 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100212 }
213
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100214 status = psa_mac_sign_finish(operation, mac, mac_size, &out_vec[1].len);
215 if (status != PSA_SUCCESS) {
216 /* Release the operation context, ignore if the operation fails. */
217 (void)tfm_crypto_operation_release(handle_out);
218 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100219 }
220
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100221 status = tfm_crypto_operation_release(handle_out);
222
Antonio de Angelis4743e672019-04-11 11:38:48 +0100223 return status;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100224#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100225}
226
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000227psa_status_t tfm_crypto_mac_verify_finish(psa_invec in_vec[],
228 size_t in_len,
229 psa_outvec out_vec[],
230 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100231{
Kevin Peng96f802e2019-12-26 16:10:25 +0800232#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100233 return PSA_ERROR_NOT_SUPPORTED;
234#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000235 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100236 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100237
Soby Mathewd8abdfd2020-10-14 10:28:01 +0100238 CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 1, 1);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000239
Antonio de Angelis4743e672019-04-11 11:38:48 +0100240 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
241 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800242 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000243 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100244 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100245 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100246 uint32_t *handle_out = out_vec[0].base;
247 const uint8_t *mac = in_vec[1].base;
248 size_t mac_length = in_vec[1].len;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000249
Antonio de Angelis4743e672019-04-11 11:38:48 +0100250 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100251 *handle_out = iov->op_handle;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100252
253 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000254 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100255 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100256 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000257 if (status != PSA_SUCCESS) {
258 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100259 }
260
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100261 status = psa_mac_verify_finish(operation, mac, mac_length);
262 if (status != PSA_SUCCESS) {
263 /* Release the operation context, ignore if the operation fails. */
264 (void)tfm_crypto_operation_release(handle_out);
265 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100266 }
267
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100268 status = tfm_crypto_operation_release(handle_out);
269
270 return status;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100271#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100272}
273
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000274psa_status_t tfm_crypto_mac_abort(psa_invec in_vec[],
275 size_t in_len,
276 psa_outvec out_vec[],
277 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100278{
Kevin Peng96f802e2019-12-26 16:10:25 +0800279#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100280 return PSA_ERROR_NOT_SUPPORTED;
281#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000282 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100283 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100284
Soby Mathewd8abdfd2020-10-14 10:28:01 +0100285 CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 1, 1);
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100286
Antonio de Angelis4743e672019-04-11 11:38:48 +0100287 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
288 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800289 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000290 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100291 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100292 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100293 uint32_t *handle_out = out_vec[0].base;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000294
Antonio de Angelis4743e672019-04-11 11:38:48 +0100295 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100296 *handle_out = iov->op_handle;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000297
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100298 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000299 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100300 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100301 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000302 if (status != PSA_SUCCESS) {
Antonio de Angelis25e2b2d2019-04-25 14:49:50 +0100303 /* Operation does not exist, so abort has no effect */
304 return PSA_SUCCESS;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100305 }
306
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100307 status = psa_mac_abort(operation);
308
309 if (status != PSA_SUCCESS) {
310 /* Release the operation context, ignore if the operation fails. */
311 (void)tfm_crypto_operation_release(handle_out);
312 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100313 }
314
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100315 status = tfm_crypto_operation_release(handle_out);
316
Antonio de Angelis4743e672019-04-11 11:38:48 +0100317 return status;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100318#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100319}
Antonio de Angelis04debbd2019-10-14 12:12:52 +0100320
321psa_status_t tfm_crypto_mac_compute(psa_invec in_vec[],
322 size_t in_len,
323 psa_outvec out_vec[],
324 size_t out_len)
325{
326 /* FixMe: To be implemented */
327 return PSA_ERROR_NOT_SUPPORTED;
328}
329
330psa_status_t tfm_crypto_mac_verify(psa_invec in_vec[],
331 size_t in_len,
332 psa_outvec out_vec[],
333 size_t out_len)
334{
335 /* FixMe: To be implemented */
336 return PSA_ERROR_NOT_SUPPORTED;
337}
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100338/*!@}*/