Remove MBEDTLS_SHA512_ALT

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
Thomas Daubney 2024-06-05 14:20:29 +01:00
parent b248a93b3d
commit 25bcf27c1a
5 changed files with 2 additions and 32 deletions

View File

@ -730,8 +730,8 @@
#if !defined(MBEDTLS_SHA512_C) #if !defined(MBEDTLS_SHA512_C)
#error "MBEDTLS_SHA512_USE_A64_CRYPTO_* defined without MBEDTLS_SHA512_C" #error "MBEDTLS_SHA512_USE_A64_CRYPTO_* defined without MBEDTLS_SHA512_C"
#endif #endif
#if defined(MBEDTLS_SHA512_ALT) || defined(MBEDTLS_SHA512_PROCESS_ALT) #if defined(MBEDTLS_SHA512_PROCESS_ALT)
#error "MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_A64_CRYPTO_*" #error "MBEDTLS_SHA512_PROCESS_ALT can't be used with MBEDTLS_SHA512_USE_A64_CRYPTO_*"
#endif #endif
#endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */ #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */

View File

@ -350,8 +350,6 @@
*/ */
//#define MBEDTLS_TIMING_ALT //#define MBEDTLS_TIMING_ALT
//#define MBEDTLS_SHA512_ALT
/** /**
* \def MBEDTLS_SHA256_PROCESS_ALT * \def MBEDTLS_SHA256_PROCESS_ALT
* *

View File

@ -1,16 +0,0 @@
/* sha512_alt.h with dummy types for MBEDTLS_SHA512_ALT */
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#ifndef SHA512_ALT_H
#define SHA512_ALT_H
typedef struct mbedtls_sha512_context {
int dummy;
}
mbedtls_sha512_context;
#endif /* sha512_alt.h */

View File

@ -25,10 +25,6 @@
extern "C" { extern "C" {
#endif #endif
#if !defined(MBEDTLS_SHA512_ALT)
// Regular implementation
//
/** /**
* \brief The SHA-512 context structure. * \brief The SHA-512 context structure.
* *
@ -47,10 +43,6 @@ typedef struct mbedtls_sha512_context {
} }
mbedtls_sha512_context; mbedtls_sha512_context;
#else /* MBEDTLS_SHA512_ALT */
#include "sha512_alt.h"
#endif /* MBEDTLS_SHA512_ALT */
/** /**
* \brief This function initializes a SHA-512 context. * \brief This function initializes a SHA-512 context.
* *

View File

@ -205,8 +205,6 @@ static int mbedtls_a64_crypto_sha512_determine_support(void)
#endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT */ #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT */
#if !defined(MBEDTLS_SHA512_ALT)
#define SHA512_BLOCK_SIZE 128 #define SHA512_BLOCK_SIZE 128
#if defined(MBEDTLS_SHA512_SMALLER) #if defined(MBEDTLS_SHA512_SMALLER)
@ -879,8 +877,6 @@ exit:
return ret; return ret;
} }
#endif /* !MBEDTLS_SHA512_ALT */
/* /*
* output = SHA-512( input buffer ) * output = SHA-512( input buffer )
*/ */