VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-02 14:45:22 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-04 13:14:05 +0200
commitb261177b8f5bc3f8495406d13dc03c0328b930f9 (patch)
tree535b8a6345c63529b3bc72f42d02c27c6aed64e3 /src/Common
parent0b914c8f5d690dfc1bdfbca1e1083372c5ed84d8 (diff)
downloadVeraCrypt-b261177b8f5bc3f8495406d13dc03c0328b930f9.tar.gz
VeraCrypt-b261177b8f5bc3f8495406d13dc03c0328b930f9.zip
Windows/Linux/MacOSX: Set maximum PIM value to 2147468 in order to avoid having negative values for iterations count using the formula 15000 + (PIM x 1000). Add specific error message to XML language files.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Language.xml1
-rw-r--r--src/Common/Password.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Common/Language.xml b/src/Common/Language.xml
index f72e1a30..8f83b864 100644
--- a/src/Common/Language.xml
+++ b/src/Common/Language.xml
@@ -1396,6 +1396,7 @@
<string lang="en" key="IDPM_COPY_VALUE_TO_CLIPBOARD">Copy Value to Clipboard...</string>
<control lang="en" key="IDC_DISABLE_BOOT_LOADER_PIM_PROMPT">Do not request PIM in the pre-boot authentication screen (PIM value is stored unencrypted on disk)</control>
<string lang="en" key="DISABLE_BOOT_LOADER_PIM_PROMPT">WARNING: Please keep in mind that if you enable this option, the PIM value will be stored unencrypted on the disk.\n\nAre you sure you want to enable this option?</string>
+ <string lang="en" key="PIM_TOO_BIG">Personal Iterations Multiplier (PIM) maximum value is 2147468.</string>
</localization>
<!-- XML Schema -->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
diff --git a/src/Common/Password.h b/src/Common/Password.h
index c6d1579b..e2058cdb 100644
--- a/src/Common/Password.h
+++ b/src/Common/Password.h
@@ -17,7 +17,8 @@
// User text input limits
#define MIN_PASSWORD 1 // Minimum possible password length
#define MAX_PASSWORD 64 // Maximum possible password length
-#define MAX_PIM 10 // Maximum allowed digits in a PIM (enough for 32-bit value)
+#define MAX_PIM 7 // Maximum allowed digits in a PIM (enough for maximum value)
+#define MAX_PIM_VALUE 2147468 // Maximum value to have a positive 32-bit result for formula 15000 + (PIM x 1000)
#define MAX_BOOT_PIM 5 // Maximum allowed digits in a PIM for boot (enough for 16-bit value)
#define MAX_BOOT_PIM_VALUE 65535