summaryrefslogtreecommitdiff
path: root/simeck.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-07-01 03:11:00 -0400
committerJeffrey Walton <noloader@gmail.com>2018-07-01 03:11:00 -0400
commit08e61370828e370d665fc59dbda534e899a0de0c (patch)
tree2effb37cb8243b36425a9ed086f1a59f87f0d301 /simeck.h
parent4a7814be7e0707895f4120c05f30b8a6f1eb41c6 (diff)
downloadcryptopp-git-08e61370828e370d665fc59dbda534e899a0de0c.tar.gz
Add SIMECK-64 SSSE3 implementation (GH #675)
Diffstat (limited to 'simeck.h')
-rw-r--r--simeck.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/simeck.h b/simeck.h
index b3345f4d..a6d44293 100644
--- a/simeck.h
+++ b/simeck.h
@@ -14,6 +14,10 @@
#include "secblock.h"
#include "algparam.h"
+#if (CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86)
+# define CRYPTOPP_SIMECK_ADVANCED_PROCESS_BLOCKS 1
+#endif
+
NAMESPACE_BEGIN(CryptoPP)
/// \brief SIMECK block cipher information
@@ -57,7 +61,7 @@ public:
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
FixedSizeSecBlock<word16, ROUNDS> m_rk;
- mutable FixedSizeSecBlock<word16, 5> m_t;
+ mutable FixedSizeSecBlock<word16, 4> m_t;
};
/// \brief Provides implementation for encryption transformation
@@ -106,7 +110,7 @@ public:
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
FixedSizeSecBlock<word32, ROUNDS> m_rk;
- mutable FixedSizeSecBlock<word32, 5> m_t;
+ mutable FixedSizeSecBlock<word32, 4> m_t;
};
/// \brief Provides implementation for encryption transformation
@@ -117,6 +121,10 @@ public:
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
+
+#if CRYPTOPP_SIMECK_ADVANCED_PROCESS_BLOCKS
+ size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
+#endif
};
/// \brief Provides implementation for encryption transformation
@@ -127,6 +135,10 @@ public:
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
+
+#if CRYPTOPP_SIMECK_ADVANCED_PROCESS_BLOCKS
+ size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
+#endif
};
typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;