diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-08-14 07:14:39 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-08-14 07:14:39 -0400 |
commit | 9b91b94b05929277db2dc8dd2d5185adcba98bed (patch) | |
tree | 08526a272e51cf2f3e4cabc41d1e84c886ce9902 /simon.cpp | |
parent | d8c28bdc2bd23ee7c25fd60c306d31a1ad61a2cb (diff) | |
download | cryptopp-git-9b91b94b05929277db2dc8dd2d5185adcba98bed.tar.gz |
Add POWER8 SIMON-64 implementation
Diffstat (limited to 'simon.cpp')
-rw-r--r-- | simon.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -226,6 +226,12 @@ extern size_t SIMON128_Dec_AdvancedProcessBlocks_SSSE3(const word64* subKeys, si #endif
#if (CRYPTOPP_POWER8_AVAILABLE)
+extern size_t SIMON64_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 SIMON64_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 SIMON128_Enc_AdvancedProcessBlocks_POWER8(const word64* subKeys, size_t rounds,
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
@@ -243,6 +249,10 @@ std::string SIMON64::Base::AlgorithmProvider() const if (HasNEON())
return "NEON";
#endif
+#if (CRYPTOPP_POWER8_AVAILABLE)
+ if (HasPower8())
+ return "Power8";
+#endif
return "C++";
}
@@ -444,6 +454,11 @@ size_t SIMON64::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SIMON64_Enc_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds,
inBlocks, xorBlocks, outBlocks, length, flags);
#endif
+#if (CRYPTOPP_POWER8_AVAILABLE)
+ if (HasPower8())
+ return SIMON64_Enc_AdvancedProcessBlocks_POWER8(m_rkeys, (size_t)m_rounds,
+ inBlocks, xorBlocks, outBlocks, length, flags);
+#endif
return BlockTransformation::AdvancedProcessBlocks(inBlocks, xorBlocks, outBlocks, length, flags);
}
@@ -460,6 +475,11 @@ size_t SIMON64::Dec::AdvancedProcessBlocks(const byte *inBlocks, const byte *xor return SIMON64_Dec_AdvancedProcessBlocks_NEON(m_rkeys, (size_t)m_rounds,
inBlocks, xorBlocks, outBlocks, length, flags);
#endif
+#if (CRYPTOPP_POWER8_AVAILABLE)
+ if (HasPower8())
+ return SIMON64_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_SIMON64_ADVANCED_PROCESS_BLOCKS
|