VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/Cipher.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/Cipher.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/Cipher.cpp')
-rw-r--r--src/Volume/Cipher.cpp73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp
index a69f15d9..5708e6e0 100644
--- a/src/Volume/Cipher.cpp
+++ b/src/Volume/Cipher.cpp
@@ -9,9 +9,6 @@
#include "Platform/Platform.h"
#include "Cipher.h"
#include "Crypto/Aes.h"
-#include "Crypto/Blowfish.h"
-#include "Crypto/Des.h"
-#include "Crypto/Cast.h"
#include "Crypto/Serpent.h"
#include "Crypto/Twofish.h"
@@ -76,9 +73,6 @@ namespace VeraCrypt
l.push_back (shared_ptr <Cipher> (new CipherAES ()));
l.push_back (shared_ptr <Cipher> (new CipherSerpent ()));
l.push_back (shared_ptr <Cipher> (new CipherTwofish ()));
- l.push_back (shared_ptr <Cipher> (new CipherBlowfish ()));
- l.push_back (shared_ptr <Cipher> (new CipherCast5 ()));
- l.push_back (shared_ptr <Cipher> (new CipherTripleDES ()));
return l;
}
@@ -199,51 +193,6 @@ namespace VeraCrypt
throw CipherInitError (SRC_POS);
}
-
- // Blowfish
- void CipherBlowfish::Decrypt (byte *data) const
- {
- BlowfishEncryptLE (data, data, (BF_KEY *) ScheduledKey.Ptr(), 0);
- }
-
- void CipherBlowfish::Encrypt (byte *data) const
- {
- BlowfishEncryptLE (data, data, (BF_KEY *) ScheduledKey.Ptr(), 1);
- }
-
- size_t CipherBlowfish::GetScheduledKeySize () const
- {
- return sizeof (BF_KEY);
- }
-
- void CipherBlowfish::SetCipherKey (const byte *key)
- {
- BlowfishSetKey ((BF_KEY *) ScheduledKey.Ptr(), static_cast<int> (GetKeySize ()), (unsigned char *) key);
- }
-
-
- // CAST5
- void CipherCast5::Decrypt (byte *data) const
- {
- Cast5Decrypt (data, data, (CAST_KEY *) ScheduledKey.Ptr());
- }
-
- void CipherCast5::Encrypt (byte *data) const
- {
- Cast5Encrypt (data, data, (CAST_KEY *) ScheduledKey.Ptr());
- }
-
- size_t CipherCast5::GetScheduledKeySize () const
- {
- return sizeof (CAST_KEY);
- }
-
- void CipherCast5::SetCipherKey (const byte *key)
- {
- Cast5SetKey ((CAST_KEY *) ScheduledKey.Ptr(), static_cast<int> (GetKeySize ()), (unsigned char *) key);
- }
-
-
// Serpent
void CipherSerpent::Decrypt (byte *data) const
{
@@ -266,28 +215,6 @@ namespace VeraCrypt
}
- // Triple-DES
- void CipherTripleDES::Decrypt (byte *data) const
- {
- TripleDesEncrypt (data, data, (TDES_KEY *) ScheduledKey.Ptr(), 0);
- }
-
- void CipherTripleDES::Encrypt (byte *data) const
- {
- TripleDesEncrypt (data, data, (TDES_KEY *) ScheduledKey.Ptr(), 1);
- }
-
- size_t CipherTripleDES::GetScheduledKeySize () const
- {
- return sizeof (TDES_KEY);
- }
-
- void CipherTripleDES::SetCipherKey (const byte *key)
- {
- TripleDesSetKey (key, GetKeySize(), (TDES_KEY *) ScheduledKey.Ptr());
- }
-
-
// Twofish
void CipherTwofish::Decrypt (byte *data) const
{