summaryrefslogtreecommitdiff
path: root/rijndael.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-09-04 11:21:47 -0400
committerJeffrey Walton <noloader@gmail.com>2017-09-04 11:21:47 -0400
commit75aef9bded7a65a4d227bde883a094249cf1ffc8 (patch)
treeb6ac9ed16e70837d97980a4e25aa7f9044df9c11 /rijndael.h
parent32cc92e048ecdad5b5c1d901a14c5d4f2ab66444 (diff)
downloadcryptopp-git-75aef9bded7a65a4d227bde883a094249cf1ffc8.tar.gz
Fixup under-aligned buffers when using AES on AltiVec and Power8
This commit supports the upcoming AltiVec and Power8 processor. This commit affects a number of classes due to the ubiquitous use of AES. The commit provides the data alignment requirements.
Diffstat (limited to 'rijndael.h')
-rw-r--r--rijndael.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/rijndael.h b/rijndael.h
index 483eab5a..2a1c44e8 100644
--- a/rijndael.h
+++ b/rijndael.h
@@ -39,6 +39,9 @@ class CRYPTOPP_DLL Rijndael : public Rijndael_Info, public BlockCipherDocumentat
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Rijndael_Info>
{
public:
+ // Intel and ARM SIMD units can handle unaligned loads, but AltiVec and Power8 cannot.
+ unsigned int OptimalDataAlignment() const;
+
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
protected: