blob: 6f8528573479775d2d9b0bc54b8dc5772c321a61 [file] [log] [blame]
Louis Mayencourt7a36f782018-09-24 14:00:57 +01001/*
2 * Copyright (c) 2019, Arm Limited. All rights reserved.
3 *
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"
Louis Mayencourt7a36f782018-09-24 14:00:57 +010020
21/*!
22 * \defgroup public_psa Public functions, PSA
23 *
24 */
25
26/*!@{*/
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000027psa_status_t tfm_crypto_mac_sign_setup(psa_invec in_vec[],
28 size_t in_len,
29 psa_outvec out_vec[],
30 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +010031{
Kevin Peng96f802e2019-12-26 16:10:25 +080032#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +010033 return PSA_ERROR_NOT_SUPPORTED;
34#else
Antonio de Angelis4743e672019-04-11 11:38:48 +010035 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010036 psa_mac_operation_t *operation = NULL;
37
Antonio de Angelis4743e672019-04-11 11:38:48 +010038 if ((in_len != 1) || (out_len != 1)) {
Summer Qin4b1d03b2019-07-02 14:56:08 +080039 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000040 }
41
Antonio de Angelis4743e672019-04-11 11:38:48 +010042 if ((out_vec[0].len != sizeof(uint32_t)) ||
43 (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +080044 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000045 }
Antonio de Angelis4743e672019-04-11 11:38:48 +010046 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010047 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +010048 uint32_t *handle_out = out_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010049 psa_key_handle_t key_handle = iov->key_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +010050 psa_algorithm_t alg = iov->alg;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000051
Antonio de Angelis60a6fe62019-06-18 15:27:34 +010052 status = tfm_crypto_check_handle_owner(key_handle, NULL);
53 if (status != PSA_SUCCESS) {
54 return status;
55 }
56
Jamie Fox0e54ebc2019-04-09 14:21:04 +010057 /* Init the handle in the operation with the one passed from the iov */
58 *handle_out = iov->op_handle;
59
60 /* Allocate the operation context in the secure world */
61 status = tfm_crypto_operation_alloc(TFM_CRYPTO_MAC_OPERATION,
62 &handle,
63 (void **)&operation);
64 if (status != PSA_SUCCESS) {
65 return status;
Antonio de Angelis4743e672019-04-11 11:38:48 +010066 }
Jamie Fox0e54ebc2019-04-09 14:21:04 +010067
68 *handle_out = handle;
69
70 status = psa_mac_sign_setup(operation, key_handle, alg);
71 if (status != PSA_SUCCESS) {
72 /* Release the operation context, ignore if the operation fails. */
73 (void)tfm_crypto_operation_release(handle_out);
74 return status;
75 }
76
77 return PSA_SUCCESS;
Antonio de Angelis7740b382019-07-16 10:59:25 +010078#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +010079}
80
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000081psa_status_t tfm_crypto_mac_verify_setup(psa_invec in_vec[],
82 size_t in_len,
83 psa_outvec out_vec[],
84 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +010085{
Kevin Peng96f802e2019-12-26 16:10:25 +080086#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +010087 return PSA_ERROR_NOT_SUPPORTED;
88#else
Antonio de Angelis4743e672019-04-11 11:38:48 +010089 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +010090 psa_mac_operation_t *operation = NULL;
91
Antonio de Angelis4743e672019-04-11 11:38:48 +010092 if ((in_len != 1) || (out_len != 1)) {
Summer Qin4b1d03b2019-07-02 14:56:08 +080093 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000094 }
95
Antonio de Angelis4743e672019-04-11 11:38:48 +010096 if ((out_vec[0].len != sizeof(uint32_t)) ||
97 (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +080098 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +000099 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100100 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100101 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100102 uint32_t *handle_out = out_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100103 psa_key_handle_t key_handle = iov->key_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100104 psa_algorithm_t alg = iov->alg;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000105
Antonio de Angelis60a6fe62019-06-18 15:27:34 +0100106 status = tfm_crypto_check_handle_owner(key_handle, NULL);
107 if (status != PSA_SUCCESS) {
108 return status;
109 }
110
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100111 /* Init the handle in the operation with the one passed from the iov */
112 *handle_out = iov->op_handle;
113
114 /* Allocate the operation context in the secure world */
115 status = tfm_crypto_operation_alloc(TFM_CRYPTO_MAC_OPERATION,
116 &handle,
117 (void **)&operation);
118 if (status != PSA_SUCCESS) {
119 return status;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100120 }
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100121
122 *handle_out = handle;
123
124 status = psa_mac_verify_setup(operation, key_handle, alg);
125 if (status != PSA_SUCCESS) {
126 /* Release the operation context, ignore if the operation fails. */
127 (void)tfm_crypto_operation_release(handle_out);
128 return status;
129 }
130
131 return PSA_SUCCESS;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100132#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100133}
134
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000135psa_status_t tfm_crypto_mac_update(psa_invec in_vec[],
136 size_t in_len,
137 psa_outvec out_vec[],
138 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100139{
Kevin Peng96f802e2019-12-26 16:10:25 +0800140#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100141 return PSA_ERROR_NOT_SUPPORTED;
142#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000143 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100144 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100145
Antonio de Angelis4743e672019-04-11 11:38:48 +0100146 if ((in_len != 2) || (out_len != 1)) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800147 return PSA_ERROR_CONNECTION_REFUSED;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100148 }
149
Antonio de Angelis4743e672019-04-11 11:38:48 +0100150 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
151 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800152 return PSA_ERROR_CONNECTION_REFUSED;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100153 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100154 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100155 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100156 uint32_t *handle_out = out_vec[0].base;
157 const uint8_t *input = in_vec[1].base;
158 size_t input_length = in_vec[1].len;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100159
Antonio de Angelis4743e672019-04-11 11:38:48 +0100160 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100161 *handle_out = iov->op_handle;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000162
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100163 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000164 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100165 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100166 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000167 if (status != PSA_SUCCESS) {
168 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100169 }
170
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100171 status = psa_mac_update(operation, input, input_length);
172 if (status != PSA_SUCCESS) {
173 /* Release the operation context, ignore if the operation fails. */
174 (void)tfm_crypto_operation_release(handle_out);
175 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100176 }
177
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000178 return PSA_SUCCESS;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100179#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100180}
181
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000182psa_status_t tfm_crypto_mac_sign_finish(psa_invec in_vec[],
183 size_t in_len,
184 psa_outvec out_vec[],
185 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100186{
Kevin Peng96f802e2019-12-26 16:10:25 +0800187#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100188 return PSA_ERROR_NOT_SUPPORTED;
189#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000190 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100191 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100192
Antonio de Angelis4743e672019-04-11 11:38:48 +0100193 if ((in_len != 1) || (out_len != 2)) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800194 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000195 }
196
Antonio de Angelis4743e672019-04-11 11:38:48 +0100197 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
198 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800199 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000200 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100201 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100202 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100203 uint32_t *handle_out = out_vec[0].base;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000204 uint8_t *mac = out_vec[1].base;
205 size_t mac_size = out_vec[1].len;
206
Antonio de Angelis4743e672019-04-11 11:38:48 +0100207 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100208 *handle_out = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100209
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000210 /* Initialise mac_length to zero */
211 out_vec[1].len = 0;
212
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100213 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000214 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100215 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100216 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000217 if (status != PSA_SUCCESS) {
218 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100219 }
220
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100221 status = psa_mac_sign_finish(operation, mac, mac_size, &out_vec[1].len);
222 if (status != PSA_SUCCESS) {
223 /* Release the operation context, ignore if the operation fails. */
224 (void)tfm_crypto_operation_release(handle_out);
225 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100226 }
227
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100228 status = tfm_crypto_operation_release(handle_out);
229
Antonio de Angelis4743e672019-04-11 11:38:48 +0100230 return status;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100231#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100232}
233
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000234psa_status_t tfm_crypto_mac_verify_finish(psa_invec in_vec[],
235 size_t in_len,
236 psa_outvec out_vec[],
237 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100238{
Kevin Peng96f802e2019-12-26 16:10:25 +0800239#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100240 return PSA_ERROR_NOT_SUPPORTED;
241#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000242 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100243 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100244
Antonio de Angelis4743e672019-04-11 11:38:48 +0100245 if ((in_len != 2) || (out_len != 1)) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800246 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000247 }
248
Antonio de Angelis4743e672019-04-11 11:38:48 +0100249 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
250 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800251 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000252 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100253 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100254 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100255 uint32_t *handle_out = out_vec[0].base;
256 const uint8_t *mac = in_vec[1].base;
257 size_t mac_length = in_vec[1].len;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000258
Antonio de Angelis4743e672019-04-11 11:38:48 +0100259 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100260 *handle_out = iov->op_handle;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100261
262 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000263 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100264 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100265 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000266 if (status != PSA_SUCCESS) {
267 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100268 }
269
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100270 status = psa_mac_verify_finish(operation, mac, mac_length);
271 if (status != PSA_SUCCESS) {
272 /* Release the operation context, ignore if the operation fails. */
273 (void)tfm_crypto_operation_release(handle_out);
274 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100275 }
276
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100277 status = tfm_crypto_operation_release(handle_out);
278
279 return status;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100280#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100281}
282
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000283psa_status_t tfm_crypto_mac_abort(psa_invec in_vec[],
284 size_t in_len,
285 psa_outvec out_vec[],
286 size_t out_len)
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100287{
Kevin Peng96f802e2019-12-26 16:10:25 +0800288#ifdef TFM_CRYPTO_MAC_MODULE_DISABLED
Antonio de Angelis7740b382019-07-16 10:59:25 +0100289 return PSA_ERROR_NOT_SUPPORTED;
290#else
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000291 psa_status_t status = PSA_SUCCESS;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100292 psa_mac_operation_t *operation = NULL;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100293
Antonio de Angelis4743e672019-04-11 11:38:48 +0100294 if ((in_len != 1) || (out_len != 1)) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800295 return PSA_ERROR_CONNECTION_REFUSED;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100296 }
297
Antonio de Angelis4743e672019-04-11 11:38:48 +0100298 if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
299 (out_vec[0].len != sizeof(uint32_t))) {
Summer Qin4b1d03b2019-07-02 14:56:08 +0800300 return PSA_ERROR_CONNECTION_REFUSED;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000301 }
Antonio de Angelis4743e672019-04-11 11:38:48 +0100302 const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100303 uint32_t handle = iov->op_handle;
Antonio de Angelis4743e672019-04-11 11:38:48 +0100304 uint32_t *handle_out = out_vec[0].base;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000305
Antonio de Angelis4743e672019-04-11 11:38:48 +0100306 /* Init the handle in the operation with the one passed from the iov */
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100307 *handle_out = iov->op_handle;
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000308
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100309 /* Look up the corresponding operation context */
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000310 status = tfm_crypto_operation_lookup(TFM_CRYPTO_MAC_OPERATION,
Antonio de Angelis4743e672019-04-11 11:38:48 +0100311 handle,
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100312 (void **)&operation);
Antonio de Angelisab85ccd2019-03-25 15:14:29 +0000313 if (status != PSA_SUCCESS) {
Antonio de Angelis25e2b2d2019-04-25 14:49:50 +0100314 /* Operation does not exist, so abort has no effect */
315 return PSA_SUCCESS;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100316 }
317
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100318 status = psa_mac_abort(operation);
319
320 if (status != PSA_SUCCESS) {
321 /* Release the operation context, ignore if the operation fails. */
322 (void)tfm_crypto_operation_release(handle_out);
323 return status;
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100324 }
325
Jamie Fox0e54ebc2019-04-09 14:21:04 +0100326 status = tfm_crypto_operation_release(handle_out);
327
Antonio de Angelis4743e672019-04-11 11:38:48 +0100328 return status;
Antonio de Angelis7740b382019-07-16 10:59:25 +0100329#endif /* TFM_CRYPTO_MAC_MODULE_DISABLED */
Louis Mayencourt7a36f782018-09-24 14:00:57 +0100330}
331/*!@}*/