Add support for CCM*-no-tag to PSA.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index ece64b1..67494dd 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -3587,7 +3587,12 @@
.core = slot->attr
};
- if( input_length < PSA_CIPHER_IV_LENGTH( slot->attr.type, alg ) )
+ if( alg == PSA_ALG_CCM_STAR_NO_TAG && input_length < PSA_BLOCK_CIPHER_BLOCK_LENGTH( slot->attr.type ) )
+ {
+ status = PSA_ERROR_INVALID_ARGUMENT;
+ goto exit;
+ }
+ else if ( input_length < PSA_CIPHER_IV_LENGTH( slot->attr.type, alg ) )
{
status = PSA_ERROR_INVALID_ARGUMENT;
goto exit;