From a5c1978eefe2fd0dbf1ab6b7cdcb019a9b913a40 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 20 Jul 2014 12:30:58 +0200 Subject: Remove remaining legacy cryptographic algorithms that are never used by VeraCrypt. --- src/Core/Unix/Linux/CoreLinux.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/Core') diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index 4170cdfe..83c91dd2 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -17,7 +17,6 @@ #include "CoreLinux.h" #include "Platform/SystemInfo.h" #include "Platform/TextReader.h" -#include "Volume/EncryptionModeLRW.h" #include "Volume/EncryptionModeXTS.h" #include "Driver/Fuse/FuseService.h" #include "Core/Unix/CoreServiceProxy.h" @@ -290,10 +289,9 @@ namespace VeraCrypt void CoreLinux::MountVolumeNative (shared_ptr volume, MountOptions &options, const DirectoryPath &auxMountPoint) const { bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS)); - bool lrw = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeLRW)); if (options.NoKernelCrypto - || (!xts && (!lrw || volume->GetEncryptionAlgorithm()->GetCiphers().size() > 1 || volume->GetEncryptionAlgorithm()->GetMinBlockSize() != 16)) + || !xts || volume->GetProtectionType() == VolumeProtection::HiddenVolumeReadOnly) { throw NotApplicable (SRC_POS); @@ -372,9 +370,6 @@ namespace VeraCrypt sprintf ((char *) hexStr.Ptr(), "%02x", (int) cipherKey[i]); dmCreateArgsBuf.GetRange (keyArgOffset + i * 2, 2).CopyFrom (hexStr.GetRange (0, 2)); - if (lrw && i >= 16) - continue; - sprintf ((char *) hexStr.Ptr(), "%02x", (int) secondaryKey[i]); dmCreateArgsBuf.GetRange (keyArgOffset + cipherKey.Size() * 2 + i * 2, 2).CopyFrom (hexStr.GetRange (0, 2)); } -- cgit v1.2.3