VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/VolumeLayout.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-07-20 12:30:58 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 23:21:35 +0100
commita5c1978eefe2fd0dbf1ab6b7cdcb019a9b913a40 (patch)
treebb48f3b5544dc218228d368a7e893a83f0c0b059 /src/Volume/VolumeLayout.cpp
parent75f780871949e5bacca4718507e66c8d28d72e69 (diff)
downloadVeraCrypt-a5c1978eefe2fd0dbf1ab6b7cdcb019a9b913a40.tar.gz
VeraCrypt-a5c1978eefe2fd0dbf1ab6b7cdcb019a9b913a40.zip
Remove remaining legacy cryptographic algorithms that are never used by VeraCrypt.
Diffstat (limited to 'src/Volume/VolumeLayout.cpp')
-rw-r--r--src/Volume/VolumeLayout.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp
index aeade493..a3ecab02 100644
--- a/src/Volume/VolumeLayout.cpp
+++ b/src/Volume/VolumeLayout.cpp
@@ -1,31 +1,29 @@
/*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
Governed by the TrueCrypt License 3.0 the full text of which is contained in
the file License.txt included in TrueCrypt binary and source code distribution
packages.
*/
#include "Volume/EncryptionMode.h"
-#include "Volume/EncryptionModeCBC.h"
-#include "Volume/EncryptionModeLRW.h"
#include "Volume/EncryptionModeXTS.h"
#include "VolumeLayout.h"
#include "Boot/Windows/BootCommon.h"
namespace VeraCrypt
{
VolumeLayout::VolumeLayout ()
{
}
VolumeLayout::~VolumeLayout ()
{
}
VolumeLayoutList VolumeLayout::GetAvailableLayouts (VolumeType::Enum type)
{
VolumeLayoutList layouts;
layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV2Normal ()));
layouts.push_back (shared_ptr <VolumeLayout> (new VolumeLayoutV1Normal ()));
@@ -56,86 +54,70 @@ namespace VeraCrypt
return Header;
}
VolumeLayoutV1Normal::VolumeLayoutV1Normal ()
{
Type = VolumeType::Normal;
HeaderOffset = TC_VOLUME_HEADER_OFFSET;
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 ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfish ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfishSerpent ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Blowfish ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Cast5 ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TripleDES ()));
-
SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ()));
- SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeLRW ()));
- SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeCBC ()));
}
uint64 VolumeLayoutV1Normal::GetDataOffset (uint64 volumeHostSize) const
{
return HeaderSize;
}
uint64 VolumeLayoutV1Normal::GetDataSize (uint64 volumeHostSize) const
{
return volumeHostSize - GetHeaderSize();
}
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 ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfish ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESBlowfishSerpent ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Blowfish ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Cast5 ()));
- SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new TripleDES ()));
-
SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ()));
- SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeLRW ()));
- SupportedEncryptionModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeCBC ()));
}
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;
HeaderOffset = TC_VOLUME_HEADER_OFFSET;
HeaderSize = TC_VOLUME_HEADER_SIZE;
BackupHeaderOffset = -TC_VOLUME_HEADER_GROUP_SIZE;