1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Linux: Disable Kernel crypto if volume encrypted using Kuznyechik or Magma

This commit is contained in:
Mounir IDRASSI
2016-08-17 08:19:43 +02:00
parent 7695b8ada0
commit d8a7de8ffb

View File

@@ -303,9 +303,12 @@ namespace VeraCrypt
void CoreLinux::MountVolumeNative (shared_ptr <Volume> 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);