Crypto: Add support for AEAD operations
This patch introduces support for the AEAD (authenticated
encryption with associated data) operations in the context
of the Crypto service. It also adds two functional test
cases to the NS suite to showcase AEAD in GCM and CCM mode
using AES-128.
Change-Id: I42ca3b27c68cb95dcddaf525d5a7ff53f92e911c
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/interface/include/psa_crypto_sizes.h b/interface/include/psa_crypto_sizes.h
index 07b52e4..e21c130 100644
--- a/interface/include/psa_crypto_sizes.h
+++ b/interface/include/psa_crypto_sizes.h
@@ -156,7 +156,7 @@
*/
#define PSA_AEAD_DECRYPT_OUTPUT_SIZE(alg, ciphertext_length) \
(PSA_AEAD_TAG_SIZE(alg) != 0 ? \
- (plaintext_length) - PSA_AEAD_TAG_SIZE(alg) : \
+ (ciphertext_length) - PSA_AEAD_TAG_SIZE(alg) : \
0)
/** Safe signature buffer size for psa_asymmetric_sign().