summaryrefslogtreecommitdiff
path: root/xts.h
diff options
context:
space:
mode:
Diffstat (limited to 'xts.h')
-rw-r--r--xts.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/xts.h b/xts.h
index 16093932..c6bbc747 100644
--- a/xts.h
+++ b/xts.h
@@ -134,10 +134,16 @@ protected:
{return const_cast<XTS_ModeBase*>(this)->AccessTweakCipher();}
// Buffers are sized based on ParallelBlocks
- SecByteBlock m_xregister;
- SecByteBlock m_xworkspace;
+ AlignedSecByteBlock m_xregister;
+ AlignedSecByteBlock m_xworkspace;
+ // Intel lacks the SSE registers to run 8 or 12 parallel blocks.
+ // Do not change this value after compiling. It has no effect.
+#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X86
enum {ParallelBlocks = 4};
+#else
+ enum {ParallelBlocks = 12};
+#endif
};
/// \brief XTS block cipher mode of operation implementation