summaryrefslogtreecommitdiff
path: root/lea.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-06-23 20:55:17 -0400
committerJeffrey Walton <noloader@gmail.com>2018-06-23 20:55:17 -0400
commit404e6cfae33c8185ef8752c7d62ce111583d4829 (patch)
tree2fc1cd61356e36442ded8da264101fb4439c4135 /lea.cpp
parent3af3b8019b96dce493a499e0989e254f1f7911f5 (diff)
downloadcryptopp-git-404e6cfae33c8185ef8752c7d62ce111583d4829.tar.gz
Remove CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS
GCC 8 was producing bad decryption results for CBC mode on x86. NEON and Aarch64 was fine. We lose 0.6 cpb so LEA runs around 3.5 cpb instead of 2.9 cpb. It would be nice to pinpoint the GCC issue but it is kind of difficult at the moment.
Diffstat (limited to 'lea.cpp')
-rw-r--r--lea.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/lea.cpp b/lea.cpp
index 75de3556..1efbf2f5 100644
--- a/lea.cpp
+++ b/lea.cpp
@@ -557,8 +557,6 @@ NAMESPACE_BEGIN(CryptoPP)
#if CRYPTOPP_LEA_ADVANCED_PROCESS_BLOCKS
# if defined(CRYPTOPP_SSSE3_AVAILABLE)
-extern void LEA_SplatKeys_SSSE3(SecBlock<word32>& rkeys);
-
extern size_t LEA_Enc_AdvancedProcessBlocks_SSSE3(const word32* subKeys, size_t rounds,
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
@@ -567,10 +565,6 @@ extern size_t LEA_Dec_AdvancedProcessBlocks_SSSE3(const word32* subKeys, size_t
# endif
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
-# if (CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS)
-extern void LEA_SplatKeys_NEON(SecBlock<word32>& rkeys);
-# endif // CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS
-
extern size_t LEA_Enc_AdvancedProcessBlocks_NEON(const word32* subKeys, size_t rounds,
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
@@ -609,20 +603,6 @@ void LEA::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength, con
default:
CRYPTOPP_ASSERT(0);;
}
-
- // If we pre-splat the round keys at setup then we avoid a shuffle
- // at runtime for each subkey used during encryption and decryption.
- // Pre-splatting saves about 0.7 to 1.0 cpb at the cost of 4x storage.
-#if (CRYPTOPP_LEA_ADVANCED_PROCESS_BLOCKS) && (CRYPTOPP_SSSE3_AVAILABLE)
- if (HasSSSE3())
- LEA_SplatKeys_SSSE3(m_rkey);
-#endif
-#if (CRYPTOPP_LEA_ADVANCED_PROCESS_BLOCKS) && (CRYPTOPP_ARM_NEON_AVAILABLE)
-# if (CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS)
- if (HasNEON())
- LEA_SplatKeys_NEON(m_rkey);
-# endif // CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS
-#endif
}
void LEA::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const