From a5c1978eefe2fd0dbf1ab6b7cdcb019a9b913a40 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 20 Jul 2014 12:30:58 +0200 Subject: Remove remaining legacy cryptographic algorithms that are never used by VeraCrypt. --- src/Volume/Cipher.cpp | 73 --------------------------------------------------- 1 file changed, 73 deletions(-) (limited to 'src/Volume/Cipher.cpp') 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 (new CipherAES ())); l.push_back (shared_ptr (new CipherSerpent ())); l.push_back (shared_ptr (new CipherTwofish ())); - l.push_back (shared_ptr (new CipherBlowfish ())); - l.push_back (shared_ptr (new CipherCast5 ())); - l.push_back (shared_ptr (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 (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 (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 { -- cgit v1.2.3