1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

add test scenarios to decrypt and encrypt input and compare with given output

This commit is contained in:
mohammad1603
2018-04-11 23:51:20 -07:00
committed by itayzafrir
parent 89e0f468bf
commit b152d4d8b6
3 changed files with 82 additions and 8 deletions

View File

@ -1365,7 +1365,7 @@ static psa_status_t psa_cipher_setup(psa_cipher_operation_t *operation,
operation->key_set = 1;
operation->alg = alg;
operation->block_size = PSA_BLOCK_CIPHER_BLOCK_SIZE(key_type);
operation->block_size = PSA_ALG_IS_BLOCK_CIPHER( alg ) ? PSA_BLOCK_CIPHER_BLOCK_SIZE( key_type ) : 1;
if( PSA_ALG_IS_BLOCK_CIPHER( alg ) || ( alg == PSA_ALG_CTR ) )
{
operation->iv_size = PSA_BLOCK_CIPHER_BLOCK_SIZE( key_type );