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.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h
index 89d22f0e..03921da3 100644
--- a/src/Common/Crypto.h
+++ b/src/Common/Crypto.h
@@ -208,9 +208,7 @@ typedef struct
# include "Camellia.h"
#if !defined (_UEFI)
# include "chachaRng.h"
-# ifdef _WIN64
# include "t1ha.h"
-# endif
#endif
#else
# include "CamelliaSmall.h"
@@ -228,9 +226,9 @@ typedef struct keyInfo_t
int noIterations; /* Number of times to iterate (PKCS-5) */
int keyLength; /* Length of the key */
uint64 dummy; /* Dummy field to ensure 16-byte alignment of this structure */
- __int8 salt[PKCS5_SALT_SIZE]; /* PKCS-5 salt */
- CRYPTOPP_ALIGN_DATA(16) __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* Concatenated master primary and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */
- CRYPTOPP_ALIGN_DATA(16) __int8 userKey[MAX_PASSWORD]; /* Password (to which keyfiles may have been applied). WITHOUT +1 for the null terminator. */
+ unsigned __int8 salt[PKCS5_SALT_SIZE]; /* PKCS-5 salt */
+ CRYPTOPP_ALIGN_DATA(16) unsigned __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* Concatenated master primary and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */
+ CRYPTOPP_ALIGN_DATA(16) unsigned __int8 userKey[MAX_PASSWORD]; /* Password (to which keyfiles may have been applied). WITHOUT +1 for the null terminator. */
} KEY_INFO, *PKEY_INFO;
#endif
@@ -309,7 +307,7 @@ typedef struct BOOT_CRYPTO_HEADER_t
PCRYPTO_INFO crypto_open (void);
#ifndef TC_WINDOWS_BOOT
-void crypto_loadkey (PKEY_INFO keyInfo, char *lpszUserKey, int nUserKeyLen);
+void crypto_loadkey (PKEY_INFO keyInfo, unsigned char *lpszUserKey, int nUserKeyLen);
void crypto_eraseKeys (PCRYPTO_INFO cryptoInfo);
#endif
void crypto_close (PCRYPTO_INFO cryptoInfo);
@@ -348,7 +346,7 @@ int EAGetKeySize (int ea);
int EAGetFirstMode (int ea);
int EAGetNextMode (int ea, int previousModeId);
#ifndef TC_WINDOWS_BOOT
-wchar_t * EAGetModeName (int ea, int mode, BOOL capitalLetters);
+const wchar_t * EAGetModeName (int mode);
#endif
int EAGetKeyScheduleSize (int ea);
int EAGetLargestKey ();
@@ -386,7 +384,7 @@ void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *s
void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo);
void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo);
-#if defined(_WIN64) && !defined (_UEFI)
+#if !defined (TC_WINDOWS_BOOT) && !defined (_UEFI)
BOOL InitializeSecurityParameters(GetRandSeedFn rngCallback);
void ClearSecurityParameters();
#ifdef TC_WINDOWS_DRIVER