summaryrefslogtreecommitdiff
path: root/speck.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-12-03 09:00:39 -0500
committerJeffrey Walton <noloader@gmail.com>2017-12-03 09:00:39 -0500
commitf0e49785f6b97b18dfd568beb5df99e595a80298 (patch)
tree5dd7d1321106471440fc510da928e4c5a72d5ecd /speck.cpp
parent18ccd89965acb3fe6f67e6cdb2ded613868112ed (diff)
downloadcryptopp-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 'speck.cpp')
-rw-r--r--speck.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/speck.cpp b/speck.cpp
index f6762094..5acac044 100644
--- a/speck.cpp
+++ b/speck.cpp
@@ -364,7 +364,7 @@ void SPECK128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
OutBlock oblk(xorBlock, outBlock); oblk(m_wspace[2])(m_wspace[3]);
}
-#if defined(CRYPTOPP_SPECK_ADVANCED_PROCESS_BLOCKS)
+#if defined(CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS)
size_t SPECK64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
byte *outBlocks, size_t length, word32 flags) const
{
@@ -386,7 +386,9 @@ size_t SPECK64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor
#endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
+#endif // CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS
+#if defined(CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS)
size_t SPECK128::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks,
byte *outBlocks, size_t length, word32 flags) const
{
@@ -418,6 +420,6 @@ size_t SPECK128::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo
#endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
-#endif
+#endif // CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS
NAMESPACE_END