mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Add option in select the number of passes for volume header over-writing. By default, it is set to 3 but it can be increased to 256 passes (which can lead to a delay of many hours for a single password change operation).
This commit is contained in:
@@ -2060,7 +2060,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
|
||||
int BootEncryption::ChangePassword (Password *oldPassword, Password *newPassword, int pkcs5)
|
||||
int BootEncryption::ChangePassword (Password *oldPassword, Password *newPassword, int pkcs5, int wipePassCount)
|
||||
{
|
||||
BootEncryptionStatus encStatus = GetStatus();
|
||||
|
||||
@@ -2125,7 +2125,7 @@ namespace VeraCrypt
|
||||
UserEnrichRandomPool (ParentWindow);
|
||||
WaitCursor();
|
||||
|
||||
/* The header will be re-encrypted PRAND_DISK_WIPE_PASSES times to prevent adversaries from using
|
||||
/* The header will be re-encrypted wipePassCount times to prevent adversaries from using
|
||||
techniques such as magnetic force microscopy or magnetic force scanning tunnelling microscopy
|
||||
to recover the overwritten header. According to Peter Gutmann, data should be overwritten 22
|
||||
times (ideally, 35 times) using non-random patterns and pseudorandom data. However, as users might
|
||||
@@ -2145,7 +2145,7 @@ namespace VeraCrypt
|
||||
BOOL backupHeader = FALSE;
|
||||
while (TRUE)
|
||||
{
|
||||
for (int wipePass = 0; wipePass < PRAND_DISK_WIPE_PASSES; wipePass++)
|
||||
for (int wipePass = 0; wipePass < wipePassCount; wipePass++)
|
||||
{
|
||||
PCRYPTO_INFO tmpCryptoInfo = NULL;
|
||||
|
||||
@@ -2164,7 +2164,7 @@ namespace VeraCrypt
|
||||
cryptoInfo->RequiredProgramVersion,
|
||||
cryptoInfo->HeaderFlags | TC_HEADER_FLAG_ENCRYPTED_SYSTEM,
|
||||
cryptoInfo->SectorSize,
|
||||
wipePass < PRAND_DISK_WIPE_PASSES - 1);
|
||||
wipePass < wipePassCount - 1);
|
||||
|
||||
if (tmpCryptoInfo)
|
||||
crypto_close (tmpCryptoInfo);
|
||||
|
||||
Reference in New Issue
Block a user