mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 00:55:39 +01:00
More cleanup of CMAC self tests
This commit is contained in:
parent
b439d4556d
commit
9044b0295c
@ -743,7 +743,7 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
int ret;
|
||||
|
||||
#ifdef MBEDTLS_AES_C
|
||||
test_cmac_with_cipher( verbose,
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
"AES 128",
|
||||
aes_128_key,
|
||||
128,
|
||||
@ -752,9 +752,12 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
aes_128_subkeys,
|
||||
aes_128_expected_result,
|
||||
MBEDTLS_CIPHER_ID_AES,
|
||||
AES_BLOCK_SIZE );
|
||||
AES_BLOCK_SIZE ) !=0 ) )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
|
||||
test_cmac_with_cipher( verbose,
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
"AES 192",
|
||||
aes_192_key,
|
||||
192,
|
||||
@ -763,9 +766,12 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
aes_192_subkeys,
|
||||
aes_192_expected_result,
|
||||
MBEDTLS_CIPHER_ID_AES,
|
||||
AES_BLOCK_SIZE );
|
||||
AES_BLOCK_SIZE ) !=0 ) )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
|
||||
test_cmac_with_cipher ( verbose,
|
||||
if( ( ret = test_cmac_with_cipher ( verbose,
|
||||
"AES 256",
|
||||
aes_256_key,
|
||||
256,
|
||||
@ -774,11 +780,14 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
aes_256_subkeys,
|
||||
aes_256_expected_result,
|
||||
MBEDTLS_CIPHER_ID_AES,
|
||||
AES_BLOCK_SIZE );
|
||||
AES_BLOCK_SIZE ) !=0 ) )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
#endif /* MBEDTLS_AES_C */
|
||||
|
||||
#ifdef MBEDTLS_DES_C
|
||||
test_cmac_with_cipher( verbose,
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
"3DES 2 key",
|
||||
des3_2key_key,
|
||||
192,
|
||||
@ -787,9 +796,12 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
des3_2key_subkeys,
|
||||
T_3des_2key,
|
||||
MBEDTLS_CIPHER_ID_3DES,
|
||||
DES3_BLOCK_SIZE );
|
||||
DES3_BLOCK_SIZE ) !=0 ) )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
|
||||
test_cmac_with_cipher( verbose,
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
"3DES 3 key",
|
||||
des3_3key_key,
|
||||
192,
|
||||
@ -798,11 +810,16 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
des3_3key_subkeys,
|
||||
T_3des_3key,
|
||||
MBEDTLS_CIPHER_ID_3DES,
|
||||
DES3_BLOCK_SIZE );
|
||||
DES3_BLOCK_SIZE ) !=0 ) )
|
||||
{
|
||||
return( ret );
|
||||
}
|
||||
#endif /* MBEDTLS_DES_C */
|
||||
|
||||
#ifdef MBEDTLS_AES_C
|
||||
test_aes128_cmac_prf( verbose );
|
||||
if( ( ret = test_aes128_cmac_prf( verbose ) != 0 ) )
|
||||
return( ret );
|
||||
|
||||
#endif /* MBEDTLS_AES_C */
|
||||
|
||||
if( verbose != 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user