summaryrefslogtreecommitdiff
path: root/salsa.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-29 06:55:19 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-29 06:55:19 -0500
commit92436b9f9b8f9553ec385de0366fef302ee81af0 (patch)
treebb1e0788ab024495a8f4d363b852e2f5f37b24e2 /salsa.h
parentf86c6124a8e094309dbf58d3e9aae96e4aca0bb2 (diff)
downloadcryptopp-git-92436b9f9b8f9553ec385de0366fef302ee81af0.tar.gz
Re-enable Salsa20 ASM (GH #543)
We are fairly certain this is a false positive due to glibc's __memcmp_sse4_1.
Diffstat (limited to 'salsa.h')
-rw-r--r--salsa.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/salsa.h b/salsa.h
index f3bede3b..a491a056 100644
--- a/salsa.h
+++ b/salsa.h
@@ -12,7 +12,7 @@
// TODO: work around GCC 4.8+ issue with SSE2 ASM until the exact details are known
// and fix is released. Duplicate with "valgrind ./cryptest.exe tv salsa"
// "Inline assembly operands don't work with .intel_syntax", http://llvm.org/bugs/show_bug.cgi?id=24232
-#if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_INTEL_ASM) || (CRYPTOPP_GCC_VERSION >= 40800)
+#if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_INTEL_ASM)
# define CRYPTOPP_DISABLE_SALSA_ASM
#endif
@@ -22,7 +22,7 @@ NAMESPACE_BEGIN(CryptoPP)
//! \brief Salsa20 stream cipher information
struct Salsa20_Info : public VariableKeyLength<32, 16, 32, 16, SimpleKeyingInterface::UNIQUE_IV, 8>
{
- CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "Salsa20";}
+ static std::string StaticAlgorithmName() {return "Salsa20";}
};
//! \class Salsa20_Policy
@@ -35,7 +35,7 @@ protected:
void CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length);
bool CipherIsRandomAccess() const {return true;}
void SeekToIteration(lword iterationCount);
-#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64) && !defined(CRYPTOPP_DISABLE_SALSA_ASM)
+#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
unsigned int GetAlignment() const;
unsigned int GetOptimalBlockSize() const;
#endif
@@ -58,7 +58,7 @@ struct Salsa20 : public Salsa20_Info, public SymmetricCipherDocumentation
//! \brief XSalsa20 stream cipher information
struct XSalsa20_Info : public FixedKeyLength<32, SimpleKeyingInterface::UNIQUE_IV, 24>
{
- CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "XSalsa20";}
+ static std::string StaticAlgorithmName() {return "XSalsa20";}
};
//! \class XSalsa20_Policy