summaryrefslogtreecommitdiff
path: root/simon.h
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 /simon.h
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 'simon.h')
-rw-r--r--simon.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/simon.h b/simon.h
index 48382072..2b47debb 100644
--- a/simon.h
+++ b/simon.h
@@ -16,8 +16,12 @@
#include "seckey.h"
#include "secblock.h"
+#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86
+# define CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS 1
+#endif
+
#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64
-# define CRYPTOPP_SIMON_ADVANCED_PROCESS_BLOCKS 1
+# define CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS 1
#endif
NAMESPACE_BEGIN(CryptoPP)
@@ -94,7 +98,7 @@ public:
{
protected:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
-#if CRYPTOPP_SIMON_ADVANCED_PROCESS_BLOCKS
+#if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
#endif
};
@@ -107,7 +111,7 @@ public:
{
protected:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
-#if CRYPTOPP_SIMON_ADVANCED_PROCESS_BLOCKS
+#if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
#endif
};
@@ -152,7 +156,7 @@ public:
{
protected:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
-#if CRYPTOPP_SIMON_ADVANCED_PROCESS_BLOCKS
+#if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
#endif
};
@@ -165,7 +169,7 @@ public:
{
protected:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
-#if CRYPTOPP_SIMON_ADVANCED_PROCESS_BLOCKS
+#if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
#endif
};