nrfxlib API 2.8.99
Loading...
Searching...
No Matches
cc3xx_psa_mac.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef CC3XX_PSA_MAC_H
9#define CC3XX_PSA_MAC_H
10
19#include "psa/crypto.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
39 const psa_key_attributes_t *attributes,
40 const uint8_t *key_buffer,
41 size_t key_buffer_size, psa_algorithm_t alg);
55 const psa_key_attributes_t *attributes,
56 const uint8_t *key_buffer,
57 size_t key_buffer_size,
58 psa_algorithm_t alg);
70 const uint8_t *input, size_t input_length);
83 uint8_t *mac, size_t mac_size,
84 size_t *mac_length);
97 const uint8_t *mac, size_t mac_length);
106psa_status_t cc3xx_mac_abort(cc3xx_mac_operation_t *operation);
107
124psa_status_t cc3xx_mac_compute(const psa_key_attributes_t *attributes,
125 const uint8_t *key_buffer,
126 size_t key_buffer_size, psa_algorithm_t alg,
127 const uint8_t *input, size_t input_length,
128 uint8_t *mac, size_t mac_size,
129 size_t *mac_length);
130#ifdef __cplusplus
131}
132#endif
133#endif /* CC3XX_PSA_MAC_H */
psa_status_t cc3xx_mac_verify_setup(cc3xx_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg)
Setup a MAC verifying object.
psa_status_t cc3xx_mac_update(cc3xx_mac_operation_t *operation, const uint8_t *input, size_t input_length)
Update a MAC object with new data to authenticate.
psa_status_t cc3xx_mac_abort(cc3xx_mac_operation_t *operation)
Abort a MAC operation.
psa_status_t cc3xx_mac_compute(const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *mac, size_t mac_size, size_t *mac_length)
Perform a MAC operation in a single step.
psa_status_t cc3xx_mac_verify_finish(cc3xx_mac_operation_t *operation, const uint8_t *mac, size_t mac_length)
Finalize a MAC verifying operation by checking the produced MAC matches with the reference MAC value.
psa_status_t cc3xx_mac_sign_finish(cc3xx_mac_operation_t *operation, uint8_t *mac, size_t mac_size, size_t *mac_length)
Finalize a MAC signing operation by producing the MAC value.
psa_status_t cc3xx_mac_sign_setup(cc3xx_mac_operation_t *operation, const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, psa_algorithm_t alg)
Setup a MAC signing object.
Definition cc3xx_crypto_primitives_private.h:22