From fc17f160ac307af7bdfadbbf5653212069d2292b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 2 Nov 2018 19:21:57 -0400 Subject: [PATCH] Remove unneeded BLAKE2B_IV from Blake2s source file --- blake2.cpp | 2 +- blake2s-simd.cpp | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/blake2.cpp b/blake2.cpp index d14f318c..df2a709e 100644 --- a/blake2.cpp +++ b/blake2.cpp @@ -22,7 +22,7 @@ # undef CRYPTOPP_ARM_NEON_AVAILABLE #endif -// Disable POWER7 on PowerPC big-endian machines. BLAKE2s runs slower than C++. +// Disable POWER7 on PowerPC big-endian machines. Blake2s/POWER7 runs slower than C++. #if defined(__powerpc__) && defined(__BIG_ENDIAN__) # undef CRYPTOPP_POWER7_AVAILABLE #endif diff --git a/blake2s-simd.cpp b/blake2s-simd.cpp index ebb737dc..da134aa3 100644 --- a/blake2s-simd.cpp +++ b/blake2s-simd.cpp @@ -16,7 +16,7 @@ // Do so in both blake2.cpp and blake2-simd.cpp. // #undef CRYPTOPP_SSE41_AVAILABLE // #undef CRYPTOPP_ARM_NEON_AVAILABLE -// #undef CRYPTOPP_POWER8_AVAILABLE +// #undef CRYPTOPP_POWER7_AVAILABLE // Disable NEON/ASIMD for Cortex-A53 and A57. The shifts are too slow and C/C++ is about // 3 cpb faster than NEON/ASIMD. Also see http://github.com/weidai11/cryptopp/issues/367. @@ -45,7 +45,7 @@ # include "ppc-simd.h" #endif -// Disable POWER7 on PowerPC big-endian machines. BLAKE2s runs slower than C++. +// Disable POWER7 on PowerPC big-endian machines. Blake2s/POWER7 runs slower than C++. #if defined(__powerpc__) && defined(__BIG_ENDIAN__) # undef CRYPTOPP_POWER7_AVAILABLE #endif @@ -65,18 +65,6 @@ const word32 BLAKE2S_IV[8] = { #endif -#if (CRYPTOPP_SSE41_AVAILABLE || CRYPTOPP_ARM_NEON_AVAILABLE || CRYPTOPP_POWER8_AVAILABLE) - -CRYPTOPP_ALIGN_DATA(16) -const word64 BLAKE2B_IV[8] = { - W64LIT(0x6a09e667f3bcc908), W64LIT(0xbb67ae8584caa73b), - W64LIT(0x3c6ef372fe94f82b), W64LIT(0xa54ff53a5f1d36f1), - W64LIT(0x510e527fade682d1), W64LIT(0x9b05688c2b3e6c1f), - W64LIT(0x1f83d9abfb41bd6b), W64LIT(0x5be0cd19137e2179) -}; - -#endif // CRYPTOPP_SSE41_AVAILABLE || CRYPTOPP_ARM_NEON_AVAILABLE - ANONYMOUS_NAMESPACE_END NAMESPACE_BEGIN(CryptoPP)