VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Volumes.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-24 17:53:44 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-24 17:53:44 +0200
commitd317fb2f19850ac18ab067bb48158e8c0c0b7e9f (patch)
treec83f6cb2b92000481d423768aad55ce5e93d0da4 /src/Common/Volumes.c
parent4dfe046390d467dd8572b9b4876a8e823098d3e2 (diff)
downloadVeraCrypt-d317fb2f19850ac18ab067bb48158e8c0c0b7e9f.tar.gz
VeraCrypt-d317fb2f19850ac18ab067bb48158e8c0c0b7e9f.zip
Windows: Exclude Argon2 for System Encryption and from automatic detection
Bootloader doesn't support Argon2 yet. We don't want to add overhead to automatic detection for now.
Diffstat (limited to 'src/Common/Volumes.c')
-rw-r--r--src/Common/Volumes.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c
index a57a8319..0551f0b9 100644
--- a/src/Common/Volumes.c
+++ b/src/Common/Volumes.c
@@ -308,6 +308,14 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
// if a PRF is specified, we skip all other PRFs
if (selected_pkcs5_prf != 0 && enqPkcs5Prf != selected_pkcs5_prf)
continue;
+
+ // we don't support Argon2 in pre-boot authentication
+ if (bBoot && (enqPkcs5Prf == ARGON2))
+ continue;
+
+ // For now, we don't included Argon2 in automatic detection
+ if (selected_pkcs5_prf == 0 && enqPkcs5Prf == ARGON2)
+ continue;
#if !defined(_UEFI)
if ((selected_pkcs5_prf == 0) && (encryptionThreadCount > 1))
@@ -923,6 +931,13 @@ int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, char *header, int ea,
if (pim < 0)
pim = 0;
+ // we don't support Argon2 in pre-boot authentication
+ if (bBoot && (pkcs5_prf == ARGON2))
+ {
+ crypto_close (cryptoInfo);
+ return ERR_PARAMETER_INCORRECT;
+ }
+
memset (header, 0, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
#if !defined(_UEFI)
VirtualLock (&keyInfo, sizeof (keyInfo));