VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Xts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Xts.c')
-rw-r--r--src/Common/Xts.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Common/Xts.c b/src/Common/Xts.c
index 390eb31e..99999f11 100644
--- a/src/Common/Xts.c
+++ b/src/Common/Xts.c
@@ -4,7 +4,7 @@
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
@@ -54,10 +54,14 @@ void EncryptBufferXTS (unsigned __int8 *buffer,
unsigned __int8 *ks2,
int cipher)
{
- if (CipherSupportsIntraDataUnitParallelization (cipher))
+ #ifndef WOLFCRYPT_BACKEND
+ if (CipherSupportsIntraDataUnitParallelization (cipher))
EncryptBufferXTSParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher);
else
EncryptBufferXTSNonParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher);
+ #else
+ xts_encrypt(buffer, buffer, length, startDataUnitNo, ks);
+ #endif
}
#if (CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && CRYPTOPP_BOOL_X64)
@@ -380,10 +384,14 @@ void DecryptBufferXTS (unsigned __int8 *buffer,
unsigned __int8 *ks2,
int cipher)
{
+ #ifndef WOLFCRYPT_BACKEND
if (CipherSupportsIntraDataUnitParallelization (cipher))
DecryptBufferXTSParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher);
else
DecryptBufferXTSNonParallel (buffer, length, startDataUnitNo, startCipherBlockNo, ks, ks2, cipher);
+ #else
+ xts_decrypt(buffer, buffer, length, startDataUnitNo, ks);
+ #endif
}