mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Remove trailing whitespace
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
Legal Notice: Some portions of the source code contained in this file were
|
||||
derived from the source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
|
||||
derived from the source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
|
||||
governed by the TrueCrypt License 3.0, also from the source code of
|
||||
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
|
||||
and which is governed by the 'License Agreement for Encryption for the Masses'
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and which is governed by the 'License Agreement for Encryption for the Masses'
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
@@ -129,7 +129,7 @@ int CipherInit (int cipher, unsigned char *key, unsigned __int8 *ks)
|
||||
case SERPENT:
|
||||
serpent_set_key (key, ks);
|
||||
break;
|
||||
|
||||
|
||||
case TWOFISH:
|
||||
twofish_set_key ((TwofishInstance *)ks, (const u4byte *)key);
|
||||
break;
|
||||
@@ -146,7 +146,7 @@ void EncipherBlock(int cipher, void *data, void *ks)
|
||||
{
|
||||
switch (cipher)
|
||||
{
|
||||
case AES:
|
||||
case AES:
|
||||
// In 32-bit kernel mode, due to KeSaveFloatingPointState() overhead, AES instructions can be used only when processing the whole data unit.
|
||||
#if (defined (_WIN64) || !defined (TC_WINDOWS_DRIVER)) && !defined (TC_WINDOWS_BOOT)
|
||||
if (IsAesHwCpuSupported())
|
||||
@@ -399,11 +399,11 @@ BOOL EAInitMode (PCRYPTO_INFO ci)
|
||||
/* Note: XTS mode could potentially be initialized with a weak key causing all blocks in one data unit
|
||||
on the volume to be tweaked with zero tweaks (i.e. 512 bytes of the volume would be encrypted in ECB
|
||||
mode). However, to create a TrueCrypt volume with such a weak key, each human being on Earth would have
|
||||
to create approximately 11,378,125,361,078,862 (about eleven quadrillion) TrueCrypt volumes (provided
|
||||
to create approximately 11,378,125,361,078,862 (about eleven quadrillion) TrueCrypt volumes (provided
|
||||
that the size of each of the volumes is 1024 terabytes). */
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
}
|
||||
@@ -488,7 +488,7 @@ int EAGetNextMode (int ea, int previousModeId)
|
||||
int c, i = 0;
|
||||
while (c = EncryptionAlgorithms[ea].Modes[i++])
|
||||
{
|
||||
if (c == previousModeId)
|
||||
if (c == previousModeId)
|
||||
return EncryptionAlgorithms[ea].Modes[i];
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ int EAGetNextCipher (int ea, int previousCipherId)
|
||||
int c, i = 0;
|
||||
while (c = EncryptionAlgorithms[ea].Ciphers[i++])
|
||||
{
|
||||
if (c == previousCipherId)
|
||||
if (c == previousCipherId)
|
||||
return EncryptionAlgorithms[ea].Ciphers[i];
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ int EAGetPreviousCipher (int ea, int previousCipherId)
|
||||
|
||||
while (c = EncryptionAlgorithms[ea].Ciphers[i++])
|
||||
{
|
||||
if (c == previousCipherId)
|
||||
if (c == previousCipherId)
|
||||
return EncryptionAlgorithms[ea].Ciphers[i - 2];
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ void crypto_close (PCRYPTO_INFO cryptoInfo)
|
||||
// EncryptBuffer
|
||||
//
|
||||
// buf: data to be encrypted; the start of the buffer is assumed to be aligned with the start of a data unit.
|
||||
// len: number of bytes to encrypt; must be divisible by the block size (for cascaded ciphers, divisible
|
||||
// len: number of bytes to encrypt; must be divisible by the block size (for cascaded ciphers, divisible
|
||||
// by the largest block size used within the cascade)
|
||||
void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo)
|
||||
{
|
||||
@@ -808,7 +808,7 @@ void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
}
|
||||
@@ -850,7 +850,7 @@ void EncryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *s
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
}
|
||||
@@ -859,7 +859,7 @@ void EncryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *s
|
||||
// DecryptBuffer
|
||||
//
|
||||
// buf: data to be decrypted; the start of the buffer is assumed to be aligned with the start of a data unit.
|
||||
// len: number of bytes to decrypt; must be divisible by the block size (for cascaded ciphers, divisible
|
||||
// len: number of bytes to decrypt; must be divisible by the block size (for cascaded ciphers, divisible
|
||||
// by the largest block size used within the cascade)
|
||||
void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo)
|
||||
{
|
||||
@@ -890,7 +890,7 @@ void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
}
|
||||
@@ -935,7 +935,7 @@ void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *s
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
}
|
||||
@@ -955,7 +955,7 @@ void EncipherBlock(int cipher, void *data, void *ks)
|
||||
if (IsAesHwCpuSupported())
|
||||
aes_hw_cpu_encrypt ((byte *) ks, data);
|
||||
else
|
||||
aes_encrypt (data, data, ks);
|
||||
aes_encrypt (data, data, ks);
|
||||
#elif defined (TC_WINDOWS_BOOT_SERPENT)
|
||||
serpent_encrypt (data, data, ks);
|
||||
#elif defined (TC_WINDOWS_BOOT_TWOFISH)
|
||||
@@ -969,7 +969,7 @@ void DecipherBlock(int cipher, void *data, void *ks)
|
||||
if (IsAesHwCpuSupported())
|
||||
aes_hw_cpu_decrypt ((byte *) ks + sizeof (aes_encrypt_ctx) + 14 * 16, data);
|
||||
else
|
||||
aes_decrypt (data, data, (aes_decrypt_ctx *) ((byte *) ks + sizeof(aes_encrypt_ctx)));
|
||||
aes_decrypt (data, data, (aes_decrypt_ctx *) ((byte *) ks + sizeof(aes_encrypt_ctx)));
|
||||
#elif defined (TC_WINDOWS_BOOT_SERPENT)
|
||||
serpent_decrypt (data, data, ks);
|
||||
#elif defined (TC_WINDOWS_BOOT_TWOFISH)
|
||||
|
||||
Reference in New Issue
Block a user