MAC size definitions for the PSA Crypto API. More...
MAC size definitions for the PSA Crypto API.
Definition in file sizes.h.
#include "kernel_defines.h"#include "psa/algorithm.h"#include "psa/cipher/sizes.h"#include "psa/hash/algorithm.h"#include "psa/hash/sizes.h"#include "psa/mac/algorithm.h"
Include dependency graph for sizes.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
| #define | PSA_MAC_LENGTH(key_type, key_bits, alg) |
| The size of the output of psa_mac_compute() and psa_mac_sign_finish(), in bytes. More... | |
| #define | PSA_MAC_MAX_SIZE 0 |
| A sufficient buffer size for storing the MAC output by psa_mac_verify() and psa_mac_verify_finish(), for any of the supported key types and MAC algorithms. More... | |
| #define PSA_MAC_LENGTH | ( | key_type, | |
| key_bits, | |||
| alg | |||
| ) |
The size of the output of psa_mac_compute() and psa_mac_sign_finish(), in bytes.
If the size of the MAC buffer is at least this large, it is guaranteed that psa_mac_compute() and psa_mac_sign_finish() will not fail due to an insufficient buffer size.
This is also the MAC length that psa_mac_verify() and psa_mac_verify_finish() expect.
See also PSA_MAC_MAX_SIZE.
| key_type | The type of the MAC key. |
| key_bits | The size of the MAC key in bits. |
| alg | A MAC algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg) is true. |
| #define PSA_MAC_MAX_SIZE 0 |
A sufficient buffer size for storing the MAC output by psa_mac_verify() and psa_mac_verify_finish(), for any of the supported key types and MAC algorithms.
If the size of the MAC buffer is at least this large, it is guaranteed that psa_mac_verify() and psa_mac_verify_finish() will not fail due to an insufficient buffer size.
See also PSA_MAC_LENGTH().