Fix CRYPTOPP_DISABLE_ASM build
parent
d12229d463
commit
b53842bcdc
12
cham.cpp
12
cham.cpp
|
|
@ -97,6 +97,7 @@ ANONYMOUS_NAMESPACE_END
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
#if CRYPTOPP_CHAM_ADVANCED_PROCESS_BLOCKS
|
#if CRYPTOPP_CHAM_ADVANCED_PROCESS_BLOCKS
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
extern size_t CHAM64_Enc_AdvancedProcessBlocks_SSSE3(const word16* subKeys, size_t rounds,
|
extern size_t CHAM64_Enc_AdvancedProcessBlocks_SSSE3(const word16* subKeys, size_t rounds,
|
||||||
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
|
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
|
||||||
|
|
||||||
|
|
@ -108,7 +109,8 @@ extern size_t CHAM128_Enc_AdvancedProcessBlocks_SSSE3(const word32* subKeys, siz
|
||||||
|
|
||||||
extern size_t CHAM128_Dec_AdvancedProcessBlocks_SSSE3(const word32* subKeys, size_t rounds,
|
extern size_t CHAM128_Dec_AdvancedProcessBlocks_SSSE3(const word32* subKeys, size_t rounds,
|
||||||
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
|
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
|
||||||
#endif
|
# endif // CRYPTOPP_SSSE3_AVAILABLE
|
||||||
|
#endif // CRYPTOPP_CHAM_ADVANCED_PROCESS_BLOCKS
|
||||||
|
|
||||||
void CHAM64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms)
|
void CHAM64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms)
|
||||||
{
|
{
|
||||||
|
|
@ -318,42 +320,50 @@ void CHAM128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock,
|
||||||
size_t CHAM64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
size_t CHAM64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
||||||
byte *outBlocks, size_t length, word32 flags) const
|
byte *outBlocks, size_t length, word32 flags) const
|
||||||
{
|
{
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
if (HasSSSE3()) {
|
if (HasSSSE3()) {
|
||||||
return CHAM64_Enc_AdvancedProcessBlocks_SSSE3(m_rk, 80,
|
return CHAM64_Enc_AdvancedProcessBlocks_SSSE3(m_rk, 80,
|
||||||
inBlocks, xorBlocks, outBlocks, length, flags);
|
inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
# endif // CRYPTOPP_SSSE3_AVAILABLE
|
||||||
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CHAM64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
size_t CHAM64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
||||||
byte *outBlocks, size_t length, word32 flags) const
|
byte *outBlocks, size_t length, word32 flags) const
|
||||||
{
|
{
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
if (HasSSSE3()) {
|
if (HasSSSE3()) {
|
||||||
return CHAM64_Dec_AdvancedProcessBlocks_SSSE3(m_rk, 80,
|
return CHAM64_Dec_AdvancedProcessBlocks_SSSE3(m_rk, 80,
|
||||||
inBlocks, xorBlocks, outBlocks, length, flags);
|
inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
# endif // CRYPTOPP_SSSE3_AVAILABLE
|
||||||
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CHAM128::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
size_t CHAM128::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
||||||
byte *outBlocks, size_t length, word32 flags) const
|
byte *outBlocks, size_t length, word32 flags) const
|
||||||
{
|
{
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
if (HasSSSE3()) {
|
if (HasSSSE3()) {
|
||||||
const size_t rounds = (m_kw == 4 ? 80 : 96);
|
const size_t rounds = (m_kw == 4 ? 80 : 96);
|
||||||
return CHAM128_Enc_AdvancedProcessBlocks_SSSE3(m_rk, rounds,
|
return CHAM128_Enc_AdvancedProcessBlocks_SSSE3(m_rk, rounds,
|
||||||
inBlocks, xorBlocks, outBlocks, length, flags);
|
inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
# endif // CRYPTOPP_SSSE3_AVAILABLE
|
||||||
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CHAM128::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
size_t CHAM128::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
|
||||||
byte *outBlocks, size_t length, word32 flags) const
|
byte *outBlocks, size_t length, word32 flags) const
|
||||||
{
|
{
|
||||||
|
# if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||||
if (HasSSSE3()) {
|
if (HasSSSE3()) {
|
||||||
const size_t rounds = (m_kw == 4 ? 80 : 96);
|
const size_t rounds = (m_kw == 4 ? 80 : 96);
|
||||||
return CHAM128_Dec_AdvancedProcessBlocks_SSSE3(m_rk, rounds,
|
return CHAM128_Dec_AdvancedProcessBlocks_SSSE3(m_rk, rounds,
|
||||||
inBlocks, xorBlocks, outBlocks, length, flags);
|
inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
|
# endif // CRYPTOPP_SSSE3_AVAILABLE
|
||||||
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
|
||||||
}
|
}
|
||||||
#endif // CRYPTOPP_CHAM_ADVANCED_PROCESS_BLOCKS
|
#endif // CRYPTOPP_CHAM_ADVANCED_PROCESS_BLOCKS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue