VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-20 14:04:07 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-20 14:31:24 (GMT)
commit4b9f8b232b956149850fc1c8b47f826a09044efa (patch)
treec083d57ad145d28cfb58b98fedfce2ab68e82eed /src/Volume
parent02cbecff6450f37498c558c1352550d647bffdfa (diff)
downloadVeraCrypt-4b9f8b232b956149850fc1c8b47f826a09044efa.zip
VeraCrypt-4b9f8b232b956149850fc1c8b47f826a09044efa.tar.gz
Reduce time for reporting wrong password by removing support for legacy hidden format because it was never functional and it was superseded by current hidden format.
Diffstat (limited to 'src/Volume')
-rwxr-xr-xsrc/Volume/Volume.cpp10
-rw-r--r--src/Volume/VolumeLayout.cpp30
-rw-r--r--src/Volume/VolumeLayout.h18
3 files changed, 0 insertions, 58 deletions
diff --git a/src/Volume/Volume.cpp b/src/Volume/Volume.cpp
index 12bc9a1..362b342 100755
--- a/src/Volume/Volume.cpp
+++ b/src/Volume/Volume.cpp
@@ -129,13 +129,6 @@ namespace VeraCrypt
if (useBackupHeaders && !layout->HasBackupHeader())
continue;
- if (typeid (*layout) == typeid (VolumeLayoutV1Hidden)
- && deviceHosted
- && hostDeviceSectorSize != TC_SECTOR_SIZE_LEGACY)
- {
- continue;
- }
-
SecureBuffer headerBuffer (layout->GetHeaderSize());
if (layout->HasDriveHeader())
@@ -249,9 +242,6 @@ namespace VeraCrypt
ProtectedRangeStart = protectedVolume.VolumeDataOffset;
ProtectedRangeEnd = protectedVolume.VolumeDataOffset + protectedVolume.VolumeDataSize;
-
- if (typeid (*protectedVolume.Layout) == typeid (VolumeLayoutV1Hidden))
- ProtectedRangeEnd += protectedVolume.Layout->GetHeaderSize();
}
catch (PasswordException&)
{
diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp
index fb75a86..21c00b5 100644
--- a/src/Volume/VolumeLayout.cpp
+++ b/src/Volume/VolumeLayout.cpp
@@ -28,7 +28,6 @@ namespace VeraCrypt
layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV2Normal ()));
layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV1Normal ()));
layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV2Hidden ()));
- layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV1Hidden ()));
layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutSystemEncryption ()));
if (type != VolumeType::Unknown)
@@ -85,35 +84,6 @@ namespace VeraCrypt
}
- VolumeLayoutV1Hidden::VolumeLayoutV1Hidden ()
- {
- Type = VolumeType::Hidden;
- HeaderOffset = -TC_HIDDEN_VOLUME_HEADER_OFFSET_LEGACY;
- HeaderSize = TC_VOLUME_HEADER_SIZE_LEGACY;
-
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentAES ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new SerpentTwofishAES ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TwofishSerpent ()));
-
- SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ()));
- }
-
- uint64 VolumeLayoutV1Hidden::GetDataOffset (uint64 volumeHostSize) const
- {
- return volumeHostSize - GetDataSize (volumeHostSize) + HeaderOffset;
- }
-
- uint64 VolumeLayoutV1Hidden::GetDataSize (uint64 volumeHostSize) const
- {
- return Header->GetHiddenVolumeDataSize ();
- }
-
-
VolumeLayoutV2Normal::VolumeLayoutV2Normal ()
{
Type = VolumeType::Normal;
diff --git a/src/Volume/VolumeLayout.h b/src/Volume/VolumeLayout.h
index 57d278c..e49f74b 100644
--- a/src/Volume/VolumeLayout.h
+++ b/src/Volume/VolumeLayout.h
@@ -78,24 +78,6 @@ namespace VeraCrypt
};
- class VolumeLayoutV1Hidden : public VolumeLayout
- {
- public:
- VolumeLayoutV1Hidden ();
- virtual ~VolumeLayoutV1Hidden () { }
-
- virtual int GetBackupHeaderOffset () const { throw NotApplicable (SRC_POS); }
- virtual uint64 GetDataOffset (uint64 volumeHostSize) const;
- virtual uint64 GetDataSize (uint64 volumeHostSize) const;
- virtual uint64 GetMaxDataSize (uint64 volumeSize) const { throw NotApplicable (SRC_POS); }
- virtual bool HasBackupHeader () const { return false; }
-
- private:
- VolumeLayoutV1Hidden (const VolumeLayoutV1Hidden &);
- VolumeLayoutV1Hidden &operator= (const VolumeLayoutV1Hidden &);
- };
-
-
class VolumeLayoutV2Normal : public VolumeLayout
{
public: