From 5699101ac9b5e8c19b3b2a0679b8d52f56f4d3d6 Mon Sep 17 00:00:00 2001 From: gabor-mezei-arm Date: Wed, 10 Mar 2021 16:43:14 +0100 Subject: [PATCH] Update PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE Signed-off-by: gabor-mezei-arm --- include/psa/crypto_sizes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/psa/crypto_sizes.h b/include/psa/crypto_sizes.h index b5fb47ddb1..a87492f838 100644 --- a/include/psa/crypto_sizes.h +++ b/include/psa/crypto_sizes.h @@ -971,7 +971,8 @@ */ #define PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(input_length) \ (PSA_ROUND_UP_TO_MULTIPLE(PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE, \ - (input_length) + PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE)) + (input_length) + 1) + \ + PSA_CIPHER_IV_MAX_SIZE) /** The maximum size of the output of psa_cipher_decrypt(), in bytes. *