VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-06-08 01:14:57 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-06-08 01:16:34 +0200
commita7a8d57bcaaaf4e5982d2e51cd3086d34f45f780 (patch)
tree457161e7fefc61ee391ab2bd99f6f728b3b4a688 /src/Common
parent00cd134720f754f008fdc541afdd9ab70f6d11da (diff)
downloadVeraCrypt-a7a8d57bcaaaf4e5982d2e51cd3086d34f45f780.tar.gz
VeraCrypt-a7a8d57bcaaaf4e5982d2e51cd3086d34f45f780.zip
Windows: rename PIN to PIM to avoid confusion. Better error messages.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Common.rc6
-rw-r--r--src/Common/Dlgcode.c6
-rw-r--r--src/Common/Language.xml34
-rw-r--r--src/Common/Password.c4
-rw-r--r--src/Common/Password.h6
-rw-r--r--src/Common/Pkcs5.c2
-rw-r--r--src/Common/Resource.h6
7 files changed, 32 insertions, 32 deletions
diff --git a/src/Common/Common.rc b/src/Common/Common.rc
index f18c0745..7df10586 100644
--- a/src/Common/Common.rc
+++ b/src/Common/Common.rc
@@ -89,11 +89,11 @@ BEGIN
CONTROL "Use backup header embedded in &volume if available",IDC_USE_EMBEDDED_HEADER_BAK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,39,257,11
COMBOBOX IDC_PKCS5_PRF_ID,112,125,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,15,126,91,17
- EDITTEXT IDC_PIN,112,145,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- RTEXT "Volume PIN:",IDT_PIN,15,148,91,17
- LTEXT "(Empty or 0 for default iterations)",IDC_PIN_HELP,158,148,112,8
+ EDITTEXT IDC_PIM,112,145,42,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ RTEXT "Volume PIM:",IDT_PIM,15,148,91,17
+ LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,158,148,112,8
END
IDD_KEYFILES DIALOGEX 0, 0, 345, 237
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index cc66506c..246f35a6 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -10737,10 +10737,10 @@ int GetPin (HWND hwndDlg, UINT ctrlId)
{
int pin = 0;
if (IsWindowEnabled (GetDlgItem (hwndDlg, ctrlId)))
{
- char szTmp[MAX_PIN + 1] = {0};
- if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIN + 1) > 0)
+ char szTmp[MAX_PIM + 1] = {0};
+ if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIM + 1) > 0)
{
char* endPtr = NULL;
pin = strtol(szTmp, &endPtr, 10);
if (pin < 0 || endPtr == szTmp || !endPtr || *endPtr != '\0')
@@ -10753,9 +10753,9 @@ int GetPin (HWND hwndDlg, UINT ctrlId)
void SetPin (HWND hwndDlg, UINT ctrlId, int pin)
{
if (pin > 0)
{
- char szTmp[MAX_PIN + 1];
+ char szTmp[MAX_PIM + 1];
StringCbPrintfA (szTmp, sizeof(szTmp), "%d", pin);
SetDlgItemText (hwndDlg, ctrlId, szTmp);
}
else
diff --git a/src/Common/Language.xml b/src/Common/Language.xml
index fe94ab2e..8de941b7 100644
--- a/src/Common/Language.xml
+++ b/src/Common/Language.xml
@@ -85,10 +85,10 @@
<control lang="en" key="IDT_NON_SYS_DEVICE">Encrypts a non-system partition on any internal or external drive (e.g. a flash drive). Optionally, creates a hidden volume.</control>
<control lang="en" key="IDT_PARTIAL_POOL_CONTENTS">Current pool content (partial)</control>
<control lang="en" key="IDT_PASS">Pass</control>
<control lang="en" key="IDT_PASSWORD">Password:</control>
- <control lang="en" key="IDT_PIN">Volume PIN:</control>
- <control lang="en" key="IDT_OLD_PIN">Volume PIN:</control>
+ <control lang="en" key="IDT_PIM">Volume PIM:</control>
+ <control lang="en" key="IDT_OLD_PIM">Volume PIM:</control>
<control lang="en" key="IDT_PROGRESS">Progress:</control>
<control lang="en" key="IDT_RANDOM_POOL">Random Pool: </control>
<control lang="en" key="IDT_SINGLE_BOOT">Select this option if there is only one operating system installed on this computer (even if it has multiple users).</control>
<control lang="en" key="IDT_SPEED">Speed</control>
@@ -144,10 +144,10 @@
<control lang="en" key="IDC_MOUNTALL">&amp;Auto-Mount Devices</control>
<control lang="en" key="IDC_MOUNT_OPTIONS">Mount Opti&amp;ons...</control>
<control lang="en" key="IDC_MOUNT_READONLY">Mount volume as read-&amp;only</control>
<control lang="en" key="IDC_NEW_KEYFILES">Keyfiles...</control>
- <control lang="en" key="IDC_OLD_PIN_HELP">(Empty or 0 for default iterations)</control>
- <control lang="en" key="IDC_PIN_HELP">(Empty or 0 for default iterations)</control>
+ <control lang="en" key="IDC_OLD_PIM_HELP">(Empty or 0 for default iterations)</control>
+ <control lang="en" key="IDC_PIM_HELP">(Empty or 0 for default iterations)</control>
<control lang="en" key="IDC_PREF_BKG_TASK_ENABLE">Enabled</control>
<control lang="en" key="IDC_PREF_CACHE_PASSWORDS">Cache passwords in driver memory</control>
<control lang="en" key="IDC_PREF_DISMOUNT_INACTIVE">Auto-dismount volume after no data has been read/written to it for</control>
<control lang="en" key="IDC_PREF_DISMOUNT_LOGOFF">User logs off</control>
@@ -608,19 +608,19 @@
<string lang="en" key="PASSWORD_HIDVOL_TITLE">Hidden Volume Password</string>
<string lang="en" key="PASSWORD_HIDDEN_OS_TITLE">Password for Hidden Operating System</string>
<string lang="en" key="PASSWORD_LENGTH_WARNING">WARNING: Short passwords are easy to crack using brute force techniques!\n\nWe recommend choosing a password consisting of 20 or more characters. Are you sure you want to use a short password?</string>
<string lang="en" key="PASSWORD_TITLE">Volume Password</string>
- <string lang="en" key="PASSWORD_WRONG">Incorrect password/PRF or not a valid volume.</string>
- <string lang="en" key="PASSWORD_OR_KEYFILE_WRONG">Incorrect keyfile(s) and/or password/PRF or not a valid volume.</string>
- <string lang="en" key="PASSWORD_OR_MODE_WRONG">Wrong mount mode, incorrect password/PRF, or not a valid volume.</string>
- <string lang="en" key="PASSWORD_OR_KEYFILE_OR_MODE_WRONG">Wrong mount mode, incorrect keyfile(s) and/or password/PRF, or not a valid volume.</string>
- <string lang="en" key="PASSWORD_WRONG_AUTOMOUNT">Incorrect password/PRF or no valid volume found.</string>
- <string lang="en" key="PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT">Incorrect keyfile(s)/password/PRF or no valid volume found.</string>
+ <string lang="en" key="PASSWORD_WRONG">Operation failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
+ <string lang="en" key="PASSWORD_OR_KEYFILE_WRONG">Operation failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
+ <string lang="en" key="PASSWORD_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
+ <string lang="en" key="PASSWORD_OR_KEYFILE_OR_MODE_WRONG">Operation failed due to one or more of the following:\n - Wrong mount mode.\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - Not a valid volume.</string>
+ <string lang="en" key="PASSWORD_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.</string>
+ <string lang="en" key="PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT">Auto-mount failed due to one or more of the following:\n - Incorrect keyfile(s).\n - Incorrect password.\n - Incorrect Volume PIM number.\n - Incorrect PRF (hash).\n - No valid volume found.</string>
<string lang="en" key="PASSWORD_WRONG_CAPSLOCK_ON">\n\nWarning: Caps Lock is on. This may cause you to enter your password incorrectly.</string>
- <string lang="en" key="PIN_CHANGE_WARNING">Remember Number to Mount Volume</string>
- <string lang="en" key="PIN_SYSENC_CHANGE_WARNING">Remember Number to Boot System</string>
- <string lang="en" key="PIN_SMALL_WARNING">You have chosen a Personal Iteration Number (PIN) that is smaller than the default VeraCrypt value. Please note that if your password is not strong enough, this could lead to a weaker security.\n\nDo you confirm that you are using a strong password?</string>
- <string lang="en" key="PIN_SYSENC_TOO_BIG">Personal Iteration Number (PIN) maximum value for system encryption is 65535.</string>
+ <string lang="en" key="PIM_CHANGE_WARNING">Remember Number to Mount Volume</string>
+ <string lang="en" key="PIM_SYSENC_CHANGE_WARNING">Remember Number to Boot System</string>
+ <string lang="en" key="PIM_SMALL_WARNING">You have chosen a Personal Iterations Multiplier (PIM) that is smaller than the default VeraCrypt value. Please note that if your password is not strong enough, this could lead to a weaker security.\n\nDo you confirm that you are using a strong password?</string>
+ <string lang="en" key="PIM_SYSENC_TOO_BIG">Personal Iterations Multiplier (PIM) maximum value for system encryption is 65535.</string>
<string lang="en" key="HIDDEN_FILES_PRESENT_IN_KEYFILE_PATH">\n\nWARNING: Hidden file(s) have been found in a keyfile search path. Such hidden files cannot be used as keyfiles. If you need to use them as keyfiles, remove their 'Hidden' attribute (right-click each of them, select 'Properties', uncheck 'Hidden' and click OK). Note: Hidden files are visible only if the corresponding option is enabled (Computer > Organize > 'Folder and search options' > View).</string>
<string lang="en" key="HIDDEN_VOL_PROT_PASSWORD_US_KEYB_LAYOUT">If you are attempting to protect a hidden volume containing a hidden system, please make sure you are using the standard US keyboard layout when typing the password for the hidden volume. This is required due to the fact that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available.</string>
<string lang="en" key="FOUND_NO_PARTITION_W_DEFERRED_INPLACE_ENC">VeraCrypt has not found any volume where the process of encryption/decryption of a non-system volume has been interrupted and where the volume header can be deciphered using the supplied password and/or keyfile(s).\n\nPlease make sure the password and/or keyfile(s) are correct and that the partition/volume is not being used by the system or applications (including antivirus software).</string>
<string lang="en" key="SELECTED_PARTITION_ALREADY_INPLACE_ENC">The selected partition/device is already fully encrypted.\nHeader Flags = 0x%.8X</string>
@@ -1069,11 +1069,11 @@
<string lang="en" key="EXTRA_BOOT_PARTITION_REMOVAL_INSTRUCTIONS">\nThe extra boot partition can be removed before installing Windows. To do so, follow these steps:\n\n1) Boot your Windows installation disc.\n\n2) In the Windows installer screen, click 'Install now' > 'Custom (advanced)'.\n\n3) Click 'Drive Options'.\n\n4) Select the main system partition and delete it by clicking 'Delete' and 'OK'.\n\n5) Select the 'System Reserved' partition, click 'Extend', and increase its size so that the operating system can be installed to it.\n\n6) Click 'Apply' and 'OK'.\n\n7) Install Windows on the 'System Reserved' partition.\n\n\nShould an attacker ask why you removed the extra boot partition, you can answer that you wanted to prevent any possible data leaks to the unencrypted boot partition.\n\nNote: You can print this text by clicking the 'Print' button below. If you save a copy of this text or print it (strongly recommended, unless your printer stores copies of documents it prints on its internal drive), you should destroy any copies of it after removing the extra boot partition (otherwise, if such a copy was found, it might indicate that there is a hidden operating system on this computer).</string>
<string lang="en" key="GAP_BETWEEN_SYS_AND_HIDDEN_OS_PARTITION">Warning: There is unallocated space between the system partition and the first partition behind it. After you create the hidden operating system, you must not create any new partitions in that unallocated space. Otherwise, the hidden operating system will be impossible to boot (until you delete such newly created partitions).</string>
<string lang="en" key="ALGO_NOT_SUPPORTED_FOR_SYS_ENCRYPTION">This algorithm is currently not supported for system encryption.</string>
<string lang="en" key="ALGO_NOT_SUPPORTED_FOR_TRUECRYPT_MODE">This algorithm is not supported for TrueCrypt mode.</string>
- <string lang="en" key="PIN_NOT_SUPPORTED_FOR_TRUECRYPT_MODE">PIN (Personal Iteration Number) not supported for TrueCrypt mode.</string>
- <string lang="en" key="PIN_REQUIRE_LONG_PASSWORD">Password must contain 20 or more characters in order to use the specified PIN.\nShorter passwords can only be used if the PIN is 485 or greater.</string>
- <string lang="en" key="BOOT_PIN_REQUIRE_LONG_PASSWORD">Pre-boot authentication Password must contain 20 or more characters in order to use the specified PIN.\nShorter passwords can only be used if the PIN is 98 or greater.</string>
+ <string lang="en" key="PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE">PIM (Personal Iterations Multiplier) not supported for TrueCrypt mode.</string>
+ <string lang="en" key="PIM_REQUIRE_LONG_PASSWORD">Password must contain 20 or more characters in order to use the specified PIM.\nShorter passwords can only be used if the PIM is 485 or greater.</string>
+ <string lang="en" key="BOOT_PIM_REQUIRE_LONG_PASSWORD">Pre-boot authentication Password must contain 20 or more characters in order to use the specified PIM.\nShorter passwords can only be used if the PIM is 98 or greater.</string>
<string lang="en" key="KEYFILES_NOT_SUPPORTED_FOR_SYS_ENCRYPTION">Keyfiles are currently not supported for system encryption.</string>
<string lang="en" key="CANNOT_RESTORE_KEYBOARD_LAYOUT">Warning: VeraCrypt could not restore the original keyboard layout. This may cause you to enter a password incorrectly.</string>
<string lang="en" key="CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION">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.</string>
<string lang="en" key="ALT_KEY_CHARS_NOT_FOR_SYS_ENCRYPTION">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.</string>
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 63b099b4..79566877 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -113,9 +113,9 @@ BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot)
if (GetWindowTextLength (hwndItem) < PASSWORD_LEN_WARNING)
{
if (bCustomPinSmall)
{
- Error (bForBoot? "BOOT_PIN_REQUIRE_LONG_PASSWORD": "PIN_REQUIRE_LONG_PASSWORD", hwndDlg);
+ Error (bForBoot? "BOOT_PIM_REQUIRE_LONG_PASSWORD": "PIM_REQUIRE_LONG_PASSWORD", hwndDlg);
return FALSE;
}
#ifndef _DEBUG
@@ -125,9 +125,9 @@ BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot)
}
#ifndef _DEBUG
else if (bCustomPinSmall)
{
- if (MessageBoxW (hwndDlg, GetString ("PIN_SMALL_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)
+ if (MessageBoxW (hwndDlg, GetString ("PIM_SMALL_WARNING"), lpszTitle, MB_YESNO|MB_ICONWARNING|MB_DEFBUTTON2) != IDYES)
return FALSE;
}
#endif
return TRUE;
diff --git a/src/Common/Password.h b/src/Common/Password.h
index 5ccc44b3..275ad40a 100644
--- a/src/Common/Password.h
+++ b/src/Common/Password.h
@@ -14,11 +14,11 @@
// User text input limits
#define MIN_PASSWORD 1 // Minimum possible password length
#define MAX_PASSWORD 64 // Maximum possible password length
-#define MAX_PIN 10 // Maximum allowed digits in a PIN (enough for 32-bit value)
-#define MAX_BOOT_PIN 5 // Maximum allowed digits in a PIN for boot (enough for 16-bit value)
-#define MAX_BOOT_PIN_VALUE 65535
+#define MAX_PIM 10 // Maximum allowed digits in a PIM (enough for 32-bit value)
+#define MAX_BOOT_PIM 5 // Maximum allowed digits in a PIM for boot (enough for 16-bit value)
+#define MAX_BOOT_PIM_VALUE 65535
#define PASSWORD_LEN_WARNING 20 // Display a warning when a password is shorter than this
#ifdef __cplusplus
diff --git a/src/Common/Pkcs5.c b/src/Common/Pkcs5.c
index adce567b..3e03ade2 100644
--- a/src/Common/Pkcs5.c
+++ b/src/Common/Pkcs5.c
@@ -759,9 +759,9 @@ char *get_pkcs5_prf_name (int pkcs5_prf_id)
int get_pkcs5_iteration_count (int pkcs5_prf_id, int pin, BOOL truecryptMode, BOOL bBoot)
{
if ( (pin < 0)
- || (truecryptMode && pin > 0) /* No PIN for TrueCrypt mode */
+ || (truecryptMode && pin > 0) /* No PIM for TrueCrypt mode */
)
{
return 0;
}
diff --git a/src/Common/Resource.h b/src/Common/Resource.h
index 9cc7b9e2..2d593b65 100644
--- a/src/Common/Resource.h
+++ b/src/Common/Resource.h
@@ -187,11 +187,11 @@
#define IDT_STATIC_MODAL_WAIT_DLG_INFO 5125
#define IDC_WAIT_PROGRESS_BAR 5126
#define IDC_PKCS5_PRF_ID 5127
#define IDT_PKCS5_PRF 5128
-#define IDT_PIN 5129
-#define IDC_PIN 5130
-#define IDC_PIN_HELP 5131
+#define IDT_PIM 5129
+#define IDC_PIM 5130
+#define IDC_PIM_HELP 5131
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED