diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-08-14 03:36:49 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-08-14 03:36:49 -0400 |
commit | d221336f42881d9de05277996b6e51c5cf605d73 (patch) | |
tree | e382225595468f042cc3a00f826a3a4fc591135f /speck.cpp | |
parent | 462851907f72be1420dbf1383a4ed61e32193472 (diff) | |
download | cryptopp-git-d221336f42881d9de05277996b6e51c5cf605d73.tar.gz |
Add POWER8 SPECK-64 implementation
Diffstat (limited to 'speck.cpp')
-rw-r--r-- | speck.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -201,6 +201,12 @@ extern size_t SPECK128_Dec_AdvancedProcessBlocks_SSSE3(const word64* subKeys, si #endif
#if defined(CRYPTOPP_POWER8_AVAILABLE)
+extern size_t SPECK64_Enc_AdvancedProcessBlocks_POWER8(const word32* subKeys, size_t rounds,
+ const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
+
+extern size_t SPECK64_Dec_AdvancedProcessBlocks_POWER8(const word32* subKeys, size_t rounds,
+ const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
+
extern size_t SPECK128_Enc_AdvancedProcessBlocks_POWER8(const word64* subKeys, size_t rounds,
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
@@ -218,6 +224,10 @@ std::string SPECK64::Base::AlgorithmProvider() const if (HasNEON())
return "NEON";
#endif
+#if (CRYPTOPP_POWER8_AVAILABLE)
+ if (HasPower8())
+ return "Power8";
+#endif
return "C++";
}
@@ -419,6 +429,11 @@ size_t SPECK64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SPECK64_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds,
inBlocks, xorBlocks, outBlocks, length, flags);
#endif
+#if (CRYPTOPP_POWER8_AVAILABLE)
+ if (HasPower8())
+ return SPECK64_Enc_AdvancedProcessBlocks_POWER8(m_rkeys, (size_t)m_rounds,
+ inBlocks, xorBlocks, outBlocks, length, flags);
+#endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
@@ -435,6 +450,11 @@ size_t SPECK64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SPECK64_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds,
inBlocks, xorBlocks, outBlocks, length, flags);
#endif
+#if (CRYPTOPP_POWER8_AVAILABLE)
+ if (HasPower8())
+ return SPECK64_Dec_AdvancedProcessBlocks_POWER8(m_rkeys, (size_t)m_rounds,
+ inBlocks, xorBlocks, outBlocks, length, flags);
+#endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
#endif // CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS
|