Revert renaming of SHA512 options

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-10-11 10:46:38 +01:00
parent 5b89c55bb8
commit be7915aa6c
6 changed files with 64 additions and 95 deletions

View File

@ -829,24 +829,24 @@
#error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites" #error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites"
#endif #endif
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) && \ #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) && \
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
#error "Must only define one of MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" #error "Must only define one of MBEDTLS_SHA512_USE_A64_CRYPTO_*"
#endif #endif
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \ #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) || \
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
#if !defined(MBEDTLS_SHA512_C) #if !defined(MBEDTLS_SHA512_C)
#error "MBEDTLS_SHA512_USE_ARMV8_A_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_ALT) || defined(MBEDTLS_SHA512_PROCESS_ALT)
#error "MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" #error "MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_A64_CRYPTO_*"
#endif #endif
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */ #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) && !defined(__aarch64__) #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY) && !defined(__aarch64__)
#error "MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY defined on non-Aarch64 system" #error "MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY defined on non-Aarch64 system"
#endif #endif
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) && \ #if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) && \

View File

@ -193,12 +193,5 @@
#if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY) #if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
#define MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY #define MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
#endif #endif
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) && \
!defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
#endif
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY
#endif
#endif /* MBEDTLS_CONFIG_ADJUST_LEGACY_CRYPTO_H */ #endif /* MBEDTLS_CONFIG_ADJUST_LEGACY_CRYPTO_H */

View File

