mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
AES, GCM selftest: indicate which implementation is used
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
committed by
Tom Cosgrove
parent
5511a34566
commit
2c8ad9400b
@ -1785,6 +1785,29 @@ int mbedtls_aes_self_test(int verbose)
|
||||
memset(key, 0, 32);
|
||||
mbedtls_aes_init(&ctx);
|
||||
|
||||
if (verbose != 0) {
|
||||
#if defined(MBEDTLS_AES_ALT)
|
||||
mbedtls_printf(" AES note: alternative implementation.\n");
|
||||
#else /* MBEDTLS_AES_ALT */
|
||||
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86)
|
||||
if (mbedtls_padlock_has_support(MBEDTLS_PADLOCK_ACE)) {
|
||||
mbedtls_printf(" AES note: using VIA Padlock.\n");
|
||||
} else
|
||||
#endif
|
||||
#if defined(MBEDTLS_AESNI_HAVE_CODE)
|
||||
if (mbedtls_aesni_has_support(MBEDTLS_AESNI_AES)) {
|
||||
mbedtls_printf(" AES note: using AESNI.\n");
|
||||
} else
|
||||
#endif
|
||||
#if defined(MBEDTLS_AESCE_C) && defined(MBEDTLS_HAVE_ARM64)
|
||||
if (mbedtls_aesce_has_support()) {
|
||||
mbedtls_printf(" AES note: using AESCE.\n");
|
||||
} else
|
||||
#endif
|
||||
mbedtls_printf(" AES note: built-in implementation.\n");
|
||||
#endif /* MBEDTLS_AES_ALT */
|
||||
}
|
||||
|
||||
/*
|
||||
* ECB mode
|
||||
*/
|
||||
|
Reference in New Issue
Block a user