diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-11-23 02:47:44 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-11-23 02:47:44 -0500 |
commit | 304809a65dc34a73160edcf9f568e35d6e1af9b5 (patch) | |
tree | 5c0768457a0fd8ca8139eb9d9e750ac2bffcba4d /speck.h | |
parent | b08596da4466a7380f65803bd51d2d2213818d19 (diff) | |
download | cryptopp-git-304809a65dc34a73160edcf9f568e35d6e1af9b5.tar.gz |
Add NEON and ASIMD intrinsics for SPECK-128 (GH #538)
Performance increased by about 115% on a 980 MHz BananaPi dev-board. Throughput went from about 46.2 cpb to about 21.5 cpb.
Diffstat (limited to 'speck.h')
-rw-r--r-- | speck.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -16,6 +16,10 @@ #include "seckey.h"
#include "secblock.h"
+#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64
+# define CRYPTOPP_SPECK_ADVANCED_PROCESS_BLOCKS 1
+#endif
+
NAMESPACE_BEGIN(CryptoPP)
//! \class SPECK_Info
@@ -142,7 +146,7 @@ public: {
protected:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
-#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
+#if CRYPTOPP_SPECK_ADVANCED_PROCESS_BLOCKS
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
#endif
};
@@ -155,7 +159,7 @@ public: {
protected:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
-#if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
+#if CRYPTOPP_SPECK_ADVANCED_PROCESS_BLOCKS
size_t AdvancedProcessBlocks(const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags) const;
#endif
};
|