Fix AlgorithmProvider for SIMON and SPECK on Solaris
parent
e2be0cdecc
commit
b2c5616ede
24
simon.cpp
24
simon.cpp
|
|
@ -243,17 +243,19 @@ extern size_t SIMON128_Dec_AdvancedProcessBlocks_POWER8(const word64* subKeys, s
|
||||||
|
|
||||||
std::string SIMON64::Base::AlgorithmProvider() const
|
std::string SIMON64::Base::AlgorithmProvider() const
|
||||||
{
|
{
|
||||||
#if defined(CRYPTOPP_SSE41_AVAILABLE)
|
#if (CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS)
|
||||||
|
# if (CRYPTOPP_SSE41_AVAILABLE)
|
||||||
if (HasSSE41())
|
if (HasSSE41())
|
||||||
return "SSE4.1";
|
return "SSE4.1";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||||
if (HasNEON())
|
if (HasNEON())
|
||||||
return "NEON";
|
return "NEON";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_POWER7_AVAILABLE)
|
# if (CRYPTOPP_POWER7_AVAILABLE)
|
||||||
if (HasPower7())
|
if (HasPower7())
|
||||||
return "Power7";
|
return "Power7";
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return "C++";
|
return "C++";
|
||||||
}
|
}
|
||||||
|
|
@ -339,17 +341,19 @@ void SIMON64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||||
|
|
||||||
std::string SIMON128::Base::AlgorithmProvider() const
|
std::string SIMON128::Base::AlgorithmProvider() const
|
||||||
{
|
{
|
||||||
#if defined(CRYPTOPP_SSSE3_AVAILABLE)
|
#if (CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS)
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
if (HasSSSE3())
|
if (HasSSSE3())
|
||||||
return "SSSE3";
|
return "SSSE3";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||||
if (HasNEON())
|
if (HasNEON())
|
||||||
return "NEON";
|
return "NEON";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_POWER8_AVAILABLE)
|
# if (CRYPTOPP_POWER8_AVAILABLE)
|
||||||
if (HasPower8())
|
if (HasPower8())
|
||||||
return "Power8";
|
return "Power8";
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return "C++";
|
return "C++";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
24
speck.cpp
24
speck.cpp
|
|
@ -218,17 +218,19 @@ extern size_t SPECK128_Dec_AdvancedProcessBlocks_POWER8(const word64* subKeys, s
|
||||||
|
|
||||||
std::string SPECK64::Base::AlgorithmProvider() const
|
std::string SPECK64::Base::AlgorithmProvider() const
|
||||||
{
|
{
|
||||||
#if defined(CRYPTOPP_SSE41_AVAILABLE)
|
#if (CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS)
|
||||||
|
# if (CRYPTOPP_SSE41_AVAILABLE)
|
||||||
if (HasSSE41())
|
if (HasSSE41())
|
||||||
return "SSE4.1";
|
return "SSE4.1";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||||
if (HasNEON())
|
if (HasNEON())
|
||||||
return "NEON";
|
return "NEON";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_POWER7_AVAILABLE)
|
# if (CRYPTOPP_POWER7_AVAILABLE)
|
||||||
if (HasPower7())
|
if (HasPower7())
|
||||||
return "Power7";
|
return "Power7";
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return "C++";
|
return "C++";
|
||||||
}
|
}
|
||||||
|
|
@ -314,17 +316,19 @@ void SPECK64::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||||
|
|
||||||
std::string SPECK128::Base::AlgorithmProvider() const
|
std::string SPECK128::Base::AlgorithmProvider() const
|
||||||
{
|
{
|
||||||
#if defined(CRYPTOPP_SSSE3_AVAILABLE)
|
#if (CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS)
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
if (HasSSSE3())
|
if (HasSSSE3())
|
||||||
return "SSSE3";
|
return "SSSE3";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
|
||||||
if (HasNEON())
|
if (HasNEON())
|
||||||
return "NEON";
|
return "NEON";
|
||||||
#endif
|
# endif
|
||||||
#if (CRYPTOPP_POWER8_AVAILABLE)
|
# if (CRYPTOPP_POWER8_AVAILABLE)
|
||||||
if (HasPower8())
|
if (HasPower8())
|
||||||
return "Power8";
|
return "Power8";
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return "C++";
|
return "C++";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue