VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Crypto.h')
-rw-r--r--src/Common/Crypto.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h
index 4f47ec04..f183a436 100644
--- a/src/Common/Crypto.h
+++ b/src/Common/Crypto.h
@@ -42,9 +42,6 @@ extern "C" {
42// Size of the volume header area containing concatenated master key(s) and secondary key(s) (XTS mode) 42// Size of the volume header area containing concatenated master key(s) and secondary key(s) (XTS mode)
43#define MASTER_KEYDATA_SIZE 256 43#define MASTER_KEYDATA_SIZE 256
44 44
45// Size of the deprecated volume header item containing either an IV seed (CBC mode) or tweak key (LRW mode)
46#define LEGACY_VOL_IV_SIZE 32
47
48// The first PRF to try when mounting 45// The first PRF to try when mounting
49#define FIRST_PRF_ID 1 46#define FIRST_PRF_ID 1
50 47
@@ -55,7 +52,6 @@ enum
55#ifndef TC_WINDOWS_BOOT 52#ifndef TC_WINDOWS_BOOT
56 SHA512, 53 SHA512,
57 WHIRLPOOL, 54 WHIRLPOOL,
58 SHA1, // Deprecated/legacy
59#endif 55#endif
60 HASH_ENUM_END_ID 56 HASH_ENUM_END_ID
61}; 57};
@@ -89,12 +85,6 @@ enum
89 /* If you add/remove a mode, update the following: GetMaxPkcs5OutSize(), EAInitMode() */ 85 /* If you add/remove a mode, update the following: GetMaxPkcs5OutSize(), EAInitMode() */
90 86
91 XTS = FIRST_MODE_OF_OPERATION_ID, 87 XTS = FIRST_MODE_OF_OPERATION_ID,
92#ifndef TC_WINDOWS_BOOT
93 LRW, // Deprecated/legacy
94 CBC, // Deprecated/legacy
95 OUTER_CBC, // Deprecated/legacy
96 INNER_CBC, // Deprecated/legacy
97#endif
98 MODE_ENUM_END_ID 88 MODE_ENUM_END_ID
99}; 89};
100 90
@@ -115,12 +105,7 @@ enum
115 NONE = 0, 105 NONE = 0,
116 AES, 106 AES,
117 SERPENT, 107 SERPENT,
118 TWOFISH, 108 TWOFISH
119#ifndef TC_WINDOWS_BOOT
120 BLOWFISH, // Deprecated/legacy
121 CAST, // Deprecated/legacy
122 TRIPLEDES // Deprecated/legacy
123#endif
124}; 109};
125 110
126typedef struct 111typedef struct
@@ -184,15 +169,11 @@ typedef struct
184#endif 169#endif
185 170
186#include "Aes_hw_cpu.h" 171#include "Aes_hw_cpu.h"
187#include "Blowfish.h"
188#include "Cast.h"
189#include "Des.h"
190#include "Serpent.h" 172#include "Serpent.h"
191#include "Twofish.h" 173#include "Twofish.h"
192 174
193#include "Rmd160.h" 175#include "Rmd160.h"
194#ifndef TC_WINDOWS_BOOT 176#ifndef TC_WINDOWS_BOOT
195# include "Sha1.h"
196# include "Sha2.h" 177# include "Sha2.h"
197# include "Whirlpool.h" 178# include "Whirlpool.h"
198#endif 179#endif
@@ -313,13 +294,6 @@ void DecryptDataUnits (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo,
313void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci); 294void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci);
314void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo); 295void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo);
315void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo); 296void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo);
316#ifndef TC_NO_COMPILER_INT64
317void EncryptBufferLRW128 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
318void DecryptBufferLRW128 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
319void EncryptBufferLRW64 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
320void DecryptBufferLRW64 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
321uint64 DataUnit2LRWIndex (uint64 dataUnit, int blockSize, PCRYPTO_INFO ci);
322#endif // #ifndef TC_NO_COMPILER_INT64
323 297
324BOOL IsAesHwCpuSupported (); 298BOOL IsAesHwCpuSupported ();
325void EnableHwEncryption (BOOL enable); 299void EnableHwEncryption (BOOL enable);