@ -3390,13 +3390,13 @@
#define MBEDTLS_SHA3_C #define MBEDTLS_SHA3_C
/** /**
* \def MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT * \def MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
* *
* Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms * Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms
* with the ARMv8 cryptographic extensions if they are available at runtime. * with the ARMv8 cryptographic extensions if they are available at runtime.
* If not, the library will fall back to the C implementation. * If not, the library will fall back to the C implementation.
* *
* \note If MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT is defined when building * \note If MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT is defined when building
* for a non-Aarch64 build it will be silently ignored. * for a non-Aarch64 build it will be silently ignored.
* *
* \note Minimum compiler versions for this feature are Clang 7.0, * \note Minimum compiler versions for this feature are Clang 7.0,
@ -3405,38 +3405,27 @@
* \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for * \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for
* armclang 6.9 * armclang 6.9
* *
* \note This was previously known as MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT. * \warning MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT cannot be defined at the
* That name is deprecated, but may still be used as an alternative form for this * same time as MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY.
* option.
*
* \warning MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT cannot be defined at the
* same time as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY.
* *
* Requires: MBEDTLS_SHA512_C. * Requires: MBEDTLS_SHA512_C.
* *
* Module: library/sha512.c * Module: library/sha512.c
* *
* Uncomment to have the library check for the Armv8-A SHA-512 crypto extensions * Uncomment to have the library check for the A64 SHA-512 crypto extensions
* and use them if available. * and use them if available.
*/ */
//#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
/*
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT.
* This name is now deprecated, but may still be used as an alternative form for
* this option.
*/
//#define MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT //#define MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
/** /**
* \def MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY * \def MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
* *
* Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms * Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms
* with the ARMv8 cryptographic extensions, which must be available at runtime * with the ARMv8 cryptographic extensions, which must be available at runtime
* or else an illegal instruction fault will occur. * or else an illegal instruction fault will occur.
* *
* \note This allows builds with a smaller code size than with * \note This allows builds with a smaller code size than with
* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT * MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
* *
* \note Minimum compiler versions for this feature are Clang 7.0, * \note Minimum compiler versions for this feature are Clang 7.0,
* armclang 6.9 or GCC 8.0. * armclang 6.9 or GCC 8.0.
@ -3444,27 +3433,16 @@
* \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for * \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for
* armclang 6.9 * armclang 6.9
* *
* \note This was previously known as MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY. * \warning MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY cannot be defined at the same
* That name is deprecated, but may still be used as an alternative form for this * time as MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT.
* option.
*
* \warning MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY cannot be defined at the same
* time as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT.
* *
* Requires: MBEDTLS_SHA512_C. * Requires: MBEDTLS_SHA512_C.
* *
* Module: library/sha512.c * Module: library/sha512.c
* *
* Uncomment to have the library use the Armv8-A SHA-512 crypto extensions * Uncomment to have the library use the A64 SHA-512 crypto extensions
* unconditionally. * unconditionally.
*/ */
//#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY
/*
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY.
* This name is now deprecated, but may still be used as an alternative form for
* this option.
*/
//#define MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY //#define MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
/** /**

View File

@ -57,8 +57,8 @@
#include "mbedtls/platform.h" #include "mbedtls/platform.h"
#if defined(__aarch64__) #if defined(__aarch64__)
# if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \ # if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) || \
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
/* *INDENT-OFF* */ /* *INDENT-OFF* */
# ifdef __ARM_NEON # ifdef __ARM_NEON
# include <arm_neon.h> # include <arm_neon.h>
@ -83,35 +83,35 @@
/* Test Clang first, as it defines __GNUC__ */ /* Test Clang first, as it defines __GNUC__ */
# if defined(__ARMCOMPILER_VERSION) # if defined(__ARMCOMPILER_VERSION)
# if __ARMCOMPILER_VERSION < 6090000 # if __ARMCOMPILER_VERSION < 6090000
# error "A more recent armclang is required for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" # error "A more recent armclang is required for MBEDTLS_SHA512_USE_A64_CRYPTO_*"
# elif __ARMCOMPILER_VERSION == 6090000 # elif __ARMCOMPILER_VERSION == 6090000
# error "Must use minimum -march=armv8.2-a+sha3 for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" # error "Must use minimum -march=armv8.2-a+sha3 for MBEDTLS_SHA512_USE_A64_CRYPTO_*"
# else # else
# pragma clang attribute push (__attribute__((target("sha3"))), apply_to=function) # pragma clang attribute push (__attribute__((target("sha3"))), apply_to=function)
# define MBEDTLS_POP_TARGET_PRAGMA # define MBEDTLS_POP_TARGET_PRAGMA
# endif # endif
# elif defined(__clang__) # elif defined(__clang__)
# if __clang_major__ < 7 # if __clang_major__ < 7
# error "A more recent Clang is required for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" # error "A more recent Clang is required for MBEDTLS_SHA512_USE_A64_CRYPTO_*"
# else # else
# pragma clang attribute push (__attribute__((target("sha3"))), apply_to=function) # pragma clang attribute push (__attribute__((target("sha3"))), apply_to=function)
# define MBEDTLS_POP_TARGET_PRAGMA # define MBEDTLS_POP_TARGET_PRAGMA
# endif # endif
# elif defined(__GNUC__) # elif defined(__GNUC__)
# if __GNUC__ < 8 # if __GNUC__ < 8
# error "A more recent GCC is required for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" # error "A more recent GCC is required for MBEDTLS_SHA512_USE_A64_CRYPTO_*"
# else # else
# pragma GCC push_options # pragma GCC push_options
# pragma GCC target ("arch=armv8.2-a+sha3") # pragma GCC target ("arch=armv8.2-a+sha3")
# define MBEDTLS_POP_TARGET_PRAGMA # define MBEDTLS_POP_TARGET_PRAGMA
# endif # endif
# else # else
# error "Only GCC and Clang supported for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*" # error "Only GCC and Clang supported for MBEDTLS_SHA512_USE_A64_CRYPTO_*"
# endif # endif
# endif # endif
/* *INDENT-ON* */ /* *INDENT-ON* */
# endif # endif
# if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) # if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
# if defined(__unix__) # if defined(__unix__)
# if defined(__linux__) # if defined(__linux__)
/* Our preferred method of detection is getauxval() */ /* Our preferred method of detection is getauxval() */
@ -122,19 +122,19 @@
# endif # endif
# endif # endif
#elif defined(_M_ARM64) #elif defined(_M_ARM64)
# if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \ # if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) || \
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
# include <arm64_neon.h> # include <arm64_neon.h>
# endif # endif
#else #else
# undef MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY # undef MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
# undef MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT # undef MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
#endif #endif
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
/* /*
* Capability detection code comes early, so we can disable * Capability detection code comes early, so we can disable
* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT if no detection mechanism found * MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT if no detection mechanism found
*/ */
#if defined(HWCAP_SHA512) #if defined(HWCAP_SHA512)
static int mbedtls_a64_crypto_sha512_determine_support(void) static int mbedtls_a64_crypto_sha512_determine_support(void)
@ -161,9 +161,9 @@ static int mbedtls_a64_crypto_sha512_determine_support(void)
* SHA-512 support. So we fall back to the C code only. * SHA-512 support. So we fall back to the C code only.
*/ */
#if defined(_MSC_VER) #if defined(_MSC_VER)
#pragma message "No mechanism to detect ARMV8_CRYPTO found, using C code only" #pragma message "No mechanism to detect A64_CRYPTO found, using C code only"
#else #else
#warning "No mechanism to detect ARMV8_CRYPTO found, using C code only" #warning "No mechanism to detect A64_CRYPTO found, using C code only"
#endif #endif
#elif defined(__unix__) && defined(SIG_SETMASK) #elif defined(__unix__) && defined(SIG_SETMASK)
/* Detection with SIGILL, setjmp() and longjmp() */ /* Detection with SIGILL, setjmp() and longjmp() */
@ -173,7 +173,7 @@ static int mbedtls_a64_crypto_sha512_determine_support(void)
static jmp_buf return_from_sigill; static jmp_buf return_from_sigill;
/* /*
* Armv8 SHA512 support detection via SIGILL * A64 SHA512 support detection via SIGILL
*/ */
static void sigill_handler(int signal) static void sigill_handler(int signal)
{ {
@ -210,11 +210,11 @@ static int mbedtls_a64_crypto_sha512_determine_support(void)
return ret; return ret;
} }
#else #else
#warning "No mechanism to detect ARMV8_CRYPTO found, using C code only" #warning "No mechanism to detect A64_CRYPTO found, using C code only"
#undef MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT #undef MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
#endif /* HWCAP_SHA512, __APPLE__, __unix__ && SIG_SETMASK */ #endif /* HWCAP_SHA512, __APPLE__, __unix__ && SIG_SETMASK */
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT */ #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT */
#if !defined(MBEDTLS_SHA512_ALT) #if !defined(MBEDTLS_SHA512_ALT)
@ -352,10 +352,10 @@ static const uint64_t K[80] =
}; };
#endif #endif
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \ #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) || \
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
# define mbedtls_internal_sha512_process_many_a64_crypto mbedtls_internal_sha512_process_many # define mbedtls_internal_sha512_process_many_a64_crypto mbedtls_internal_sha512_process_many
# define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process # define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process
#endif #endif
@ -567,9 +567,9 @@ static size_t mbedtls_internal_sha512_process_many_a64_crypto(
return processed; return processed;
} }
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
/* /*
* This function is for internal use only if we are building both C and Armv8 * This function is for internal use only if we are building both C and A64
* versions, otherwise it is renamed to be the public mbedtls_internal_sha512_process() * versions, otherwise it is renamed to be the public mbedtls_internal_sha512_process()
*/ */
static static
@ -582,7 +582,7 @@ int mbedtls_internal_sha512_process_a64_crypto(mbedtls_sha512_context *ctx,
SHA512_BLOCK_SIZE) ? 0 : -1; SHA512_BLOCK_SIZE) ? 0 : -1;
} }
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */ #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
#if defined(MBEDTLS_POP_TARGET_PRAGMA) #if defined(MBEDTLS_POP_TARGET_PRAGMA)
#if defined(__clang__) #if defined(__clang__)
@ -594,17 +594,17 @@ int mbedtls_internal_sha512_process_a64_crypto(mbedtls_sha512_context *ctx,
#endif #endif
#if !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) #if !defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
#define mbedtls_internal_sha512_process_many_c mbedtls_internal_sha512_process_many #define mbedtls_internal_sha512_process_many_c mbedtls_internal_sha512_process_many
#define mbedtls_internal_sha512_process_c mbedtls_internal_sha512_process #define mbedtls_internal_sha512_process_c mbedtls_internal_sha512_process
#endif #endif
#if !defined(MBEDTLS_SHA512_PROCESS_ALT) && !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) #if !defined(MBEDTLS_SHA512_PROCESS_ALT) && !defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
/* /*
* This function is for internal use only if we are building both C and Armv8 * This function is for internal use only if we are building both C and A64
* versions, otherwise it is renamed to be the public mbedtls_internal_sha512_process() * versions, otherwise it is renamed to be the public mbedtls_internal_sha512_process()
*/ */
static static
@ -701,10 +701,10 @@ int mbedtls_internal_sha512_process_c(mbedtls_sha512_context *ctx,
return 0; return 0;
} }
#endif /* !MBEDTLS_SHA512_PROCESS_ALT && !MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */ #endif /* !MBEDTLS_SHA512_PROCESS_ALT && !MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
#if !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) #if !defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
static size_t mbedtls_internal_sha512_process_many_c( static size_t mbedtls_internal_sha512_process_many_c(
mbedtls_sha512_context *ctx, const uint8_t *data, size_t len) mbedtls_sha512_context *ctx, const uint8_t *data, size_t len)
@ -725,10 +725,10 @@ static size_t mbedtls_internal_sha512_process_many_c(
return processed; return processed;
} }
#endif /* !MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */ #endif /* !MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
static int mbedtls_a64_crypto_sha512_has_support(void) static int mbedtls_a64_crypto_sha512_has_support(void)
{ {
@ -763,7 +763,7 @@ int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
} }
} }
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT */ #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT */
/* /*
* SHA-512 process buffer * SHA-512 process buffer

View File

@ -214,9 +214,8 @@ EXCLUDE_FROM_FULL = frozenset([
'MBEDTLS_PSA_INJECT_ENTROPY', # conflicts with platform entropy sources 'MBEDTLS_PSA_INJECT_ENTROPY', # conflicts with platform entropy sources
'MBEDTLS_RSA_NO_CRT', # influences the use of RSA in X.509 and TLS 'MBEDTLS_RSA_NO_CRT', # influences the use of RSA in X.509 and TLS
'MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY', # interacts with *_USE_A64_CRYPTO_IF_PRESENT 'MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY', # interacts with *_USE_A64_CRYPTO_IF_PRESENT
'MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY', # interacts with *_USE_A64_CRYPTO_IF_PRESENT
'MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT 'MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT
'MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT 'MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY', # interacts with *_USE_A64_CRYPTO_IF_PRESENT
'MBEDTLS_SSL_RECORD_SIZE_LIMIT', # in development, currently breaks other tests 'MBEDTLS_SSL_RECORD_SIZE_LIMIT', # in development, currently breaks other tests
'MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN', # build dependency (clang+memsan) 'MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN', # build dependency (clang+memsan)
'MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND', # build dependency (valgrind headers) 'MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND', # build dependency (valgrind headers)
@ -280,10 +279,9 @@ EXCLUDE_FROM_BAREMETAL = frozenset([
'MBEDTLS_THREADING_C', # requires a threading interface 'MBEDTLS_THREADING_C', # requires a threading interface
'MBEDTLS_THREADING_PTHREAD', # requires pthread 'MBEDTLS_THREADING_PTHREAD', # requires pthread
'MBEDTLS_TIMING_C', # requires a clock 'MBEDTLS_TIMING_C', # requires a clock
'MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection 'MBEDTLS_SHA256_USE_A64_A_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
'MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
'MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection 'MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
'MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection 'MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
]) ])
def keep_in_baremetal(name): def keep_in_baremetal(name):

View File

@ -2248,9 +2248,9 @@ component_build_module_alt () {
# MBEDTLS_SHA256_*ALT can't be used with MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_* # MBEDTLS_SHA256_*ALT can't be used with MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
# MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_* # MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_A64_CRYPTO_*
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
# Enable all MBEDTLS_XXX_ALT for whole modules. Do not enable # Enable all MBEDTLS_XXX_ALT for whole modules. Do not enable
# MBEDTLS_XXX_YYY_ALT which are for single functions. # MBEDTLS_XXX_YYY_ALT which are for single functions.
@ -3467,7 +3467,7 @@ config_psa_crypto_hash_use_psa () {
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
scripts/config.py unset MBEDTLS_SHA384_C scripts/config.py unset MBEDTLS_SHA384_C
scripts/config.py unset MBEDTLS_SHA512_C scripts/config.py unset MBEDTLS_SHA512_C
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
scripts/config.py unset MBEDTLS_SHA3_C scripts/config.py unset MBEDTLS_SHA3_C
fi fi
} }
@ -4332,7 +4332,7 @@ component_build_aes_aesce_armcc () {
scripts/config.py baremetal scripts/config.py baremetal
# armc[56] don't support SHA-512 intrinsics # armc[56] don't support SHA-512 intrinsics
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
# Stop armclang warning about feature detection for A64_CRYPTO. # Stop armclang warning about feature detection for A64_CRYPTO.
# With this enabled, the library does build correctly under armclang, # With this enabled, the library does build correctly under armclang,
@ -4936,7 +4936,7 @@ component_build_armcc () {
msg "build: ARM Compiler 5" msg "build: ARM Compiler 5"
scripts/config.py baremetal scripts/config.py baremetal
# armc[56] don't support SHA-512 intrinsics # armc[56] don't support SHA-512 intrinsics
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
# Stop armclang warning about feature detection for A64_CRYPTO. # Stop armclang warning about feature detection for A64_CRYPTO.
# With this enabled, the library does build correctly under armclang, # With this enabled, the library does build correctly under armclang,