diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-11-13 02:08:51 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-11-13 02:08:51 +0100 |
commit | cb973512503bd7f0ea525db89cb20fa83b25f216 (patch) | |
tree | ee65a77befed695711b0f380258776d23da1c603 /src/Common/Crypto.c | |
parent | ec4b44c238b47e11eee327a8dc4d74b90175eab2 (diff) | |
download | VeraCrypt-cb973512503bd7f0ea525db89cb20fa83b25f216.tar.gz VeraCrypt-cb973512503bd7f0ea525db89cb20fa83b25f216.zip |
Windows: Remove support for 32-bit driver code. Set build target as Windows 10. Simplify code and fix all warnings in driver.
Diffstat (limited to 'src/Common/Crypto.c')
-rw-r--r-- | src/Common/Crypto.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c index 9c4ee5a3..5856df48 100644 --- a/src/Common/Crypto.c +++ b/src/Common/Crypto.c @@ -659,8 +659,8 @@ int EAGetNextMode (int ea, int previousModeId) return 0; } -// Returns the name of the mode of operation of the whole EA -wchar_t *EAGetModeName (int ea, int mode, BOOL capitalLetters) +// Returns the name of the mode of operation +const wchar_t *EAGetModeName (int mode) { switch (mode) { @@ -669,7 +669,7 @@ wchar_t *EAGetModeName (int ea, int mode, BOOL capitalLetters) return L"XTS"; } - return L"[unknown]"; + return L"[UNKNOWN]"; } #endif // TC_WINDOWS_BOOT @@ -891,7 +891,7 @@ PCRYPTO_INFO crypto_open () } #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) { keyInfo->keyLength = nUserKeyLen; burn (keyInfo->userKey, sizeof (keyInfo->userKey)); @@ -1239,9 +1239,11 @@ static BOOL RamEncryptionEnabled = FALSE; BOOL IsCpuRngSupported () { +#ifndef _M_ARM64 if (HasRDSEED() || HasRDRAND()) return TRUE; else +#endif return FALSE; } @@ -1313,7 +1315,7 @@ uint8 GetRandomIndex (ChaCha20RngCtx* pCtx, uint8 elementsCount) return index; } -#if defined(_WIN64) && !defined (_UEFI) +#if !defined (_UEFI) /* declaration of variables and functions used for RAM encryption on 64-bit build */ static uint8* pbKeyDerivationArea = NULL; static ULONG cbKeyDerivationArea = 0; |