From d8a7de8ffb54ad98088f1d89cde67c24fe02beea Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 17 Aug 2016 08:19:43 +0200 Subject: Linux: Disable Kernel crypto if volume encrypted using Kuznyechik or Magma --- src/Core/Unix/Linux/CoreLinux.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Core') diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index eb4545fd..5ae29e54 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -303,9 +303,12 @@ namespace VeraCrypt void CoreLinux::MountVolumeNative (shared_ptr volume, MountOptions &options, const DirectoryPath &auxMountPoint) const { bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS)); + bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (GOST89)) + || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik)); if (options.NoKernelCrypto || !xts + || algoNotSupported || volume->GetProtectionType() == VolumeProtection::HiddenVolumeReadOnly) { throw NotApplicable (SRC_POS); -- cgit v1.2.3