summaryrefslogtreecommitdiff
path: root/simon.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-07-07 12:36:49 -0400
committerJeffrey Walton <noloader@gmail.com>2020-07-07 12:36:49 -0400
commit84ab419029081d3a194da28421be615389716e7a (patch)
tree2dc243cce02addbeb226573fc54643c0ad984dc2 /simon.cpp
parentabe69c6130a6ca6503852d9937098dc06cb176af (diff)
downloadcryptopp-git-84ab419029081d3a194da28421be615389716e7a.tar.gz
Fix SIMON64 and SPECK64 self test failures (GH #945)
Diffstat (limited to 'simon.cpp')
-rw-r--r--simon.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/simon.cpp b/simon.cpp
index 65a0dd50..f00ba3a0 100644
--- a/simon.cpp
+++ b/simon.cpp
@@ -312,6 +312,8 @@ void SIMON64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
CRYPTOPP_ASSERT(0);
}
+#if CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
+
// Pre-splat the round keys for Altivec forward transformation
#if CRYPTOPP_ALTIVEC_AVAILABLE
if (IsForwardTransformation() && HasAltivec())
@@ -330,6 +332,8 @@ void SIMON64::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength,
m_rkeys.swap(presplat);
}
#endif
+
+#endif // CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
}
void SIMON64::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
@@ -453,6 +457,8 @@ void SIMON128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
CRYPTOPP_ASSERT(0);
}
+#if CRYPTOPP_SIMON128_ADVANCED_PROCESS_BLOCKS
+
// Pre-splat the round keys for Altivec forward transformation
#if CRYPTOPP_ALTIVEC_AVAILABLE
if (IsForwardTransformation() && HasAltivec())
@@ -471,6 +477,8 @@ void SIMON128::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLength
m_rkeys.swap(presplat);
}
#endif
+
+#endif // CRYPTOPP_SIMON64_ADVANCED_PROCESS_BLOCKS
}
void SIMON128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const