diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-12-03 09:00:39 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-12-03 09:00:39 -0500 |
commit | f0e49785f6b97b18dfd568beb5df99e595a80298 (patch) | |
tree | 5dd7d1321106471440fc510da928e4c5a72d5ecd /simon.cpp | |
parent | 18ccd89965acb3fe6f67e6cdb2ded613868112ed (diff) | |
download | cryptopp-git-f0e49785f6b97b18dfd568beb5df99e595a80298.tar.gz |
Fix incorrect SPECK-128 decrypt when blocks >= 6
Add defines for CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS and CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS
Diffstat (limited to 'simon.cpp')
-rw-r--r-- | simon.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -384,7 +384,7 @@ void SIMON128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[2])(m_wspace[3]);
}
-#if defined(CRYPTOPP_SIMON_ADVANCED_PROCESS_BLOCKS)
+#if defined(CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS)
size_t SIMON64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
byte *outBlocks, size_t length, word32 flags) const
{
@@ -416,7 +416,9 @@ size_t SIMON64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor #endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
+#endif // CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
+#if defined(CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS)
size_t SIMON128::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
byte *outBlocks, size_t length, word32 flags) const
{
@@ -448,6 +450,6 @@ size_t SIMON128::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo #endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
-#endif
+#endif // CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
NAMESPACE_END
|