VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/BootEncryption.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/BootEncryption.cpp')
-rw-r--r--src/Common/BootEncryption.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp
index 0fec2878..e57a434e 100644
--- a/src/Common/BootEncryption.cpp
+++ b/src/Common/BootEncryption.cpp
@@ -2060,7 +2060,7 @@ namespace VeraCrypt
2060 } 2060 }
2061 2061
2062 2062
2063 int BootEncryption::ChangePassword (Password *oldPassword, Password *newPassword, int pkcs5) 2063 int BootEncryption::ChangePassword (Password *oldPassword, Password *newPassword, int pkcs5, int wipePassCount)
2064 { 2064 {
2065 BootEncryptionStatus encStatus = GetStatus(); 2065 BootEncryptionStatus encStatus = GetStatus();
2066 2066
@@ -2125,7 +2125,7 @@ namespace VeraCrypt
2125 UserEnrichRandomPool (ParentWindow); 2125 UserEnrichRandomPool (ParentWindow);
2126 WaitCursor(); 2126 WaitCursor();
2127 2127
2128 /* The header will be re-encrypted PRAND_DISK_WIPE_PASSES times to prevent adversaries from using 2128 /* The header will be re-encrypted wipePassCount times to prevent adversaries from using
2129 techniques such as magnetic force microscopy or magnetic force scanning tunnelling microscopy 2129 techniques such as magnetic force microscopy or magnetic force scanning tunnelling microscopy
2130 to recover the overwritten header. According to Peter Gutmann, data should be overwritten 22 2130 to recover the overwritten header. According to Peter Gutmann, data should be overwritten 22
2131 times (ideally, 35 times) using non-random patterns and pseudorandom data. However, as users might 2131 times (ideally, 35 times) using non-random patterns and pseudorandom data. However, as users might
@@ -2145,7 +2145,7 @@ namespace VeraCrypt
2145 BOOL backupHeader = FALSE; 2145 BOOL backupHeader = FALSE;
2146 while (TRUE) 2146 while (TRUE)
2147 { 2147 {
2148 for (int wipePass = 0; wipePass < PRAND_DISK_WIPE_PASSES; wipePass++) 2148 for (int wipePass = 0; wipePass < wipePassCount; wipePass++)
2149 { 2149 {
2150 PCRYPTO_INFO tmpCryptoInfo = NULL; 2150 PCRYPTO_INFO tmpCryptoInfo = NULL;
2151 2151
@@ -2164,7 +2164,7 @@ namespace VeraCrypt
2164 cryptoInfo->RequiredProgramVersion, 2164 cryptoInfo->RequiredProgramVersion,
2165 cryptoInfo->HeaderFlags | TC_HEADER_FLAG_ENCRYPTED_SYSTEM, 2165 cryptoInfo->HeaderFlags | TC_HEADER_FLAG_ENCRYPTED_SYSTEM,
2166 cryptoInfo->SectorSize, 2166 cryptoInfo->SectorSize,
2167 wipePass < PRAND_DISK_WIPE_PASSES - 1); 2167 wipePass < wipePassCount - 1);
2168 2168
2169 if (tmpCryptoInfo) 2169 if (tmpCryptoInfo)
2170 crypto_close (tmpCryptoInfo); 2170 crypto_close (tmpCryptoInfo);