diff --git a/configure.ac b/configure.ac index b96ee01e8..da0012a37 100644 --- a/configure.ac +++ b/configure.ac @@ -498,7 +498,6 @@ then test "$enable_aesctr" = "" && enable_aesctr=yes test "$enable_aesofb" = "" && enable_aesofb=yes test "$enable_aescfb" = "" && enable_aescfb=yes - test "$enable_aessiv" = "" && enable_aessiv=yes test "$enable_aescbc_length_checks" = "" && enable_aescbc_length_checks=yes test "$enable_camellia" = "" && enable_camellia=yes test "$enable_ripemd" = "" && enable_ripemd=yes @@ -629,6 +628,10 @@ then fi fi + if test "$ENABLED_FIPS" = "no" || test "$ENABLED_FIPS" = "v5-dev"; then + test "$enable_aessiv" = "" && enable_aessiv=yes + fi + # Enable DH const table speedups (eliminates `-lm` math lib dependency) AM_CFLAGS="$AM_CFLAGS -DHAVE_FFDHE_2048 -DHAVE_FFDHE_3072" DEFAULT_MAX_CLASSIC_ASYM_KEY_BITS=4096 @@ -665,7 +668,6 @@ then test "$enable_aesctr" = "" && enable_aesctr=yes test "$enable_aesofb" = "" && enable_aesofb=yes test "$enable_aescfb" = "" && enable_aescfb=yes - test "$enable_aessiv" = "" && enable_aessiv=yes test "$enable_aescbc_length_checks" = "" && enable_aescbc_length_checks=yes test "$enable_camellia" = "" && enable_camellia=yes test "$enable_ripemd" = "" && enable_ripemd=yes @@ -752,6 +754,10 @@ then fi fi + if test "$ENABLED_FIPS" = "no" || test "$ENABLED_FIPS" = "v5-dev"; then + test "$enable_aessiv" = "" && enable_aessiv=yes + fi + # Enable AES Decrypt, AES ECB, Alt Names, DER Load AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_DECRYPT -DHAVE_AES_ECB -DWOLFSSL_ALT_NAMES -DWOLFSSL_DER_LOAD" diff --git a/wolfcrypt/src/cmac.c b/wolfcrypt/src/cmac.c index 3fe933adb..ce9bc6bc1 100644 --- a/wolfcrypt/src/cmac.c +++ b/wolfcrypt/src/cmac.c @@ -57,12 +57,8 @@ #endif -#ifdef HAVE_FIPS -static void ShiftAndXorRb(byte* out, byte* in) -#else /* Used by AES-SIV. See aes.c. */ void ShiftAndXorRb(byte* out, byte* in) -#endif { int i, j, xorRb; int mask = 0, last = 0; diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index b0f805cb6..d096cb132 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -38870,7 +38870,7 @@ typedef struct { const byte plaintext[83]; word32 plaintextSz; const byte siv[AES_BLOCK_SIZE+1]; - const byte ciphertext[83]; + const byte ciphertext[82]; word32 ciphertextSz; } AesSivTestVector; diff --git a/wolfssl/wolfcrypt/cmac.h b/wolfssl/wolfcrypt/cmac.h index ee99f0a66..4f5d4cf04 100644 --- a/wolfssl/wolfcrypt/cmac.h +++ b/wolfssl/wolfcrypt/cmac.h @@ -103,10 +103,8 @@ int wc_AesCmacVerify(const byte* check, word32 checkSz, const byte* in, word32 inSz, const byte* key, word32 keySz); -#ifndef HAVE_FIPS WOLFSSL_LOCAL void ShiftAndXorRb(byte* out, byte* in); -#endif #ifdef __cplusplus } /* extern "C" */