diff --git a/include/mbedtls/mbedtls_config.h b/include/mbedtls/mbedtls_config.h index ad96fc3fab..6b36dd7979 100644 --- a/include/mbedtls/mbedtls_config.h +++ b/include/mbedtls/mbedtls_config.h @@ -380,7 +380,6 @@ //#define MBEDTLS_CAMELLIA_ALT //#define MBEDTLS_CCM_ALT //#define MBEDTLS_CHACHA20_ALT -//#define MBEDTLS_CHACHAPOLY_ALT //#define MBEDTLS_CMAC_ALT //#define MBEDTLS_DES_ALT //#define MBEDTLS_GCM_ALT diff --git a/tests/include/alt-dummy/chachapoly_alt.h b/tests/include/alt-dummy/chachapoly_alt.h deleted file mode 100644 index de28ced670..0000000000 --- a/tests/include/alt-dummy/chachapoly_alt.h +++ /dev/null @@ -1,18 +0,0 @@ -/* chachapoly_alt.h with dummy types for MBEDTLS_CHACHAPOLY_ALT */ -/* - * Copyright The Mbed TLS Contributors - * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later - */ - -#ifndef CHACHAPOLY_ALT_H -#define CHACHAPOLY_ALT_H - -#include "mbedtls/chacha20.h" - -typedef struct mbedtls_chachapoly_context { - int dummy; -} -mbedtls_chachapoly_context; - - -#endif /* chachapoly_alt.h */ diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/chachapoly.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/chachapoly.h index 3dc21e380b..6c236fe5e6 100644 --- a/tf-psa-crypto/drivers/builtin/include/mbedtls/chachapoly.h +++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/chachapoly.h @@ -41,8 +41,6 @@ typedef enum { } mbedtls_chachapoly_mode_t; -#if !defined(MBEDTLS_CHACHAPOLY_ALT) - #include "mbedtls/chacha20.h" typedef struct mbedtls_chachapoly_context { @@ -55,10 +53,6 @@ typedef struct mbedtls_chachapoly_context { } mbedtls_chachapoly_context; -#else /* !MBEDTLS_CHACHAPOLY_ALT */ -#include "chachapoly_alt.h" -#endif /* !MBEDTLS_CHACHAPOLY_ALT */ - /** * \brief This function initializes the specified ChaCha20-Poly1305 context. * diff --git a/tf-psa-crypto/drivers/builtin/src/chachapoly.c b/tf-psa-crypto/drivers/builtin/src/chachapoly.c index a1314eab6d..5bfee0982b 100644 --- a/tf-psa-crypto/drivers/builtin/src/chachapoly.c +++ b/tf-psa-crypto/drivers/builtin/src/chachapoly.c @@ -19,8 +19,6 @@ #include "mbedtls/platform.h" -#if !defined(MBEDTLS_CHACHAPOLY_ALT) - #define CHACHAPOLY_STATE_INIT (0) #define CHACHAPOLY_STATE_AAD (1) #define CHACHAPOLY_STATE_CIPHERTEXT (2) /* Encrypting or decrypting */ @@ -318,8 +316,6 @@ int mbedtls_chachapoly_auth_decrypt(mbedtls_chachapoly_context *ctx, return 0; } -#endif /* MBEDTLS_CHACHAPOLY_ALT */ - #if defined(MBEDTLS_SELF_TEST) static const unsigned char test_key[1][32] =