Remove MBEDTLS_AES_ALT
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/tf-psa-crypto/drivers/builtin/src/aes.c b/tf-psa-crypto/drivers/builtin/src/aes.c
index 72e2c57..eef55e6 100644
--- a/tf-psa-crypto/drivers/builtin/src/aes.c
+++ b/tf-psa-crypto/drivers/builtin/src/aes.c
@@ -50,8 +50,6 @@
#define MBEDTLS_AES_NEED_REVERSE_TABLES
#endif
-#if !defined(MBEDTLS_AES_ALT)
-
#if defined(MBEDTLS_AES_ROM_TABLES)
/*
* Forward S-box
@@ -1436,8 +1434,6 @@
}
#endif /* MBEDTLS_CIPHER_MODE_CTR */
-#endif /* !MBEDTLS_AES_ALT */
-
#if defined(MBEDTLS_SELF_TEST)
/*
* AES test vectors from:
@@ -1800,9 +1796,6 @@
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_AESNI_HAVE_CODE)
#if MBEDTLS_AESNI_HAVE_CODE == 1
mbedtls_printf(" AES note: AESNI code present (assembly implementation).\n");
@@ -1825,7 +1818,6 @@
mbedtls_printf(" AES note: built-in implementation.\n");
#endif
}
-#endif /* MBEDTLS_AES_ALT */
}
/*
@@ -1868,8 +1860,8 @@
/*
* AES-192 is an optional feature that may be unavailable when
- * there is an alternative underlying implementation i.e. when
- * MBEDTLS_AES_ALT is defined.
+ * there is an alternative underlying implementation such as a
+ * PSA driver.
*/
if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192) {
mbedtls_printf("skipped\n");
@@ -1932,8 +1924,8 @@
/*
* AES-192 is an optional feature that may be unavailable when
- * there is an alternative underlying implementation i.e. when
- * MBEDTLS_AES_ALT is defined.
+ * there is an alternative underlying implementation such as a
+ * PSA driver.
*/
if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192) {
mbedtls_printf("skipped\n");
@@ -1999,8 +1991,8 @@
ret = mbedtls_aes_setkey_enc(&ctx, key, keybits);
/*
* AES-192 is an optional feature that may be unavailable when
- * there is an alternative underlying implementation i.e. when
- * MBEDTLS_AES_ALT is defined.
+ * there is an alternative underlying implementation such as a
+ * PSA driver.
*/
if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192) {
mbedtls_printf("skipped\n");
@@ -2063,8 +2055,8 @@
ret = mbedtls_aes_setkey_enc(&ctx, key, keybits);
/*
* AES-192 is an optional feature that may be unavailable when
- * there is an alternative underlying implementation i.e. when
- * MBEDTLS_AES_ALT is defined.
+ * there is an alternative underlying implementation such as a
+ * PSA driver.
*/
if (ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && keybits == 192) {
mbedtls_printf("skipped\n");