summaryrefslogtreecommitdiff
path: root/rijndael.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-04-12 12:56:50 -0400
committerJeffrey Walton <noloader@gmail.com>2020-04-12 12:56:50 -0400
commitcac28287cc9a2dda620c5649a13e9d2edfae3288 (patch)
tree5184de9f27578ecbf621e44cae783cb2d2c3a0b5 /rijndael.cpp
parentdbc123a4d14f5fea42b0d23661fc13f8cd4ddd45 (diff)
downloadcryptopp-git-cac28287cc9a2dda620c5649a13e9d2edfae3288.tar.gz
Fix AES/CFB mode failure on ARMv7
Diffstat (limited to 'rijndael.cpp')
-rw-r--r--rijndael.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/rijndael.cpp b/rijndael.cpp
index 75a1b1b3..a43ff3ef 100644
--- a/rijndael.cpp
+++ b/rijndael.cpp
@@ -250,19 +250,19 @@ unsigned int Rijndael::Base::OptimalDataAlignment() const
{
#if (CRYPTOPP_AESNI_AVAILABLE)
if (HasAESNI())
- return GetAlignmentOf<word32>();
+ return 16; // load __m128i
#endif
#if (CRYPTOPP_ARM_AES_AVAILABLE)
if (HasAES())
- return GetAlignmentOf<word32>();
+ return 4; // load uint32x4_t
#endif
#if (CRYPTOGAMS_ARM_AES)
if (HasARMv7())
- return GetAlignmentOf<word32>();
+ return 1; // CFB mode error without 1
#endif
#if (CRYPTOPP_POWER8_AES_AVAILABLE)
if (HasAES())
- return GetAlignmentOf<word32>();
+ return 16; // load uint32x4_p
#endif
return BlockTransformation::OptimalDataAlignment();
}