Fix AlgorithmProvider for ChaChaTLS

pull/795/head
Jeffrey Walton 2019-01-24 09:46:56 -05:00
parent 5603661eec
commit a29b734a0f
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 12 additions and 4 deletions

View File

@ -337,6 +337,9 @@ std::string ChaChaTLS_Policy::AlgorithmName() const
std::string ChaChaTLS_Policy::AlgorithmProvider() const std::string ChaChaTLS_Policy::AlgorithmProvider() const
{ {
// Disable SIMD until we can generate large block test vectors
// https://mailarchive.ietf.org/arch/msg/saag/S0_YjVkzEx2s2bHd8KIzjK1CwZ4
#if 0
#if (CRYPTOPP_AVX2_AVAILABLE) #if (CRYPTOPP_AVX2_AVAILABLE)
if (HasAVX2()) if (HasAVX2())
return "AVX2"; return "AVX2";
@ -360,6 +363,7 @@ std::string ChaChaTLS_Policy::AlgorithmProvider() const
if (HasAltivec()) if (HasAltivec())
return "Altivec"; return "Altivec";
else else
#endif
#endif #endif
return "C++"; return "C++";
} }
@ -414,6 +418,9 @@ void ChaChaTLS_Policy::SeekToIteration(lword iterationCount)
unsigned int ChaChaTLS_Policy::GetAlignment() const unsigned int ChaChaTLS_Policy::GetAlignment() const
{ {
// Disable SIMD until we can generate large block test vectors
// https://mailarchive.ietf.org/arch/msg/saag/S0_YjVkzEx2s2bHd8KIzjK1CwZ4
#if 0
#if (CRYPTOPP_AVX2_AVAILABLE) #if (CRYPTOPP_AVX2_AVAILABLE)
if (HasAVX2()) if (HasAVX2())
return 16; return 16;
@ -428,6 +435,7 @@ unsigned int ChaChaTLS_Policy::GetAlignment() const
if (HasAltivec()) if (HasAltivec())
return 16; return 16;
else else
#endif
#endif #endif
return GetAlignmentOf<word32>(); return GetAlignmentOf<word32>();
} }