psa_mac_compute() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...
SummarySyntaxArgumentsReferences

Return value

#PSA_SUCCESS Success. #PSA_ERROR_INVALID_HANDLE \emptydescription #PSA_ERROR_NOT_PERMITTED \emptydescription #PSA_ERROR_INVALID_ARGUMENT \p key is not compatible with \p alg. #PSA_ERROR_NOT_SUPPORTED \p alg is not supported or is not a MAC algorithm. #PSA_ERROR_BUFFER_TOO_SMALL \p mac_size is too small #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription #PSA_ERROR_COMMUNICATION_FAILURE \emptydescription #PSA_ERROR_HARDWARE_FAILURE \emptydescription #PSA_ERROR_CORRUPTION_DETECTED \emptydescription #PSA_ERROR_STORAGE_FAILURE The key could not be retrieved from storage. #PSA_ERROR_BAD_STATE The library has not been previously initialized by psa_crypto_init(). It is implementation-dependent whether a failure to initialize results in this error code.

Notes

To verify the MAC of a message against an expected value, use psa_mac_verify() instead. Beware that comparing integrity or authenticity data such as MAC values with a function such as \c memcmp is risky because the time taken by the comparison may leak information about the MAC value which could allow an attacker to guess a valid MAC and thereby bypass security controls.

References

from examples