From 44c9c077f379e65ef45952e1e78059cdec2fa36f Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 11 Dec 2022 13:01:14 +0100 Subject: Revert "New sys enc wizard (#957)" This reverts commit c0ff7a7c521b1d658316d9a177383ab0c403007a. --- src/Common/Dlgcode.c | 71 +++++++-------------------------------------- src/Common/Dlgcode.h | 4 --- src/Common/Language.xml | 76 +++++++++---------------------------------------- src/Common/Password.c | 12 ++++---- 4 files changed, 30 insertions(+), 133 deletions(-) (limited to 'src/Common') diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index c3430525..2c707f5d 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -2068,25 +2068,24 @@ void HandlePasswordEditWmChar (HWND hwnd, WPARAM wParam) SendMessage(hwnd, EM_HIDEBALLOONTIP, 0, 0); } - -/* Protects an input field from having its content updated by a paste action */ +// Protects an input field from having its content updated by a Paste action (call ToBootPwdField() to use this). static LRESULT CALLBACK BootPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { WNDPROC wp = (WNDPROC) GetWindowLongPtrW (hwnd, GWLP_USERDATA); - + switch (message) { case WM_PASTE: - Error ("ERROR_PASTE_ACTION", GetParent(hwnd)); return 1; - case WM_CHAR: HandlePasswordEditWmChar (hwnd, wParam); break; } + return CallWindowProcW (wp, hwnd, message, wParam, lParam); } + // Protects an input field from having its content updated by a Paste action. Used for pre-boot password // input fields (only the US keyboard layout is supported in pre-boot environment so we must prevent the // user from pasting a password typed using a non-US keyboard layout). @@ -2105,12 +2104,6 @@ void ToBootPwdField (HWND hwndDlg, UINT ctrlId) SetWindowLongPtrW (hwndCtrl, GWLP_WNDPROC, (LONG_PTR) BootPwdFieldProc); } -BOOL CheckIsIMESupported () -{ - if (himm32dll == NULL) - return FALSE; - return TRUE; -} // Ensures that a warning is displayed when user is pasting a password longer than the maximum // length which is set to 64 characters static LRESULT CALLBACK NormalPwdFieldProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -2941,7 +2934,7 @@ SelectAlgo (HWND hComboBox, int *algo_id) /* Something went wrong ; couldn't find the requested algo id so we drop back to a default */ - + *algo_id = (int) SendMessage (hComboBox, CB_GETITEMDATA, 0, 0); SendMessage (hComboBox, CB_SETCURSEL, 0, 0); @@ -5468,53 +5461,6 @@ BOOL BrowseFiles (HWND hwndDlg, char *stringId, wchar_t *lpszFileName, BOOL keep return BrowseFilesInDir (hwndDlg, stringId, NULL, lpszFileName, keepHistory, saveMode, browseFilter); } -BOOL BrowseFile (HWND hwndDlg, char *stringId, wchar_t *initialDir) -{ - OPENFILENAMEW ofn; - wchar_t file[TC_MAX_PATH] = { 0 }; - wchar_t filter[1024]; - BOOL status = FALSE; - - CoInitialize (NULL); - - ZeroMemory (&ofn, sizeof (ofn)); - - if (initialDir) - { - ofn.lpstrInitialDir = initialDir; - } - - ofn.lStructSize = sizeof (ofn); - ofn.hwndOwner = hwndDlg; - StringCbPrintfW (filter, sizeof(filter), L"%ls (*.*)%c*.*%c", - GetString ("ALL_FILES"), 0, 0); - ofn.lpstrFilter = filter; - ofn.nFilterIndex = 1; - ofn.lpstrFile = NULL; - ofn.nMaxFile = sizeof (file) / sizeof (file[0]); - ofn.lpstrTitle = GetString (stringId); - ofn.lpstrDefExt = NULL; - ofn.Flags = OFN_HIDEREADONLY - | OFN_PATHMUSTEXIST - | OFN_DONTADDTORECENT; - - SystemFileSelectorCallerThreadId = GetCurrentThreadId(); - SystemFileSelectorCallPending = TRUE; - - if (!GetOpenFileNameW (&ofn)) - goto ret; - - SystemFileSelectorCallPending = FALSE; - - status = TRUE; - -ret: - SystemFileSelectorCallPending = FALSE; - ResetCurrentDirectory(); - CoUninitialize(); - - return status; -} BOOL BrowseFilesInDir (HWND hwndDlg, char *stringId, wchar_t *initialDir, wchar_t *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter, const wchar_t *initialFileName, const wchar_t *defaultExtension) { @@ -10036,6 +9982,8 @@ BOOL PrintHardCopyTextUTF16 (wchar_t *text, wchar_t *title, size_t textByteLen) return TRUE; } + + BOOL IsNonInstallMode () { HKEY hkey, hkeybis; @@ -10134,6 +10082,7 @@ BOOL IsNonInstallMode () return TRUE; } + LRESULT SetCheckBox (HWND hwndDlg, int dlgItem, BOOL state) { return SendDlgItemMessage (hwndDlg, dlgItem, BM_SETCHECK, state ? BST_CHECKED : BST_UNCHECKED, 0); @@ -11674,7 +11623,7 @@ BYTE *MapResource (wchar_t *resourceType, int resourceId, PDWORD size) { HGLOBAL hResL; HRSRC hRes; - HINSTANCE hResInst = NULL; + HINSTANCE hResInst = NULL; #ifdef SETUP_DLL // In case we're being called from the SetupDLL project, FindResource() @@ -11686,7 +11635,7 @@ BYTE *MapResource (wchar_t *resourceType, int resourceId, PDWORD size) hRes = FindResource (hResInst, MAKEINTRESOURCE(resourceId), resourceType); hResL = LoadResource (hResInst, hRes); - + if (size != NULL) *size = SizeofResource (hResInst, hRes); diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index d9bc3374..362b2d6d 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h @@ -282,9 +282,6 @@ typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)( #define ISO_BURNER_TOOL L"isoburn.exe" #define PRINT_TOOL L"notepad.exe" - -BOOL CheckIsIMESupported (); - void InitGlobalLocks (); void FinalizeGlobalLocks (); void cleanup ( void ); @@ -377,7 +374,6 @@ BOOL CALLBACK CipherTestDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , void ResetCipherTest ( HWND hwndDlg , int idTestCipher ); void ResetCurrentDirectory (); BOOL BrowseFiles (HWND hwndDlg, char *stringId, wchar_t *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter); -BOOL BrowseFile (HWND hwndDlg, char *stringId, wchar_t *initialDir); BOOL BrowseDirectories (HWND hWnd, char *lpszTitle, wchar_t *dirName); void handleError ( HWND hwndDlg , int code, const char* srcPos ); BOOL CheckFileStreamWriteErrors (HWND hwndDlg, FILE *file, const wchar_t *fileName); diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 9ac6ce1b..e4ceac7a 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -6,7 +6,6 @@ - Cancel Install &for all users Bro&wse... @@ -59,7 +58,7 @@ Open Outer Volume &Pause Use P&IM - Modify PIM + Use PIM Quick Format &Display password &Display password @@ -71,7 +70,7 @@ Encrypt the system partition or entire system drive Encrypt the Windows system partition Encrypt the whole drive - VeraCrypt Wizard + VeraCrypt Volume Creation Wizard Cluster IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click Next to continue. &Confirm: @@ -101,7 +100,7 @@ Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system. Select this option to encrypt the partition where the currently running Windows operating system is installed. Volume Label in Windows: - Wipe Mode + Wipe mode: Close Allow pre-boot &authentication to be bypassed by pressing the Esc key (enables boot manager) Do nothing @@ -489,7 +488,7 @@ The entire selected partition and all data stored on it will be encrypted in place. If the partition is empty, you should choose the other option (the volume will be created much faster). Note: &Resume - &Cancel + &Defer &Start &Continue &Format @@ -1107,7 +1106,7 @@ Keyfiles are currently not supported for system encryption. Warning: VeraCrypt could not restore the original keyboard layout. This may cause you to enter a password incorrectly. Error: Cannot set the keyboard layout for VeraCrypt to the standard US keyboard layout.\n\nNote that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available. Therefore, the password must always be typed using the standard US keyboard layout. - It is not possible to type characters by pressing keys while the right Alt key is held down. However, you can type most of such characters by pressing appropriate keys while the Shift key is held down. + As VeraCrypt temporarily changed the keyboard layout to the standard US keyboard layout, it is not possible to type characters by pressing keys while the right Alt key is held down. However, you can type most of such characters by pressing appropriate keys while the Shift key is held down. VeraCrypt prevented change of keyboard layout. Note: The password will need to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available. Therefore, the password must always be typed using the standard US keyboard layout. However, it is important to note that you do NOT need a real US keyboard. VeraCrypt automatically ensures that you can safely type the password (right now and in the pre-boot environment) even if you do NOT have a real US keyboard. Before you can encrypt the partition/drive, you must create a VeraCrypt Rescue Disk (VRD), which serves the following purposes:\n\n- If the VeraCrypt Boot Loader, master key, or other critical data gets damaged, the VRD allows you to restore it (note, however, that you will still have to enter the correct password then).\n\n- If Windows gets damaged and cannot start, the VRD allows you to permanently decrypt the partition/drive before Windows starts.\n\n- The VRD will contain a backup of the present content of the first drive track (which typically contains a system loader or boot manager) and will allow you to restore it if necessary.\n\nThe VeraCrypt Rescue Disk ISO image will be created in the location specified below. @@ -1155,7 +1154,7 @@ If the currently running operating system is installed on the boot partition, then, after you encrypt it, you will need to enter the correct password even if you want to start any other unencrypted Windows system(s) (as they will share a single encrypted Windows boot loader/manager).\n\nIn contrast, if the currently running operating system is not installed on the boot partition (or if the Windows boot loader/manager is not used by any other system), then, after you encrypt this system, you will not need to enter the correct password to boot the other unencrypted system(s) -- you will only need to press the Esc key to start the unencrypted system (if there are multiple unencrypted systems, you will also need to choose which system to start in the VeraCrypt Boot Manager menu).\n\nNote: Typically, the earliest installed Windows system is installed on the boot partition. Encryption of Host Protected Area At the end of many drives, there is an area that is normally hidden from the operating system (such areas are usually referred to as Host Protected Areas). However, some programs can read and write data from/to such areas.\n\nWARNING: Some computer manufacturers may use such areas to store tools and data for RAID, system recovery, system setup, diagnostic, or other purposes. If such tools or data must be accessible before booting, the hidden area should NOT be encrypted (choose 'No' above).\n\nDo you want VeraCrypt to detect and encrypt such a hidden area (if any) at the end of the system drive? - Encrypt Windows Drive (%c:) + Type of System Encryption Select this option if you merely want to encrypt the system partition or the entire system drive. It may happen that you are forced by somebody to decrypt the operating system. There are many situations where you cannot refuse to do so (for example, due to extortion). If you select this option, you will create a hidden operating system whose existence should be impossible to prove (provided that certain guidelines are followed). Thus, you will not have to decrypt or reveal the password to the hidden operating system. For a detailed explanation, please click the link below. It may happen that you are forced by somebody to decrypt the operating system. There are many situations where you cannot refuse to do so (for example, due to extortion).\n\nUsing this wizard, you can create a hidden operating system whose existence should be impossible to prove (provided that certain guidelines are followed). Thus, you will not have to decrypt or reveal the password for the hidden operating system. @@ -1174,7 +1173,7 @@ Please follow these steps:\n\n1) Connect a removable drive, such as a USB flash drive, to your computer now.\n\n2) Copy the VeraCrypt Rescue Disk image file (%s) to the removable drive.\n\nIn case you need to use the VeraCrypt Rescue Disk in the future, you will be able to connect your removable drive (containing the VeraCrypt Rescue Disk image) to a computer with a CD/DVD burner and create a bootable VeraCrypt Rescue Disk by burning the image to a CD or DVD. IMPORTANT: Note that the VeraCrypt Rescue Disk image file must be written to the CD/DVD as an ISO disk image (not as an individual file). Rescue Disk Recording Rescue Disk Created - System Encryption Test + System Encryption Pretest Rescue Disk Verified \nThe VeraCrypt Rescue Disk has been successfully verified. Please remove it from the drive now and store it in a safe place.\n\nClick Next to continue. WARNING: During the next steps, the VeraCrypt Rescue Disk must not be in the drive. Otherwise, it will not be possible to complete the steps correctly.\n\nPlease remove it from the drive now and store it in a safe place. Then click OK. @@ -1184,9 +1183,9 @@ What to Do If Windows Cannot Start\n------------------------------------------------\n\nNote: These instructions are valid only if you have not started encrypting.\n\n- If Windows does not start after you enter the correct password (or if you repeatedly enter the correct password but VeraCrypt says that the password is incorrect), do not panic. Restart (power off and on) the computer, and in the VeraCrypt Boot Loader screen, press the Esc key on your keyboard (and if you have multiple systems, choose which to start). Then Windows should start (provided that it is not encrypted) and VeraCrypt will automatically ask whether you want to uninstall the pre-boot authentication component. Note that the previous steps do NOT work if the system partition/drive is encrypted (nobody can start Windows or access encrypted data on the drive without the correct password even if he or she follows the previous steps).\n\n - If the previous steps do not help or if the VeraCrypt Boot Loader screen does not appear (before Windows starts), insert the VeraCrypt Rescue Disk into your CD/DVD drive and restart your computer. If the VeraCrypt Rescue Disk screen does not appear (or if you do not see the 'Repair Options' item in the 'Keyboard Controls' section of the VeraCrypt Rescue Disk screen), it is possible that your BIOS is configured to attempt to boot from hard drives before CD/DVD drives. If that is the case, restart your computer, press F2 or Delete (as soon as you see a BIOS start-up screen), and wait until a BIOS configuration screen appears. If no BIOS configuration screen appears, restart (reset) the computer again and start pressing F2 or Delete repeatedly as soon as you restart (reset) the computer. When a BIOS configuration screen appears, configure your BIOS to boot from the CD/DVD drive first (for information on how to do so, please refer to the documentation for your BIOS/motherboard or contact your computer vendor's technical support team for assistance). Then restart your computer. The VeraCrypt Rescue Disk screen should appear now. In the VeraCrypt Rescue Disk screen, select 'Repair Options' by pressing F8 on your keyboard. From the 'Repair Options' menu, select 'Restore original system loader'. Then remove the Rescue Disk from your CD/DVD drive and restart your computer. Windows should start normally (provided that it is not encrypted).\n\n Note that the previous steps do NOT work if the system partition/drive is encrypted (nobody can start Windows or access encrypted data on the drive without the correct password even if he or she follows the previous steps).\n\n\nNote that even if you lose your VeraCrypt Rescue Disk and an attacker finds it, he or she will NOT be able to decrypt the system partition or drive without the correct password. - Pretest Successfully Completed - If the encryption is interrupted you can resume it restarting VeraCrypt and selecting 'System' > 'Resume Interrupted Process'\n\nPlease make sure, that your device does not run out of power during the encryption process. - Make sure that your device does not run out of power.\nIf the encryption is interrupted you can resume it restarting VeraCrypt and selecting 'System' > 'Resume Interrupted Process'. + Pretest Completed + The pretest has been successfully completed.\n\nWARNING: Please note that if power supply is suddenly interrupted while encrypting existing data in place, or when the operating system crashes due to a software error or hardware malfunction while VeraCrypt is encrypting existing data in place, portions of the data will be corrupted or lost. Therefore, before you start encrypting, please make sure that you have backup copies of the files you want to encrypt. If you do not, please back up the files now (you can click Defer, back up the files, then run VeraCrypt again anytime, and select 'System' > 'Resume Interrupted Process' to start encrypting).\n\nWhen ready, click Encrypt to start encrypting. + You can click Pause or Defer anytime to interrupt the process of encryption or decryption, exit this wizard, restart or shut down your computer, and then resume the process, which will continue from the point it was stopped. To prevent slowdown when the system or applications write or read data from the system drive, VeraCrypt automatically waits until the data is written or read (see Status above) and then automatically continues encrypting or decrypting. \n\nYou can click Pause or Defer anytime to interrupt the process of encryption, exit this wizard, restart or shut down your computer, and then resume the process, which will continue from the point it was stopped. Note that the volume cannot be mounted until it has been fully encrypted. \n\nYou can click Pause or Defer anytime to interrupt the process of decryption, exit this wizard, restart or shut down the computer, and then resume the process, which will continue from the point where it was stopped. Note that the volume cannot be mounted until it has been fully decrypted. Hidden System Started @@ -1308,7 +1307,7 @@ Warning: VeraCrypt volume auto-dismounted Before you physically remove or turn off a device containing a mounted volume, you should always dismount the volume in VeraCrypt first.\n\nUnexpected spontaneous dismount is usually caused by an intermittently failing cable, drive (enclosure), etc. This volume was created with TrueCrypt %x.%x but VeraCrypt supports only TrueCrypt volumes created with TrueCrypt 6.x/7.x series - Start pretest + Test Keyfile Backspace Tab @@ -1401,9 +1400,9 @@ Time Iterations Pre-Boot - \n\nIf Windows gets damaged and cannot start, the VeraCrypt Rescue Disk allows you to permanently decrypt the partition. Note, however, that you will still have to enter the correct password then!\n\n\nWARNING: If you have already created a VeraCrypt Rescue Disk in the past, it cannot be reused for this encryption! Every time you use this encryption tool, you must create and securely store a new VeraCrypt Rescue Disk for it even if you use the same password. + Before you can encrypt the partition, you must create a VeraCrypt Rescue Disk (VRD), which serves the following purposes:\n\n- If the VeraCrypt Boot Loader, master key, or other critical data gets damaged, the VRD allows you to restore it (note, however, that you will still have to enter the correct password then).\n\n- If Windows gets damaged and cannot start, the VRD allows you to permanently decrypt the partition before Windows starts.\n\n- The VRD will contain a backup of the present EFI boot loader and will allow you to restore it if necessary.\n\nThe VeraCrypt Rescue Disk ZIP image will be created in the location specified below. The Rescue Disk ZIP image has been created and stored in this file:\n%s\n\nNow you need to extract it to a USB stick that is formatted as FAT/FAT32.\n\n%lsAfter you create the Rescue Disk, click Next to verify that it has been correctly created. - The Rescue Disk ZIP image has been created and stored in this file:\n%s\n\nNow you should either extract the image to a USB stick that is formatted as FAT/FAT32 or move it to a safe location for later use.\n\n\n\n%lsClick Next to continue. + The Rescue Disk ZIP image has been created and stored in this file:\n%s\n\nNow you should either extract the image to a USB stick that is formatted as FAT/FAT32 or move it to a safe location for later use.\n\n%lsClick Next to continue. IMPORTANT: Note that the zip file must be extracted directly to the root of the USB stick. For example, if the drive letter of the USB stick is E: then extracting the zip file should create a folder E:\\EFI on the USB stick.\n\n Cannot verify that the Rescue Disk has been correctly extracted.\n\nIf you have extracted the Rescue Disk, please eject and reinsert the USB stick; then click Next to try again. If this does not help, please try another USB stick and/or another ZIP software.\n\nIf you have not extracted the Rescue Disk yet, please do so, and then click Next.\n\nIf you attempted to verify a VeraCrypt Rescue Disk created before you started this wizard, please note that such Rescue Disk cannot be used, because it was created for a different master key. You need to extract the newly generated Rescue Disk ZIP image. Cannot verify that the Rescue Disk has been correctly extracted.\n\nIf you have extracted the Rescue Disk image to a USB stick, please eject it and reinsert it; then try again. If this does not help, please try other ZIP software and/or medium.\n\nIf you attempted to verify a VeraCrypt Rescue Disk created for a different master key, password, salt, etc., please note that such Rescue Disk will always fail this verification. To create a new Rescue Disk fully compatible with your current configuration, select 'System' > 'Create Rescue Disk'. @@ -1426,7 +1425,7 @@ Password already reached its maximum length of %d characters.\nNo additional character is allowed. Select the language to use during the installation: ERROR: The size of the file container is larger than the available free space on disk. - Allow Windows Disk Defragmenter to defragment non-system partition/drive + Allow Windows Disk Defragmenter to defragment non-system partition/drive WARNING: Defragmenting non-system partitions/drives may leak metadata about their content or cause issues with hidden volumes they may contain.\n\nContinue? Virtual Device The selected mounted volume is not associated with its drive letter in Windows and so it can not be opened in Windows Explorer. @@ -1569,53 +1568,6 @@ VeraCrypt was previously installed using an MSI package and so it can't be updated using the standard installer.\n\nPlease use the MSI package to update your VeraCrypt installation. Use all available free space VeraCrypt cannot be upgraded because the system partition/drive was encrypted using an algorithm that is not supported anymore.\nPlease decrypt your system before upgrading VeraCrypt and then encrypt it again. - The Rescue Disk was already created depending on the selected options. In order to prevent incompatibility, you have to click 'cancel' and restart the system encryption process, if you want to modify any configuration. - AES is secure according to NIST - Backup Rescue Disk - Store your password in a safe location. You can not recover your data without your password.\nThat is why VeraCrypt is considered to be secure. - Make sure that the rescue file is stored on an external medium. This could be a flash drive, an external hard drive or even a cloud storage.\nYour rescue file is located here: - Before you start encrypting your system, it is always a good idea to backup your personal data on an external drive for the unlikely case that the encryption process fails. - The VeraCrypt Rescue Disk ZIP image will be created by clicking the Next button in location specified below. - I remember my Password - I stored my rescue file - I considered doing a backup of my personal Data - Checklist - Before clicking 'Next' - Some tests have to be done now to verify that everything works correctly.\n\nFor this test, your computer has to be restarted. Then you will have to enter your password in the VeraCrypt Boot Loader screen that will appear before Windows starts. After Windows starts, VeraCrypt is started automatically and you will be informed about the result of this pretest.\n\n\nThe following device will be modified: Drive %c: - Make sure that your device does not run out of power.\nIf the decryption is interrupted you can resume it restarting VeraCrypt and selecting 'System' > 'Resume Interrupted Process'. - Advanced features - very weak - weak - medium - strong - very strong - Password strength: - You might consider to write the password down somewhere safe. Please note, that the field to repeat your password is greyed out until your password has the minimum required strength. - AES is secure accoring to the National Institute of Standards and Technology (NIST) and the privacy and security research community. - SHA-512 is secure accoring to the National Institute of Standards and Technology (NIST) and the privacy and security research community. - Choose Password - Warning: Error occured while writing translated password! Please try again. If this error happens again, change keyboard layout to US keyboard layout manually. - Warning: Error occured while translating password!\nPlease type password again and try. If this error happens again, switch keyboard layout to US keyboard layout manually. - Your system does not support the standard US-Keyboard layout. Please make sure the layout is available. For further help, please visit: https://support.microsoft.com/en-us/windows/manage-the-input-and-display-language-settings-in-windows-10-12a10cb4-8626-9b77-0ccb-5013e0c7c7a2 - Pasting text is disabled. Please type your password. - Passwords are not identical! Please type identic passwords in both fields! - This assistant will help you encrypt your drive (%c:) - A windows password can easily be circumvented by bad actors with physical access to your device. Drive encryption helps to secure your data from beeing accessed by bad actors. VeraCrypt Drive Encryption will keep them out by protecting your data with an additional password. - Activate hidden OS here. - Most experts agree that the following preselected options are secure. Only change them if you know what you are doing. - A Personal Iterations Multiplier (PIM) allows you to set the number of password hash iterations. This provides more flexibility for adjusting the desired security level while also controling the performance of the mount/boot operation. - Overrides your data before the encryption. This prevents possible data recovery. Wipe is not needed under normal circumstances. - Before encrypting VeraCrypt will verify that everything is working correctly.\n\nVeraCrypt will run some tests, restart your computer and you have to enter you password before windows starts. - If you click cancel now, no changes will be made your system. - Error occured while getting path to executable file. - Error occured while getting the password. Please try again. - Error occured while getting the keyboard state. - There is no translation for that key you just pressed! - Dead keys will not reproduce dead char in this case because your password need to be translated to US keyboard layout so you can type your password in pre-boot environment. - I made sure that my device will not run out of power during the encryption process. - Open path - Rescue Disk Path - If you want to cancel the encryption wizard, please click on cancel. In this case no changes will be made to your computer. - Wiping can take a long time (Up to hours). Wiping is not recommended if you have an SSD Drive. diff --git a/src/Common/Password.c b/src/Common/Password.c index 3c9faa82..4caf3a21 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -39,7 +39,6 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, char szTmp1Utf8[MAX_PASSWORD + 1]; char szTmp2Utf8[MAX_PASSWORD + 1]; int k = GetWindowTextLength (hPassword); - int j = GetWindowTextLength (hVerify); BOOL bEnable = FALSE; int utf8Len1, utf8Len2; @@ -52,12 +51,7 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword, utf8Len2 = WideCharToMultiByte (CP_UTF8, 0, szTmp2, -1, szTmp2Utf8, MAX_PASSWORD + 1, NULL, NULL); if (wcscmp (szTmp1, szTmp2) != 0) - { bEnable = FALSE; - if(k > 0 && j == k) - Warning ("WARNING_PASSWORD_NOT_IDENTICAL", hwndDlg); - - } else if (utf8Len1 <= 0) bEnable = FALSE; else @@ -151,6 +145,11 @@ BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pim Error (bootPimCondition? "BOOT_PIM_REQUIRE_LONG_PASSWORD": "PIM_REQUIRE_LONG_PASSWORD", hwndDlg); return FALSE; } + +#ifndef _DEBUG + if (!bSkipPasswordWarning && (MessageBoxW (hwndDlg, GetString ("PASSWORD_LENGTH_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)) + return FALSE; +#endif } #ifndef _DEBUG else if (bCustomPimSmall) @@ -564,3 +563,4 @@ error: return nStatus; } + -- cgit v1.2.3