Compare commits

...
Author SHA1 Message Date
Mounir IDRASSI 26e2d22d62 MacOSX: increment bundle version to 1.17.22 2016-02-14 10:29:58 +01:00
Mounir IDRASSI a144e2167d MacOSX: increment installer version to 1.17. 2016-02-14 09:15:13 +01:00
Mounir IDRASSI 2b4003cc81 Increment version to 1.17. Update user guide PDF file. 2016-02-14 09:03:13 +01:00
Mounir IDRASSI 1f87e64127 Windows: handle rare case where size of disk can't be retrieved using IOCTL_DISK_GET_PARTITION_INFO_EX. use IOCTL_DISK_GET_DRIVE_GEOMETRY in such case and add workaround to display correctly partitions in dialog even if disk size is not available. 2016-02-13 22:14:40 +01:00
Mounir IDRASSI d7d4c98775 Windows: Add colors (Red, Yellow, Green) to the collected randomness indicator depending on how much entropy was gathered. Code re-factoring. 2016-02-12 00:04:31 +01:00
Mounir IDRASSI 89d238bb32 Window: fix regression that caused only a single keyfile to be taken into account. 2016-02-12 00:04:28 +01:00
Mounir IDRASSI 7fee9a04c4 Windows: Avoid updating configuration after opening keyfile file dialog when /quit switch used without preferences parameter. 2016-02-12 00:04:25 +01:00
Mounir IDRASSI 39fb2edc25 Linux/MacOSX: add progress bar for mouse collected entropy in GUI of volume creation wizard. Add mutex protection in event handler for shared counter variable 2016-02-09 00:52:28 +01:00
Mounir IDRASSI 0863924483 Linux/MacOSX: add progress bar for mouse collected entropy in GUI for keyfile generator and for random poll enrichment 2016-02-08 01:39:50 +01:00
Mounir IDRASSI 8e2793085e Windows: Continuation of fix for wrong update of configuration XML file. 2016-02-08 01:39:47 +01:00
Mounir IDRASSI 8518d55834 Windows Driver: if saving volume header fails, don't mark operation as successful so that it will be retried later. 2016-02-07 02:39:45 +01:00
Mounir IDRASSI ae7ec4802a Windows:Fix various issues and warnings reported by static code analysis tool Coverity. 2016-02-07 02:39:43 +01:00
Mounir IDRASSI 229bd668f4 Merge pull request #44 from makomi/master
Language files: Update German translation
2016-02-03 00:53:44 +01:00
Matthias Kolja Miehl 13a0473cf9 Language files: Update German translation 2016-02-02 20:10:25 +00:00
Mounir IDRASSI 49d61632f9 Language Files: update polish translation 2016-02-02 01:02:16 +01:00
Mounir IDRASSI 4a7a9f4dd2 Windows: Don't try to mount using cached passwords if password and/or keyfile are specified in the command line. 2016-02-02 00:47:15 +01:00
Mounir IDRASSI ce8a9becdf Windows:Center the text of the random pool displayed in the keyfile generator dialog. 2016-02-01 00:13:55 +01:00
Mounir IDRASSI 5aec655b8b Windows: solve bootloader compilation error 2016-01-31 23:42:11 +01:00
Mounir IDRASSI 2c0776e987 Language XML files: update XML files with newly added field 2016-01-31 23:30:36 +01:00
Mounir IDRASSI 203c7aa015 Windows: Fix link issue in Debug configuration for Setup project. 2016-01-31 23:30:32 +01:00
Mounir IDRASSI fe234e08ee Windows: Fix buffer overrun issue introduce by the Unicode rewrite. 2016-01-31 23:30:29 +01:00
Mounir IDRASSI 77885de85e Windows: Implement GUI indicator for entropy collected from mouse movements. 2016-01-31 23:30:27 +01:00
Mounir IDRASSI b407512248 MacOSX: Support creation exFAT volumes on OSX using the built-in command newfs_exfat 2016-01-30 00:48:20 +01:00
Mounir IDRASSI dde3dcf14d Language XML files: update German translation (Ettore Atalan) 2016-01-29 00:50:29 +01:00
Mounir IDRASSI 926721d54e Windows Bootloader: Always hide password/PIM values with '*' after ENTER is hit, even if F5 was pressed to display password/PIM. 2016-01-29 00:50:27 +01:00
Mounir IDRASSI 24b2dfc0d5 Language XML files: update exFAT message translation in Korea, Russian and Chinese. 2016-01-28 13:11:27 +01:00
Mounir IDRASSI ef0906bc83 Language Files: update polish translation 2016-01-28 12:29:20 +01:00
Mounir IDRASSI 90def2ee5a Language XML files:update German translation 2016-01-28 00:51:48 +01:00
Mounir IDRASSI 1ca60754b2 Language XML file: correct errors in some English texts. 2016-01-28 00:30:40 +01:00
Mounir IDRASSI f63e34e0f9 Language XML files: update with new fields. Reoder node so that new additions are at the bottom. This makes it easier for Crowdin.com import. 2016-01-27 01:13:51 +01:00
Mounir IDRASSI dcb8390bb2 Windows/Linux: Implement exFAT support. 2016-01-27 01:13:46 +01:00
Mounir IDRASSI 9f5b5445d7 Linux/MacOSX: Update command line help text to reflect that we can now specify in filesystem when creating a new volume. 2016-01-26 01:47:29 +01:00
Mounir IDRASSI d53b48bdf0 Linux/MacOSX: fix issue creating volumes using command line with a filesystem other than FAT. 2016-01-26 01:29:45 +01:00
Mounir IDRASSI 84ee7076d9 Linux/MacOSX: remove unecessary XML resource string replacement of %hs, not needed since Unicode rewrite. 2016-01-25 01:46:37 +01:00
Mounir IDRASSI 5a555deb74 Linux/MacOSX: fix wrong AskYesNo method parameters use caused by mistake in parenthesis use. 2016-01-25 01:46:34 +01:00
Mounir IDRASSI b8a2e808c6 MacOSX: Add PIM value validity checks to workaround wxWidget bug that makes wxTextValidator useless when applied to a text control with password attribute (http://trac.wxwidgets.org/ticket/17185). 2016-01-25 01:46:32 +01:00
Mounir IDRASSI e9d3ba0b11 Linux/MacOSX: update --size entry in command line help text. 2016-01-24 02:58:50 +01:00
Mounir IDRASSI c86697f51b Linux/MacOSX: Support K/M/G/T suffixes for --size switch to indicate unit to use for size value (KiloByte, MegaByte, GigaByte and TeraByte respectively) 2016-01-24 02:41:49 +01:00
Mounir IDRASSI 5a09d17c45 Windows: hide PIM is VeraCrypt Expander the same way as in other places 2016-01-20 21:45:40 +01:00
Mounir IDRASSI c95940cfc6 Readme.txt: update libfuse URL to new Github location. 2016-01-20 21:42:39 +01:00
Mounir IDRASSI b12e8b6943 Merge pull request #41 from ReadmeCritic/master
Update README to point to new libfuse URL
2016-01-20 21:37:04 +01:00
ReadmeCritic cd65f78a62 Update README URLs based on HTTP redirects 2016-01-20 11:34:24 -08:00
Mounir IDRASSI bda7a1d0bd Copyright: update dates to include 2016. 2016-01-20 00:53:24 +01:00
Mounir IDRASSI 43f5fae2ee Windows:Fix issue with the display of legal notices text. Regression caused by the latest Unicode modifications. 2016-01-20 00:53:08 +01:00
Mounir IDRASSI f9fa0191ec Linux/MacOSX:solve issue of --stdin option not handling correctly passwords that contain a space character (reported and fixed by Codeplex user horsley1953) 2016-01-20 00:53:02 +01:00
Mounir IDRASSI 8a2d9c4120 Windows: solve Expander GUI issues caused by latest Unicode modifications. 2016-01-18 21:40:16 +01:00
Mounir IDRASSI 90957cd9d9 MacOSX: Ensure that time-stamping is always activated when performing code signing by using --timestamp switch. 2016-01-17 14:55:13 +01:00
Mounir IDRASSI 3cda204626 Windows: avoid leaking location of selected keyfiles by clearing global variable used to store multiple file selection path. 2016-01-17 10:52:31 +01:00
Mounir IDRASSI 59afc2c4d9 Cryptography: Divide mount and boot times by 2 using a pre-computation of values used in PRF HMac calculation (thanks to Xavier de Carné de Carnavalet for finding this optimization). 2016-01-17 10:52:29 +01:00
Mounir IDRASSI dd1e62ebcd Windows: Add SHA-256 EV Code Signing using the new GlobalSign certificate on top of the SHA-1 code signing. Create new SHA256 test code signing certificate and update test signing script. 2016-01-17 10:52:26 +01:00
Mounir IDRASSI a6c6c3dc4a Language files: Update German translation (contributed by Ettore Atalan) 2016-01-14 23:02:07 +01:00
Mounir IDRASSI 66a5671e3b Language Files: update polish translation 2016-01-14 23:02:05 +01:00
Mounir IDRASSI e858d93a8e MacOSX: use native OSX byte swapping routines used in hash functions to improve speed. 2016-01-11 01:04:54 +01:00
Mounir IDRASSI e40774f546 Linux/MacOSX: Show better error message when the PKCS#11 library can't be loaded 2016-01-10 23:59:17 +01:00
Mounir IDRASSI fe38d6f52c Language XML files: update XML files with newly added field 2016-01-10 20:45:22 +01:00
Mounir IDRASSI 8586c51016 Windows: Avoid wrong update of configuration XML file caused by not using the correct window handle to get some GUI fields content. Some code cleanup. 2016-01-10 20:45:18 +01:00
Mounir IDRASSI fb430c403b Windows: Don't show disconnected network drives in the list of available drives. Add option to make them available for mounting if needed. 2016-01-10 20:45:15 +01:00
Mounir IDRASSI 5597a1e390 Language files: fix mistake in previous German translation commit where a "\nDAS" was replaced by "\DAS" 2016-01-10 20:45:10 +01:00
Mounir IDRASSI 3b1eebbfad Language files: various enhancements to German translation (contributed by Ettore Atalan) 2016-01-09 21:44:03 +01:00
Mounir IDRASSI 80ba722497 Windows: increase the size of the field IDC_PREF_CACHE_PIM in the preferences dialog to avoid truncation when using a language other then English 2016-01-04 02:55:18 +01:00
Mounir IDRASSI 52d9838978 Language Files: update polish translation 2016-01-04 02:55:15 +01:00
Mounir IDRASSI 7a15ff2083 Windows: Enhance fix for dll hijacking vulnerability affecting installer (CVE-2016-1281) 2016-01-04 02:37:37 +01:00
Mounir IDRASSI 0600ae7d1c Language XML files: update XML files with newly added fields. 2016-01-04 02:37:33 +01:00
Mounir IDRASSI 29d46b749d Windows: Add keyboard shortcut alt+i for checking "Use PIM" in various dialogs like password dialog. 2016-01-04 02:37:29 +01:00
Mounir IDRASSI ea8e8e517e Linux: Restore Nautilus fix that was mistakenly removed by Whirlpool optimization commit 2016-01-03 09:30:21 +01:00
Mounir IDRASSI 723fcfa64d Windows Driver: Remove unwanted ':' character at the end of volume device name. This was causing a crash in Kaspersky Internet Security 2016 when a program is run from a VeraCrypt volume. 2016-01-03 00:15:11 +01:00
Mounir IDRASSI 6e1f5cfe4b Windows: use compiler intrinsic for some functions used in cryptographic primitives to ensure maximum performance. 2016-01-03 00:15:08 +01:00
Mounir IDRASSI 5872be28a2 Windows: Fix Dll hijacking vulnerability affecting installer that allows arbitrary code execution with elevation of privilege (CVE-2016-1281) 2016-01-03 00:15:05 +01:00
Mounir IDRASSI 6cb1eefc49 Windows: sign binaries using both SHA-1 and SHA-256 for maximum compatibility. Add requirement for Windows SDK 8.1 that contains signtool.exe version that enables this. 2016-01-03 00:15:02 +01:00
Mounir IDRASSI 4181283f29 Cryptography: Set 16-byte alignment for KEY_INFO structure that is used as input for Whirlpool hash. This helps improve performance. 2016-01-03 00:14:59 +01:00
Mounir IDRASSI bb66dac8e6 Cryptography: correct Whirlpool compilation error on Big Endian platforms. 2016-01-03 00:14:54 +01:00
Mounir IDRASSI 0c2c0a846d Cryptography: Optimize Whirlpool implementation by using public domain assembly code developed by Wei Dai 2015-12-31 01:56:19 +01:00
Mounir IDRASSI d462806ea9 Windows: Make benchmark batch file run a PRF measurement only when associated container file is present. 2015-12-31 01:56:16 +01:00
Mounir IDRASSI 859c111d01 Readme: Make Readme.txt identical to README.md. 2015-12-25 20:30:53 +01:00
Mounir IDRASSI 82f372ef4f README: Add reference to UPX as a dependency on Windows in README.md. 2015-12-25 20:29:12 +01:00
Mounir IDRASSI 5a2c8af7ec Merge pull request #38 from makomi/master
Readme: fix markdown syntax, typos, and format
2015-12-25 20:22:30 +01:00
Matthias Kolja Miehl 2e9c630ab1 Readme: fix markdown syntax, typos, and format 2015-12-22 05:49:41 +00:00
Mounir IDRASSI 2fd699cc66 Windows Driver: wipe cached PIM values when passwords are wiped. 2015-12-21 01:53:29 +01:00
Mounir IDRASSI fcfcd1a2c4 Language XML files: update XML files with newly added fields. 2015-12-21 01:19:08 +01:00
Mounir IDRASSI 8f6c08330a Windows: Implement PIM caching, both for system encryption and for normal volumes. Add options to activate it in the Preferences and System Settings. 2015-12-21 01:19:04 +01:00
Mounir IDRASSI 7832d712fd Windows: solve issue with system favorites not being able to mount at A: 2015-12-16 23:38:44 +01:00
Mounir IDRASSI 3610d2c2ec Language files: various fixes to German translation (contributed by Ettore Atalan) 2015-12-10 17:19:41 +01:00
Mounir IDRASSI 9a39164ed5 Language files: update German XML file (contributed by Ettore Atalan) 2015-12-09 23:24:53 +01:00
Mounir IDRASSI 4f17e0cfe9 MacOSX: Customize dmg file using VeraCrypt new logo 2015-12-06 11:51:23 +01:00
Mounir IDRASSI c1f1c643ff MacOSX: Add possibility in build script to reuse existing wxWidgets compiled library 2015-12-06 11:51:11 +01:00
Mounir IDRASSI 8e56e138cc Windows Rescue Disk: when decryption paused/finished, display message to indicate that header is being updated 2015-12-05 19:35:45 +01:00
Mounir IDRASSI 1cf826dbad Windows: Correct issue with some of new bitmaps that didn't render correctly. 2015-12-05 19:35:42 +01:00
Mounir IDRASSI 13c6f2948e Windows: use new icons an graphics contributed by Andreas Becker (https://github.com/veracrypt/VeraCrypt/issues/9#issuecomment-118353850) 2015-12-05 00:07:13 +01:00
Mounir IDRASSI 533b7e1eb8 Linux/MacOSX: use new icons contributed by Andreas Becker (https://github.com/veracrypt/VeraCrypt/issues/9#issuecomment-118353850) 2015-12-04 22:20:45 +01:00
Mounir IDRASSI 3a9db8d98c Linux: fix Nautilus not detected as file manager on some Gnome based destributions. 2015-12-04 22:20:42 +01:00
Mounir IDRASSI 613ea66c95 Merge pull request #35 from netdcy/patch-1
Update Language.zh-cn.xml
2015-11-30 14:03:07 +01:00
Mounir IDRASSI efa436974d Linux/MacOSX: Implement Unicode passwords suppport. Make validation of parameters in GUI more robust. 2015-11-30 13:58:19 +01:00
Mounir IDRASSI cfadb231d2 Linux/MacOSX: Solve compilation issue following Windows Unicode rewrite 2015-11-30 13:58:15 +01:00
netdcy 2d4781be24 Update Language.zh-cn.xml
Add translations.
2015-11-30 13:22:40 +08:00
Mounir IDRASSI e0408eee74 Language files: update German XML file (Dulla) 2015-11-28 10:36:19 +01:00
Mounir IDRASSI 96d8c65ab4 Language Files: update polish translation 2015-11-26 19:23:14 +01:00
Mounir IDRASSI 9666dda282 Windows: solve GUI issues caused by using ANSI string instead of UNICODE ones. Remove Unused functions. 2015-11-26 19:23:11 +01:00
Mounir IDRASSI 2408edb239 Windows Language files: update language XML files with added new fields. 2015-11-26 01:45:01 +01:00
Mounir IDRASSI 10d77be0d2 Windows: Support creating Traveler Disk when running in Portable Mode 2015-11-26 01:44:56 +01:00
Mounir IDRASSI 59611b8b37 Windows: solve crash caused by system function FormatMessage failure on rare cases. 2015-11-26 01:44:54 +01:00
Mounir IDRASSI 90bd57fe40 Windows: Full UNICODE rewrite and implement support for UNICODE passwords. 2015-11-26 01:44:52 +01:00
Mounir IDRASSI ec7d96fcb7 Windows Bootloader: Avoid displaying empty new line between password and PIM after filling password field with dummy '*'. 2015-11-26 01:44:46 +01:00
Mounir IDRASSI c53fd7ef0c Windows Driver: solve compilation error in Debug build caused by a missing variable. 2015-11-26 01:44:43 +01:00
Mounir IDRASSI d40eedeaaf Language XML files: More fixes for language files following import into Crowdin. 2015-11-26 01:44:40 +01:00
Mounir IDRASSI 1c55894e1d Language XML files: harmonize XML language files ad solve few issues. 2015-11-08 09:49:04 +01:00
Mounir IDRASSI 7322ebbc83 Merge pull request #31 from initbar/master
Update Language.ko.xml (by Herbert Shin)
2015-11-03 00:21:27 +01:00
Brehret Nish c69bd27f78 Update Language.ko.xml #30 2015-11-01 22:51:39 -05:00
Brehret Nish 6691cc0c06 Fix Language.ko.xml 2015-11-01 05:05:03 -05:00
Brehret Nish 3eb383d4a5 Update Language.ko.xml 2015-11-01 04:27:54 -05:00
Brehret Nish 14eaa9006c Update Language.ko.xml 2015-11-01 03:47:08 -05:00
Mounir IDRASSI 4a09511372 Language XML files: update Russian XML file by Dmitry Yerokhin. 2015-10-27 20:47:58 +01:00
Mounir IDRASSI ebbbde8964 Windows: workaround to solve false positive detection by some anti-virus software. 2015-10-27 20:47:56 +01:00
Mounir IDRASSI 62de77e2c8 Windows: fix wrong translation for "Reset" button in hotkeys dialog 2015-10-27 20:47:53 +01:00
Mounir IDRASSI c863f3769e Language XML file: correct some fields and shorten some of them to avoid being truncated in GUI 2015-10-27 20:47:50 +01:00
Mounir IDRASSI 1d844c4557 Language Files: update polish translation 2015-10-20 16:13:10 +02:00
Mounir IDRASSI 908fa17e0f Merge pull request #29 from netdcy/master
Update Language.zh-cn.xml
2015-10-19 13:03:59 +02:00
netdcy 01fda292e6 Update Language.zh-cn.xml
Change some punctuation from English to Chinese.
Minor fixes.
2015-10-19 16:30:53 +08:00
Mounir IDRASSI 4ff727d702 Language XML files: add some missing fields 2015-10-18 17:21:53 +02:00
Mounir IDRASSI 97701eb2e9 Windows: Ensure focus is always set to the drive list upon startup 2015-10-18 16:17:09 +02:00
Mounir IDRASSI 0a69062c6b Language XML files: remove unused ID. 2015-10-18 16:17:07 +02:00
Mounir IDRASSI d5e7426181 Merge pull request #27 from Zhangjintao/master
Update Language.zh-cn.xml (By zhangjintao)
2015-10-18 16:05:52 +02:00
Mounir IDRASSI 41819270bb Windows: Solve lost focus for application after displaying the waiting dialog 2015-10-15 01:36:15 +02:00
Mounir IDRASSI 8342d0d616 Windows Rescue Disk: compress bootloader for rescue disk in several more cases because of its growing size. 2015-10-15 01:36:12 +02:00
Mounir IDRASSI 19483d2097 Windows Bootloader: Protect password/PIM length by filling the fields to their maximum length with '*' after ENTER is hit 2015-10-15 01:36:10 +02:00
Mounir IDRASSI 225acf4a22 Windows: resize some GUI fields to avoid text truncation with non US languages (e.g. German) 2015-10-15 01:36:07 +02:00
Mounir IDRASSI fb67b54787 Language files: update German XML file with anonymous contribution (Dulla) 2015-10-15 01:36:04 +02:00
Mounir IDRASSI 23b69537a5 Windows: Set bPrebootPasswordDlgMode to FALSE at the correct code location. 2015-10-15 01:36:02 +02:00
Mounir IDRASSI ee3fa19ed9 Windows: correct wrong ID for keyfiles button in password dialog 2015-10-15 01:35:59 +02:00
Mounir IDRASSI f274f5bdc5 Windows: solve issue on VeraCryptExpander where if TB radio button was checked, it will remain checked even if GB, MB or KB is are checked. 2015-10-15 01:35:57 +02:00
Mounir IDRASSI 5a8eee91c3 Language Files: update polish translation 2015-10-15 01:35:54 +02:00
Zhangjintao 647a7e047a Update Language.zh-cn.xml 2015-10-12 08:34:16 +08:00
Zhangjintao dadfebc6c3 Update Language.zh-cn.xml
Update Simplified Chinese translation.
2015-10-11 15:32:53 +08:00
Mounir IDRASSI 8748013f7d Increment version to 1.16. Update user guide PDF file. 2015-10-07 12:56:09 +02:00
Mounir IDRASSI 63091cd29c Windows Language files: update language XML files with added new fields. 2015-10-07 12:56:05 +02:00
Mounir IDRASSI 9a6fc789eb Windows: Add option to disable detection of "Evil Maid" attacks. This is helpful for users who have software running the modifies the bootloader, like FLEXnet. 2015-10-07 12:56:01 +02:00
Mounir IDRASSI f3c91cb05c Windows: Don’t try to mount using empty password when default keyfile configured or keyfile specified in command line. Add option in default keyfiles dialog to restore the old behavior. 2015-10-07 12:55:58 +02:00
Mounir IDRASSI 13058fd638 Windows: fix failure to restore volume header from an external file if custom PIM used or PRF different from default one. Also default PRF is correct set in password dialog for restore operation. 2015-10-05 04:31:19 +02:00
Mounir IDRASSI c94f8c9b63 Windows Driver: Modify fix for CVE-2015-7358 to solve side effects on Windows mount manager while still making it hard to abuse drive letter handling. 2015-10-05 04:31:17 +02:00
Mounir IDRASSI ea451c7241 Windows Driver: remove allocation of unused variables 2015-10-05 04:31:15 +02:00
Mounir IDRASSI 4682f9b235 Windows: remove wrong check for return value of MultiByteToWideChar 2015-10-05 04:31:13 +02:00
Mounir IDRASSI 185e421114 Increment version to 1.15. Update user guide PDF file. 2015-09-26 17:44:31 +02:00
Mounir IDRASSI a3437067ac Windows Language files: update language XML files with added new fields. 2015-09-26 17:44:23 +02:00
Mounir IDRASSI f07121f830 Windows: rename "Performance..." menu to "Performance/Driver Configuration" since we added IOCTL option 2015-09-26 17:44:12 +02:00
Mounir IDRASSI f41be7399b Windows: Support specifying volumes size using TB in GUI as it is the case in command line. 2015-09-26 17:44:09 +02:00
Mounir IDRASSI 307568f631 Windows Driver: remove unnecessary variables declaration and use in MountManagerMount. 2015-09-26 17:44:06 +02:00
Mounir IDRASSI 9b24da3398 Windows Driver: Fix inherited TrueCrypt local elevation of privilege vulnerability caused by abusing the drive letter symbolic link creation facilities to remap the main system drive. Thanks to James Forshaw (Google) for reporting this issue and for helping implementing the fix. 2015-09-26 17:44:03 +02:00
Mounir IDRASSI b7f9df6e4f Windows Driver: Fix inherited TrueCrypt local elevation of privilege vulnerability caused by incorrect impersonation token handling. Reported and fixed by James Forshaw (Google) 2015-09-26 17:44:00 +02:00
Mounir IDRASSI fda4d3f820 Windows: Allow Application key to open context menu on drive letters list. 2015-09-26 17:43:57 +02:00
Mounir IDRASSI 0eec3bc349 Windows Installer: check newly added files if they are used before resuming installation. Avoid using driver handle to check if we are using system encryption. 2015-09-26 17:43:54 +02:00
Mounir IDRASSI d98367f53b Window: Solve Unicode issues in GUI (e.g. Chinese text not always displayed correctly) by using Unicode API for dialogs and window message handling. 2015-09-26 17:43:51 +02:00
Mounir IDRASSI 03de885b13 Windows: Set keyboard focus to PIM field when "Use PIM" is checked. 2015-09-26 17:43:47 +02:00
Mounir IDRASSI 6b3a26bc40 Windows: Add extra check in GetDiskDeviceDriveLetter for code clarity 2015-09-26 17:43:43 +02:00
Mounir IDRASSI e8ea23e719 Windows: fix regression that made Favorite fail to load a logon. 2015-09-26 17:43:35 +02:00
Mounir IDRASSI c447b45d45 Increment version to 1.14. Update user guide PDF file. 2015-09-16 18:35:57 +02:00
Mounir IDRASSI d904c2758f Windows Language files: update language XML files with added new fields. 2015-09-16 18:35:51 +02:00
Mounir IDRASSI 9e1e128b14 Windows: Add functionality to verify Rescue Disk ISO image file. 2015-09-16 01:33:19 +02:00
Mounir IDRASSI 52c7445a79 Windows: Correctly detect presence of CD/DVD recorder during the creation of Rescue Disk. Check only CD/DVD drives and removable media when looking for rescue disk during its verification. 2015-09-16 01:33:16 +02:00
Mounir IDRASSI db80c02342 Windows: Add option to explicitly support extended disk IOCTLs and disable this support by default. This will avoid having issue with software that doesn't handle correctly partial IOCTL_STORAGE_QUERY_PROPERTY support. 2015-09-16 01:33:14 +02:00
Mounir IDRASSI 4d7dc3ba25 Windows: first implementation of CLI support for creating volumes. 2015-09-16 01:33:11 +02:00
Mounir IDRASSI 85c1bc34e3 Linux/MacOSX: workaround bug in old versions of g++ that are confused by methods having the same name and one of them used as wxWidgets event handler callback. 2015-09-14 00:48:37 +02:00
Mounir IDRASSI 24f3b5230c Linux/MacOSX: Mask/unmask PIM value in GUI the same way as the password 2015-09-13 23:51:06 +02:00
Mounir IDRASSI 7e73208e62 Windows Bootloader: Fix Rescue Disk issue when Cascades and SHA256 used. It was caused by the bootloader becoming too big in this case with PIM implementation (larger than the limit of 31232 bytes). We also increase memory requirement for this case 2015-09-13 01:15:13 +02:00
Mounir IDRASSI 22152878f8 Windows Bootloader: pass correct compressed data size to decompressor and use shorter string to keep a valid memory layout for boot sector. 2015-09-13 01:14:17 +02:00
Mounir IDRASSI 89a7fad16d Windows: avoid freezing the wait dialog by setting its parent to desktop when having lengthy driver calls (like mounting) 2015-09-11 00:38:52 +02:00
Mounir IDRASSI fe6ea62363 Windows: Don't offer creating a restore point if it is disabled in Windows. 2015-09-10 01:44:17 +02:00
Mounir IDRASSI 957ff20f37 Windows: Implement waiting dialog for Mount All Favorites Volumes operation. 2015-09-10 01:44:14 +02:00
Mounir IDRASSI ec7b5cd7e6 Windows: Implement waiting dialog for Dismount operations to avoid freezing GUI when dismounting takes long time. 2015-09-10 01:44:12 +02:00
Mounir IDRASSI c55e08b31e Windows: When no language selected by user, explicitly use English as default one unless VeraCrypt is in portable mode. 2015-09-10 01:44:09 +02:00
Mounir IDRASSI 09db742c3e Windows: Add missing IDC_COPY_EXPANDER control definition 2015-09-10 01:44:06 +02:00
Mounir IDRASSI a36cf1f01e Windows Traveler Disk Setup: Include Volume Expander. Force selection of target directory through Browse button. Use Unicode functions for handling the creation files. 2015-09-08 01:08:24 +02:00
Mounir IDRASSI a9882a6689 Windows: Don't use RegDeleteKeyEx since it's not supported on Windows XP. 2015-09-08 01:08:22 +02:00
Mounir IDRASSI 0bd265cbde Windows: Launch Format/Expander wizards from VeraCrypt.exe using executable binaries with the same architecture. 2015-09-07 01:40:51 +02:00
Mounir IDRASSI 9fc98b5ea3 Windows: take into account default PRF and TrueCrypt Mode in "Volume Tools" operations. 2015-09-06 20:31:10 +02:00
Mounir IDRASSI 13bfb2db59 Windows: Installer and Traveler Disk Setup both always copy 32-bit and 64-bit executable binaries. 2015-09-06 20:31:07 +02:00
Mounir IDRASSI e445863ae4 Windows: Save/Restore last selected drive in drivers list only when saving history is enabled. 2015-09-06 20:31:04 +02:00
Mounir IDRASSI 42a7a17cb9 Windows Installer: better handling for updating system favorite service from 1.0f-2 (solve Windows 10 issue) . Remove extra VeraCrypt files that may remain after uninstalling it. 2015-09-06 20:31:01 +02:00
Mounir IDRASSI adc3274395 Language files: adaptations of XML files to be recognized correctly by Transifex 2015-09-01 01:37:02 +02:00
Mounir IDRASSI 249d747a53 Windows: Increase width of plain text size static control to accommodate larger text 2015-09-01 01:37:00 +02:00
Mounir IDRASSI f2b40ba5b5 Language files: update XML files with new fields. 2015-09-01 01:36:57 +02:00
Mounir IDRASSI 4470d11c39 Merge pull request #18 from LouisTakePILLz/master
Linux/MacOSX: Support supplying password to VeraCrypt via pipe (stdin)
2015-08-31 01:56:56 +02:00
LouisTakePILLz 9582d8fbcb Add stdin-supplied password support 2015-08-30 19:45:01 -04:00
Mounir IDRASSI 90f9194558 Windows: Support setting volume label in Explorer through mount option. Support using favorite label as label in Explorer. 2015-08-31 00:30:58 +02:00
Mounir IDRASSI dc6c279339 Windows Driver: Protect captured subject context during processing of user access token. 2015-08-31 00:30:56 +02:00
Mounir IDRASSI 2f2cb6b7ae Windows: compact columns size of view reports used in Benchmark and Devices dialogs 2015-08-31 00:30:53 +02:00
Mounir IDRASSI 8dc1dd2fb4 Windows bootloader: Mask/unmask PIM value in bootloader the same way as the password 2015-08-28 19:32:29 +02:00
Mounir IDRASSI 86dc27dcb8 Windows: Treat the PIM like a password and make it visible when "Display password" is checked. 2015-08-28 01:54:53 +02:00
Mounir IDRASSI cfb591a9e9 Windows: Correctly display the password edit "black dot" instead of a '*' when showing it then hiding it. 2015-08-27 02:18:47 +02:00
Mounir IDRASSI 8c0fadc068 Language XML translations: use correct abbreviation for VeraCrypt Rescue Disk (VRD instead of TRD) 2015-08-27 02:18:44 +02:00
Mounir IDRASSI ad3b8eca69 Windows: Protect against using a container file as its own keyfile. Normalizing path names to never use '/' but always '\'. 2015-08-27 02:18:40 +02:00
Mounir IDRASSI 20cb199e55 Windows: Solve various issues in HotKeys assignment dialog by ensuring that keys are detected only when the assignment edit has the focus and also by taking a key into account only once even if it remains pressed contently (this solves issue http://sourceforge.net/p/veracrypt/discussion/technical/thread/6597c91a) 2015-08-27 02:18:36 +02:00
Mounir IDRASSI ef94506c34 Windows: Solve wrong PKCS-5 PRF label disabled in dialog for Add/Remove Keyfiles and Remove All Keyfiles 2015-08-16 21:29:00 +02:00
Mounir IDRASSI 55a267a171 Windows: Solve UI language change not taken into account for new install unless a preference is changed. Code refactoring. 2015-08-16 17:58:06 +02:00
Mounir IDRASSI ba9af46662 Language XML: use correct abbreviation for VeraCrypt Rescue Disk (VRD instead of TRD) 2015-08-14 01:58:45 +02:00
Mounir IDRASSI fa66a059d9 Windows Driver: support returning StorageDeviceProperty through IOCTL_STORAGE_QUERY_PROPERTY. 2015-08-14 01:58:42 +02:00
Mounir IDRASSI 1d36a1cd05 Windows: solve issue of option "Cache password in driver memory" not read on startup, making it always disabled unless a mount is attempted. 2015-08-14 01:58:39 +02:00
Mounir IDRASSI 5db8cdb98f Increment version to 1.13 2015-08-09 13:56:51 +02:00
Mounir IDRASSI 0cf2885e84 Windows: better error code when IOCTL_STORAGE_QUERY_PROPERTY type is not supported 2015-08-09 01:38:34 +02:00
Mounir IDRASSI f9c3bcd384 Windows: Solve crash of TOR when run from VeraCrypt volume by explicitly returning error code when unsupported IOCTL_STORAGE_QUERY_PROPERTY parameter encountered. 2015-08-09 00:17:46 +02:00
Mounir IDRASSI 96520e22bd Linux: modify official build script to use different build directories for wxWidgets console and GUI builds. 2015-08-06 12:31:32 +02:00
Mounir IDRASSI ff0ab2da93 Linux: Correct formating of license displayed in the installer 2015-08-06 12:31:28 +02:00
Mounir IDRASSI 174f7f498a Increment version to 1.12. Update user guide PDF file. 2015-08-06 00:04:29 +02:00
Mounir IDRASSI 041024fbb9 Update license information to reflect the use of a dual license Apache 2.0 and TrueCrypt 3.0. 2015-08-06 00:04:25 +02:00
Mounir IDRASSI a23943694b Language files: Remove duplicated entry in XML files. 2015-08-06 00:04:10 +02:00
Mounir IDRASSI e760d69bfd Language files: update French XML file. remove duplicated field. 2015-08-06 00:04:00 +02:00
Mounir IDRASSI c2d0d5e344 Windows: Add extra checks for bootloader tampering. 2015-08-06 00:03:56 +02:00
Mounir IDRASSI a06c41c5c9 Language files: update German XML file with anonymous contribution (Maria) 2015-07-31 17:39:37 +02:00
YanandMounir IDRASSI ee511e95b2 typo fix 2015-07-31 17:39:34 +02:00
YanandMounir IDRASSI 8454c23fcc Updated Russian translation 2015-07-31 17:39:30 +02:00
Mounir IDRASSI 2aa558d6f4 Language files: update German XML file to replace Volumen by Volume 2015-07-30 22:47:01 +02:00
Mounir IDRASSI 0eeff69332 Language Files: update polish translation 2015-07-30 01:37:51 +02:00
Mounir IDRASSI 1a897f8714 Language files: Update German translation received from anonymous contributor. 2015-07-30 00:51:02 +02:00
Mounir IDRASSI d94304f419 Language files: add new field related to bootloader fingerprint checking 2015-07-29 00:33:17 +02:00
Mounir IDRASSI 4535aee30f Language files: Update Polish translation received from anonymous contributor. 2015-07-29 00:33:13 +02:00
Mounir IDRASSI 6ca598f841 Windows: Implement Evil-Maid-Attack detection mechanism. Write the correct bootloader when changing the system encryption password: this enables to recover if an attack is detected. 2015-07-29 00:33:10 +02:00
Mounir IDRASSI 69a8ad5bba Linux/MacOSX: remove unused variable. 2015-07-25 23:59:01 +02:00
Mounir IDRASSI 78aa7de9bc Language files: update XML language files with new fields 2015-07-25 19:46:10 +02:00
Mounir IDRASSI 94ccaf1ab4 Linux: solve compilation error on OpenSUSE when linking against system wxWidgets. OpenSUSE enables STL in wxWidgets which causes the error because implicit casts are not available. 2015-07-25 13:39:50 +02:00
Mounir IDRASSI 4fcf5c921c Linux: Add "new-hash" switch for changing PRF and remove "current-hash" switch which didin't fit the change password/keyfile logic. 2015-07-19 11:29:47 +02:00
Mounir IDRASSI 5158953428 User Interface enhancements for PIM 2015-07-19 11:29:45 +02:00
Mounir IDRASSI 63818bcaa4 Windows: Don't offer "None" as wipe mode when real wipe is explicitly needed (like in Decoy system partition wipe case) 2015-07-14 16:58:30 +02:00
Mounir IDRASSI 88ef238593 Windows: in encryption wizard, clicking "Previous" in the "Large File Support" page should take to password page if PIM not enabled. 2015-07-14 15:47:38 +02:00
Mounir IDRASSI 046513b7c9 Windows: solve issue introduced by the new "Use PIM" checkbox that caused error when trying to encrypt system (the wizard was executing a wrong page) 2015-07-14 14:03:20 +02:00
Mounir IDRASSI 7d6cd0c92d Windows: on 64-bit Windows, more System favorite service from SysWoW64 to System32 since now all binaries are native 64-bit on 64-bit machines. 2015-07-13 23:35:23 +02:00
Mounir IDRASSI 103018b367 Windows: Fix memory access issues when processing language XML files. Avoid writing to locked memory resource which can trigger crash. 2015-07-13 23:35:20 +02:00
Mounir IDRASSI 52146825de Windows: workaround to solve system favorites failing to mount because underlying drive takes long time to be recognized by Windows. 2015-07-13 23:35:17 +02:00
Mounir IDRASSI a43a5ebb21 Windows: Modify PIM parts in GUI to make it easier to use. Users must explicitly check "User PIM" to enable its use. 2015-07-13 23:35:15 +02:00
Mounir IDRASSI 8fc08b1e46 Windows: Solve failure to create hidden volume when PIM used for outer volume. Correctly wipe password variable from memory. 2015-07-13 23:35:11 +02:00
Mounir IDRASSI b23cbf384f Windows: Set longer wait hint time for System Favorites Service to avoid being killed by Windows. Add extra system event logs to help trace any issues (there is no leak issue because this is done in case of System Favorite service which is only enabled when system is encrypted). 2015-07-13 23:35:08 +02:00
Mounir IDRASSI 2d0d4b06b1 Linux: Solve compilation warning (unused variables, pointer cast) 2015-07-11 01:58:39 +02:00
Mounir IDRASSI 944b6aa53f Linux: Solve error when building against dynamic wxWidgets library, especially under Ubuntu. 2015-07-11 01:58:36 +02:00
Mounir IDRASSI 6ef41abdd2 Use Pim name for internal variables instead of the old name Pin 2015-07-11 01:58:34 +02:00
Mounir IDRASSI 7a01453f00 Windows: Fix old issue inherited from TrueCrypt by initializing COM library before instantiating UAC COM object used for changing password. This issue made it impossible to change the password of a volume requiring administrative privileges. 2015-07-08 22:16:04 +02:00
Mounir IDRASSI b809cf62ae Windows: Disable Set Key Header Algorithm item in "Volumes" menu when the system partition is selected by the user using "Select Device" 2015-07-08 22:16:01 +02:00
Mounir IDRASSI 0ddd19d4ab Windows: Disable menu item for changing system header key derivation algorithm until it's actually implemented 2015-07-07 08:13:34 +02:00
Mounir IDRASSI 6a78f7eae2 Windows: better logic for FormatEx function call. To be replaced in the future by Microsoft COM interfaces. 2015-07-06 01:19:23 +02:00
Mounir IDRASSI 724043be0b Windows: Display source location of errors in order to help diagnose issues reported by users 2015-07-06 01:19:21 +02:00
Mounir IDRASSI c3b77fba25 Linux: Support checking/reparing mounted filesystem on KDE when xterm not available 2015-07-04 17:48:20 +02:00
Mounir IDRASSI 218f63b4b6 Windows: re-size some controls to avoid text truncation. 2015-07-03 23:27:40 +02:00
Mounir IDRASSI b4b51bd909 Windows: Solve privacy issue inherited from TrueCrypt and linked to the update of configuration and history XML files everytime VeraCrypt main window is opened, even if there was no modifications. This could give information about the usage of VeraCrypt. Now, configuration and history XML files are updated only when there are modifications. 2015-07-03 02:12:28 +02:00
Mounir IDRASSI bef713de1a Language XML: Add newlines to PIM Help Text to make clearer for reading 2015-07-03 02:12:25 +02:00
Mounir IDRASSI 8f4b970dc1 Windows: Explicitly use internal PKCS#11 headers for building 2015-07-03 02:12:22 +02:00
Mounir IDRASSI 439e0a9588 Linux/MacOSX: Add dedicated PIM page in the volume creation wizard. Correct PIM value check logic. 2015-06-28 20:25:22 +02:00
Mounir IDRASSI da8aec4292 Linux: don't ask for PIM if TrueCryptMode enabled, both in command line and GUI 2015-06-26 22:07:17 +02:00
Mounir IDRASSI d73df9bbd4 Linux: if a keyfile is specified in the command line without a password, don't try to mount using an empty password unless its TrueCryptMode or an empty password has been explicitly specified. 2015-06-24 23:58:52 +02:00
Mounir IDRASSI d734ce4635 Linux/MacOSX: solve GUI layout issues although the volume creation wizard still has issues 2015-06-24 23:35:30 +02:00
Mounir IDRASSI 2cd39b37c2 Linux/MacOSX: restore normal file mode to some source files 2015-06-24 15:33:23 +02:00
Mounir IDRASSI ea27cace41 Linux: solve bug when "-tc" command line switch is not followed by another switch. In this case, the value coming after the "-tc" switch was ignored from processing. 2015-06-24 15:33:20 +02:00
Mounir IDRASSI 9913af3a8e Linux/MacOSX: first dynamic mode implementation 2015-06-24 15:33:16 +02:00
Mounir IDRASSI f927ce9b58 Windows: Add a dedicate page for volume PIM in the volume creation wizard 2015-06-21 20:47:01 +02:00
Mounir IDRASSI 5d9d49e989 Windows: in "VeraCrypt Format.exe", erase the volume PIM value after the process is finished to avoid displaying it again if the user starts a new creation process right after 2015-06-19 18:32:03 +02:00
Mounir IDRASSI d31466ae7a Windows: If PIM of a volume is changed and if it is a favorite or system favorite, automatically update favorite or system favorite XML file with the new value. 2015-06-19 18:31:59 +02:00
Mounir IDRASSI 7d55b028f2 Windows: Use "PIM" instead of "PIN" in favorites XML file 2015-06-19 18:31:53 +02:00
Mounir IDRASSI 44234a0ccc Windows installer: solve Windows XP 32-bit incompatibility issue introduced previously. 2015-06-12 00:01:12 +02:00
Mounir IDRASSI 6be12f4889 Windows: Implement waiting dialog for Auto-Mount Devices operations to avoid freezing GUI. 2015-06-10 01:13:56 +02:00
Mounir IDRASSI b7eadfd310 Windows: solve installer issue on Windows 10 caused by failure to overwrite VeraCrypt driver file. 2015-06-10 01:13:53 +02:00
Mounir IDRASSI a7a8d57bca Windows: rename PIN to PIM to avoid confusion. Better error messages. 2015-06-08 01:16:34 +02:00
Mounir IDRASSI 00cd134720 Windows: Add command line switch parameter for temporary caching of password during favorites mounting (/cache favorites). Correct implementation of "/cache y". 2015-06-08 01:16:29 +02:00
Mounir IDRASSI c3c1bdd29d Windows: Add support for PIN in favorites. Several enhancements to GUI handling of Dynamic Mode. 2015-06-07 01:38:34 +02:00
Mounir IDRASSI 550e2bcf3b Windows: fix buffer overrun issue when parsing language XML file 2015-05-31 08:09:46 +02:00
Mounir IDRASSI 57343ce04c Windows: reorder command line switched with alphabetical order for better help display 2015-05-29 02:22:12 +02:00
Mounir IDRASSI fdc2143bfa Windows: workaround FormatEx keeping references on formatted volume by adding extra delays. 2015-05-29 02:22:08 +02:00
Mounir IDRASSI 5867250820 Windows: Display VeraCrypt version information when the command line switch /help is used. 2015-05-29 02:22:05 +02:00
Mounir IDRASSI 70215e3682 Windows: GUI modifications around PIN field 2015-05-27 01:01:53 +02:00
Mounir IDRASSI 8ebf5ac605 Windows: first implementation of dynamic mode 2015-05-26 01:38:15 +02:00
Mounir IDRASSI 85e5e383f9 Windows: solve 64-bit compilation warnings after checking that they are harmless. 2015-05-26 01:38:11 +02:00
Mounir IDRASSI a8651ac014 Language files: update XML language files with new fields 2015-05-22 22:59:00 +02:00
Mounir IDRASSI 1c08ea01f1 Windows Setup: Integrate 64-bit builds of exe files into the installer. Only install 64-bit exe files on Windows 64-bit. This gives a boot in performance for encryption/decryption of partitions/drives on Windows 64-bit. 2015-05-22 22:58:55 +02:00
Mounir IDRASSI 0d23312886 Windows: Modifications to build 64-bit versions of VeraCrypt.exe & "VeraCrypt Format.exe". 2015-05-22 22:58:51 +02:00
Mounir IDRASSI c44c1ac9ce Windows: make random generator function compatible with 64-bit execution environment 2015-05-22 12:00:23 +02:00
Mounir IDRASSI 32ba1ebcff Windows: Correctly detect switch user and RDP disconnect as session locking so that autodismount could be performed when it's enabled in the preferences 2015-05-22 12:00:20 +02:00
Mounir IDRASSI 138d22a254 Windows: remove crash dump analysis functionality. It didn't always work and it required external debugging tools. 2015-05-22 12:00:17 +02:00
Mounir IDRASSI 330bed0c42 Windows: correct typo in help text 2015-05-22 12:00:13 +02:00
Mounir IDRASSI f72125ea71 Windows: First implementation of non-system volumes decryption. 2015-05-17 12:16:16 +02:00
Mounir IDRASSI 4695920b41 Language XML: Use correct links in displayed message. 2015-05-15 00:02:41 +02:00
Mounir IDRASSI e95c075f0c Windows driver: avoid race condition by using IoAttachDeviceToDeviceStackSafe instead IoAttachDeviceToDeviceStack. Set BootArgs.CryptoInfoLength to 0 after clearing boot memory. 2015-05-15 00:02:38 +02:00
Mounir IDRASSI 4a5154e750 Windows Driver: fix wrongly reported bad sectors by chkdsk caused by a bug in IOCTL_DISK_VERIFY. There was no real issue in sectors. 2015-05-10 01:26:18 +02:00
Mounir IDRASSI b3646b3237 Windows: Solve detection issue when resuming encryption. Add separate logic for manual selection of device and display error message in case of failure. 2015-05-06 23:31:37 +02:00
Mounir IDRASSI 061292130d Windows: When resuming in-place encryption, add manual selection of partition possible. Display wait dialog when performing detection. 2015-05-04 00:06:26 +02:00
Mounir IDRASSI d1c1aa369c Windows: Make the Format wizard work again when launched from VeraCrypt menu. 2015-05-03 15:47:31 +02:00
Mounir IDRASSI 7d52dda67c Windows Driver: Implement querying physical sector size of veraCrypt volume through IOCTL_STORAGE_QUERY_PROPERTY 2015-05-03 15:47:29 +02:00
Mounir IDRASSI 0f2d32f011 Windows: enable showing/hiding password for system encryption in Windows UI and in the bootloader (F5 key). This will be helpful to diagnose issues with non-US versions of Windows. 2015-05-03 15:47:25 +02:00
Mounir IDRASSI a1f1e34789 Windows: Modify custom window class names to less generic value in order to avoid collision with existing class names. 2015-05-03 15:47:22 +02:00
Mounir IDRASSI eac440ae9e Windows: Support A: and B: as driver letters for mounting volumes. 2015-04-27 23:59:53 +02:00
Mounir IDRASSI dc3bc64b86 Windows: Better command line handling to make it more strict and robust. This avoids issues when using wrong syntax. 2015-04-27 23:59:49 +02:00
Mounir IDRASSI 9ccb8a97af Linux: in command line, support hash algorithm names without '-' as on Windows ("sha256", "sha512", "ripemd160") 2015-04-26 00:05:22 +02:00
Mounir IDRASSI bf8e07966b Language XML: update German translation 2015-04-26 00:05:18 +02:00
Mounir IDRASSI 093fada00b Language XML: add new IDC_PREF_TEMP_CACHE_ON_MULTIPLE_MOUNT field to translations 2015-04-19 22:00:16 +02:00
Mounir IDRASSI 4890a65106 Windows: solve translation issue with IDM_DEFAULT_MOUNT_PARAMETERS menu item 2015-04-19 22:00:11 +02:00
Mounir IDRASSI 2ec75c5f8e Linux: Correct wxWidgets assert warnings when displaying about/LegalNotice dialogs. This didn't happen with official binaries because the library used disables asserts. 2015-04-19 16:31:28 +02:00
Mounir IDRASSI 29501638d1 Windows: lower position of "Never save history" checkbox to avoid wrong clicks 2015-04-19 16:12:57 +02:00
Mounir IDRASSI 856395962b Linux installer: Add support for kdesudo and correct usage of konsole external call. 2015-04-19 16:12:53 +02:00
Mounir IDRASSI bb2149aac8 Windows: add a test code-signing certificate and a batch file to sign binaries and the installer with it. 2015-04-11 00:32:20 +02:00
Mounir IDRASSI 8e4a68af3b MacOSX: Set properly the version in the bundle and the installation package. Allow downgrading using older installers. 2015-04-06 19:50:30 +02:00
Mounir IDRASSI 4a8040735b MacOSX: Correctly handle OSX dock "reopen-application" event and Cocoa openFiles message instead of the deprecated Carbon "open-document" event 2015-04-06 19:50:27 +02:00
Mounir IDRASSI ae28d51016 Linux/MaxOSX: correctly detect type of internal exceptions 2015-04-06 19:50:24 +02:00
Mounir IDRASSI 32f11001c0 MacOSX: solve issue volumes not auto-dismounting when quitting VeraCrypt. restore main VeraCrypt window if is in background when we need to display various dialogs 2015-04-06 19:50:21 +02:00
Mounir IDRASSI a0ebc22d1f Windows: update projects build dependencies in Visual Studio solution files 2015-04-06 06:16:43 +02:00
Mounir IDRASSI 9159a0777d Language: Update language XML files 2015-04-06 06:16:40 +02:00
Mounir IDRASSI 0718a4ec20 Increment VeraCrypt version to 1.0f-2 2015-04-06 00:22:48 +02:00
Mounir IDRASSI f2cda804dc Update user guide PDF 2015-04-06 00:22:45 +02:00
Mounir IDRASSI b68fec97ea Windows: Require upgrading rescue disk since we changed bootloader in 1.0f-2 2015-04-06 00:22:42 +02:00
Mounir IDRASSI eefaefccc0 Windows: use secure string functions 2015-04-06 00:22:39 +02:00
Mounir IDRASSI 2784652ab8 Windows vulnerability fix: CryptAcquireContext vulnerability fix. Add checks to random generator to abort in case of error and display a diagnose message to the user. 2015-04-06 00:22:36 +02:00
Mounir IDRASSI a284922ce4 Linux/MacOSX: Always add the source location when system exception occur in order to help diagnose users issues. 2015-04-05 14:25:15 +02:00
Mounir IDRASSI c4d30b34ba Linux/MacOSX: correctly handle some internal exception classes that were missed by the WaitDialog class. 2015-04-05 14:25:12 +02:00
Mounir IDRASSI a5203dd006 Windows Setup: Avoid potential issues by correctly initializing variables and checking memory allocation. 2015-04-05 14:25:09 +02:00
Mounir IDRASSI 474505d704 Linux: solve mount point permission issues for some users where the non-FAT volumes were only mounted in read-only mode 2015-03-23 09:07:58 +01:00
Mounir IDRASSI d3db2548b5 Windows: correctly handle WIN32 LastError when mounting. Harmonize file access checks between GUI and console. Skip ERROR_SHARING_VIOLATION in primary check in order to let the driver handle it more thoroughly. 2015-03-19 00:16:38 +01:00
Mounir IDRASSI f397f70fbe Windows Setup: When clicking uninstall link, launch Windows Add/Remove program instead of uninstall directly in order to avoid being flagged as legacy application by the Windows Program Compatibility Assistant (see number 5 in Microsoft UI Design Standard https://msdn.microsoft.com/en-us/library/ms954377.aspx) 2015-03-17 22:13:52 +01:00
Mounir IDRASSI ae5867f8b1 Windows Setup: remove other VeraCrypt references for registry. 2015-03-16 08:45:19 +01:00
Mounir IDRASSI ec4be21492 Windows Setup: implement removal of special LEGACY_VERACRYPT registry keys. 2015-03-15 23:46:12 +01:00
Mounir IDRASSI ed604cf0f3 Windows: VeraCrypt reference from various registry locations. Uninstall old VeraCrypt COM interfaces that were left after upgrading. 2015-03-13 18:09:21 +01:00
Mounir IDRASSI ef196b5ca5 Add Coverity define to avoid false positives during Static Code Analysis when TC_THROW_FATAL_EXCEPTION is used in the code 2015-03-08 20:14:33 +01:00
Mounir IDRASSI 279c99fdf8 Linux/MacOSX: Load preferences if only volume path is given in command line and GUI mode enabled. 2015-03-08 20:14:30 +01:00
Mounir IDRASSI f80f7d47d5 Windows: Avoid temporary caching password when mounting multiple favorites. Add option to activate this if needed. 2015-03-04 00:27:04 +01:00
Mounir IDRASSI 8e6707cc22 Windows: if TrueCrypt volume created with a version prior to 6.0, display this version in the error message to help users understand why it is not working. 2015-03-02 00:23:58 +01:00
Mounir IDRASSI f09f8e3a31 Windows Bootloader: Display message after entering password to inform user that the password is being processed. Without this, users coming from TrueCrypt think that the system is freezed since they expect it to boot quickly. 2015-03-02 00:23:55 +01:00
Mounir IDRASSI 21be04cb6e Update test containers and benchmark script to support hidden containers and measure wrong password time 2015-02-28 22:47:41 +01:00
Mounir IDRASSI ba1e9c8f4d Linux/MacOSX: A configuration option for default hash and default TrueCrypt mode used for mounting volumes (Menu Settings -> Default Mount Parameters). Implement priority of command line arguments over default values. 2015-02-28 17:03:38 +01:00
Mounir IDRASSI 6e73a8a393 Linux/MacOSX: Modify wxFormBuilder generated files directly to solve the 'X' icon not closing some dialog because we can't workaround wxFormBuilder bug without introducing other issues (the correct SetExtraStyle call must be present at the beginning of the constructor, so it must be present in the generated files). Each time we generated new sources, Forms.cpp must be manually modify it to keep this correction. 2015-02-27 18:07:36 +01:00
Mounir IDRASSI 176bec1bb2 Revert "Linux/MacOSX: solve the 'X' icon not closing some dialog. This was caused by a bug of wxFormBuilder that calls SetExtraStyle without taking care of the previous value."
This reverts commit 400fd599f812b057b0674f2ae0e0141e7c35a332.
2015-02-27 18:07:33 +01:00
Mounir IDRASSI 31b238872e Readme.md: indicate that on MacOSX building a console-only binary is not supported. 2015-02-25 22:57:15 +01:00
Mounir IDRASSI b730e965c5 Readme.txt: indicate that on MacOSX building a console-only binary is not supported. 2015-02-25 22:54:39 +01:00
Mounir IDRASSI a916135f3c Windows: Use default hash in the options of hidden volume protection 2015-02-25 09:09:03 +01:00
Mounir IDRASSI b2020c9fb7 Language XML: change the wording of password error messages to reflect the possibility of a wrong PRF. Replace "VeraCrypt volume" by "valid volume" since TrueCrypt is also supported. 2015-02-24 12:11:55 +01:00
Mounir IDRASSI 188b459d28 Windows: remove topmost and system modal properties from the wait dialog so that it doesn't disturb other applications. 2015-02-24 00:41:59 +01:00
Mounir IDRASSI 39bf211ebe Add test containers and Windows benchmark script for mount performance 2015-02-24 00:41:56 +01:00
Mounir IDRASSI 06af5ce7fd Windows: check password length for outer volume during hidden volume creation to avoid potential plausible deniability issues. 2015-02-22 21:29:42 +01:00
Mounir IDRASSI 7fb5af6ada Windows: Add menu option to set default hash and default TrueCrypt mode used for mounting volumes (Menu Settings -> Default Mount Parameters) 2015-02-22 01:03:22 +01:00
Mounir IDRASSI cb9859fa0e Speed and memory usage optimization for key derivation based on patches by Nils Maier. 20% improvement on 64-bit CPU for SHA512 and SHA256, 11% for Whirlpool and 13% for RIPEMD-160. 2015-02-22 01:03:19 +01:00
Mounir IDRASSI 717ffadf93 Windows Installer: don't add link to VeraCryptExpander in the desktop. 2015-02-16 00:19:39 +01:00
Mounir IDRASSI 419586d4a2 Language: update German XML with translation contributed by H. Sauer 2015-02-16 00:19:37 +01:00
Mounir IDRASSI 450cde5fac Language: update French translation (contributed by Thierry T.) 2015-02-16 00:19:34 +01:00
Mounir IDRASSI b2d119f781 Language: Update language XML files with new added fields 2015-02-16 00:19:32 +01:00
Mounir IDRASSI 7818c0e0e3 Window: add menu entry for launching VeraCryptExpander 2015-02-16 00:19:28 +01:00
Mounir IDRASSI 86529dadde Linux/MacOSX: solve the 'X' icon not closing some dialog. This was caused by a bug of wxFormBuilder that calls SetExtraStyle without taking care of the previous value. 2015-02-16 00:19:24 +01:00
Mounir IDRASSI 544c55debc Linux: Perform a quick NTFS formatting by adding the "-f" switch to mkfs.ntfs. Without this, the creation of big NTFS volumes takes ages. The code already takes care of the empty sectors by encrypting them with different key to randomize plaintext. 2015-02-13 16:18:00 +01:00
Mounir IDRASSI 2b826843de Windows: Add VeraCryptExpander.exe to the Windows installer. 2015-02-13 12:31:16 +01:00
Mounir IDRASSI b920bb2a6a Linux: modify installer script to make it run when the "less" command doesn't support the -X argument (Busybox case) 2015-02-11 09:02:41 +01:00
Mounir IDRASSI 5012e0941a Linux: Add graphical installer support when xterm is not available (Linux Mint case) 2015-02-10 12:45:36 +01:00
Mounir IDRASSI 1eb8aec9fa Language: update German translation (contributed by H.S.) 2015-02-10 12:45:33 +01:00
Mounir IDRASSI 2b8aa2df16 Windows: Solve PIN blocked issue when trying to mount a volume right after configuring the PKCS#11 module. Always ensure that we are using a valid window handle as a parent. 2015-02-09 11:01:26 +01:00
Mounir IDRASSI 5f252f2c50 Static Code Analysis: check return of remove function and display message when it fails. 2015-02-09 11:01:23 +01:00
Mounir IDRASSI d5f34ad49d Static Code Analysis: Avoid over-flaw in arithmetic operations by adding more checks. Add extra checks. Solve various issues. 2015-02-09 11:01:21 +01:00
Mounir IDRASSI 608e86c7bc Static Code Analysis: solve issues in Expander. Use real random values for wipe buffers. 2015-02-09 11:01:18 +01:00
Mounir IDRASSI 516da2229d Static Code Analysis: in Windows Driver, avoid using uninitialized stack memory as random and use proper random value for wipe operation. Solve potential double-free issue. 2015-02-09 11:01:16 +01:00
Mounir IDRASSI 28a9eaf0e3 Static Code Analysis: code potential memory leaks in inflate.c used by the setup. 2015-02-09 11:01:13 +01:00
Mounir IDRASSI de0c30dded Static Code Analysis: handle unused variables more properly. Catch STL exception. Add more checks. Add proper cast to arithmetic operations. 2015-02-09 11:01:11 +01:00
Mounir IDRASSI 1ab00f3e3c Static Code Analysis: Correct memory leaks. Add more checks. 2015-02-09 11:01:08 +01:00
Mounir IDRASSI 651bea29b4 Static Code Analysis: clarify macros definition and use. 2015-02-09 11:01:06 +01:00
Mounir IDRASSI 4e03adc2e7 Static Code Analysis: Add more checks. Avoid unhandled ATL exceptions by checking memory allocation. Avoid throwing exception in File constructor and simplify code. 2015-02-09 11:01:03 +01:00
Mounir IDRASSI d1a3316e44 Linux: solve rare issue where VeraCrypt wrongly reports that another instance is already running. That happens when VeraCrypt doesn't close cleanly upon shutdown/reboot and on the next startup another process is running with the same PID as VeraCrypt before shutdow/reboot. 2015-02-08 17:57:00 +01:00
Mounir IDRASSI 2c96d17748 Linux/MacOSX: mark RIPEMD-160 as deprecated like it's the case on Windows. It will no more be available for the creation of volumes. 2015-02-08 16:20:40 +01:00
Mounir IDRASSI ad4af09d88 Linux: When not under Gnome/KDE, use xdg-open to open the mounted volume if it is available. 2015-02-08 16:20:37 +01:00
Mounir IDRASSI 96b39a5973 Windows: retry UAC prompt operation in case of failure. This avoids cancel the whole operation if the user is not in front of the machine during UAC prompt (this happens ofter during in-place encryption of big NTFS partitions). 2015-02-08 10:07:44 +01:00
Mounir IDRASSI b16cfa959d Windows: rename VeraCryptExpander project in the global solution 2015-02-08 10:07:41 +01:00
Mounir IDRASSI f98a691933 Windows Setup: implement removal of non-empty directories to avoid errors during uninstall. 2015-02-08 10:07:38 +01:00
Mounir IDRASSI 35497f87a7 Activate support of mounting TrueCrypt system partitions. 2015-02-08 10:07:36 +01:00
Mounir IDRASSI d01fa11983 Linux/MacOSX: use command line values of TrueCryptMode and PRF as defaults for the password dialog 2015-02-08 10:07:33 +01:00
Mounir IDRASSI 3d8d088b06 Windows: use command line values of TrueCryptMode and PRF as defaults for the password dialog 2015-02-08 10:07:30 +01:00
Mounir IDRASSI 89a9763b11 Windows: Correct displaying wrong TrueCrypt mode in volume properties when SHA-256 is used. Issue reported and fixed by user Ache on CodePlex (https://veracrypt.codeplex.com/workitem/65) 2015-01-23 01:41:31 +01:00
Mounir IDRASSI 1efb782666 Windows: Add first version of VeraCryptExpander who is based on extcv. Minor modification to Mount.c to avoid link errors when building VeraCryptExpander. 2015-01-20 12:42:04 +01:00
Mounir IDRASSI 38f3fc816a Windows: use the same waiting message in dialog resource as it is in the language XML file. 2015-01-20 12:41:55 +01:00
Mounir IDRASSI 3794df4f31 Update the FAQ section of the user guide to include TrueCrypt support information. 2015-01-06 00:19:03 +01:00
Mounir IDRASSI 3502681f77 Clarify the waiting dialog message. 2015-01-05 23:08:38 +01:00
Mounir IDRASSI 8252cc3ec7 Linux/MacOSX: Add support for TrueCrypt 6.x as it was done on Windows. 2015-01-04 23:59:22 +01:00
Mounir IDRASSI 6a254778e2 Linux/MacOSX: Add wait dialog to the benchmark computation. Correct handling of wait dialog call when changing password and creating volumes. 2015-01-04 23:53:35 +01:00
Mounir IDRASSI 41607d126a Linux/MacOSX: make the cancel button work on the preferences dialog. 2015-01-04 19:28:42 +01:00
Mounir IDRASSI f53554a46a Increment version to 1.0f-1 and update language files and PDF with information about TrueCrypt 6.0 support. 2015-01-04 16:29:40 +01:00
Mounir IDRASSI 03e64e842a Language XML: correct error message to show that we support TrueCrypt 6.0 and above. 2015-01-04 16:29:36 +01:00
Mounir IDRASSI 2894bade88 Windows: better display of volume information and benchmark results. 2015-01-04 16:29:34 +01:00
Mounir IDRASSI cc02c78a8c Windows Driver: add TrueCrypt mode of mounted volumes to the output of TC_IOCTL_GET_MOUNTED_VOLUMES 2015-01-04 16:29:31 +01:00
Mounir IDRASSI 4f56a0a53d Windows: Add support for TrueCrypt 6.x since its format (v4) is identical to 7.x apart from the sector size field which we already handle correctly. 2015-01-04 16:29:29 +01:00
Mounir IDRASSI cbc28bd4fe Linux/MacOSX: change cascade encryption naming format in the UI as it was done on Windows. 2015-01-04 00:55:36 +01:00
Mounir IDRASSI 9a31c23881 Linux/MacOSX: workaround for wxWidgets bug in the method wxTextEntry::IsEmpty that made it impossible to enter a one digit size for the volume. 2015-01-03 23:54:12 +01:00
Mounir IDRASSI 55b3400afa Windows: change cascade encryption naming format to reflex mathematical composition of the encryption algorithm, thus being more clear. For example AES(Twofish(Serpent)) instead of AES-Twofish-Serpent. 2015-01-03 23:54:09 +01:00
Mounir IDRASSI 8f5fd67ff3 Windows: solve XP issue where the installer has missing/blacked out text boxes. 2015-01-03 00:29:02 +01:00
Mounir IDRASSI ad9b40d599 Linux: solve link error on recent Ubuntu when using shared wxWidgets. 2015-01-02 17:12:36 +01:00
Mounir IDRASSI 271d39d942 User Guide: add documentation for /hash command line switch on Windows that is used to specify the PRF of a volume. 2015-01-02 17:12:34 +01:00
Mounir IDRASSI 696166c9d4 Readme: add makeself to the build requirements for Linux. 2015-01-02 14:55:04 +01:00
Mounir IDRASSI aba8840625 Update the user guide with new screenshots and an entry for TrueCrypt compatibility 2014-12-31 01:01:14 +01:00
Mounir IDRASSI ac981c62c5 Increment version to 1.0f and update language XML files with new fields. 2014-12-31 01:01:11 +01:00
Mounir IDRASSI 41c12afefd Windows driver: don't fail if the PRF recovered from boot memory is not recognized in case we are dealing with a restored bootloader coming from a version prior to 1.0f. 2014-12-30 22:31:37 +01:00
Mounir IDRASSI 7c050d681d Linux/MacOSX: code refactoring and cleanup. 2014-12-30 19:57:08 +01:00
Mounir IDRASSI c178e325b8 Linux/MacOSX: Implement TrueCrypt conversion and loading support. Correct many GTK issues linked to multi-threaded origine of events by implementing an automatic mechanism for handling such requests in the main thread. 2014-12-30 17:06:20 +01:00
Mounir IDRASSI 8d787dcd71 Windows: propose only hash algorithm that support system encryption when the user select the option to a partition as an encrypted system partition. 2014-12-28 23:27:59 +01:00
Mounir IDRASSI 25c3d15ed7 Windows: support loading TrueCrypt volumes. Implement converting TrueCrypt volumes to VeraCrypt using the change password functionality. 2014-12-28 23:27:56 +01:00
Mounir IDRASSI ec9ff0fc1d Windows: make the wait dialog wider to accommodate long messages 2014-12-28 23:27:53 +01:00
Mounir IDRASSI 9a228ff045 Windows: use the selected hash algorithm when resuming interrupted process. This reduces volume opening time. 2014-12-28 23:27:51 +01:00
Mounir IDRASSI a8cc93f995 Windows: implement wait dialog for benchmark operation. 2014-12-28 23:27:48 +01:00
Mounir IDRASSI 2b1a166d23 Linux/MacOSX: Add possibility to choose 1-pass wipe mode without changing the default wipe mode (3-pass). 2014-12-28 23:27:46 +01:00
Mounir IDRASSI a27792cfcf Windows: Add possibility to choose 1-pass wipe mode in all cases without changing the default wipe mode. 2014-12-28 23:27:43 +01:00
Mounir IDRASSI e18f3cf381 Windows: use the correct parent window when changing the password of the encrypted system partition. 2014-12-27 13:39:26 +01:00
Mounir IDRASSI f4c864e88e Windows: implement wait dialog for the backup/restore header operations. 2014-12-27 13:39:24 +01:00
Mounir IDRASSI a8112b8373 Windows: use the correct window handle for creating message boxes. This became important after the introduction of the wait dialog in order to avoid having message boxes behind the wait dialog. 2014-12-27 13:39:22 +01:00
Mounir IDRASSI 2dbbd6b9d2 Windows: implement wait dialog for the change password operation. 2014-12-27 13:39:18 +01:00
Mounir IDRASSI c92d51e040 Windows: make the wait dialog mechanism more generic in order to reuse it more widely across VeraCrypt. 2014-12-27 13:39:16 +01:00
Mounir IDRASSI 258ba629a2 Windows: workaround freezing of waiting dialog but setting its parent to the desktop and making all mount calls in a separate thread. DeviceIoControl is making our like hard because it doesn't behave as a normal system call and it blocks our window message loop even when called from a separate thread. 2014-12-26 16:55:21 +01:00
Mounir IDRASSI d90d9f0c40 Linux/MacOSX: Implement waiting dialog for lengthy operations in order to have a better user experience. 2014-12-26 00:51:52 +01:00
Mounir IDRASSI bbcc944855 Windows: resize hot keys dialog to avoid displaying scroll-bars. 2014-12-22 01:02:55 +01:00
Mounir IDRASSI e1157ea935 Windows: Solve issue of some dialogs not showing up and that was caused by wrong handling of WM_NOTIFY messages. This behavior appeared after switching to Windows visual styles. 2014-12-22 01:02:53 +01:00
Mounir IDRASSI 9267450346 MacOSX: Increment installer version to 1.0f-BETA3 2014-12-21 00:30:23 +01:00
Mounir IDRASSI bb5e96a679 Linux: update the embedded data index inside the installer because the license content became bigger. 2014-12-20 22:36:10 +01:00
Mounir IDRASSI b8373ae933 Linux: Update license file displayed in the installer. 2014-12-20 21:38:07 +01:00
Mounir IDRASSI 5ef923f26c Increment version to 1.0f-BETA3 and update language XML files with new fields. 2014-12-20 19:33:55 +01:00
Mounir IDRASSI 7a89f0f0e1 Linux/MacOSX: Add a donation menu entry 2014-12-20 17:37:36 +01:00
Mounir IDRASSI 496701851f Linux/MacOSX: remove calls to non existent class VolumeLayoutV1Hidden 2014-12-20 15:48:00 +01:00
Mounir IDRASSI 4b9f8b232b Reduce time for reporting wrong password by removing support for legacy hidden format because it was never functional and it was superseded by current hidden format. 2014-12-20 15:31:24 +01:00
Mounir IDRASSI 02cbecff64 Windows: Add a donation menu entry 2014-12-20 15:31:22 +01:00
Mounir IDRASSI fbe1bbaffd Windows: Add missing PRF selection combobox in password page of Format program wizard. 2014-12-20 10:12:37 +01:00
Mounir IDRASSI 94737b2a7a Windows: change command line switch for PRF selection to /hash in order to match its value on Linux/MacOSX. Support hash names with and without the '-' character. 2014-12-19 18:41:43 +01:00
Mounir IDRASSI 07156b6c09 Linux/MacOSX: Enhance performance by implementing the possibility to choose the correct hash algorithm of volumes during various operations (mount, change password...), both using the GUI and the command line. 2014-12-19 18:41:41 +01:00
Mounir IDRASSI 18dc75ee62 Correct small typo in language XML file. 2014-12-19 15:25:53 +01:00
Mounir IDRASSI a3f7bcf45b Windows: replace stricmp by _stricmp to remove compilation warning 2014-12-17 12:15:01 +01:00
Mounir IDRASSI c98400a2b7 Windows: in silent mode, don't show the wait dialog during mount operation 2014-12-17 12:14:59 +01:00
Mounir IDRASSI 5b151492bd Windows: Remove Truecrypt name is error message. 2014-12-17 12:14:58 +01:00
Mounir IDRASSI c27461572c Windows: Enhance performance by implementing the possibility to choose the correct hash algorithm of volumes during various operations (mount, change password...). In case of system encryption, slightly speedup Windows startup time by making the driver pickup the correct hash algorithm used for the encryption. 2014-12-16 00:17:59 +01:00
Mounir IDRASSI 6349162303 Windows: display a wait dialog during the lengthy opening of a volume. There is still a freeze in the GUI even though the call to DeviceIoControl is done in a separate thread which can't be explained. Maybe if we had an asynchronous Device Driver call, things would better. 2014-12-16 00:17:57 +01:00
Mounir IDRASSI e935ec55dd Windows: Enable Visual Styles for a modern look-and-feel 2014-12-16 00:17:55 +01:00
Mounir IDRASSI d328269492 Linux/macOSX: always display random gathering dialog/interface before performing sensitive operations that needs good quality random. 2014-12-11 18:31:41 +01:00
Mounir IDRASSI 134ef04140 Windows: always display random gathering dialog when UserEnrichRandomPool is called instead of once per application run. This is implemented through the call SetRandomPoolEnrichedByUserStatus(FALSE) at the begining of sensitive operations instead of changing UserEnrichRandomPool because in the same call there can be many calls to UserEnrichRandomPool which can result in displaying the dialog many times. 2014-12-11 18:31:39 +01:00
Mounir IDRASSI c8c8cc517d Linux/MacOSX: Implement generating more than one keyfile, specifying the size of the generated keyfiles and letting VeraCrypt choose random size values. 2014-12-11 18:31:38 +01:00
Mounir IDRASSI e673006969 Update license text to show VeraCrypt name while maintaining the TrueCrypt license. 2014-12-11 18:31:35 +01:00
Mounir IDRASSI 520d885840 Correct XML syntax for symbols '<' and '>' 2014-12-11 18:31:34 +01:00
Mounir IDRASSI eb9cb16aeb Windows: Implement specifying the size of the generated keyfiles and also letting VeraCrypt choose random size values. 2014-12-11 18:31:32 +01:00
Mounir IDRASSI 32e72d1117 Implement function RandgetBytesFull that enables generating random bytes of any length. 2014-12-11 18:31:30 +01:00
Mounir IDRASSI fd0e434087 Windows: correct lock issue in RandgetBytes by releasing critical section in case of error. 2014-12-11 18:31:29 +01:00
Mounir IDRASSI 84a279a83f Windows Driver: change inherited TrueCrypt constants in kernel objects tags by VeraCrypt specific values. These are used in crash dumps analysis and during debugging. 2014-12-11 18:31:27 +01:00
Mounir IDRASSI 9a6b371c96 MacOSX/Linux: Solve truncated text in some Wizard windows by defining a large enough minimum size. 2014-12-07 22:40:27 +01:00
Mounir IDRASSI 078614fbce Windows: Implement creation of multiple keyfiles at once. 2014-12-07 22:40:25 +01:00
Mounir IDRASSI ec327c006e Windows: implement auto-dismount option when session is locked 2014-12-07 22:40:23 +01:00
Mounir IDRASSI 03afe1224a Windows: correct issue in handling "More information on keyfiles" link that caused a crash on some machines 2014-12-04 13:47:37 +01:00
Mounir IDRASSI 11013ce71e Linux/macOSX: handle project URLs using the new values 2014-12-04 13:47:35 +01:00
Mounir IDRASSI a185b540bd Windows: put back the tutorial prompt since we now have online documentation. 2014-12-04 13:47:33 +01:00
Mounir IDRASSI a5df5d981a Windows: correct issue in displaying PDF of User Guide. 2014-12-04 13:47:31 +01:00
Mounir IDRASSI dfff927389 Windows: update URLs to points to the online documentation. Use a dedicated donation link. 2014-12-04 13:47:30 +01:00
Mounir IDRASSI e6ebc63c66 Update VeraCrypt User Guide 2014-12-01 00:34:16 +01:00
Mounir IDRASSI f31c7b3a88 Add test vectors for HMAC-SHA256 and PBKDF2-HMAC-SHA256 2014-12-01 00:34:13 +01:00
Mounir IDRASSI bc9005968a Windows: Avoid calling RegCloseKey on an invalid handle. 2014-11-11 19:25:05 +01:00
Mounir IDRASSI b2438b5029 Windows: close file handle if the call to GetFileSize fails. 2014-11-10 23:11:12 +01:00
Mounir IDRASSI 51fa86b246 Copy license file to the top of git repository 2014-11-08 23:59:26 +01:00
Mounir IDRASSI b5dfe9c9ed Add copy of src/Reader.txt to make Github happy 2014-11-08 23:42:51 +01:00
Mounir IDRASSI c3353c71d4 Readme: Add more MacOSX specific details concerning the build of VeraCrypt following users feedback 2014-11-08 23:24:59 +01:00
Mounir IDRASSI de93034485 MacOSX: add shell script to perform build under MacOSX 2014-11-08 23:24:57 +01:00
Mounir IDRASSI f1a596109b Linux/MacOSX: solve compilation warning by explicitly converting wxCStrData to (const wchar_t*) 2014-11-08 23:24:54 +01:00
Mounir IDRASSI 2c6e9fc15c Replace deprecated wxTextValidator::SetBellOnError whose logic whose inverted by the new wxTextValidator::SuppressBellOnError. Since its used in constructor only for TC_WINDOWS, we do the same in the destructor. 2014-11-08 23:24:51 +01:00
Mounir IDRASSI ce7fab744b MacOSX: fix warning by displacing declaration of variable used only under Linux 2014-11-08 23:24:49 +01:00
Mounir IDRASSI 65e4b3a91b Remove unused functions from GfMul.c 2014-11-08 23:24:46 +01:00
Mounir IDRASSI 2cdfbd2703 Linux/MacOSX: Remove static size values from GUI in order to let wxWidgets calculate the best size (the "Fit" method ensure this). Fix truncation of text is some dialogs. 2014-11-08 23:24:44 +01:00
Mounir IDRASSI 81b9e28993 Linux: Add shell script to perform VeraCrypt full build 2014-11-08 23:24:41 +01:00
Mounir IDRASSI d7498fae01 Linux/MacOSX: add newline at the end of Pkcs5.c to remove gcc warning 2014-11-08 23:24:38 +01:00
Mounir IDRASSI 3c471383d9 Linux/MacOSX: adapt code to the changes in PRF functions prototypes 2014-11-08 23:24:36 +01:00
Mounir IDRASSI 0a09314336 Correct typo in language XML file. 2014-11-08 23:24:33 +01:00
Mounir IDRASSI b0bb124772 Bootloader: reduce the size of Serpent implementation when used as the single cipher. We need this because to save space for the new features to come. 2014-11-08 23:24:30 +01:00
Mounir IDRASSI f7d8e565b4 Windows Driver Sanity check: check that the password length passed from the bootloader is less than or equal to 64 before using it. 2014-11-08 23:24:27 +01:00
Mounir IDRASSI 3f2e20e339 Simplify code handling iterations count: in boot mode, we'll set the correct iterations count inside derive_u_sha256 and derive_u_ripemd160 depending in the value of the iterations parameter. On normal mode, we use normal values of iterations count. Removes the special test parameter from RIPEMD160 functions. 2014-11-08 23:24:25 +01:00
Mounir IDRASSI 714a2ce0ae Bootloader: in function ReadVolumeHeader, arrays dk and masterKey have the same size and they are never needed at the same time. So, we can minimize stack memory usage by using only one array instead of two. At the end of the function, the array is erased securely. 2014-11-08 23:24:22 +01:00
Mounir IDRASSI c1378f781a Bootloader: optimize code size in single cipher mode by manually inlining EAInit, EAGetFirst and EAGetKeySize, and by removing the loop in ReadVolumeHeader that tests for encryption algorithms. 2014-11-08 23:24:19 +01:00
Mounir IDRASSI c61f8c70de Bootloader code optimization: remove code in HMAC implementation in case of boot compilation that is never called since passwords are always less than 64-byte length. We leave it in Windows compilation because it is used to check the implementation against test vectors. 2014-11-08 23:24:17 +01:00
Mounir IDRASSI e1a0826ef5 Linux: remove workaround for wxFileType::GetOpenCommand bug in handling path with spaces because it was fixed in wxWidgets 3.0 and this workaround causes problems. 2014-11-08 23:24:14 +01:00
Mounir IDRASSI 9c1ddff7e3 Linux: Support NTFS formatting of volume. We use mkfs.ntfs so it needs to be installed on the system. 2014-11-08 23:24:11 +01:00
Mounir IDRASSI ea03100d9e Linux/MacOSX : fix encryption/decryption issues with hard drives that have a sector size bigger than 512. Now, we use the sector size as the minimum unit for data fragment encryption/decryption. 2014-11-08 23:24:09 +01:00
Mounir IDRASSI 067394d110 MacOSX : Support hard drives with a large sector size ( > 512). 2014-11-08 23:24:06 +01:00
Mounir IDRASSI f05f6a00a6 Integrate SHA-256 support into Linux/MacOSX code. Set PRF priority to SHA-512 -> Whirlpool -> SHA-256 -> RIPEMD-160 . 2014-11-08 23:24:03 +01:00
Mounir IDRASSI 905a3ff4a5 Small code size optimization for RIPEMD-160 when compiled for boot encryption. 2014-11-08 23:24:01 +01:00
Mounir IDRASSI 922a09b634 Use HashForSystemEncryption to check if the algorithm is supported for system partition encryption because we have now two supported algorithms. 2014-11-08 23:23:58 +01:00
Mounir IDRASSI f043e6cbf0 Display only allowed hashes when encrypting the system partition (now, SHA-256 and RIPEMD-160). 2014-11-08 23:23:56 +01:00
Mounir IDRASSI 68f16dae24 Implement support for creating and booting encrypted partition using SHA-256. Support SHA-256 for normal volumes as well. 2014-11-08 23:23:53 +01:00
Mounir IDRASSI f38cf0b694 Add support for SHA-256 in key derivation for bootloader encryption. Create separate bootloader images for SHA-256 and RIPEMD-160. Set SHA-256 as the default PRF for boot encryption and SHA-512 as default PRF for all other cases. Depricate RIPEMD-160. 2014-11-08 23:23:50 +01:00
Mounir IDRASSI bd7d151abf Add SHA-256 source specific for upcoming bootloader build because of its small size. It was derived from the libtomcrypt public domain source. 2014-11-08 23:23:48 +01:00
Mounir IDRASSI 2fe23a3fa3 Correctly support reinstalling the same version. Overwrite the bootloader if the same version detected. 2014-11-08 23:23:45 +01:00
Mounir IDRASSI effb5c7c1e Windows vulnerability fix : finally make bootloader decompressor more robust and secure by adding multiple checks and validation code. This solves the issue found by the Open Crypt Audit project. Note that we had to switch to the slow implementation of the function decode in order to keep the size of the decompressor code under 2K. 2014-11-08 23:23:42 +01:00
Mounir IDRASSI 50ca9fe46f Optimization to reduce code size of derive_u_ripemd160. Useful for boatloader. 2014-11-08 23:23:40 +01:00
Mounir IDRASSI 0178a6d33f Optimize code space and solve the Serpent issue (https://sourceforge.net/p/veracrypt/discussion/technical/thread/fb09633a/#6406) by removing key length parameter from serpent_set_key and twofish_set_key 2014-11-08 23:23:37 +01:00
Mounir IDRASSI 411e8599f3 Call RegCloseKey only if handle is valid. 2014-11-08 23:23:34 +01:00
Mounir IDRASSI b80ee2b7b9 Windows : display the correct tray icon when explorer is restarted (i.e. after an explorer crash). 2014-11-08 23:23:31 +01:00
Mounir IDRASSI 8a028aca45 Use absolute path in ShellExecute call that was missed when the security fix for Microsoft Security Advisory 2269637 was implemented. 2014-11-08 23:23:28 +01:00
Mounir IDRASSI fb12b635ed Update Readme.txt to include more accurate build instructions for Linux and MacOSX 2014-11-08 23:23:25 +01:00
Mounir IDRASSI d761e95133 MacOSX : increment MacOSX installer version to 1.0e 2014-11-08 23:23:22 +01:00
Mounir IDRASSI f7d783dda8 Adapt certain functions in the case of Windows bootloader in order to make its size as small as possible. 2014-11-08 23:23:19 +01:00
Mounir IDRASSI ccbc2cff0b Increment version to 1.0e for the next release 2014-11-08 23:23:17 +01:00
Mounir IDRASSI 809394d383 Include language xml files in the setup 2014-11-08 23:23:13 +01:00
Mounir IDRASSI 7c501359b3 Windows vulnerability fix: correct some integer overflow issues using the IntSafe library. Detected by the Open Crypto Audit project 2014-11-08 23:23:10 +01:00
Mounir IDRASSI f82e16f0a1 Windows vulnerability fix: correct checking device name to avoid possible bypass attack detected by the Open Crypto Audit project 2014-11-08 23:23:08 +01:00
Mounir IDRASSI 4fa4d6d227 Windows vulnerability fix: correct possible BSOD attack targeted towards GetWipePassCount() / WipeBuffer() found by the Open Crypto Audit Project. 2014-11-08 23:23:05 +01:00
Mounir IDRASSI e0efb36f33 Revert previous modification on boad-loader decompressor because it increased its size and it became impossible to include it with the SERPENT version of bootloader. The decompressor and the compressed bootloader are copied twice (original and backup) in the 63 first sectors of the hard drive (32K), thus the size limitation.
This reverts commit 154235d589222e3c31cda05aa53e73ab69a89a6e.
2014-11-08 23:23:02 +01:00
Mounir IDRASSI ef4355acf8 Windows vulnerability fix : make boot-loader decompressor more robust and secure by adding multiple checks and validation code. Note that we had to switch to the slow implementation of the function decode in order to keep the size of the decompressor code under 2K. 2014-11-08 23:22:59 +01:00
Mounir IDRASSI 5fcb262539 Windows vulnerability fix : clear sensitive data in Windows kernel driver by using burjn instead of memset 2014-11-08 23:22:57 +01:00
Mounir IDRASSI d6aa653648 Windows vulnerability fix : avoid kernel pointer disclosure through a call to TC_IOCTL_GET_SYSTEM_DRIVE_DUMP_CONFIG but restricting this call to Kernel Mode. 2014-11-08 23:22:54 +01:00
Mounir IDRASSI 6de2c143b9 Windows : Specify "IDRIX" in signtool for the subject of the code signing certificate. 2014-11-08 23:22:51 +01:00
Mounir IDRASSI 9083f95db0 Remove driver version test that is non application to VeraCrypt and that was wrongly inherited from TrueCrypt. 2014-11-08 23:22:49 +01:00
Mounir IDRASSI 03cf7cc566 Correctly handle dialogs from previous versions that used 'TRUE' instead of 'VERA' as a value for GWLP_USERDATA. 2014-11-08 23:22:46 +01:00
Mounir IDRASSI f158df394e Windows : correct bug in construction of Format.exe path that prevented the new volume wizard to launch. 2014-11-08 23:22:43 +01:00
Mounir IDRASSI bb7ef68040 MacOSX : Update Main Makefile to used the new package name that include the version. 2014-11-08 23:22:41 +01:00
Mounir IDRASSI 37891c2bb0 MacOSX : Add detection of MacFUSE compatibility layer in installer. Change package name to include version in order to avoid specifying manually the title of the installer window. 2014-11-08 23:22:38 +01:00
Mounir IDRASSI 3e2cf28d92 MacOSX : Correct typos in Main Makefile 2014-11-08 23:22:35 +01:00
Mounir IDRASSI 92af806488 MacOSX : change OSXFuse error message to indicate the MacFUSE compatibility layer is needed. 2014-11-08 23:22:32 +01:00
Mounir IDRASSI ce44ad4c57 MacOSX : modify Makefile to automatically build and sign the MacOSX installer for VeraCrypt. 2014-11-08 23:22:29 +01:00
Mounir IDRASSI a857f6c087 MacOSX : add Packages project that creates the MacOSX installer for VeraCrypt 2014-11-08 23:22:27 +01:00
Mounir IDRASSI 0d6443e05a MacOSX : Since we link directly with OSXFuse, change error message to indicate that OSXFuse 2.3+ is needed. 2014-11-08 23:22:24 +01:00
Mounir IDRASSI 41a31ac76f MacOSX : Copy console version of VeraCrypt inside the bundle under the name veracrypt_console. 2014-11-08 23:22:21 +01:00
Mounir IDRASSI 4fefd61cee MacOSX : Update Fuse error message to display OSXFUSE requirement alongside MacFuse. 2014-11-08 23:22:19 +01:00
Mounir IDRASSI 8ee17fd727 MacOSX : Support detection of OSXFUSE and the presence of MacFUSE compatibility layer. 2014-11-08 23:22:16 +01:00
Mounir IDRASSI 7aceaf124e MacOSX : copy the help pdf into the VeraCrypt bundle during package creation 2014-11-08 23:22:13 +01:00
Mounir IDRASSI f143182cbc MacOSX : correct the name of dmg file used by the rm command 2014-11-08 23:22:10 +01:00
Mounir IDRASSI f94707e4ef MacOSX : correct compilation issue caused by system API deprication and use of new wxWidgets. 2014-11-08 23:22:08 +01:00
Mounir IDRASSI 73bf608efc MacOSX : Correct issue of compiling assembly files in both 32-bit and 64-bit mode. Modify Makefiles to correct compilation process using latest Xcode. 2014-11-08 23:22:05 +01:00
Mounir IDRASSI 6688c9d85a MacOSX : add icns file to be used by VeraCrypt bundle 2014-11-08 23:22:02 +01:00
Mounir IDRASSI e8fbc912ce MacOSX : add nasm binary to be used instead of the native one because of the limitations of the version shipped by Apple 2014-11-08 23:22:00 +01:00
Mounir IDRASSI 80a26745a6 Linux GUI : hide the wipe choice during volume creation. Remove extra content from wipe choice list. 2014-11-08 23:21:57 +01:00
Mounir IDRASSI 88b4628c34 Correct message in Linux VeraCrypt installer to replace truecrypt-uninstall.sh by veracrypt-uninstall.sh 2014-11-08 23:21:54 +01:00
Mounir IDRASSI ee9f3101fd Correct compilation error under Linux introduced in latest commit 2014-11-08 23:21:52 +01:00
Mounir IDRASSI cb6dad6bd2 Linux/MacOSX port of manual selection of number of passes for volume header over-write operation. 2014-11-08 23:21:49 +01:00
Mounir IDRASSI 4d8d59c23d Add description string for the new wipe mode WIPE_MODE_256 in language files. 2014-11-08 23:21:46 +01:00
Mounir IDRASSI 1c11ee428d 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). 2014-11-08 23:21:43 +01:00
Mounir IDRASSI 97154aaf51 Lower number of times we overwrite volume header during the encryption of a partition if the user choose to wipe the driver. Latest studies show that even one pass is enough to make data irretrievable. A value of 3 is a conservative approach that enhance performance without scarifying security. http://www.infosecisland.com/blogview/16130-The-Urban-Legend-of-Multipass-Hard-Disk-Overwrite.html http://digital-forensics.sans.org/blog/2009/01/15/overwriting-hard-drive-data/ 2014-11-08 23:21:40 +01:00
Mounir IDRASSI 1ddae20932 Correct Linux compilation after removing legacy cryptographic code. 2014-11-08 23:21:38 +01:00
Mounir IDRASSI a5c1978eef Remove remaining legacy cryptographic algorithms that are never used by VeraCrypt. 2014-11-08 23:21:35 +01:00
Mounir IDRASSI 75f7808719 Remove deprecated/legacy cryptographic algorithms and encryption modes that are never used by VeraCrypt. This will speed up volumes opening in many cases. 2014-11-08 23:21:32 +01:00
Mounir IDRASSI 0594532cf1 Mount.c : call burn directly in szFileName instead of (&szFileName). This was not an issue because the compiler returns the same address for both, but for the sake of clarity it had to be corrected. 2014-11-08 23:21:30 +01:00
Mounir IDRASSI c220db0128 Static Code Analysis : Generalize the use of Safe String functions. Add some NULL pointer checks. Avoid false-positive detection in AppendMenu (MF_SEPARATOR) calls by setting the last parameter to "" instead of NULL. 2014-11-08 23:21:27 +01:00
Mounir IDRASSI c01f392a7b Static Code Analysis : Use Safe String function in Dlgcode.c. Add byte size parameter in various functions to help implement secure handling of strings. 2014-11-08 23:21:24 +01:00
Mounir IDRASSI bbc738c490 Static Code Analysis : Add various NULL pointers checks 2014-11-08 23:21:21 +01:00
Mounir IDRASSI 8bf58486af Static Code Analysis : Add NULL pointers checks on the result of ATL string conversion. Avoid some conversions by using UNICODE functions directly. 2014-11-08 23:21:18 +01:00
Mounir IDRASSI ba733dd032 Use Safe String functions in Registry.c and add a unicode version of WriteLocalMachineRegistryDword function to avoid doing conversions when used. 2014-11-08 23:21:16 +01:00
Mounir IDRASSI 016edc150b Static Code Analysis : Use Safe String functions in Setup code to avoid potential security issues. 2014-11-08 23:21:13 +01:00
Mounir IDRASSI 5c1db9d0e1 Static Code Analysis : Add check on the return of strtok inside mkfulldir_internal to avoid warning. 2014-11-08 23:21:10 +01:00
Mounir IDRASSI f3625a080f Static Code Analysis: Correctly initialize variables to avoid false-positive detection in the boot code. 2014-11-08 23:21:07 +01:00
Mounir IDRASSI 3137d36d9a Static Code Analysis : Use Safe string functions inside VeraCrypt Device Driver to avoid potential security issues. Add many checks for NULL pointers to handle low memory use cases. 2014-11-08 23:21:04 +01:00
Mounir IDRASSI 516fda09a7 Remove test inherited from TrueCrypt because it's always true since we inherited from version 0x71a 2014-11-08 23:21:02 +01:00
Mounir IDRASSI 626a3aedd7 Disable posting the results of minidump analysis until a dedicated URL is put in place. 2014-11-08 23:20:59 +01:00
Mounir IDRASSI c7c8e28655 Disable crash handling until we put in place a dedicated URL for posting crash information. 2014-11-08 23:20:56 +01:00
Mounir IDRASSI 469f1dba40 Remove unused label. 2014-11-08 23:20:53 +01:00
Mounir IDRASSI 515495f2f3 Static Code Analysis : Correctly initialize member variable in HostDevice constructor 2014-11-08 23:20:51 +01:00
Mounir IDRASSI 7bb812af66 Static Code Analysis : Avoid using invalidate integer value received from GetFileSize. 2014-11-08 23:20:48 +01:00
Mounir IDRASSI 9d027b02b9 Static Code Analysis : fix usage of strncpy and sscanf. 2014-11-08 23:20:45 +01:00
Mounir IDRASSI 899a22b840 Static Code Analysis : fix various memory leaks. 2014-11-08 23:20:43 +01:00
Mounir IDRASSI 5281e2d3b9 Static Code Analysis : fix resource leakage by ensuring that all Windows handles are released properly 2014-11-08 23:20:40 +01:00
Mounir IDRASSI 2a288a7e12 Static Code Analysis : Avoid potential overflow when parsing language file by specifying width for 's' conversion specifier 2014-11-08 23:20:37 +01:00
Mounir IDRASSI f67748ae8e Static Code Analysis : fix non-absolute DLL/process loads that can be hijacked (Microsoft Security Advisory 2269637). 2014-11-08 23:20:35 +01:00
Mounir IDRASSI d6817f941a Static Code Analysis : Add virtual attribute to destructor of classes that have virtual methods inherited from a base class 2014-11-08 23:20:32 +01:00
Mounir IDRASSI f19cfb3361 Static Code Analysis : Correctly initialize member variables in various constructors 2014-11-08 23:20:29 +01:00
Mounir IDRASSI 9bb962c8bb Fix password memory leak inside the Device driver in boot encryption mode. 2014-11-08 23:20:27 +01:00
Mounir IDRASSI 0dda93ca47 Avoid changing metadata (ownership, permission,etc) of /usr when unpacking VeraCrypt tar package 2014-11-08 23:20:24 +01:00
Mounir IDRASSI c2d4bf6207 Set the Execute bit for VeraCrypt uninstall script before copying it to the tar package 2014-11-08 23:20:22 +01:00
Mounir IDRASSI a9404c2bff Remove VeraCrypt version number from Readme.txt. 2014-11-08 23:20:19 +01:00
Mounir IDRASSI 5218b6dfe8 Add VeraCrypt specific Linux packaging code in Makefiles and add various helper scripts. The original TrueCrypt sources didn't contain anything about this. 2014-11-08 23:20:17 +01:00
Mounir IDRASSI 41a22ca4e7 Change namespace from TrueCrypt to VeraCrypt. Rename method from Resources Resources::GetTrueCryptIcon to Resources::GetVeraCryptIcon. 2014-11-08 23:20:14 +01:00
Mounir IDRASSI 17823cb58c Update wxFormBuild file to latest version (3.5 beta) and generate new Forms.cpp/Forms.h files. 2014-11-08 23:20:11 +01:00
Mounir IDRASSI a81790329f Point to the SourceForge website instead of idrix.fr for the application link. Remove OS parameter is URL constructed under Linux/MacOSX 2014-11-08 23:20:08 +01:00
Mounir IDRASSI 4b6594325f Update wxWidgets compilation flags in order to be compatible with wxWidgets 3.0 and remove unneeded dependencies to ensure maximum compatibility. 2014-11-08 23:20:06 +01:00
Mounir IDRASSI e1de322ed3 Replace 'TRUE' by 'VERA' in some GUI constants and comments 2014-11-08 23:20:03 +01:00
Mounir IDRASSI b6dc9e9e15 Change legacy version check in newly added Linux/MacOSX sources from 0x600 (TrueCrypt) to 0x10b 2014-11-08 23:20:01 +01:00
Mounir IDRASSI b9e34c30e8 Require to upgrade rescue disk if upgrading from version 1.0a of VeraCrypt instead of version 6.0a (left over from TrueCrypt). Does anyone still uses VeraCrypt 1.0a??? 2014-11-08 23:19:58 +01:00
Mounir IDRASSI 95c6072a57 Modify language files from TrueCrypt to make them compatible with VeraCrypt. Set supported version to 1.0d. 2014-11-08 23:19:55 +01:00
Mounir IDRASSI 859393caf1 Add original TrueCrypt 7.1a translation language files 2014-11-08 23:19:51 +01:00
Mounir IDRASSI 437cbd9c8b Remove some legacy code inherited from True and that doesn't apply to VeraCrypt 2014-11-08 23:19:47 +01:00
Mounir IDRASSI f34d894f6e Detect correctly VeraCrypt rescue disk by looking for the little-endian encoding of "Vera" instead of "True". 2014-11-08 23:19:44 +01:00
Mounir IDRASSI 7875d3ec3f Set volume header to 'VERA' instead of 'TRUE' in newly added Linux/MacOSX code 2014-11-08 23:19:42 +01:00
Mounir IDRASSI f701dc1c29 Correct typos introduced inadvertently 2014-11-08 23:19:39 +01:00
Mounir IDRASSI bacd720279 Correct values of RIPEMD160 iterations count to be identical to Windows ones (defined in function get_pkcs5_iteration_count) 2014-11-08 23:19:36 +01:00
Mounir IDRASSI 31fd16979f Change TrueCrypt to VeraCrypt in some comments 2014-11-08 23:19:34 +01:00
Mounir IDRASSI 4d12001e10 Adapt Makefiles for VeraCrypt. Use PKCS#11 headers from source tree is not specified elsewhere. 2014-11-08 23:19:32 +01:00
Mounir IDRASSI 084a8ee85c wxWidgets 3.0 compatibility modifications 2014-11-08 23:19:29 +01:00
Mounir IDRASSI c386beb69c Adapt newly added Linux/MacOSX code to the modification of key derivation introduced by VeraCrypt 2014-11-08 23:19:27 +01:00
Mounir IDRASSI be4ca4bac6 Replace TrueCrypt from Linux/MacOSX mount point names 2014-11-08 23:19:24 +01:00
Mounir IDRASSI 0c95ed3691 Add PKCS#11 2.20 headers to the source tree 2014-11-08 23:19:22 +01:00
Mounir IDRASSI a27f345832 Set the publisher to IDRIX in the uninstaller registry key. 2014-11-08 23:19:20 +01:00
518 changed files with 108560 additions and 20376 deletions
+503
View File
@@ -0,0 +1,503 @@
TrueCrypt License Version 3.0
Software distributed under this license is distributed on an "AS
IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND
DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO
USES, COPIES, MODIFIES, OR (RE)DISTRIBUTES ANY PART OF THE
SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE
BOUND BY ALL TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT
ACCEPT THEM, DO NOT USE, COPY, MODIFY, NOR (RE)DISTRIBUTE THE
SOFTWARE, NOR ANY PART(S) THEREOF.
I. Definitions
1. "This Product" means the work (including, but not limited to,
source code, graphics, texts, and accompanying files) made
available under and governed by this version of this license
("License"), as may be indicated by, but is not limited to,
copyright notice(s) attached to or included in the work.
2. "You" means (and "Your" refers to) an individual or a legal
entity (e.g., a non-profit organization, commercial
organization, government agency, etc.) exercising permissions
granted by this License.
3. "Modification" means (and "modify" refers to) any alteration
of This Product, including, but not limited to, addition to or
deletion from the substance or structure of This Product,
translation into another language, repackaging, alteration or
removal of any file included with This Product, and addition of
any new files to This Product.
4. "Your Product" means This Product modified by You, or any
work You derive from (or base on) any part of This Product. In
addition, "Your Product" means any work in which You include any
(modified or unmodified) portion of This Product. However, if
the work in which you include it is an aggregate software
distribution (such as an operating system distribution or a
cover CD-ROM of a magazine) containing multiple separate
products, then the term "Your Product" includes only those
products (in the aggregate software distribution) that use,
include, or depend on a modified or unmodified version of This
Product (and the term "Your Product" does not include the whole
aggregate software distribution). For the purposes of this
License, a product suite consisting of two or more products is
considered a single product (operating system distributions and
cover media of magazines are not considered product suites).
5. "Distribution" means (and "distribute" refers to), regardless
of means or methods, conveyance, transfer, providing, or making
available of This/Your Product or portions thereof to third
parties (including, but not limited to, making This/Your
Product, or portions thereof, available for download to third
parties, whether or not any third party has downloaded the
product, or any portion thereof, made available for download).
II. Use, Copying, and Distribution of This Product
1. Provided that You comply with all applicable terms and
conditions of this License, You may make copies of This Product
(unmodified) and distribute copies of This Product (unmodified)
that are not included in another product forming Your Product
(except as permitted under Chapter III). Note: For terms and
conditions for copying and distribution of modified versions of
This Product, see Chapter III.
2. Provided that You comply with all applicable terms and
conditions of this License, You may use This Product freely (see
also Chapter III) on any number of computers/systems for non-
commercial and/or commercial purposes.
III. Modification, Derivation, and Inclusion in Other Products
1. If all conditions specified in the following paragraphs in
this Chapter (III) are met (for exceptions, see Section III.2)
and if You comply with all other applicable terms and conditions
of this License, You may modify This Product (thus forming Your
Product), derive new works from This Product or portions thereof
(thus forming Your Product), include This Product or portions
thereof in another product (thus forming Your Product, unless
defined otherwise in Chapter I), and You may use (for non-
commercial and/or commercial purposes), copy, and/or distribute
Your Product.
a. The name of Your Product (or of Your modified version of
This Product) must not contain the name TrueCrypt (for
example, the following names are not allowed: TrueCrypt,
TrueCrypt+, TrueCrypt Professional, iTrueCrypt, etc.) nor
any other names confusingly similar to the name TrueCrypt
(e.g., True-Crypt, True Crypt, TruKrypt, etc.)
All occurrences of the name TrueCrypt that could reasonably
be considered to identify Your Product must be removed from
Your Product and from any associated materials. Logo(s)
included in (or attached to) Your Product (and in/to
associated materials) must not incorporate and must not be
confusingly similar to any of the TrueCrypt logos
(including, but not limited to, the non-textual logo
consisting primarily of a key in stylized form) or
portion(s) thereof. All graphics contained in This Product
(logos, icons, etc.) must be removed from Your Product (or
from Your modified version of This Product) and from any
associated materials.
b. The following phrases must be removed from Your Product
and from any associated materials, except the text of this
License: "A TrueCrypt Foundation Release", "Released by
TrueCrypt Foundation", "This is a TrueCrypt Foundation
release."
c. Phrase "Based on TrueCrypt, freely available at
http://www.truecrypt.org/" must be displayed by Your Product
(if technically feasible) and contained in its
documentation. Alternatively, if This Product or its portion
You included in Your Product constitutes only a minor
portion of Your Product, phrase "Portions of this product
are based in part on TrueCrypt, freely available at
http://www.truecrypt.org/" may be displayed instead. In each
of the cases mentioned above in this paragraph,
"http://www.truecrypt.org/" must be a hyperlink (if
technically feasible) pointing to http://www.truecrypt.org/
and You may freely choose the location within the user
interface (if there is any) of Your Product (e.g., an
"About" window, etc.) and the way in which Your Product will
display the respective phrase.
Your Product (and any associated materials, e.g., the
documentation, the content of the official web site of Your
Product, etc.) must not present any Internet address
containing the domain name truecrypt.org (or any domain name
that forwards to the domain name truecrypt.org) in a manner
that might suggest that it is where information about Your
Product may be obtained or where bugs found in Your Product
may be reported or where support for Your Product may be
available or otherwise attempt to indicate that the domain
name truecrypt.org is associated with Your Product.
d. The complete source code of Your Product must be freely
and publicly available (for exceptions, see Section III.2)
at least until You cease to distribute Your Product. This
condition can be met in one or both of the following ways:
(i) You include the complete source code of Your Product
with every copy of Your Product that You make and distribute
and You make all such copies of Your Product available to
the general public free of charge, and/or (ii) You include
information (valid and correct at least until You cease to
distribute Your Product) about where the complete source
code of Your Product can be obtained free of charge (e.g.,
an Internet address) or for a reasonable reproduction fee
with every copy of Your Product that You make and distribute
and, if there is a web site officially associated with Your
Product, You include the aforementioned information about
the source code on a freely and publicly accessible web
page to which such web site links via an easily viewable
hyperlink (at least until You cease to distribute Your
Product).
The source code of Your Product must not be deliberately
obfuscated and it must not be in an intermediate form (e.g.,
the output of a preprocessor). Source code means the
preferred form in which a programmer would usually modify
the program.
Portions of the source code of Your Product not contained in
This Product (e.g., portions added by You in creating Your
Product, whether created by You or by third parties) must be
available under license(s) that (however, see also
Subsection III.1.e) allow(s) anyone to modify and derive new
works from the portions of the source code that are not
contained in This Product and to use, copy, and redistribute
such modifications and/or derivative works. The license(s)
must be perpetual, non-exclusive, royalty-free, no-charge,
and worldwide, and must not invalidate, weaken, restrict,
interpret, amend, modify, interfere with or otherwise affect
any part, term, provision, or clause of this License. The
text(s) of the license(s) must be included with every copy
of Your Product that You make and distribute.
e. You must not change the license terms of This Product in
any way (adding any new terms is considered changing the
license terms even if the original terms are retained),
which means, e.g., that no part of This Product may be put
under another license. You must keep intact all the legal
notices contained in the source code files. You must include
the following items with every copy of Your Product that You
make and distribute: a clear and conspicuous notice stating
that Your Product or portion(s) thereof is/are governed by
this version of the TrueCrypt License, a verbatim copy of
this version of the TrueCrypt License (as contained herein),
a clear and conspicuous notice containing information about
where the included copy of the License can be found, and an
appropriate copyright notice.
2. You are not obligated to comply with Subsection III.1.d if
Your Product is not distributed (i.e., Your Product is available
only to You).
IV. Disclaimer of Liability, Disclaimer of Warranty,
Indemnification
You expressly acknowledge and agree to the following:
1. IN NO EVENT WILL ANY (CO)AUTHOR OF THIS PRODUCT, OR ANY
APPLICABLE INTELLECTUAL-PROPERTY OWNER, OR ANY OTHER PARTY WHO
MAY COPY AND/OR (RE)DISTRIBUTE THIS PRODUCT OR PORTIONS THEREOF,
AS MAY BE PERMITTED HEREIN, BE LIABLE TO YOU OR TO ANY OTHER
PARTY FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, ANY
DIRECT, INDIRECT, GENERAL, SPECIAL, INCIDENTAL, PUNITIVE,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, CORRUPTION OR LOSS OF DATA, ANY LOSSES SUSTAINED BY YOU OR
THIRD PARTIES, A FAILURE OF THIS PRODUCT TO OPERATE WITH ANY
OTHER PRODUCT, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR
BUSINESS INTERRUPTION), WHETHER IN CONTRACT, STRICT LIABILITY,
TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE) OR OTHERWISE,
ARISING OUT OF THE USE, COPYING, MODIFICATION, OR
(RE)DISTRIBUTION OF THIS PRODUCT (OR A PORTION THEREOF) OR OF
YOUR PRODUCT (OR A PORTION THEREOF), OR INABILITY TO USE THIS
PRODUCT (OR A PORTION THEREOF), EVEN IF SUCH DAMAGES (OR THE
POSSIBILITY OF SUCH DAMAGES) ARE/WERE PREDICTABLE OR KNOWN TO
ANY (CO)AUTHOR, INTELLECTUAL-PROPERTY OWNER, OR ANY OTHER PARTY.
2. THIS PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
LIMITED TO, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE ENTIRE RISK AS TO
THE QUALITY AND PERFORMANCE OF THIS PRODUCT IS WITH YOU. SHOULD
THIS PRODUCT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
3. THIS PRODUCT MAY INCORPORATE IMPLEMENTATIONS OF CRYPTOGRAPHIC
ALGORITHMS THAT ARE REGULATED (E.G., SUBJECT TO EXPORT/IMPORT
CONTROL REGULATIONS) OR ILLEGAL IN SOME COUNTRIES. IT IS SOLELY
YOUR RESPONSIBILITY TO VERIFY THAT IT IS LEGAL TO IMPORT AND/OR
(RE)EXPORT AND/OR USE THIS PRODUCT (OR PORTIONS THEREOF) IN
COUNTRIES WHERE YOU INTEND TO USE IT AND/OR TO WHICH YOU INTEND
TO IMPORT IT AND/OR FROM WHICH YOU INTEND TO EXPORT IT, AND IT
IS SOLELY YOUR RESPONSIBILITY TO COMPLY WITH ANY APPLICABLE
REGULATIONS, RESTRICTIONS, AND LAWS.
4. YOU SHALL INDEMNIFY, DEFEND AND HOLD ALL (CO)AUTHORS OF THIS
PRODUCT, AND APPLICABLE INTELLECTUAL-PROPERTY OWNERS, HARMLESS
FROM AND AGAINST ANY AND ALL LIABILITY, DAMAGES, LOSSES,
SETTLEMENTS, PENALTIES, FINES, COSTS, EXPENSES (INCLUDING
REASONABLE ATTORNEYS' FEES), DEMANDS, CAUSES OF ACTION, CLAIMS,
ACTIONS, PROCEEDINGS, AND SUITS, DIRECTLY RELATED TO OR ARISING
OUT OF YOUR USE, INABILITY TO USE, COPYING, (RE)DISTRIBUTION,
IMPORT AND/OR (RE)EXPORT OF THIS PRODUCT (OR PORTIONS THEREOF)
AND/OR YOUR BREACH OF ANY TERM OF THIS LICENSE.
V. Trademarks
This License does not grant permission to use trademarks
associated with (or applying to) This Product, except for fair
use as defined by applicable law and except for use expressly
permitted or required by this License. Any attempt otherwise to
use trademarks associated with (or applying to) This Product
automatically and immediately terminates Your rights under This
License and may constitute trademark infringement (which may be
prosecuted).
VI. General Terms and Conditions, Miscellaneous Provisions
1. ANYONE WHO USES AND/OR COPIES AND/OR MODIFIES AND/OR CREATES
DERIVATIVE WORKS OF AND/OR (RE)DISTRIBUTES THIS PRODUCT, OR ANY
PORTION(S) THEREOF, IS, BY SUCH ACTION(S), AGREEING TO BE BOUND
BY AND ACCEPTING ALL TERMS AND CONDITIONS OF THIS LICENSE (AND
THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS LICENSE).
IF YOU DO NOT ACCEPT (AND AGREE TO BE BOUND BY) ALL TERMS AND
CONDITIONS OF THIS LICENSE, DO NOT USE, COPY, MODIFY, CREATE
DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY
PORTION(S) THEREOF.
2. YOU MAY NOT USE, MODIFY, COPY, CREATE DERIVATIVE WORKS OF,
(RE)DISTRIBUTE, OR SUBLICENSE THIS PRODUCT, OR PORTION(S)
THEREOF, EXCEPT AS EXPRESSLY PROVIDED IN THIS LICENSE (EVEN IF
APPLICABLE LAW GIVES YOU MORE RIGHTS). ANY ATTEMPT (EVEN IF
PERMITTED BY APPLICABLE LAW) OTHERWISE TO USE, MODIFY, COPY,
CREATE DERIVATIVE WORKS OF, (RE)DISTRIBUTE, OR SUBLICENSE THIS
PRODUCT, OR PORTION(S) THEREOF, AUTOMATICALLY AND IMMEDIATELY
TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN CONSTITUTE
COPYRIGHT INFRINGEMENT (WHICH MAY BE PROSECUTED). ANY CONDITIONS
AND RESTRICTIONS CONTAINED IN THIS LICENSE ARE ALSO LIMITATIONS
ON THE SCOPE OF THIS LICENSE AND ALSO DEFINE THE SCOPE OF YOUR
RIGHTS UNDER THIS LICENSE. YOUR FAILURE TO COMPLY WITH THE TERMS
AND CONDITIONS OF THIS LICENSE OR FAILURE TO PERFORM ANY
APPLICABLE OBLIGATION IMPOSED BY THIS LICENSE AUTOMATICALLY AND
IMMEDIATELY TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN
CAUSE OR BE CONSIDERED COPYRIGHT INFRINGEMENT (WHICH MAY BE
PROSECUTED). NOTHING IN THIS LICENSE SHALL IMPLY OR BE CONSTRUED
AS A PROMISE, OBLIGATION, OR COVENANT NOT TO SUE FOR COPYRIGHT
OR TRADEMARK INFRINGEMENT IF YOU DO NOT COMPLY WITH THE TERMS
AND CONDITIONS OF THIS LICENSE.
3. This License does not constitute or imply a waiver of any
intellectual property rights except as may be otherwise
expressly provided in this License. This License does not
transfer, assign, or convey any intellectual property rights
(e.g., it does not transfer ownership of copyrights or
trademarks).
4. Subject to the terms and conditions of this License, You may
allow a third party to use Your copy of This Product (or a copy
that You make and distribute, or Your Product) provided that the
third party explicitly accepts and agrees to be bound by all
terms and conditions of this License and the third party is not
prohibited from using This Product (or portions thereof) by this
License (see, e.g., Section VI.7) or by applicable law. However,
You are not obligated to ensure that the third party accepts
(and agrees to be bound by all terms of) this License if You
distribute only the self-extracting package (containing This
Product) that does not allow the user to install (nor extract)
the files contained in the package until he or she accepts and
agrees to be bound by all terms and conditions of this License.
5. Without specific prior written permission from the authors of
This Product (or from their common representative), You must not
use the name of This Product, the names of the authors of This
Product, or the names of the legal entities (or informal groups)
of which the authors were/are members/employees, to endorse or
promote Your Product or any work in which You include a modified
or unmodified version of This Product, or to endorse or promote
You or Your affiliates, or in a way that might suggest that Your
Product (or any work in which You include a modified or
unmodified version of This Product), You, or Your affiliates
is/are endorsed by one or more authors of This Product, or in a
way that might suggest that one or more authors of This Product
is/are affiliated with You (or Your affiliates) or directly
participated in the creation of Your Product or of any work in
which You include a modified or unmodified version of This
Product.
6. IF YOU ARE NOT SURE WHETHER YOU UNDERSTAND ALL PARTS OF THIS
LICENSE OR IF YOU ARE NOT SURE WHETHER YOU CAN COMPLY WITH ALL
TERMS AND CONDITIONS OF THIS LICENSE, YOU MUST NOT USE, COPY,
MODIFY, CREATE DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS
PRODUCT, NOR ANY PORTION(S) OF IT. YOU SHOULD CONSULT WITH A
LAWYER.
7. IF (IN RELEVANT CONTEXT) ANY PROVISION OF CHAPTER IV OF THIS
LICENSE IS UNENFORCEABLE, INVALID, OR PROHIBITED UNDER
APPLICABLE LAW IN YOUR JURISDICTION, YOU HAVE NO RIGHTS UNDER
THIS LICENSE AND YOU MUST NOT USE, COPY, MODIFY, CREATE
DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY
PORTION(S) THEREOF.
8. Except as otherwise provided in this License, if any
provision of this License, or a portion thereof, is found to be
invalid or unenforceable under applicable law, it shall not
affect the validity or enforceability of the remainder of this
License, and such invalid or unenforceable provision shall be
construed to reflect the original intent of the provision and
shall be enforced to the maximum extent permitted by applicable
law so as to effect the original intent of the provision as
closely as possible.
____________________________________________________________
Third-Party Licenses
This Product contains components that were created by third
parties and that are governed by third-party licenses, which are
contained hereinafter (separated by lines consisting of
underscores). Each of the third-party licenses applies only to
(portions of) the source code file(s) in which the third-party
license is contained or in which it is explicitly referenced,
and to compiled or otherwise processed forms of such source
code. None of the third-party licenses applies to This Product
as a whole, even when it uses terms such as "product",
"program", or any other equivalent terms/phrases. This Product
as a whole is governed by the TrueCrypt License (see above).
Some of the third-party components have been modified by the
authors of This Product. Unless otherwise stated, such
modifications and additions are governed by the TrueCrypt
License (see above). Note: Unless otherwise stated, graphics and
files that are not part of the source code are governed by the
TrueCrypt License.
____________________________________________________________
License agreement for Encryption for the Masses.
Copyright (C) 1998-2000 Paul Le Roux. All Rights Reserved.
This product can be copied and distributed free of charge,
including source code.
You may modify this product and source code, and distribute such
modifications, and you may derive new works based on this
product, provided that:
1. Any product which is simply derived from this product cannot
be called E4M, or Encryption for the Masses.
2. If you use any of the source code in your product, and your
product is distributed with source code, you must include this
notice with those portions of this source code that you use.
Or,
If your product is distributed in binary form only, you must
display on any packaging, and marketing materials which
reference your product, a notice which states:
"This product uses components written by Paul Le Roux
<pleroux@swprofessionals.com>"
3. If you use any of the source code originally by Eric Young,
you must in addition follow his terms and conditions.
4. Nothing requires that you accept this License, as you have
not signed it. However, nothing else grants you permission to
modify or distribute the product or its derivative works.
These actions are prohibited by law if you do not accept this
License.
5. If any of these license terms is found to be to broad in
scope, and declared invalid by any court or legal process, you
agree that all other terms shall not be so affected, and shall
remain valid and enforceable.
6. THIS PROGRAM IS DISTRIBUTED FREE OF CHARGE, THEREFORE THERE
IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. UNLESS OTHERWISE STATED THE PROGRAM IS PROVIDED
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
7. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM, INCLUDING BUT NOT LIMITED TO LOSS
OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
ANY OTHER PROGRAMS, EVEN IF SUCH HOLDER OR OTHER PARTY HAD
PREVIOUSLY BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
____________________________________________________________
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK.
All rights reserved.
LICENSE TERMS
The free distribution and use of this software is allowed (with
or without changes) provided that:
1. source code distributions include the above copyright
notice, this list of conditions and the following
disclaimer;
2. binary distributions include the above copyright notice,
this list of conditions and the following disclaimer in
their documentation;
3. the name of the copyright holder is not used to endorse
products built using this software without specific written
permission.
DISCLAIMER
This software is provided 'as is' with no explicit or implied
warranties in respect of its properties, including, but not
limited to, correctness and/or fitness for purpose.
____________________________________________________________
Copyright (C) 2002-2004 Mark Adler, all rights reserved
version 1.8, 9 Jan 2004
This software is provided 'as-is', without any express or
implied warranty. In no event will the author be held liable
for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the
product documentation would be appreciated but is not
required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
____________________________________________________________
+264
View File
@@ -0,0 +1,264 @@
This archive contains the source code of VeraCrypt.
It is based on original TrueCrypt 7.1a with security enhancements and modifications.
Important
=========
You may use the source code contained in this archive only if you accept and
agree to the license terms contained in the file 'License.txt', which is
included in this archive.
Note that the license specifies, for example, that a derived work must not be
called 'TrueCrypt' or 'VeraCrypt'
Contents
========
I. Windows
Requirements for Building VeraCrypt for Windows
Instructions for Building VeraCrypt for Windows
Instructions for Signing and Packaging VeraCrypt for Windows
II. Linux and Mac OS X
Requirements for Building VeraCrypt for Linux and Mac OS X
Instructions for Building VeraCrypt for Linux and Mac OS X
Mac OS X specifics
III. FreeBSD and OpenSolaris
IV. Third-Party Developers (Contributors)
V. Legal Information
VI. Further Information
I. Windows
==========
Requirements for Building VeraCrypt for Windows:
------------------------------------------------
- Microsoft Visual C++ 2008 SP1 (Professional Edition or compatible)
- Microsoft Visual C++ 1.52 (available from MSDN Subscriber Downloads)
- Microsoft Windows SDK for Windows 7 (configured for Visual C++)
- Microsoft Windows SDK for Windows 8.1 (needed for SHA-256 code signing)
- Microsoft Windows Driver Kit 7.1.0 (build 7600.16385.1)
- RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
- NASM assembler 2.08 or compatible
- gzip compressor
- upx packer (available at http://upx.sourceforge.net/)
IMPORTANT:
The 64-bit editions of Windows Vista and later versions of Windows, and in
some cases (e.g. playback of HD DVD content) also the 32-bit editions, do not
allow the VeraCrypt driver to run without an appropriate digital signature.
Therefore, all .sys files in official VeraCrypt binary packages are digitally
signed with the digital certificate of the IDRIX, which was
issued by Thawte certification authority. At the end of each official .exe and
.sys file, there are embedded digital signatures and all related certificates
(i.e. all certificates in the relevant certification chain, such as the
certification authority certificates, CA-MS cross-certificate, and the
IDRIX certificate).
Keep this in mind if you compile VeraCrypt
and compare your binaries with the official binaries. If your binaries are
unsigned, the sizes of the official binaries will usually be approximately
10 KB greater than sizes of your binaries (there may be further differences
if you use a different version of the compiler, or if you install a different
or no service pack for Visual Studio, or different hotfixes for it, or if you
use different versions of the required SDKs).
Instructions for Building VeraCrypt for Windows:
------------------------------------------------
1) Create an environment variable 'MSVC16_ROOT' pointing to the folder 'MSVC15'
extracted from the Visual C++ 1.52 self-extracting package.
Note: The 16-bit installer MSVC15\SETUP.EXE cannot be run on 64-bit Windows,
but it is actually not necessary to run it. You only need to extract the
folder 'MSVC15', which contains the 32-bit binaries required to build the
VeraCrypt Boot Loader.
2) If you have installed the Windows Driver Development Kit in another
directory than '%SYSTEMDRIVE%\WinDDK', create an environment variable
'WINDDK_ROOT' pointing to the DDK installation directory.
3) Copy the PKCS #11 header files to a standard include path or create an
environment variable 'PKCS11_INC' pointing to the directory where
the PKCS #11 header files are installed.
4) Open the solution file 'VeraCrypt.sln' in Microsoft Visual Studio 2008.
5) Select 'All' as the active solution configuration.
6) Build the solution.
7) If successful, there should be newly built VeraCrypt binaries in the
'Release' folder.
Instructions for Signing and Packaging VeraCrypt for Windows:
-------------------------------------------------------------
First, create an environment variable 'WSDK81' pointing to the Windows SDK
for Windows 8.1 installation directory.
The folder "Signing" contains a batch file (sign.bat) that will sign all
VeraCrypt components using a code signing certificate present on the
certificate store and also build the final installation setup.
The batch file suppose that the code signing certificate is issued by Thawt.
This is the case for IDRIX's certificate. If yours is issued by another CA,
then you should put the Root and Intermediate certificates in the "Signing"
folder and then modify sign.bat accordingly.
II. Linux and Mac OS X
======================
Requirements for Building VeraCrypt for Linux and Mac OS X:
-----------------------------------------------------------
- GNU Make
- GNU C++ Compiler 4.0 or compatible
- Apple Xcode (Mac OS X only)
- NASM assembler 2.08 or compatible (x86/x64 architecture only)
- pkg-config
- makeself (Linux only)
- wxWidgets 3.0 shared library and header files installed or
wxWidgets 3.0 library source code (available at http://www.wxwidgets.org)
- FUSE library and header files (available at https://github.com/libfuse/libfuse
and https://osxfuse.github.io/)
- RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20).
They are already included in the source tree under the directory PKCS11 but
it is possible to override it using the environment variable 'PKCS11_INC'.
Instructions for Building VeraCrypt for Linux and Mac OS X:
-----------------------------------------------------------
1) Change the current directory to the root of the VeraCrypt source code.
2) If you have no wxWidgets shared library installed, run the following
command to configure the wxWidgets static library for VeraCrypt and to
build it:
$ make WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
The variable WX_ROOT must point to the location of the source code of the
wxWidgets library. Output files will be placed in the './wxrelease/'
directory.
3) To build VeraCrypt, run the following command:
$ make
or if you have no wxWidgets shared library installed:
$ make WXSTATIC=1
4) If successful, the VeraCrypt executable should be located in the directory
'Main'.
By default, a universal executable supporting both graphical and text user
interface (through the switch --text) is built.
On Linux, a console-only executable, which requires no GUI library, can be
built using the 'NOGUI' parameter:
$ make NOGUI=1 WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
$ make NOGUI=1 WXSTATIC=1
On MacOSX, building a console-only executable is not supported.
Mac OS X specifics:
-----------------------------------------------------------
Under MacOSX, the SDK for OSX 10.7 is used by default. To use another version
of the SDK (i.e. 10.6), you can export the environment variable VC_OSX_TARGET:
$ export VC_OSX_TARGET=10.6
Before building under MacOSX, pkg-config must be installed if not yet available.
Get it from http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz and
compile using the following commands :
$ ./configure --with-internal-glib
$ make
$ sudo make install
After making sure pkg-config is available, download and install OSXFuse from
https://osxfuse.github.io/ (MacFUSE compatibility layer must selected)
The script build_veracrypt_macosx.sh available under "src/Build" performs the
full build of VeraCrypt including the creation of the installer pkg. It expects
to find the wxWidgets 3.0.2 sources at the same level as where you put
VeraCrypt sources (i.e. if "src" path is "/Users/joe/Projects/VeraCrypt/src"
then wxWidgets should be at "/Users/joe/Projects/wxWidgets-wxWidgets-3.0.2")
The build process uses Code Signing certificates whose ID is specified in
src/Main/Main.make (lines 167 & 169). You'll have to modify these lines to put
the ID of your Code Signing certificates or comment them if you don't have one.
Because of incompatibility issues with OSXFUSE, the SDK 10.9 generates a
VeraCrypt binary that has issues communicating with the OSXFUSE kernel extension.
Thus, we recommend to use the SDK 10.8 or earlier for building VeraCrypt.
III. FreeBSD and OpenSolaris
============================
FreeBSD and OpenSolaris are not yet supported.
IV. Third-Party Developers (Contributors)
=========================================
If you intend to implement a feature, please contact us first to make sure:
1) That the feature has not been implemented (we may have already implemented
it, but haven't released the code yet).
2) That the feature is acceptable.
3) Whether we need help of third-party developers with implementing the feature.
Information on how to contact us can be found at:
https://veracrypt.codeplex.com/
V. Legal Information
====================
Copyright Information
---------------------
This software as a whole:
Copyright (c) 2013-2015 IDRIX. All rights reserved.
Portions of this software:
Copyright (c) 2003-2012 TrueCrypt Developers Association. All rights reserved.
Copyright (c) 1998-2000 Paul Le Roux. All rights reserved.
Copyright (c) 1998-2008 Brian Gladman, Worcester, UK. All rights reserved.
Copyright (c) 2002-2004 Mark Adler. All rights reserved.
For more information, please see the legal notices attached to parts of the
source code.
Trademark Information
---------------------
Any trademarks contained in the source code, binaries, and/or in the
documentation, are the sole property of their respective owners.
VI. Further Information
=======================
http://www.veracrypt.fr
+321
View File
@@ -0,0 +1,321 @@
@echo off
setlocal
call :freedrive mydriveletter && goto :cont
echo ERROR: No free drive letter found.
goto :exit
:cont
echo Using drive letter %mydriveletter%: for our tests
echo.
IF NOT EXIST test.sha512.hc GOTO :whirlpool
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount SHA-512 container (Normal)
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.sha512.hc /hash sha512 /l %mydriveletter% /password test /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo SHA-512 (Normal) = %hh%:%mm%:%ss%,%cc%
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount SHA-512 container (Hidden)
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.sha512.hc /hash sha512 /l %mydriveletter% /password testhidden /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo SHA-512 (Hidden) = %hh%:%mm%:%ss%,%cc%
echo.
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
:whirlpool
IF NOT EXIST test.whirlpool.hc GOTO :sha256
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount Whirlpool container (Normal).
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.whirlpool.hc /hash whirlpool /l %mydriveletter% /password test /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo Whirlpool (Normal) = %hh%:%mm%:%ss%,%cc%
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount Whirlpool container (Hidden).
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.whirlpool.hc /hash whirlpool /l %mydriveletter% /password testhidden /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo Whirlpool (Hidden) = %hh%:%mm%:%ss%,%cc%
echo.
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
:sha256
IF NOT EXIST test.sha256.hc GOTO :ripemd160
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount SHA-256 container (Normal)
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.sha256.hc /hash sha256 /l %mydriveletter% /password test /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo SHA-256 (Normal) = %hh%:%mm%:%ss%,%cc%
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount SHA-256 container (Hidden)
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.sha256.hc /hash sha256 /l %mydriveletter% /password testhidden /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo SHA-256 (Hidden) = %hh%:%mm%:%ss%,%cc%
echo.
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
:ripemd160
IF NOT EXIST test.ripemd160.hc GOTO :autodetect
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount RIPEMD-160 container (Normal)
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.ripemd160.hc /hash ripemd160 /l %mydriveletter% /password test /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo RIPEMD-160 (Normal) = %hh%:%mm%:%ss%,%cc%
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Mount RIPEMD-160 container (Hidden)
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.ripemd160.hc /hash ripemd160 /l %mydriveletter% /password testhidden /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo RIPEMD-160 (Hidden) = %hh%:%mm%:%ss%,%cc%
echo.
"c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q
:autodetect
call :availablevolume testvolume && goto :contautodetect
goto :exit
:contautodetect
rem Get start time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Try to mount with a wrong password and PRF autodetection
"c:\Program Files\VeraCrypt\veracrypt.exe" /volume %testvolume% /l %mydriveletter% /password wrongpassword /q /silent /m ro
rem Get end time:
for /F "tokens=1-4 delims=:.," %%a in ("%time%") do (
set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)
rem Get elapsed time:
set /A elapsed=end-start
rem Show elapsed time:
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%
echo Wrong Password (PRF Auto-detection)= %hh%:%mm%:%ss%,%cc%
echo.
goto :exit
rem Finds a free drive letter.
rem
rem Parameters:
rem %1 = Output variable name.
rem
rem Example:
rem call :freedrive mydriveletter && goto :cont
rem echo ERROR: No free drive letter found.
rem goto :EOF
rem :cont
rem echo Found drive letter: %mydriveletter%
:freedrive
setlocal EnableDelayedExpansion
set exitcode=0
set "output_var=%~1"
for %%i in (C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) do (
set "drive=%%i:"
rem If 'subst' fails, the drive letter is already in use.
rem This way we can even detect optical drives that have a drive
rem letter but no media in them, a case that goes undetected when
rem using 'if exist'.
subst !drive! %SystemDrive%\ >nul
if !errorlevel! == 0 (
subst !drive! /d >nul
set "drive=%%i"
goto :freedrive0
)
)
set exitcode=1
set drive=
:freedrive0
endlocal & set "%output_var%=%drive%" & exit /b %exitcode%
:availablevolume
setlocal EnableDelayedExpansion
set exitcode=0
set "output_var=%~1"
for %%i in (test.sha512.hc,test.sha256.hc,test.whirlpool.hc,test.ripemd160.hc) do (
if exist %%i (
set "volume=%%i"
goto :availablevolume0
)
)
set exitcode=1
set volume=
:availablevolume0
endlocal & set "%output_var%=%volume%" & exit /b %exitcode%
:exit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_Bios #ifndef TC_HEADER_Boot_Bios
+7 -3
View File
@@ -24,9 +24,9 @@
> >
<Tool <Tool
Name="VCNMakeTool" Name="VCNMakeTool"
BuildCommandLine="md Release 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1&#x0D;&#x0A;&#x0D;&#x0A;md Release_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES&#x0D;&#x0A;&#x0D;&#x0A;md Release_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT&#x0D;&#x0A;&#x0D;&#x0A;md Release_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH&#x0D;&#x0A;&#x0D;&#x0A;md Rescue 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1" BuildCommandLine="md Release 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1&#x0D;&#x0A;&#x0D;&#x0A;md Release_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Release_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES&#x0D;&#x0A;&#x0D;&#x0A;md Release_AES_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Release_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT&#x0D;&#x0A;&#x0D;&#x0A;md Release_Serpent_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Release_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH&#x0D;&#x0A;&#x0D;&#x0A;md Release_Twofish_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Rescue 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_AES_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_Serpent_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;md Rescue_Twofish_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2"
ReBuildCommandLine="del /q /s Release &gt;NUL:&#x0D;&#x0A;md Release 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_AES &gt;NUL:&#x0D;&#x0A;md Release_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_Serpent &gt;NUL:&#x0D;&#x0A;md Release_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_Twofish &gt;NUL:&#x0D;&#x0A;md Release_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue &gt;NUL:&#x0D;&#x0A;md Rescue 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_AES &gt;NUL:&#x0D;&#x0A;md Rescue_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_Serpent &gt;NUL:&#x0D;&#x0A;md Rescue_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_Twofish &gt;NUL:&#x0D;&#x0A;md Rescue_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1" ReBuildCommandLine="del /q /s Release &gt;NUL:&#x0D;&#x0A;md Release 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_SHA2 &gt;NUL:&#x0D;&#x0A;md Release_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_AES &gt;NUL:&#x0D;&#x0A;md Release_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_AES_SHA2 &gt;NUL:&#x0D;&#x0A;md Release_AES_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_Serpent &gt;NUL:&#x0D;&#x0A;md Release_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_Serpent_SHA2 &gt;NUL:&#x0D;&#x0A;md Release_Serpent_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_Twofish &gt;NUL:&#x0D;&#x0A;md Release_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Release_Twofish_SHA2 &gt;NUL:&#x0D;&#x0A;md Release_Twofish_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue &gt;NUL:&#x0D;&#x0A;md Rescue 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_SHA2 &gt;NUL:&#x0D;&#x0A;md Rescue_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_AES &gt;NUL:&#x0D;&#x0A;md Rescue_AES 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_AES_SHA2 &gt;NUL:&#x0D;&#x0A;md Rescue_AES_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_Serpent &gt;NUL:&#x0D;&#x0A;md Rescue_Serpent 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_Serpent_SHA2 &gt;NUL:&#x0D;&#x0A;md Rescue_Serpent_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_Twofish &gt;NUL:&#x0D;&#x0A;md Rescue_Twofish 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1&#x0D;&#x0A;&#x0D;&#x0A;del /q /s Rescue_Twofish_SHA2 &gt;NUL:&#x0D;&#x0A;md Rescue_Twofish_SHA2 2&gt;NUL:&#x0D;&#x0A;nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2"
CleanCommandLine="del /q /s Release Release_AES Release_Serpent Release_Twofish Rescue Rescue_AES Rescue_Serpent Rescue_Twofish &gt;NUL:" CleanCommandLine="del /q /s Release Release_AES Release_Serpent Release_Twofish Rescue Rescue_AES Rescue_Serpent Rescue_Twofish &gt;NUL:&#x0D;&#x0A;del /q /s Release_SHA2 Release_AES_SHA2 Release_Serpent_SHA2 Release_Twofish_SHA2 Rescue_SHA2 Rescue_AES_SHA2 Rescue_Serpent_SHA2 Rescue_Twofish_SHA2 &gt;NUL:&#x0D;&#x0A;"
Output="Release\BootLoader.com" Output="Release\BootLoader.com"
PreprocessorDefinitions="WIN32;NDEBUG" PreprocessorDefinitions="WIN32;NDEBUG"
IncludeSearchPath="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(MSVC16_ROOT)\Include&quot;" IncludeSearchPath="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)\Common&quot;;&quot;$(SolutionDir)\Crypto&quot;;&quot;$(MSVC16_ROOT)\Include&quot;"
@@ -164,6 +164,10 @@
RelativePath="..\..\Crypto\Serpent.c" RelativePath="..\..\Crypto\Serpent.c"
> >
</File> </File>
<File
RelativePath="..\..\Crypto\Sha2Small.c"
>
</File>
<File <File
RelativePath="..\..\Crypto\Twofish.c" RelativePath="..\..\Crypto\Twofish.c"
> >
+9 -5
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootCommon #ifndef TC_HEADER_Boot_BootCommon
@@ -13,7 +17,7 @@
#include "BootDefs.h" #include "BootDefs.h"
// The user will be advised to upgrade the rescue disk if upgrading from the following or any previous version // The user will be advised to upgrade the rescue disk if upgrading from the following or any previous version
#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x060a #define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0116
#define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS) #define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS)
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2012 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "BootConfig.h" #include "BootConfig.h"
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootConfig #ifndef TC_HEADER_Boot_BootConfig
+13 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Platform.h" #include "Platform.h"
@@ -305,6 +309,11 @@ bool IsPrintable (char c)
return c >= ' ' && c <= '~'; return c >= ' ' && c <= '~';
} }
bool IsDigit (char c)
{
return c >= '0' && c <= '9';
}
int GetString (char *buffer, size_t bufferSize) int GetString (char *buffer, size_t bufferSize)
{ {
+9 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootConsoleIo #ifndef TC_HEADER_Boot_BootConsoleIo
@@ -48,6 +52,7 @@ int GetString (char *buffer, size_t bufferSize);
void InitVideoMode (); void InitVideoMode ();
bool IsKeyboardCharAvailable (); bool IsKeyboardCharAvailable ();
bool IsPrintable (char c); bool IsPrintable (char c);
bool IsDigit (char c);
void Print (const char *str); void Print (const char *str);
void Print (uint32 number); void Print (uint32 number);
void Print (const uint64 &number); void Print (const uint64 &number);
+8 -4
View File
@@ -1,9 +1,13 @@
; ;
; Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. ; Derived from source code of TrueCrypt 7.1a, which is
; Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
; by the TrueCrypt License 3.0.
; ;
; Governed by the TrueCrypt License 3.0 the full text of which is contained in ; Modifications and additions to the original source code (contained in this file)
; the file License.txt included in TrueCrypt binary and source code distribution ; and all other portions of this file are Copyright (c) 2013-2016 IDRIX
; packages. ; and are governed by the Apache License 2.0 the full text of which is
; contained in the file License.txt included in VeraCrypt binary and source
; code distribution packages.
; ;
.MODEL tiny, C .MODEL tiny, C
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Platform.h" #include "Platform.h"
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootDebug #ifndef TC_HEADER_Boot_BootDebug
+13 -5
View File
@@ -1,16 +1,24 @@
/* /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootDefs #ifndef TC_HEADER_Boot_BootDefs
#define TC_HEADER_Boot_BootDefs #define TC_HEADER_Boot_BootDefs
// Total memory required (CODE + DATA + BSS + STACK + 0x100) in KBytes - determined from linker map. // Total memory required (CODE + DATA + BSS + STACK + 0x100) in KBytes - determined from linker map.
#define TC__BOOT_MEMORY_REQUIRED 42 #ifdef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
#define TC__BOOT_MEMORY_REQUIRED 44
#else
#define TC__BOOT_MEMORY_REQUIRED 42
#endif
#ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE #ifdef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE
# undef TC__BOOT_MEMORY_REQUIRED # undef TC__BOOT_MEMORY_REQUIRED
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2011 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Bios.h" #include "Bios.h"
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2011 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootDiskIo #ifndef TC_HEADER_Boot_BootDiskIo
+9 -5
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Crypto.h" #include "Crypto.h"
@@ -74,7 +78,7 @@ BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte dri
BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount) BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount)
{ {
BiosResult result; BiosResult result = BiosResultSuccess;
AcquireSectorBuffer(); AcquireSectorBuffer();
uint64 dataUnitNo; uint64 dataUnitNo;
uint64 writeOffset; uint64 writeOffset;
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootEncryptionIo #ifndef TC_HEADER_Boot_BootEncryptionIo
+128 -22
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2011 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Crc.h" #include "Crc.h"
@@ -60,6 +64,7 @@ static void PrintMainMenu ()
return; return;
Print (" Keyboard Controls:\r\n"); Print (" Keyboard Controls:\r\n");
Print (" [F5] Hide/Show Password and PIM\r\n");
Print (" [Esc] "); Print (" [Esc] ");
#ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE #ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
@@ -144,11 +149,14 @@ static int AskSelection (const char *options[], size_t optionCount)
} }
static byte AskPassword (Password &password) static byte AskPassword (Password &password, int& pim)
{ {
size_t pos = 0; size_t pos = 0;
byte scanCode; byte scanCode;
byte asciiCode; byte asciiCode;
byte hidePassword = 1;
pim = 0;
Print ("Enter password"); Print ("Enter password");
Print (PreventNormalSystemBoot ? " for hidden system:\r\n" : ": "); Print (PreventNormalSystemBoot ? " for hidden system:\r\n" : ": ");
@@ -160,11 +168,24 @@ static byte AskPassword (Password &password)
switch (scanCode) switch (scanCode)
{ {
case TC_BIOS_KEY_ENTER: case TC_BIOS_KEY_ENTER:
password.Length = pos;
Print ("\r");
if (!PreventNormalSystemBoot)
Print ("Enter password: ");
pos = 0;
while (pos < MAX_PASSWORD)
{
pos++;
if (pos < MAX_PASSWORD)
PrintChar ('*');
else
PrintCharAtCursor ('*');
}
ClearBiosKeystrokeBuffer(); ClearBiosKeystrokeBuffer();
PrintEndl(); PrintEndl();
password.Length = pos; break;
return scanCode;
case TC_BIOS_KEY_BACKSPACE: case TC_BIOS_KEY_BACKSPACE:
if (pos > 0) if (pos > 0)
@@ -178,6 +199,10 @@ static byte AskPassword (Password &password)
} }
continue; continue;
case TC_BIOS_KEY_F5:
hidePassword ^= 0x01;
continue;
default: default:
if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode)) if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode))
{ {
@@ -189,6 +214,9 @@ static byte AskPassword (Password &password)
} }
} }
if (TC_BIOS_KEY_ENTER == scanCode)
break;
if (!IsPrintable (asciiCode) || pos == MAX_PASSWORD) if (!IsPrintable (asciiCode) || pos == MAX_PASSWORD)
{ {
Beep(); Beep();
@@ -196,10 +224,78 @@ static byte AskPassword (Password &password)
} }
password.Text[pos++] = asciiCode; password.Text[pos++] = asciiCode;
if (hidePassword) asciiCode = '*';
if (pos < MAX_PASSWORD) if (pos < MAX_PASSWORD)
PrintChar ('*'); PrintChar (asciiCode);
else else
PrintCharAtCursor ('*'); PrintCharAtCursor (asciiCode);
}
pos = 0;
Print ("PIM: ");
while (true)
{
asciiCode = GetKeyboardChar (&scanCode);
switch (scanCode)
{
case TC_BIOS_KEY_ENTER:
Print ("\rPIM: ");
pos =0;
while (pos < MAX_PIM)
{
PrintChar ('*');
pos++;
}
ClearBiosKeystrokeBuffer();
PrintEndl();
return TC_BIOS_KEY_ENTER;
case TC_BIOS_KEY_BACKSPACE:
if (pos > 0)
{
if (pos < MAX_PIM)
PrintBackspace();
else
PrintCharAtCursor (' ');
--pos;
pim /= 10;
}
continue;
case TC_BIOS_KEY_F5:
hidePassword ^= 0x01;
continue;
default:
if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode))
{
burn (password.Text, sizeof (password.Text));
ClearBiosKeystrokeBuffer();
PrintEndl();
return scanCode;
}
}
if (!IsDigit (asciiCode) || pos == MAX_PIM)
{
Beep();
continue;
}
pim = 10*pim + (asciiCode - '0');
pos++;
if (hidePassword) asciiCode = '*';
if (pos < MAX_PIM)
PrintChar (asciiCode);
else
PrintCharAtCursor (asciiCode);
} }
} }
@@ -230,7 +326,7 @@ static void ExecuteBootSector (byte drive, byte *sectorBuffer)
} }
static bool OpenVolume (byte drive, Password &password, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32, bool skipNormal, bool skipHidden) static bool OpenVolume (byte drive, Password &password, int pim, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32, bool skipNormal, bool skipHidden)
{ {
int volumeType; int volumeType;
bool hiddenVolume; bool hiddenVolume;
@@ -261,7 +357,7 @@ static bool OpenVolume (byte drive, Password &password, CRYPTO_INFO **cryptoInfo
if (ReadSectors (SectorBuffer, drive, headerSec, 1) != BiosResultSuccess) if (ReadSectors (SectorBuffer, drive, headerSec, 1) != BiosResultSuccess)
continue; continue;
if (ReadVolumeHeader (!hiddenVolume, (char *) SectorBuffer, &password, cryptoInfo, nullptr) == ERR_SUCCESS) if (ReadVolumeHeader (!hiddenVolume, (char *) SectorBuffer, &password, pim, cryptoInfo, nullptr) == ERR_SUCCESS)
{ {
// Prevent opening a non-system hidden volume // Prevent opening a non-system hidden volume
if (hiddenVolume && !((*cryptoInfo)->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM)) if (hiddenVolume && !((*cryptoInfo)->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM))
@@ -315,21 +411,25 @@ static bool CheckMemoryRequirements ()
static bool MountVolume (byte drive, byte &exitKey, bool skipNormal, bool skipHidden) static bool MountVolume (byte drive, byte &exitKey, bool skipNormal, bool skipHidden)
{ {
BootArguments *bootArguments = (BootArguments *) TC_BOOT_LOADER_ARGS_OFFSET; BootArguments *bootArguments = (BootArguments *) TC_BOOT_LOADER_ARGS_OFFSET;
int incorrectPasswordCount = 0; int incorrectPasswordCount = 0, pim = 0;
EraseMemory (bootArguments, sizeof (*bootArguments)); EraseMemory (bootArguments, sizeof (*bootArguments));
// Open volume header // Open volume header
while (true) while (true)
{ {
exitKey = AskPassword (bootArguments->BootPassword); exitKey = AskPassword (bootArguments->BootPassword, pim);
if (exitKey != TC_BIOS_KEY_ENTER) if (exitKey != TC_BIOS_KEY_ENTER)
return false; return false;
if (OpenVolume (BootDrive, bootArguments->BootPassword, &BootCryptoInfo, &bootArguments->HeaderSaltCrc32, skipNormal, skipHidden)) Print ("Verifying password...");
break;
if (OpenVolume (BootDrive, bootArguments->BootPassword, pim, &BootCryptoInfo, &bootArguments->HeaderSaltCrc32, skipNormal, skipHidden))
{
Print ("OK\r\n");
break;
}
if (GetShiftFlags() & TC_BIOS_SHIFTMASK_CAPSLOCK) if (GetShiftFlags() & TC_BIOS_SHIFTMASK_CAPSLOCK)
Print ("Warning: Caps Lock is on.\r\n"); Print ("Warning: Caps Lock is on.\r\n");
@@ -351,6 +451,7 @@ static bool MountVolume (byte drive, byte &exitKey, bool skipNormal, bool skipHi
bootArguments->BootLoaderVersion = VERSION_NUM; bootArguments->BootLoaderVersion = VERSION_NUM;
bootArguments->CryptoInfoOffset = (uint16) BootCryptoInfo; bootArguments->CryptoInfoOffset = (uint16) BootCryptoInfo;
bootArguments->CryptoInfoLength = sizeof (*BootCryptoInfo); bootArguments->CryptoInfoLength = sizeof (*BootCryptoInfo);
bootArguments->Flags = (((uint32)pim) << 16);
if (BootCryptoInfo->hiddenVolume) if (BootCryptoInfo->hiddenVolume)
bootArguments->HiddenSystemPartitionStart = PartitionFollowingActive.StartSector << TC_LB_SIZE_BIT_SHIFT_DIVISOR; bootArguments->HiddenSystemPartitionStart = PartitionFollowingActive.StartSector << TC_LB_SIZE_BIT_SHIFT_DIVISOR;
@@ -584,7 +685,7 @@ static bool CopySystemPartitionToHiddenVolume (byte drive, byte &exitKey)
sectorOffset.HighPart = 0; sectorOffset.HighPart = 0;
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
int statCount; int statCount = 0;
if (!CheckMemoryRequirements ()) if (!CheckMemoryRequirements ())
goto err; goto err;
@@ -709,7 +810,7 @@ static void DecryptDrive (byte drive)
uint64 sector = EncryptedVirtualPartition.EndSector + 1; uint64 sector = EncryptedVirtualPartition.EndSector + 1;
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
int statCount; int statCount = 0;
bool skipBadSectors = false; bool skipBadSectors = false;
@@ -789,6 +890,8 @@ askBadSectorSkip:
if (headerUpdateRequired) if (headerUpdateRequired)
{ {
Print ("\rUpdating header...");
AcquireSectorBuffer(); AcquireSectorBuffer();
uint64 headerSector; uint64 headerSector;
headerSector.HighPart = 0; headerSector.HighPart = 0;
@@ -799,7 +902,7 @@ askBadSectorSkip:
CRYPTO_INFO *headerCryptoInfo = crypto_open(); CRYPTO_INFO *headerCryptoInfo = crypto_open();
while (ReadSectors (SectorBuffer, drive, headerSector, 1) != BiosResultSuccess); while (ReadSectors (SectorBuffer, drive, headerSector, 1) != BiosResultSuccess);
if (ReadVolumeHeader (TRUE, (char *) SectorBuffer, &bootArguments->BootPassword, NULL, headerCryptoInfo) == 0) if (ReadVolumeHeader (TRUE, (char *) SectorBuffer, &bootArguments->BootPassword, (int) (bootArguments->Flags >> 16), NULL, headerCryptoInfo) == 0)
{ {
DecryptBuffer (SectorBuffer + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, headerCryptoInfo); DecryptBuffer (SectorBuffer + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, headerCryptoInfo);
@@ -826,6 +929,8 @@ askBadSectorSkip:
while (WriteSectors (SectorBuffer, drive, headerSector, 1) != BiosResultSuccess); while (WriteSectors (SectorBuffer, drive, headerSector, 1) != BiosResultSuccess);
ReleaseSectorBuffer(); ReleaseSectorBuffer();
Print ("Done!\r\n");
} }
if (sectorsRemaining.HighPart == 0 && sectorsRemaining.LowPart == 0) if (sectorsRemaining.HighPart == 0 && sectorsRemaining.LowPart == 0)
@@ -952,7 +1057,8 @@ static void RepairMenu ()
uint32 masterKeyScheduleCrc; uint32 masterKeyScheduleCrc;
Password password; Password password;
byte exitKey = AskPassword (password); int pim;
byte exitKey = AskPassword (password, pim);
if (exitKey != TC_BIOS_KEY_ENTER) if (exitKey != TC_BIOS_KEY_ENTER)
goto abort; goto abort;
@@ -963,7 +1069,7 @@ static void RepairMenu ()
ReleaseSectorBuffer(); ReleaseSectorBuffer();
// Restore volume header only if the current one cannot be used // Restore volume header only if the current one cannot be used
if (OpenVolume (TC_FIRST_BIOS_DRIVE, password, &cryptoInfo, nullptr, false, true)) if (OpenVolume (TC_FIRST_BIOS_DRIVE, password, pim, &cryptoInfo, nullptr, false, true))
{ {
validHeaderPresent = true; validHeaderPresent = true;
masterKeyScheduleCrc = GetCrc32 (cryptoInfo->ks, sizeof (cryptoInfo->ks)); masterKeyScheduleCrc = GetCrc32 (cryptoInfo->ks, sizeof (cryptoInfo->ks));
@@ -973,7 +1079,7 @@ static void RepairMenu ()
AcquireSectorBuffer(); AcquireSectorBuffer();
CopyMemory (TC_BOOT_LOADER_BUFFER_SEGMENT, 0, SectorBuffer, TC_LB_SIZE); CopyMemory (TC_BOOT_LOADER_BUFFER_SEGMENT, 0, SectorBuffer, TC_LB_SIZE);
if (ReadVolumeHeader (TRUE, (char *) SectorBuffer, &password, &cryptoInfo, nullptr) == 0) if (ReadVolumeHeader (TRUE, (char *) SectorBuffer, &password, pim, &cryptoInfo, nullptr) == 0)
{ {
if (validHeaderPresent) if (validHeaderPresent)
{ {
@@ -1081,7 +1187,7 @@ void main ()
// Check whether the user is not using the Rescue Disk to create a hidden system // Check whether the user is not using the Rescue Disk to create a hidden system
if (ReadWriteMBR (false, BootDrive, true) == BiosResultSuccess if (ReadWriteMBR (false, BootDrive, true) == BiosResultSuccess
&& *(uint32 *) (SectorBuffer + 6) == 0x65757254 && *(uint32 *) (SectorBuffer + 6) == 0x61726556
&& *(uint32 *) (SectorBuffer + 10) == 0x70797243 && *(uint32 *) (SectorBuffer + 10) == 0x70797243
&& (SectorBuffer[TC_BOOT_SECTOR_CONFIG_OFFSET] & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE) != TC_HIDDEN_OS_CREATION_PHASE_NONE) && (SectorBuffer[TC_BOOT_SECTOR_CONFIG_OFFSET] & TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE) != TC_HIDDEN_OS_CREATION_PHASE_NONE)
{ {
+9 -5
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootMain #ifndef TC_HEADER_Boot_BootMain
@@ -12,7 +16,7 @@
#include "TCdefs.h" #include "TCdefs.h"
#include "Platform.h" #include "Platform.h"
static byte AskPassword (Password &password); static byte AskPassword (Password &password, int& pim);
static int AskSelection (const char *options[], size_t optionCount); static int AskSelection (const char *options[], size_t optionCount);
static bool AskYesNo (const char *message); static bool AskYesNo (const char *message);
static byte BootEncryptedDrive (); static byte BootEncryptedDrive ();
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "BootDefs.h" #include "BootDefs.h"
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Platform.h" #include "Platform.h"
+13 -6
View File
@@ -1,9 +1,13 @@
; ;
; Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. ; Derived from source code of TrueCrypt 7.1a, which is
; Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
; by the TrueCrypt License 3.0.
; ;
; Governed by the TrueCrypt License 3.0 the full text of which is contained in ; Modifications and additions to the original source code (contained in this file)
; the file License.txt included in TrueCrypt binary and source code distribution ; and all other portions of this file are Copyright (c) 2013-2016 IDRIX
; packages. ; and are governed by the Apache License 2.0 the full text of which is
; contained in the file License.txt included in VeraCrypt binary and source
; code distribution packages.
; ;
.MODEL tiny .MODEL tiny
@@ -134,6 +138,9 @@ checksum_ok:
push dx push dx
; Decompress boot loader ; Decompress boot loader
mov cx, word ptr [start + TC_BOOT_SECTOR_LOADER_LENGTH_OFFSET]
sub cx, TC_GZIP_HEADER_SIZE
push cx ; Compressed data size
push TC_BOOT_LOADER_COMPRESSED_BUFFER_OFFSET + TC_GZIP_HEADER_SIZE ; Compressed data push TC_BOOT_LOADER_COMPRESSED_BUFFER_OFFSET + TC_GZIP_HEADER_SIZE ; Compressed data
push TC_MAX_BOOT_LOADER_DECOMPRESSED_SIZE ; Output buffer size push TC_MAX_BOOT_LOADER_DECOMPRESSED_SIZE ; Output buffer size
push TC_BOOT_LOADER_DECOMPRESSOR_MEMORY_SIZE + TC_COM_EXECUTABLE_OFFSET ; Output buffer push TC_BOOT_LOADER_DECOMPRESSOR_MEMORY_SIZE + TC_COM_EXECUTABLE_OFFSET ; Output buffer
@@ -145,7 +152,7 @@ checksum_ok:
retf retf
decompressor_ret: decompressor_ret:
add sp, 6 add sp, 8
pop dx pop dx
; Restore boot sector segment ; Restore boot sector segment
@@ -228,7 +235,7 @@ checksum:
backup_loader_used db 0 backup_loader_used db 0
disk_error_msg db 'Disk error', 13, 10, 7, 0 disk_error_msg db 'Disk error', 13, 10, 7, 0
loader_damaged_msg db 7, 'Loader damaged! Use Rescue Disk: Repair Options > Restore', 0 loader_damaged_msg db 7, 'Loader damaged! Repair with Rescue Disk', 0
ORG 7C00h + 510 ORG 7C00h + 510
dw 0AA55h ; Boot sector signature dw 0AA55h ; Boot sector signature
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_BootStrings #ifndef TC_HEADER_Boot_BootStrings
+52 -16
View File
@@ -23,6 +23,7 @@
*/ */
/* Adapted for TrueCrypt */ /* Adapted for TrueCrypt */
/* Adapted for VeraCrypt */
#define local static /* for local function definitions */ #define local static /* for local function definitions */
@@ -47,6 +48,7 @@ struct state {
/* input state */ /* input state */
unsigned char *in; /* input buffer */ unsigned char *in; /* input buffer */
unsigned int inlen; /* available input at in */
unsigned int incnt; /* bytes read so far */ unsigned int incnt; /* bytes read so far */
int bitbuf; /* bit buffer */ int bitbuf; /* bit buffer */
int bitcnt; /* number of bits in bit buffer */ int bitcnt; /* number of bits in bit buffer */
@@ -81,6 +83,9 @@ local int stored(struct state *s)
s->bitbuf = 0; s->bitbuf = 0;
s->bitcnt = 0; s->bitcnt = 0;
if (s->incnt + 4 > s->inlen)
return 2; /* not enough input */
/* get length and check against its one's complement */ /* get length and check against its one's complement */
len = s->in[s->incnt++]; len = s->in[s->incnt++];
len |= s->in[s->incnt++] << 8; len |= s->in[s->incnt++] << 8;
@@ -88,6 +93,9 @@ local int stored(struct state *s)
s->in[s->incnt++] != ((~len >> 8) & 0xff)) s->in[s->incnt++] != ((~len >> 8) & 0xff))
return -2; /* didn't match complement! */ return -2; /* didn't match complement! */
if (s->incnt + len > s->inlen)
return 2; /* not enough input */
/* copy len bytes from in to out */ /* copy len bytes from in to out */
if (s->out != NIL) { if (s->out != NIL) {
if (s->outcnt + len > s->outlen) if (s->outcnt + len > s->outlen)
@@ -110,6 +118,8 @@ struct huffman {
short *symbol; /* canonically ordered symbols */ short *symbol; /* canonically ordered symbols */
}; };
/* reduce code size by using slow version of the decompressor */
#define SLOW
#ifdef SLOW #ifdef SLOW
local int decode(struct state *s, struct huffman *h) local int decode(struct state *s, struct huffman *h)
@@ -265,7 +275,7 @@ local int codes(struct state *s,
/* get and check distance */ /* get and check distance */
symbol = decode(s, distcode); symbol = decode(s, distcode);
if (symbol < 0) return symbol; /* invalid symbol */ if (symbol < 0) return symbol; /* invalid symbol */
dist = dists[symbol] + bits(s, dext[symbol]); dist = dists[symbol] + bits(s, dext[symbol]);
if (dist > s->outcnt) if (dist > s->outcnt)
return -10; /* distance too far back */ return -10; /* distance too far back */
@@ -363,26 +373,38 @@ local int dynamic(struct state *s)
int len; /* last length to repeat */ int len; /* last length to repeat */
symbol = decode(s, &lencode); symbol = decode(s, &lencode);
if (symbol < 0)
return symbol; /* invalid symbol */
if (symbol < 16) /* length in 0..15 */ if (symbol < 16) /* length in 0..15 */
lengths[index++] = symbol; lengths[index++] = symbol;
else { /* repeat instruction */ else { /* repeat instruction */
len = 0; /* assume repeating zeros */ len = 0; /* assume repeating zeros */
if (symbol == 16) { /* repeat last length 3..6 times */ switch(symbol)
if (index == 0) return -5; /* no last length! */ {
len = lengths[index - 1]; /* last length */ case 16: { /* repeat last length 3..6 times */
symbol = 3 + bits(s, 2); if (index == 0) return -5; /* no last length! */
} len = lengths[index - 1]; /* last length */
else if (symbol == 17) /* repeat zero 3..10 times */ symbol = 3 + bits(s, 2);
symbol = 3 + bits(s, 3); break;
else /* == 18, repeat zero 11..138 times */ }
symbol = 11 + bits(s, 7); case 17: /* repeat zero 3..10 times */
if (index + symbol > nlen + ndist) symbol = 3 + bits(s, 3);
break;
default: /* == 18, repeat zero 11..138 times */
symbol = 11 + bits(s, 7);
break;
}
if ((index + symbol > nlen + ndist))
return -6; /* too many lengths! */ return -6; /* too many lengths! */
while (symbol--) /* repeat last or zero symbol times */ while (symbol--) /* repeat last or zero symbol times */
lengths[index++] = len; lengths[index++] = len;
} }
} }
/* check for end-of-block code -- there better be one! */
if (lengths[256] == 0)
return -9;
/* build huffman table for literal/length codes */ /* build huffman table for literal/length codes */
err = construct(&lencode, lengths, nlen); err = construct(&lencode, lengths, nlen);
if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1)) if (err < 0 || (err > 0 && nlen - lencode.count[0] != 1))
@@ -404,7 +426,8 @@ void _acrtused () { }
int far main ( int far main (
unsigned char *dest, /* pointer to destination pointer */ unsigned char *dest, /* pointer to destination pointer */
unsigned int destlen, /* amount of output space */ unsigned int destlen, /* amount of output space */
unsigned char *source) /* pointer to source data pointer */ unsigned char *source, /* pointer to source data pointer */
unsigned int sourcelen)
{ {
struct state s; /* input/output state */ struct state s; /* input/output state */
int last, type; /* block information */ int last, type; /* block information */
@@ -417,6 +440,7 @@ int far main (
/* initialize input state */ /* initialize input state */
s.in = source; s.in = source;
s.inlen = sourcelen;
s.incnt = 0; s.incnt = 0;
s.bitbuf = 0; s.bitbuf = 0;
s.bitcnt = 0; s.bitcnt = 0;
@@ -425,10 +449,22 @@ int far main (
do { do {
last = bits(&s, 1); /* one if last block */ last = bits(&s, 1); /* one if last block */
type = bits(&s, 2); /* block type 0..3 */ type = bits(&s, 2); /* block type 0..3 */
err = type == 0 ? stored(&s) : switch(type)
(type == 1 ? fixed(&s) : {
(type == 2 ? dynamic(&s) : case 0:
-1)); /* type == 3, invalid */ err = stored(&s);
break;
case 1:
err = fixed(&s);
break;
case 2:
err = dynamic(&s);
break;
default:
err = -1; /* type == 3, invalid */
break;
}
if (err != 0) break; /* return with error */ if (err != 0) break; /* return with error */
} while (!last); } while (!last);
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Platform.h" #include "Platform.h"
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_IntFilter #ifndef TC_HEADER_Boot_IntFilter
+23 -5
View File
@@ -1,10 +1,13 @@
# #
# Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved. # Derived from source code of TrueCrypt 7.1a, which is
# # Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
# Governed by the TrueCrypt License 3.0 the full text of which is contained in # by the TrueCrypt License 3.0.
# the file License.txt included in TrueCrypt binary and source code distribution
# packages.
# #
# Modifications and additions to the original source code (contained in this file)
# and all other portions of this file are Copyright (c) 2013-2016 IDRIX
# and are governed by the Apache License 2.0 the full text of which is
# contained in the file License.txt included in VeraCrypt binary and source
# code distribution packages.
PROJ = BootLoader PROJ = BootLoader
.SILENT: .SILENT:
@@ -39,6 +42,13 @@ OBJDIR = $(OBJDIR)_$(SINGLE_CIPHER)
CFLAGS = $(CFLAGS) /D TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE /D TC_WINDOWS_BOOT_$(SINGLE_CIPHER) CFLAGS = $(CFLAGS) /D TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE /D TC_WINDOWS_BOOT_$(SINGLE_CIPHER)
!endif !endif
!ifdef SINGLE_PRF
OBJDIR = $(OBJDIR)_$(SINGLE_PRF)
CFLAGS = $(CFLAGS) /D TC_WINDOWS_BOOT_$(SINGLE_PRF)
!else
CFLAGS = $(CFLAGS) /D TC_WINDOWS_BOOT_RIPEMD160
!endif
OUTDIR = $(OBJDIR) OUTDIR = $(OBJDIR)
TARGETEXT = com TARGETEXT = com
TARGETS = $(OUTDIR)\BootDefs.i $(OUTDIR)\BootSector.bin $(OUTDIR)\Decompressor.com TARGETS = $(OUTDIR)\BootDefs.i $(OUTDIR)\BootSector.bin $(OUTDIR)\Decompressor.com
@@ -72,7 +82,11 @@ OBJS = $(OBJS) $(OUTDIR)\Pkcs5.obj
OBJS = $(OBJS) $(OUTDIR)\Volumes.obj OBJS = $(OBJS) $(OUTDIR)\Volumes.obj
OBJS = $(OBJS) $(OUTDIR)\Xts.obj OBJS = $(OBJS) $(OUTDIR)\Xts.obj
!if "$(SINGLE_PRF)" == "SHA2"
OBJS = $(OBJS) $(OUTDIR)\Sha2Small.obj
!else
OBJS = $(OBJS) $(OUTDIR)\Rmd160.obj OBJS = $(OBJS) $(OUTDIR)\Rmd160.obj
!endif
!if !DEFINED (SINGLE_CIPHER) !if !DEFINED (SINGLE_CIPHER)
OBJS = $(OBJS) $(OUTDIR)\AesSmall.obj OBJS = $(OBJS) $(OUTDIR)\AesSmall.obj
@@ -179,6 +193,10 @@ $(LIBS)
$(LD) $(LFLAGS) @$(PROJ).crf $(LD) $(LFLAGS) @$(PROJ).crf
del $(PROJ).crf $(PROJ).crf2 del $(PROJ).crf $(PROJ).crf2
# Compress the Rescue Disk botloader for Cascades and Serpent since it is too big (size > 31232 bytes)
!if DEFINED(RESCUE_DISK) && (!DEFINED (SINGLE_CIPHER) || ("$(SINGLE_CIPHER)" == "SERPENT"))
upx $(PROJ).$(TARGETEXT)
!endif
gzip.exe -c -n --best $(PROJ).$(TARGETEXT) >$(PROJ).$(TARGETEXT).gz gzip.exe -c -n --best $(PROJ).$(TARGETEXT) >$(PROJ).$(TARGETEXT).gz
-dd.exe conv=notrunc,sync bs=512 seek=5 if=$(PROJ).$(TARGETEXT).gz of=$(PROJ).flp 2>NUL: -dd.exe conv=notrunc,sync bs=512 seek=5 if=$(PROJ).$(TARGETEXT).gz of=$(PROJ).flp 2>NUL:
cd .. cd ..
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "Platform.h" #include "Platform.h"
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Boot_Platform #ifndef TC_HEADER_Boot_Platform
+20 -9
View File
@@ -1,16 +1,20 @@
# #
# Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. # Derived from source code of TrueCrypt 7.1a, which is
# Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
# by the TrueCrypt License 3.0.
# #
# Governed by the TrueCrypt License 3.0 the full text of which is contained in # Modifications and additions to the original source code (contained in this file)
# the file License.txt included in TrueCrypt binary and source code distribution # and all other portions of this file are Copyright (c) 2013-2016 IDRIX
# packages. # and are governed by the Apache License 2.0 the full text of which is
# contained in the file License.txt included in VeraCrypt binary and source
# code distribution packages.
# #
$(NAME): $(NAME).a $(NAME): $(NAME).a
clean: clean:
@echo Cleaning $(NAME) @echo Cleaning $(NAME)
rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJS:.o=.d) *.gch
%.o: %.c %.o: %.c
@echo Compiling $(<F) @echo Compiling $(<F)
@@ -20,10 +24,17 @@ clean:
@echo Compiling $(<F) @echo Compiling $(<F)
$(CXX) $(CXXFLAGS) -c $< -o $@ $(CXX) $(CXXFLAGS) -c $< -o $@
ifeq "$(PLATFORM)" "MacOSX"
%.o: %.asm
@echo Assembling $(<F)
$(AS) $(ASFLAGS) -f macho32 -o $@.32 $<
$(AS) $(ASFLAGS) -f macho64 -o $@.64 $<
lipo -create $@.32 $@.64 -output $@
else
%.o: %.asm %.o: %.asm
@echo Assembling $(<F) @echo Assembling $(<F)
$(AS) $(ASFLAGS) -o $@ $< $(AS) $(ASFLAGS) -o $@ $<
endif
# Precompiled headers # Precompiled headers
%.h.gch: %.h %.h.gch: %.h
@@ -49,10 +60,10 @@ TR_SED_BIN := tr '\n' ' ' | tr -s ' ' ',' | sed -e 's/^,//g' -e 's/,$$/n/' | tr
# Dependencies # Dependencies
-include $(OBJS:.o=.d) -include $(OBJS:.o=.d) $(OBJSEX:.oo=.d)
$(NAME).a: $(OBJS) $(NAME).a: $(OBJS) $(OBJSEX)
@echo Updating library $@ @echo Updating library $@
$(AR) $(AFLAGS) -rcu $@ $(OBJS) $(AR) $(AFLAGS) -rcu $@ $(OBJS) $(OBJSEX)
$(RANLIB) $@ $(RANLIB) $@
+2 -2
View File
@@ -27,7 +27,7 @@
<string>TRUE</string> <string>TRUE</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0</string> <string>1.17.22</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>_VERSION_</string> <string>_VERSION_</string>
@@ -36,7 +36,7 @@
<string>VeraCrypt _VERSION_</string> <string>VeraCrypt _VERSION_</string>
<key>LSRequiresCarbon</key> <key>LSRequiresCarbon</key>
<true/> <false/>
<key>CSResourcesFileMapped</key> <key>CSResourcesFileMapped</key>
<true/> <true/>
BIN
View File
Binary file not shown.
+47
View File
@@ -0,0 +1,47 @@
#
# Copyright (c) 2013-2016 IDRIX
# Governed by the Apache License 2.0 the full text of which is contained
# in the file License.txt included in VeraCrypt binary and source
# code distribution packages.
#
# Absolute path to this script
SCRIPT=$(readlink -f "$0")
# Absolute path this script is in
SCRIPTPATH=$(dirname "$SCRIPT")
# source directory which contains the Makefile
SOURCEPATH=$(readlink -f "$SCRIPTPATH/..")
# directory where the VeraCrypt has been checked out
PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..")
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "VeraCrypt must be built by root" 1>&2
exit 1
fi
# the sources of wxWidgets 3.0.2 must be extracted to the parent directory
export WX_ROOT=$PARENTDIR/wxWidgets-3.0.2
echo "Using wxWidgets sources in $WX_ROOT"
cd $SOURCEPATH
echo "Building GUI version of VeraCrypt"
# this will be the temporary wxWidgets directory
export WX_BUILD_DIR=$PARENTDIR/wxBuildGui
make WXSTATIC=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1
# Uncomment below and comment line above to reuse existing wxWidgets build
# make WXSTATIC=1 clean && make WXSTATIC=1
echo "Building console version of VeraCrypt"
# this will be the temporary wxWidgets directory
export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole
make WXSTATIC=1 NOGUI=1 wxbuild && make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1
# Uncomment below and comment line above to reuse existing wxWidgets build
# make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1
+33
View File
@@ -0,0 +1,33 @@
#
# Copyright (c) 2013-2016 IDRIX
# Governed by the Apache License 2.0 the full text of which is contained
# in the file License.txt included in VeraCrypt binary and source
# code distribution packages.
#
# Absolute path this script is in
SCRIPTPATH=$(cd "$(dirname "$0")"; pwd)
# source directory which contains the Makefile
SOURCEPATH=$(cd "$(dirname "$SCRIPTPATH/../.")"; pwd)
# directory where the VeraCrypt project has been checked out
PARENTDIR=$(cd "$(dirname "$SCRIPTPATH/../../../.")"; pwd)
# the sources of wxWidgets 3.0.2 must be extracted to the parent directory
export WX_ROOT=$PARENTDIR/wxWidgets-3.0.2
echo "Using wxWidgets sources in $WX_ROOT"
# this will be the temporary wxWidgets directory
export WX_BUILD_DIR=$PARENTDIR/wxBuild
# define the SDK version to use. We use 10.6 by default
export VC_OSX_TARGET=10.6
echo "Using MacOSX SDK $VC_OSX_TARGET"
cd $SOURCEPATH
echo "Building VeraCrypt"
make WXSTATIC=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1
# Uncomment below and comment line above to reuse existing wxWidgets build
# make WXSTATIC=1 clean && make WXSTATIC=1
+38 -16
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#pragma once #pragma once
@@ -62,6 +64,7 @@
#define TC_IOCTL_SET_SYSTEM_FAVORITE_VOLUME_DIRTY TC_IOCTL (36) #define TC_IOCTL_SET_SYSTEM_FAVORITE_VOLUME_DIRTY TC_IOCTL (36)
#define TC_IOCTL_REREAD_DRIVER_CONFIG TC_IOCTL (37) #define TC_IOCTL_REREAD_DRIVER_CONFIG TC_IOCTL (37)
#define TC_IOCTL_GET_SYSTEM_DRIVE_DUMP_CONFIG TC_IOCTL (38) #define TC_IOCTL_GET_SYSTEM_DRIVE_DUMP_CONFIG TC_IOCTL (38)
#define VC_IOCTL_GET_BOOT_LOADER_FINGERPRINT TC_IOCTL (39)
// Legacy IOCTLs used before version 5.0 // Legacy IOCTLs used before version 5.0
#define TC_IOCTL_LEGACY_GET_DRIVER_VERSION 466968 #define TC_IOCTL_LEGACY_GET_DRIVER_VERSION 466968
@@ -100,6 +103,16 @@ typedef struct
Password ProtectedHidVolPassword; /* Password to the hidden volume to be protected against overwriting */ Password ProtectedHidVolPassword; /* Password to the hidden volume to be protected against overwriting */
BOOL UseBackupHeader; BOOL UseBackupHeader;
BOOL RecoveryMode; BOOL RecoveryMode;
int pkcs5_prf;
int ProtectedHidVolPkcs5Prf;
BOOL bTrueCryptMode;
uint32 BytesPerPhysicalSector;
int VolumePim;
int ProtectedHidVolPim;
wchar_t wszLabel[33]; // maximum label length is 32 for NTFS and 11 for FAT32
BOOL bIsNTFS; // output only
BOOL bDriverSetLabel;
BOOL bCachePim;
} MOUNT_STRUCT; } MOUNT_STRUCT;
typedef struct typedef struct
@@ -114,9 +127,11 @@ typedef struct
{ {
unsigned __int32 ulMountedDrives; /* Bitfield of all mounted drive letters */ unsigned __int32 ulMountedDrives; /* Bitfield of all mounted drive letters */
wchar_t wszVolume[26][TC_MAX_PATH]; /* Volume names of mounted volumes */ wchar_t wszVolume[26][TC_MAX_PATH]; /* Volume names of mounted volumes */
wchar_t wszLabel[26][33]; /* Labels of mounted volumes */
unsigned __int64 diskLength[26]; unsigned __int64 diskLength[26];
int ea[26]; int ea[26];
int volumeType[26]; /* Volume type (e.g. PROP_VOL_TYPE_OUTER, PROP_VOL_TYPE_OUTER_VOL_WRITE_PREVENTED, etc.) */ int volumeType[26]; /* Volume type (e.g. PROP_VOL_TYPE_OUTER, PROP_VOL_TYPE_OUTER_VOL_WRITE_PREVENTED, etc.) */
BOOL truecryptMode[26];
} MOUNT_LIST_STRUCT; } MOUNT_LIST_STRUCT;
typedef struct typedef struct
@@ -133,15 +148,14 @@ typedef struct
BOOL readOnly; BOOL readOnly;
BOOL removable; BOOL removable;
BOOL partitionInInactiveSysEncScope; BOOL partitionInInactiveSysEncScope;
#if 0
unsigned __int64 volumeCreationTime; // Deprecated in v6.0
unsigned __int64 headerCreationTime; // Deprecated in v6.0
#endif
uint32 volumeHeaderFlags; uint32 volumeHeaderFlags;
unsigned __int64 totalBytesRead; unsigned __int64 totalBytesRead;
unsigned __int64 totalBytesWritten; unsigned __int64 totalBytesWritten;
int hiddenVolProtection; /* Hidden volume protection status (e.g. HIDVOL_PROT_STATUS_NONE, HIDVOL_PROT_STATUS_ACTIVE, etc.) */ int hiddenVolProtection; /* Hidden volume protection status (e.g. HIDVOL_PROT_STATUS_NONE, HIDVOL_PROT_STATUS_ACTIVE, etc.) */
int volFormatVersion; int volFormatVersion;
int volumePim;
wchar_t wszLabel[33];
BOOL bDriverSetLabel;
} VOLUME_PROPERTIES_STRUCT; } VOLUME_PROPERTIES_STRUCT;
typedef struct typedef struct
@@ -239,14 +253,22 @@ typedef struct
typedef struct typedef struct
{ {
Password VolumePassword; Password VolumePassword;
int pkcs5_prf;
int pim;
} ReopenBootVolumeHeaderRequest; } ReopenBootVolumeHeaderRequest;
typedef struct typedef struct
{ {
char BootEncryptionAlgorithmName[256]; char BootEncryptionAlgorithmName[256];
char BootPrfAlgorithmName[256];
} GetBootEncryptionAlgorithmNameRequest; } GetBootEncryptionAlgorithmNameRequest;
typedef struct
{
byte Fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE];
} BootLoaderFingerprintRequest;
typedef struct typedef struct
{ {
wchar_t DevicePath[TC_MAX_PATH]; wchar_t DevicePath[TC_MAX_PATH];
@@ -290,18 +312,15 @@ typedef struct
#pragma pack (pop) #pragma pack (pop)
#ifdef TC_WINDOWS_DRIVER
#define DRIVER_STR WIDE #define DRIVER_STR WIDE
#else
#define DRIVER_STR
#endif
#define TC_UNIQUE_ID_PREFIX "VeraCryptVolume" #define TC_UNIQUE_ID_PREFIX "VeraCryptVolume"
#define TC_MOUNT_PREFIX L"\\Device\\VeraCryptVolume" #define TC_MOUNT_PREFIX L"\\Device\\VeraCryptVolume"
#define NT_MOUNT_PREFIX DRIVER_STR("\\Device\\VeraCryptVolume") #define NT_MOUNT_PREFIX DRIVER_STR("\\Device\\VeraCryptVolume")
#define NT_ROOT_PREFIX DRIVER_STR("\\Device\\VeraCrypt") #define NT_ROOT_PREFIX DRIVER_STR("\\Device\\VeraCrypt")
#define DOS_MOUNT_PREFIX DRIVER_STR("\\DosDevices\\") #define DOS_MOUNT_PREFIX_DEFAULT DRIVER_STR("\\DosDevices\\")
#define DOS_MOUNT_PREFIX_GLOBAL DRIVER_STR("\\GLOBAL??\\") // Use Global MS-DOS device names for sanity checks on drive letters
#define DOS_ROOT_PREFIX DRIVER_STR("\\DosDevices\\VeraCrypt") #define DOS_ROOT_PREFIX DRIVER_STR("\\DosDevices\\VeraCrypt")
#define WIN32_ROOT_PREFIX DRIVER_STR("\\\\.\\VeraCrypt") #define WIN32_ROOT_PREFIX DRIVER_STR("\\\\.\\VeraCrypt")
@@ -313,5 +332,8 @@ typedef struct
#define TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES 0x2 #define TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES 0x2
#define TC_DRIVER_CONFIG_DISABLE_NONADMIN_SYS_FAVORITES_ACCESS 0x4 #define TC_DRIVER_CONFIG_DISABLE_NONADMIN_SYS_FAVORITES_ACCESS 0x4
#define TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION 0x8 #define TC_DRIVER_CONFIG_DISABLE_HARDWARE_ENCRYPTION 0x8
#define TC_DRIVER_CONFIG_ENABLE_EXTENDED_IOCTL 0x10
#define TC_DRIVER_CONFIG_DISABLE_EVIL_MAID_ATTACK_DETECTION 0x20
#define TC_DRIVER_CONFIG_CACHE_BOOT_PIM 0x40
#endif /* _WIN32 */ #endif /* _WIN32 */
+33 -18
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2007-2010 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include <atlcomcli.h> #include <atlcomcli.h>
@@ -15,7 +19,7 @@
#include "Dlgcode.h" #include "Dlgcode.h"
#include "Registry.h" #include "Registry.h"
using namespace TrueCrypt; using namespace VeraCrypt;
HRESULT CreateElevatedComObject (HWND hwnd, REFGUID guid, REFIID iid, void **ppv) HRESULT CreateElevatedComObject (HWND hwnd, REFGUID guid, REFIID iid, void **ppv)
{ {
@@ -43,12 +47,27 @@ BOOL ComGetInstanceBase (HWND hWnd, REFCLSID clsid, REFIID iid, void **tcServer)
BOOL r; BOOL r;
if (IsUacSupported ()) if (IsUacSupported ())
r = CreateElevatedComObject (hWnd, clsid, iid, tcServer) == S_OK; {
while (true)
{
r = CreateElevatedComObject (hWnd, clsid, iid, tcServer) == S_OK;
if (r)
break;
else
{
if (IDRETRY == ErrorRetryCancel ("UAC_INIT_ERROR", hWnd))
continue;
else
break;
}
}
}
else else
{
r = CoCreateInstance (clsid, NULL, CLSCTX_LOCAL_SERVER, iid, tcServer) == S_OK; r = CoCreateInstance (clsid, NULL, CLSCTX_LOCAL_SERVER, iid, tcServer) == S_OK;
if (!r)
if (!r) Error ("UAC_INIT_ERROR", hWnd);
Error ("UAC_INIT_ERROR"); }
return r; return r;
} }
@@ -83,9 +102,8 @@ DWORD BaseCom::CallDriver (DWORD ioctl, BSTR input, BSTR *output)
DWORD BaseCom::CopyFile (BSTR sourceFile, BSTR destinationFile) DWORD BaseCom::CopyFile (BSTR sourceFile, BSTR destinationFile)
{ {
USES_CONVERSION;
if (!::CopyFile (CW2A (sourceFile), CW2A (destinationFile), FALSE)) if (!::CopyFileW (sourceFile, destinationFile, FALSE))
return GetLastError(); return GetLastError();
return ERROR_SUCCESS; return ERROR_SUCCESS;
@@ -94,9 +112,8 @@ DWORD BaseCom::CopyFile (BSTR sourceFile, BSTR destinationFile)
DWORD BaseCom::DeleteFile (BSTR file) DWORD BaseCom::DeleteFile (BSTR file)
{ {
USES_CONVERSION;
if (!::DeleteFile (CW2A (file))) if (!::DeleteFileW (file))
return GetLastError(); return GetLastError();
return ERROR_SUCCESS; return ERROR_SUCCESS;
@@ -111,11 +128,10 @@ BOOL BaseCom::IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly)
DWORD BaseCom::ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone) DWORD BaseCom::ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone)
{ {
USES_CONVERSION;
try try
{ {
auto_ptr <File> file (device ? new Device (string (CW2A (filePath)), !write) : new File (string (CW2A (filePath)), !write)); auto_ptr <File> file (device ? new Device (filePath, !write) : new File (filePath, !write));
file->CheckOpened (SRC_POS);
file->SeekAt (offset); file->SeekAt (offset);
if (write) if (write)
@@ -223,8 +239,7 @@ DWORD BaseCom::SetDriverServiceStartType (DWORD startType)
DWORD BaseCom::WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value) DWORD BaseCom::WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value)
{ {
USES_CONVERSION; if (!::WriteLocalMachineRegistryDword (keyPath, valueName, value))
if (!::WriteLocalMachineRegistryDword (CW2A (keyPath), CW2A (valueName), value))
return GetLastError(); return GetLastError();
return ERROR_SUCCESS; return ERROR_SUCCESS;
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2007-2010 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_BASE_COM #ifndef TC_HEADER_BASE_COM
File diff suppressed because it is too large Load Diff
+45 -31
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_Common_BootEncryption #ifndef TC_HEADER_Common_BootEncryption
@@ -17,15 +21,16 @@
using namespace std; using namespace std;
namespace TrueCrypt namespace VeraCrypt
{ {
class File class File
{ {
public: public:
File () : FileOpen (false) { } File () : Elevated (false), FileOpen (false), FilePointerPosition(0), Handle(INVALID_HANDLE_VALUE), IsDevice(false), LastError(0) { }
File (string path, bool readOnly = false, bool create = false); File (wstring path,bool readOnly = false, bool create = false);
~File () { Close(); } virtual ~File () { Close(); }
void CheckOpened (const char* srcPos) { if (!FileOpen) { SetLastError (LastError); throw SystemException (srcPos);} }
void Close (); void Close ();
DWORD Read (byte *buffer, DWORD size); DWORD Read (byte *buffer, DWORD size);
void Write (byte *buffer, DWORD size); void Write (byte *buffer, DWORD size);
@@ -37,14 +42,16 @@ namespace TrueCrypt
uint64 FilePointerPosition; uint64 FilePointerPosition;
HANDLE Handle; HANDLE Handle;
bool IsDevice; bool IsDevice;
string Path; wstring Path;
DWORD LastError;
}; };
class Device : public File class Device : public File
{ {
public: public:
Device (string path, bool readOnly = false); Device (wstring path,bool readOnly = false);
virtual ~Device () {}
}; };
@@ -70,9 +77,9 @@ namespace TrueCrypt
struct Partition struct Partition
{ {
string DevicePath; wstring DevicePath;
PARTITION_INFORMATION Info; PARTITION_INFORMATION Info;
string MountPoint; wstring MountPoint;
size_t Number; size_t Number;
BOOL IsGPT; BOOL IsGPT;
wstring VolumeNameId; wstring VolumeNameId;
@@ -112,8 +119,8 @@ namespace TrueCrypt
struct SystemDriveConfiguration struct SystemDriveConfiguration
{ {
string DeviceKernelPath; wstring DeviceKernelPath;
string DevicePath; wstring DevicePath;
int DriveNumber; int DriveNumber;
Partition DrivePartition; Partition DrivePartition;
bool ExtraBootPartitionPresent; bool ExtraBootPartitionPresent;
@@ -137,43 +144,48 @@ namespace TrueCrypt
DumpFilter DumpFilter
}; };
void SetParentWindow (HWND parent) { ParentWindow = parent; }
void AbortDecoyOSWipe (); void AbortDecoyOSWipe ();
void AbortSetup (); void AbortSetup ();
void AbortSetupWait (); void AbortSetupWait ();
void CallDriver (DWORD ioctl, void *input = nullptr, DWORD inputSize = 0, void *output = nullptr, DWORD outputSize = 0); void CallDriver (DWORD ioctl, void *input = nullptr, DWORD inputSize = 0, void *output = nullptr, DWORD outputSize = 0);
int ChangePassword (Password *oldPassword, Password *newPassword, int pkcs5); int ChangePassword (Password *oldPassword, int old_pkcs5, int old_pim, Password *newPassword, int pkcs5, int pim, int wipePassCount, HWND hwndDlg);
void CheckDecoyOSWipeResult (); void CheckDecoyOSWipeResult ();
void CheckEncryptionSetupResult (); void CheckEncryptionSetupResult ();
void CheckRequirements (); void CheckRequirements ();
void CheckRequirementsHiddenOS (); void CheckRequirementsHiddenOS ();
void CopyFileAdmin (const string &sourceFile, const string &destinationFile); void CopyFileAdmin (const wstring &sourceFile, const wstring &destinationFile);
void CreateRescueIsoImage (bool initialSetup, const string &isoImagePath); void CreateRescueIsoImage (bool initialSetup, const wstring &isoImagePath);
void Deinstall (bool displayWaitDialog = false); void Deinstall (bool displayWaitDialog = false);
void DeleteFileAdmin (const string &file); void DeleteFileAdmin (const wstring &file);
DecoySystemWipeStatus GetDecoyOSWipeStatus (); DecoySystemWipeStatus GetDecoyOSWipeStatus ();
DWORD GetDriverServiceStartType (); DWORD GetDriverServiceStartType ();
unsigned int GetHiddenOSCreationPhase (); unsigned int GetHiddenOSCreationPhase ();
uint16 GetInstalledBootLoaderVersion (); uint16 GetInstalledBootLoaderVersion ();
void GetInstalledBootLoaderFingerprint (byte fingerprint[WHIRLPOOL_DIGESTSIZE + SHA512_DIGESTSIZE]);
Partition GetPartitionForHiddenOS (); Partition GetPartitionForHiddenOS ();
bool IsBootLoaderOnDrive (char *devicePath); bool IsBootLoaderOnDrive (wchar_t *devicePath);
BootEncryptionStatus GetStatus (); BootEncryptionStatus GetStatus ();
string GetTempPath ();
void GetVolumeProperties (VOLUME_PROPERTIES_STRUCT *properties); void GetVolumeProperties (VOLUME_PROPERTIES_STRUCT *properties);
SystemDriveConfiguration GetSystemDriveConfiguration (); SystemDriveConfiguration GetSystemDriveConfiguration ();
void Install (bool hiddenSystem); void Install (bool hiddenSystem);
void InstallBootLoader (Device& device, bool preserveUserConfig = false, bool hiddenOSCreation = false);
void InstallBootLoader (bool preserveUserConfig = false, bool hiddenOSCreation = false); void InstallBootLoader (bool preserveUserConfig = false, bool hiddenOSCreation = false);
bool CheckBootloaderFingerprint (bool bSilent = false);
void InvalidateCachedSysDriveProperties (); void InvalidateCachedSysDriveProperties ();
bool IsCDDrivePresent (); bool IsCDRecorderPresent ();
bool IsHiddenSystemRunning (); bool IsHiddenSystemRunning ();
bool IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly); bool IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly);
void PrepareHiddenOSCreation (int ea, int mode, int pkcs5); void PrepareHiddenOSCreation (int ea, int mode, int pkcs5);
void PrepareInstallation (bool systemPartitionOnly, Password &password, int ea, int mode, int pkcs5, const string &rescueIsoImagePath); void PrepareInstallation (bool systemPartitionOnly, Password &password, int ea, int mode, int pkcs5, int pim, const wstring &rescueIsoImagePath);
void ProbeRealSystemDriveSize (); void ProbeRealSystemDriveSize ();
void ReadBootSectorConfig (byte *config, size_t bufLength, byte *userConfig = nullptr, string *customUserMessage = nullptr, uint16 *bootLoaderVersion = nullptr); void ReadBootSectorConfig (byte *config, size_t bufLength, byte *userConfig = nullptr, string *customUserMessage = nullptr, uint16 *bootLoaderVersion = nullptr);
uint32 ReadDriverConfigurationFlags (); uint32 ReadDriverConfigurationFlags ();
void RegisterBootDriver (bool hiddenSystem); void RegisterBootDriver (bool hiddenSystem);
void RegisterFilterDriver (bool registerDriver, FilterType filterType); void RegisterFilterDriver (bool registerDriver, FilterType filterType);
void RegisterSystemFavoritesService (BOOL registerService); void RegisterSystemFavoritesService (BOOL registerService);
void RegisterSystemFavoritesService (BOOL registerService, BOOL noFileHandling);
void UpdateSystemFavoritesService ();
void RenameDeprecatedSystemLoaderBackup (); void RenameDeprecatedSystemLoaderBackup ();
bool RestartComputer (void); bool RestartComputer (void);
void InitialSecurityChecksForHiddenOS (); void InitialSecurityChecksForHiddenOS ();
@@ -190,24 +202,25 @@ namespace TrueCrypt
bool SystemPartitionCoversWholeDrive (); bool SystemPartitionCoversWholeDrive ();
bool SystemDriveIsDynamic (); bool SystemDriveIsDynamic ();
bool VerifyRescueDisk (); bool VerifyRescueDisk ();
bool VerifyRescueDiskIsoImage (const wchar_t* imageFile);
void WipeHiddenOSCreationConfig (); void WipeHiddenOSCreationConfig ();
void WriteBootDriveSector (uint64 offset, byte *data); void WriteBootDriveSector (uint64 offset, byte *data);
void WriteBootSectorConfig (const byte newConfig[]); void WriteBootSectorConfig (const byte newConfig[]);
void WriteBootSectorUserConfig (byte userConfig, const string &customUserMessage); void WriteBootSectorUserConfig (byte userConfig, const string &customUserMessage);
void WriteLocalMachineRegistryDwordValue (char *keyPath, char *valueName, DWORD value); void WriteLocalMachineRegistryDwordValue (wchar_t *keyPath, wchar_t *valueName, DWORD value);
protected: protected:
static const uint32 RescueIsoImageSize = 1835008; // Size of ISO9660 image with bootable emulated 1.44MB floppy disk image static const uint32 RescueIsoImageSize = 1835008; // Size of ISO9660 image with bootable emulated 1.44MB floppy disk image
void BackupSystemLoader (); void BackupSystemLoader ();
void CreateBootLoaderInMemory (byte *buffer, size_t bufferSize, bool rescueDisk, bool hiddenOSCreation = false); void CreateBootLoaderInMemory (byte *buffer, size_t bufferSize, bool rescueDisk, bool hiddenOSCreation = false);
void CreateVolumeHeader (uint64 volumeSize, uint64 encryptedAreaStart, Password *password, int ea, int mode, int pkcs5); void CreateVolumeHeader (uint64 volumeSize, uint64 encryptedAreaStart, Password *password, int ea, int mode, int pkcs5, int pim);
string GetSystemLoaderBackupPath (); wstring GetSystemLoaderBackupPath ();
uint32 GetChecksum (byte *data, size_t size); uint32 GetChecksum (byte *data, size_t size);
DISK_GEOMETRY GetDriveGeometry (int driveNumber); DISK_GEOMETRY GetDriveGeometry (int driveNumber);
PartitionList GetDrivePartitions (int driveNumber); PartitionList GetDrivePartitions (int driveNumber);
wstring GetRemarksOnHiddenOS (); wstring GetRemarksOnHiddenOS ();
string GetWindowsDirectory (); wstring GetWindowsDirectory ();
void RegisterFilter (bool registerFilter, FilterType filterType, const GUID *deviceClassGuid = nullptr); void RegisterFilter (bool registerFilter, FilterType filterType, const GUID *deviceClassGuid = nullptr);
void RestoreSystemLoader (); void RestoreSystemLoader ();
void InstallVolumeHeader (); void InstallVolumeHeader ();
@@ -215,6 +228,7 @@ namespace TrueCrypt
HWND ParentWindow; HWND ParentWindow;
SystemDriveConfiguration DriveConfig; SystemDriveConfiguration DriveConfig;
int SelectedEncryptionAlgorithmId; int SelectedEncryptionAlgorithmId;
int SelectedPrfAlgorithmId;
Partition HiddenOSCandidatePartition; Partition HiddenOSCandidatePartition;
byte *RescueIsoImage; byte *RescueIsoImage;
byte RescueVolumeHeader[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE]; byte RescueVolumeHeader[TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE];
@@ -231,11 +245,11 @@ namespace TrueCrypt
#define MIN_HIDDENOS_DECOY_PARTITION_SIZE_RATIO_NTFS 2.1 #define MIN_HIDDENOS_DECOY_PARTITION_SIZE_RATIO_NTFS 2.1
#define MIN_HIDDENOS_DECOY_PARTITION_SIZE_RATIO_FAT 1.05 #define MIN_HIDDENOS_DECOY_PARTITION_SIZE_RATIO_FAT 1.05
#define TC_SYS_BOOT_LOADER_BACKUP_NAME "Original System Loader" #define TC_SYS_BOOT_LOADER_BACKUP_NAME L"Original System Loader"
#define TC_SYS_BOOT_LOADER_BACKUP_NAME_LEGACY "Original System Loader.bak" // Deprecated to prevent removal by some "cleaners" #define TC_SYS_BOOT_LOADER_BACKUP_NAME_LEGACY L"Original System Loader.bak" // Deprecated to prevent removal by some "cleaners"
#define TC_SYSTEM_FAVORITES_SERVICE_NAME TC_APP_NAME "SystemFavorites" #define TC_SYSTEM_FAVORITES_SERVICE_NAME _T(TC_APP_NAME) L"SystemFavorites"
#define TC_SYSTEM_FAVORITES_SERVICE_LOAD_ORDER_GROUP "Event Log" #define TC_SYSTEM_FAVORITES_SERVICE_LOAD_ORDER_GROUP L"Event Log"
#define TC_SYSTEM_FAVORITES_SERVICE_CMDLINE_OPTION "/systemFavoritesService" #define TC_SYSTEM_FAVORITES_SERVICE_CMDLINE_OPTION L"/systemFavoritesService"
#endif // TC_HEADER_Common_BootEncryption #endif // TC_HEADER_Common_BootEncryption
+33 -12
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#include "Tcdefs.h" #include "Tcdefs.h"
@@ -18,18 +20,19 @@
#include "Cache.h" #include "Cache.h"
Password CachedPasswords[CACHE_SIZE]; Password CachedPasswords[CACHE_SIZE];
int CachedPim[CACHE_SIZE];
int cacheEmpty = 1; int cacheEmpty = 1;
static int nPasswordIdx = 0; static int nPasswordIdx = 0;
int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, char *header, Password *password, PCRYPTO_INFO *retInfo) int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim, char *header, Password *password, int pkcs5_prf, int pim, BOOL truecryptMode, PCRYPTO_INFO *retInfo)
{ {
int nReturnCode = ERR_PASSWORD_WRONG; int nReturnCode = ERR_PASSWORD_WRONG;
int i; int i, effectivePim;
/* Attempt to recognize volume using mount password */ /* Attempt to recognize volume using mount password */
if (password->Length > 0) if (password->Length > 0)
{ {
nReturnCode = ReadVolumeHeader (bBoot, header, password, retInfo, NULL); nReturnCode = ReadVolumeHeader (bBoot, header, password, pkcs5_prf, pim, truecryptMode, retInfo, NULL);
/* Save mount passwords back into cache if asked to do so */ /* Save mount passwords back into cache if asked to do so */
if (bCache && (nReturnCode == 0 || nReturnCode == ERR_CIPHER_INIT_WEAK_KEY)) if (bCache && (nReturnCode == 0 || nReturnCode == ERR_CIPHER_INIT_WEAK_KEY))
@@ -45,11 +48,21 @@ int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, char *header, Password *pas
/* Store the password */ /* Store the password */
CachedPasswords[nPasswordIdx] = *password; CachedPasswords[nPasswordIdx] = *password;
/* Store also PIM if requested, otherwise set to default */
if (bCachePim && (pim > 0))
CachedPim[nPasswordIdx] = pim;
else
CachedPim[nPasswordIdx] = 0;
/* Try another slot */ /* Try another slot */
nPasswordIdx = (nPasswordIdx + 1) % CACHE_SIZE; nPasswordIdx = (nPasswordIdx + 1) % CACHE_SIZE;
cacheEmpty = 0; cacheEmpty = 0;
} }
else if (bCachePim)
{
CachedPim[i] = pim > 0? pim : 0;
}
} }
} }
else if (!cacheEmpty) else if (!cacheEmpty)
@@ -59,7 +72,13 @@ int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, char *header, Password *pas
{ {
if (CachedPasswords[i].Length > 0) if (CachedPasswords[i].Length > 0)
{ {
nReturnCode = ReadVolumeHeader (bBoot, header, &CachedPasswords[i], retInfo, NULL); if (truecryptMode)
effectivePim = 0;
else if (pim == -1)
effectivePim = CachedPim[i];
else
effectivePim = pim;
nReturnCode = ReadVolumeHeader (bBoot, header, &CachedPasswords[i], pkcs5_prf, effectivePim, truecryptMode, retInfo, NULL);
if (nReturnCode != ERR_PASSWORD_WRONG) if (nReturnCode != ERR_PASSWORD_WRONG)
break; break;
@@ -71,7 +90,7 @@ int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, char *header, Password *pas
} }
void AddPasswordToCache (Password *password) void AddPasswordToCache (Password *password, int pim)
{ {
int i; int i;
for (i = 0; i < CACHE_SIZE; i++) for (i = 0; i < CACHE_SIZE; i++)
@@ -81,6 +100,7 @@ void AddPasswordToCache (Password *password)
} }
CachedPasswords[nPasswordIdx] = *password; CachedPasswords[nPasswordIdx] = *password;
CachedPim[nPasswordIdx] = pim > 0? pim : 0;
nPasswordIdx = (nPasswordIdx + 1) % CACHE_SIZE; nPasswordIdx = (nPasswordIdx + 1) % CACHE_SIZE;
cacheEmpty = 0; cacheEmpty = 0;
} }
@@ -89,6 +109,7 @@ void AddPasswordToCache (Password *password)
void WipeCache () void WipeCache ()
{ {
burn (CachedPasswords, sizeof (CachedPasswords)); burn (CachedPasswords, sizeof (CachedPasswords));
burn (CachedPim, sizeof (CachedPim));
nPasswordIdx = 0; nPasswordIdx = 0;
cacheEmpty = 1; cacheEmpty = 1;
} }
+11 -9
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#include "Common.h" #include "Common.h"
@@ -18,6 +20,6 @@
extern int cacheEmpty; extern int cacheEmpty;
void AddPasswordToCache (Password *password); void AddPasswordToCache (Password *password, int pim);
int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, char *header, Password *password, PCRYPTO_INFO *retInfo); int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, BOOL bCachePim,char *header, Password *password, int pkcs5_prf, int pim, BOOL truecryptMode, PCRYPTO_INFO *retInfo);
void WipeCache (void); void WipeCache (void);
+51 -107
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2009 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#include "Tcdefs.h" #include "Tcdefs.h"
@@ -20,21 +22,26 @@
#include "Apidrvr.h" #include "Apidrvr.h"
#include "Dlgcode.h" #include "Dlgcode.h"
#include "Language.h" #include "Language.h"
#include <Strsafe.h>
#ifndef SRC_POS
#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
#endif
/* Except in response to the WM_INITDIALOG message, the dialog box procedure /* Except in response to the WM_INITDIALOG message, the dialog box procedure
should return nonzero if it processes the message, and zero if it does should return nonzero if it processes the message, and zero if it does
not. - see DialogProc */ not. - see DialogProc */
BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
if (lParam); /* remove warning */ UNREFERENCED_PARAMETER (lParam); /* remove warning */
if (wParam); /* remove warning */ UNREFERENCED_PARAMETER (wParam); /* remove warning */
switch (msg) switch (msg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{ {
char * tmp = err_malloc(8192); wchar_t * tmp = err_malloc(8192 * sizeof (wchar_t));
char tmp2[MAX_PATH * 2]; wchar_t tmp2[MAX_PATH * 2];
argumentspec *as; argumentspec *as;
int i; int i;
@@ -44,17 +51,31 @@ BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
*tmp = 0; *tmp = 0;
strcpy (tmp, "Command line options:\n\n"); StringCchCopyW (tmp, 8192, L"VeraCrypt " _T(VERSION_STRING));
#ifdef _WIN64
StringCchCatW (tmp, 8192, L" (64-bit)");
#else
StringCchCatW (tmp, 8192, L" (32-bit)");
#endif
#if (defined(_DEBUG) || defined(DEBUG))
StringCchCatW (tmp, 8192, L" (debug)");
#endif
StringCchCatW (tmp, 8192, L"\n\nCommand line options:\n\n");
for (i = 0; i < as->arg_cnt; i ++) for (i = 0; i < as->arg_cnt; i ++)
{ {
if (!as->args[i].Internal) if (!as->args[i].Internal)
{ {
sprintf(tmp2, "%s\t%s\n", as->args[i].short_name, as->args[i].long_name); StringCchPrintfW(tmp2, MAX_PATH * 2, L"%s\t%s\n", as->args[i].short_name, as->args[i].long_name);
strcat(tmp,tmp2); StringCchCatW(tmp, 8192, tmp2);
} }
} }
SetWindowText (GetDlgItem (hwndDlg, IDC_COMMANDHELP_TEXT), (char*) tmp); StringCchCatW (tmp, 8192, L"\nExamples:\n\nMount a volume as X:\tveracrypt.exe /q /v volume.hc /l X\nDismount a volume X:\tveracrypt.exe /q /d X");
SetWindowTextW (GetDlgItem (hwndDlg, IDC_COMMANDHELP_TEXT), tmp);
TCfree(tmp);
return 1; return 1;
} }
@@ -69,7 +90,7 @@ BOOL CALLBACK CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
return 0; return 0;
} }
int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs) int Win32CommandLine (wchar_t ***lpszArgs)
{ {
int argumentCount; int argumentCount;
int i; int i;
@@ -77,7 +98,7 @@ int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs)
LPWSTR *arguments = CommandLineToArgvW (GetCommandLineW(), &argumentCount); LPWSTR *arguments = CommandLineToArgvW (GetCommandLineW(), &argumentCount);
if (!arguments) if (!arguments)
{ {
handleWin32Error (NULL); handleWin32Error (NULL, SRC_POS);
return 0; return 0;
} }
@@ -88,30 +109,16 @@ int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs)
return 0; return 0;
} }
*lpszArgs = malloc (sizeof (char *) * argumentCount); *lpszArgs = malloc (sizeof (wchar_t *) * argumentCount);
if (!*lpszArgs) if (!*lpszArgs)
AbortProcess ("OUTOFMEMORY"); AbortProcess ("OUTOFMEMORY");
for (i = 0; i < argumentCount; ++i) for (i = 0; i < argumentCount; ++i)
{ {
size_t argLen = wcslen (arguments[i + 1]); wchar_t *arg = _wcsdup (arguments[i + 1]);
char *arg = malloc (argLen + 1);
if (!arg) if (!arg)
AbortProcess ("OUTOFMEMORY"); AbortProcess ("OUTOFMEMORY");
if (argLen > 0)
{
int len = WideCharToMultiByte (CP_ACP, 0, arguments[i + 1], -1, arg, argLen + 1, NULL, NULL);
if (len == 0)
{
handleWin32Error (NULL);
AbortProcessSilent();
}
}
else
arg[0] = 0;
(*lpszArgs)[i] = arg; (*lpszArgs)[i] = arg;
} }
@@ -119,89 +126,34 @@ int Win32CommandLine (char *lpszCommandLine, char ***lpszArgs)
return argumentCount; return argumentCount;
} }
int GetArgSepPosOffset (char *lpszArgument) int GetArgSepPosOffset (wchar_t *lpszArgument)
{ {
if (lpszArgument[0] == '/') if (lpszArgument[0] == L'/')
return 1; return 1;
return 0; return 0;
} }
int GetArgumentID (argumentspec *as, char *lpszArgument, int *nArgPos) int GetArgumentID (argumentspec *as, wchar_t *lpszArgument)
{ {
char szTmp[MAX_PATH * 2];
int i; int i;
i = strlen (lpszArgument);
szTmp[i] = 0;
while (--i >= 0)
{
szTmp[i] = (char) tolower (lpszArgument[i]);
}
for (i = 0; i < as->arg_cnt; i++) for (i = 0; i < as->arg_cnt; i++)
{ {
size_t k; if (_wcsicmp (as->args[i].long_name, lpszArgument) == 0)
k = strlen (as->args[i].long_name);
if (memcmp (as->args[i].long_name, szTmp, k * sizeof (char)) == 0)
{ {
int x; return as->args[i].Id;
for (x = i + 1; x < as->arg_cnt; x++)
{
size_t m;
m = strlen (as->args[x].long_name);
if (memcmp (as->args[x].long_name, szTmp, m * sizeof (char)) == 0)
{
break;
}
}
if (x == as->arg_cnt)
{
if (strlen (lpszArgument) != k)
*nArgPos = k;
else
*nArgPos = 0;
return as->args[i].Id;
}
} }
} }
for (i = 0; i < as->arg_cnt; i++) for (i = 0; i < as->arg_cnt; i++)
{ {
size_t k;
if (as->args[i].short_name[0] == 0) if (as->args[i].short_name[0] == 0)
continue; continue;
k = strlen (as->args[i].short_name); if (_wcsicmp (as->args[i].short_name, lpszArgument) == 0)
if (memcmp (as->args[i].short_name, szTmp, k * sizeof (char)) == 0)
{ {
int x; return as->args[i].Id;
for (x = i + 1; x < as->arg_cnt; x++)
{
size_t m;
if (as->args[x].short_name[0] == 0)
continue;
m = strlen (as->args[x].short_name);
if (memcmp (as->args[x].short_name, szTmp, m * sizeof (char)) == 0)
{
break;
}
}
if (x == as->arg_cnt)
{
if (strlen (lpszArgument) != k)
*nArgPos = k;
else
*nArgPos = 0;
return as->args[i].Id;
}
} }
} }
@@ -209,27 +161,19 @@ int GetArgumentID (argumentspec *as, char *lpszArgument, int *nArgPos)
return -1; return -1;
} }
int GetArgumentValue (char **lpszCommandLineArgs, int nArgPos, int *nArgIdx, int GetArgumentValue (wchar_t **lpszCommandLineArgs, int *nArgIdx,
int nNoCommandLineArgs, char *lpszValue, int nValueSize) int nNoCommandLineArgs, wchar_t *lpszValue, int nValueSize)
{ {
*lpszValue = 0; *lpszValue = 0;
if (nArgPos) if (*nArgIdx + 1 < nNoCommandLineArgs)
{
/* Handles the case of no space between parameter code and
value */
strncpy (lpszValue, &lpszCommandLineArgs[*nArgIdx][nArgPos], nValueSize);
lpszValue[nValueSize - 1] = 0;
return HAS_ARGUMENT;
}
else if (*nArgIdx + 1 < nNoCommandLineArgs)
{ {
int x = GetArgSepPosOffset (lpszCommandLineArgs[*nArgIdx + 1]); int x = GetArgSepPosOffset (lpszCommandLineArgs[*nArgIdx + 1]);
if (x == 0) if (x == 0)
{ {
/* Handles the case of space between parameter code /* Handles the case of space between parameter code
and value */ and value */
strncpy (lpszValue, &lpszCommandLineArgs[*nArgIdx + 1][x], nValueSize); StringCchCopyW (lpszValue, nValueSize, lpszCommandLineArgs[*nArgIdx + 1]);
lpszValue[nValueSize - 1] = 0; lpszValue[nValueSize - 1] = 0;
(*nArgIdx)++; (*nArgIdx)++;
return HAS_ARGUMENT; return HAS_ARGUMENT;
+15 -13
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#ifdef __cplusplus #ifdef __cplusplus
@@ -19,8 +21,8 @@ extern "C" {
typedef struct argument_t typedef struct argument_t
{ {
int Id; int Id;
char long_name[32]; wchar_t long_name[32];
char short_name[8]; wchar_t short_name[8];
BOOL Internal; BOOL Internal;
} argument; } argument;
@@ -31,10 +33,10 @@ typedef struct argumentspec_t
} argumentspec; } argumentspec;
BOOL CALLBACK CommandHelpDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam ); BOOL CALLBACK CommandHelpDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
int Win32CommandLine ( char *lpszCommandLine , char ***lpszArgs ); int Win32CommandLine ( wchar_t ***lpszArgs );
int GetArgSepPosOffset ( char *lpszArgument ); int GetArgSepPosOffset ( wchar_t *lpszArgument );
int GetArgumentID ( argumentspec *as , char *lpszArgument , int *nArgPos ); int GetArgumentID ( argumentspec *as , wchar_t *lpszArgument );
int GetArgumentValue ( char **lpszCommandLineArgs , int nArgPos , int *nArgIdx , int nNoCommandLineArgs , char *lpszValue , int nValueSize ); int GetArgumentValue ( wchar_t **lpszCommandLineArgs , int *nArgIdx , int nNoCommandLineArgs , wchar_t *lpszValue , int nValueSize );
#ifdef __cplusplus #ifdef __cplusplus
} }
+75 -29
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#include "Tcdefs.h" #include "Tcdefs.h"
@@ -18,7 +20,7 @@
#define SIZEOF_MRU_LIST 20 #define SIZEOF_MRU_LIST 20
void AddComboItem (HWND hComboBox, char *lpszFileName, BOOL saveHistory) void AddComboItem (HWND hComboBox, const wchar_t *lpszFileName, BOOL saveHistory)
{ {
LPARAM nIndex; LPARAM nIndex;
@@ -51,19 +53,19 @@ void AddComboItem (HWND hComboBox, char *lpszFileName, BOOL saveHistory)
LPARAM MoveEditToCombo (HWND hComboBox, BOOL saveHistory) LPARAM MoveEditToCombo (HWND hComboBox, BOOL saveHistory)
{ {
char szTmp[TC_MAX_PATH] = {0}; wchar_t szTmp[TC_MAX_PATH] = {0};
if (!saveHistory) if (!saveHistory)
{ {
GetWindowText (hComboBox, szTmp, sizeof (szTmp)); GetWindowText (hComboBox, szTmp, ARRAYSIZE (szTmp));
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0); SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
SetWindowText (hComboBox, szTmp); SetWindowText (hComboBox, szTmp);
return 0; return 0;
} }
GetWindowText (hComboBox, szTmp, sizeof (szTmp)); GetWindowText (hComboBox, szTmp, ARRAYSIZE (szTmp));
if (strlen (szTmp) > 0) if (wcslen (szTmp) > 0)
{ {
LPARAM nIndex = SendMessage (hComboBox, CB_FINDSTRINGEXACT, (WPARAM) - 1, LPARAM nIndex = SendMessage (hComboBox, CB_FINDSTRINGEXACT, (WPARAM) - 1,
(LPARAM) & szTmp[0]); (LPARAM) & szTmp[0]);
@@ -133,23 +135,67 @@ LPARAM UpdateComboOrder (HWND hComboBox)
return nIndex; return nIndex;
} }
void LoadCombo (HWND hComboBox) void LoadCombo (HWND hComboBox, BOOL bEnabled, BOOL bOnlyCheckModified, BOOL *pbModified)
{ {
DWORD size; DWORD size;
char *history = LoadFile (GetConfigPath (TC_APPD_FILENAME_HISTORY), &size); char *history = LoadFile (GetConfigPath (TC_APPD_FILENAME_HISTORY), &size);
char *xml = history; char *xml = history;
char volume[MAX_PATH]; char volume[MAX_PATH];
int i, nComboIdx[SIZEOF_MRU_LIST] = {0};
int count = SendMessage (hComboBox, CB_GETCOUNT, 0, 0);
if (xml == NULL) return; if (xml == NULL)
while (xml = XmlFindElement (xml, "volume"))
{ {
XmlGetNodeText (xml, volume, sizeof (volume)); // No history XML file but history is enabled
AddComboItem (hComboBox, volume, TRUE); if (bEnabled && pbModified)
xml++; *pbModified = TRUE;
return;
} }
SendMessage (hComboBox, CB_SETCURSEL, 0, 0); if (!bEnabled && bOnlyCheckModified)
{
// History is disable but there is a history XML file
if (pbModified)
*pbModified = TRUE;
free (history);
return;
}
/* combo list part:- get mru items */
for (i = 0; i < SIZEOF_MRU_LIST; i++)
nComboIdx[i] = GetOrderComboIdx (hComboBox, &nComboIdx[0], i);
i = 0;
while (xml = XmlFindElement (xml, "volume"))
{
wchar_t szTmp[MAX_PATH] = { 0 };
wchar_t wszVolume[MAX_PATH] = {0};
if (i < count)
{
if (SendMessage (hComboBox, CB_GETLBTEXTLEN, nComboIdx[i], 0) < ARRAYSIZE (szTmp))
SendMessage (hComboBox, CB_GETLBTEXT, nComboIdx[i], (LPARAM) & szTmp[0]);
}
XmlGetNodeText (xml, volume, sizeof (volume));
if (0 == MultiByteToWideChar (CP_UTF8, 0, volume, -1, wszVolume, MAX_PATH))
wszVolume [0] = 0;
if (!bOnlyCheckModified)
AddComboItem (hComboBox, wszVolume, TRUE);
if (pbModified && wcscmp (wszVolume, szTmp))
*pbModified = TRUE;
xml++;
i++;
}
if (pbModified && (i != count))
*pbModified = TRUE;
if (!bOnlyCheckModified)
SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
free (history); free (history);
} }
@@ -157,7 +203,7 @@ void LoadCombo (HWND hComboBox)
void DumpCombo (HWND hComboBox, int bClear) void DumpCombo (HWND hComboBox, int bClear)
{ {
FILE *f; FILE *f;
int i, nComboIdx[SIZEOF_MRU_LIST]; int i, nComboIdx[SIZEOF_MRU_LIST] = {0};
if (bClear) if (bClear)
{ {
@@ -165,11 +211,11 @@ void DumpCombo (HWND hComboBox, int bClear)
return; return;
} }
f = fopen (GetConfigPath (TC_APPD_FILENAME_HISTORY), "w"); f = _wfopen (GetConfigPath (TC_APPD_FILENAME_HISTORY), L"w,ccs=UTF-8");
if (f == NULL) return; if (f == NULL) return;
XmlWriteHeader (f); XmlWriteHeader (f);
fputs ("\n\t<history>", f); fputws (L"\n\t<history>", f);
/* combo list part:- get mru items */ /* combo list part:- get mru items */
for (i = 0; i < SIZEOF_MRU_LIST; i++) for (i = 0; i < SIZEOF_MRU_LIST; i++)
@@ -178,21 +224,21 @@ void DumpCombo (HWND hComboBox, int bClear)
/* combo list part:- write out mru items */ /* combo list part:- write out mru items */
for (i = 0; i < SIZEOF_MRU_LIST; i++) for (i = 0; i < SIZEOF_MRU_LIST; i++)
{ {
char szTmp[MAX_PATH] = { 0 }; wchar_t szTmp[MAX_PATH] = { 0 };
if (SendMessage (hComboBox, CB_GETLBTEXTLEN, nComboIdx[i], 0) < sizeof (szTmp)) if (SendMessage (hComboBox, CB_GETLBTEXTLEN, nComboIdx[i], 0) < ARRAYSIZE (szTmp))
SendMessage (hComboBox, CB_GETLBTEXT, nComboIdx[i], (LPARAM) & szTmp[0]); SendMessage (hComboBox, CB_GETLBTEXT, nComboIdx[i], (LPARAM) & szTmp[0]);
if (szTmp[0] != 0) if (szTmp[0] != 0)
{ {
char q[MAX_PATH * 2] = { 0 }; wchar_t q[MAX_PATH * 2] = { 0 };
XmlQuoteText (szTmp, q, sizeof (q)); XmlQuoteTextW (szTmp, q, ARRAYSIZE (q));
fprintf (f, "\n\t\t<volume>%s</volume>", q); fwprintf (f, L"\n\t\t<volume>%s</volume>", q);
} }
} }
fputs ("\n\t</history>", f); fputws (L"\n\t</history>", f);
XmlWriteFooter (f); XmlWriteFooter (f);
fclose (f); fclose (f);
} }
+11 -9
View File
@@ -1,23 +1,25 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void AddComboItem (HWND hComboBox, char *lpszFileName, BOOL saveHistory); void AddComboItem (HWND hComboBox, const wchar_t *lpszFileName, BOOL saveHistory);
LPARAM MoveEditToCombo (HWND hComboBox, BOOL saveHistory); LPARAM MoveEditToCombo (HWND hComboBox, BOOL saveHistory);
int GetOrderComboIdx ( HWND hComboBox , int *nIdxList , int nElems ); int GetOrderComboIdx ( HWND hComboBox , int *nIdxList , int nElems );
LPARAM UpdateComboOrder ( HWND hComboBox ); LPARAM UpdateComboOrder ( HWND hComboBox );
void LoadCombo ( HWND hComboBox ); void LoadCombo (HWND hComboBox, BOOL bEnabled, BOOL bOnlyCheckModified, BOOL *pbModified);
void DumpCombo ( HWND hComboBox , int bClear ); void DumpCombo ( HWND hComboBox , int bClear );
void ClearCombo (HWND hComboBox); void ClearCombo (HWND hComboBox);
int IsComboEmpty (HWND hComboBox); int IsComboEmpty (HWND hComboBox);
+17 -5
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2005-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef COMMON_H #ifndef COMMON_H
@@ -36,6 +40,12 @@ typedef enum
WIN_SERVER_2008, WIN_SERVER_2008,
WIN_7, WIN_7,
WIN_SERVER_2008_R2, WIN_SERVER_2008_R2,
WIN_8,
WIN_SERVER_2012,
WIN_8_1,
WIN_SERVER_2012_R2,
WIN_10,
WIN_SERVER_2016
} OSVersionEnum; } OSVersionEnum;
/* Volume types */ /* Volume types */
@@ -43,7 +53,6 @@ enum
{ {
TC_VOLUME_TYPE_NORMAL = 0, TC_VOLUME_TYPE_NORMAL = 0,
TC_VOLUME_TYPE_HIDDEN, TC_VOLUME_TYPE_HIDDEN,
TC_VOLUME_TYPE_HIDDEN_LEGACY,
TC_VOLUME_TYPE_COUNT TC_VOLUME_TYPE_COUNT
}; };
@@ -76,6 +85,9 @@ typedef struct
Password ProtectedHidVolPassword; /* Password of hidden volume to protect against overwriting */ Password ProtectedHidVolPassword; /* Password of hidden volume to protect against overwriting */
BOOL UseBackupHeader; BOOL UseBackupHeader;
BOOL RecoveryMode; BOOL RecoveryMode;
int ProtectedHidVolPkcs5Prf;
int ProtectedHidVolPim;
wchar_t Label[33]; /* maximum label length is 32 for NTFS and 11 for FAT32 */
} MountOptions; } MountOptions;
#endif #endif
+109 -47
View File
@@ -29,30 +29,30 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
IDD_ABOUT_DLG DIALOGEX 31, 51, 292, 199 IDD_ABOUT_DLG DIALOGEX 31, 51, 292, 199
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About VeraCrypt" CAPTION "About VeraCrypt"
CLASS "SplashDlg" CLASS "VeraCryptSplashDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
EDITTEXT IDC_ABOUT_CREDITS,7,111,277,45,ES_MULTILINE | WS_VSCROLL | NOT WS_TABSTOP EDITTEXT IDC_ABOUT_CREDITS,7,111,277,45,ES_MULTILINE | WS_VSCROLL | NOT WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,230,178,52,14 DEFPUSHBUTTON "OK",IDOK,230,178,52,14
LTEXT "",IDC_HOMEPAGE,18,87,117,9,SS_NOTIFY LTEXT "",IDC_HOMEPAGE,18,87,117,9,SS_NOTIFY
LTEXT "",IDT_ABOUT_RELEASE,18,71,235,8 LTEXT "",IDT_ABOUT_RELEASE,18,71,235,8
CONTROL 517,IDC_ABOUT_BKG,"Static",SS_BITMAP,0,0,12,11,WS_EX_STATICEDGE CONTROL IDB_TEXTUAL_LOGO_BKG,IDC_ABOUT_BKG,"Static",SS_BITMAP,0,0,12,11,WS_EX_STATICEDGE
LTEXT "",IDT_ABOUT_VERSION,18,61,161,8 LTEXT "",IDT_ABOUT_VERSION,18,61,161,8
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,167,291,1,WS_EX_STATICEDGE CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,167,291,1,WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,169,291,1,WS_EX_STATICEDGE CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,169,291,1,WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,107,291,1,WS_EX_STATICEDGE CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,107,291,1,WS_EX_STATICEDGE
CONTROL "",IDC_ABOUT_LOGO_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,293,50,WS_EX_TRANSPARENT | WS_EX_STATICEDGE CONTROL "",IDC_ABOUT_LOGO_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,293,50,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
CONTROL 518,IDC_TEXTUAL_LOGO_IMG,"Static",SS_BITMAP,12,26,157,16 CONTROL IDB_TEXTUAL_LOGO_96DPI,IDC_TEXTUAL_LOGO_IMG,"Static",SS_BITMAP,12,26,157,16
END END
IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 249, 213 IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 249, 274
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Command Line Help" CAPTION "Command Line Help"
CLASS "CustomDlg" CLASS "VeraCryptCustomDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,93,191,59,14 DEFPUSHBUTTON "OK",IDOK,93,252,59,14
LTEXT "",IDC_COMMANDHELP_TEXT,20,11,208,174 LTEXT "",IDC_COMMANDHELP_TEXT,20,10,208,241
END END
IDD_RAWDEVICES_DLG DIALOGEX 0, 0, 305, 209 IDD_RAWDEVICES_DLG DIALOGEX 0, 0, 305, 209
@@ -65,7 +65,7 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,248,190,50,14 PUSHBUTTON "Cancel",IDCANCEL,248,190,50,14
END END
IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 172 IDD_MOUNT_OPTIONS DIALOGEX 0, 0, 277, 231
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - Mount Options" CAPTION "VeraCrypt - Mount Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -73,24 +73,32 @@ BEGIN
CONTROL "Mount volume as read-&only",IDC_MOUNT_READONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,11,194,10 CONTROL "Mount volume as read-&only",IDC_MOUNT_READONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,11,194,10
CONTROL "Mount volume as removable &medium",IDC_MOUNT_REMOVABLE, CONTROL "Mount volume as removable &medium",IDC_MOUNT_REMOVABLE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,25,195,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,25,195,10
CONTROL "Mount partition &using system encryption without pre-boot authentication",IDC_MOUNT_SYSENC_PART_WITHOUT_PBA,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,53,259,11
CONTROL "&Protect hidden volume against damage caused by writing to outer volume",IDC_PROTECT_HIDDEN_VOL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,86,252,10
EDITTEXT IDC_PASSWORD_PROT_HIDVOL,112,104,151,14,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "&Display password",IDC_SHOW_PASSWORD_MO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,123,90,10
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE_HIDVOL_PROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,136,90,10
PUSHBUTTON "&Keyfiles...",IDC_KEYFILES_HIDVOL_PROT,203,125,60,14
LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,151,247,10,SS_NOTIFY
DEFPUSHBUTTON "OK",IDOK,211,7,60,14
PUSHBUTTON "Cancel",IDCANCEL,211,24,60,14
RTEXT "P&assword to hidden volume:\n(if empty, cache is used)",IDT_HIDDEN_PROT_PASSWD,15,103,91,17,0,WS_EX_RIGHT
GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,72,265,95
CONTROL "Use backup header embedded in &volume if available",IDC_USE_EMBEDDED_HEADER_BAK, CONTROL "Use backup header embedded in &volume if available",IDC_USE_EMBEDDED_HEADER_BAK,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,39,257,11 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,39,257,11
CONTROL "Mount partition &using system encryption without pre-boot authentication",IDC_MOUNT_SYSENC_PART_WITHOUT_PBA,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,53,259,11
EDITTEXT IDC_VOLUME_LABEL,112,67,150,14,ES_AUTOHSCROLL
CONTROL "&Protect hidden volume against damage caused by writing to outer volume",IDC_PROTECT_HIDDEN_VOL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,97,252,10
EDITTEXT IDC_PASSWORD_PROT_HIDVOL,112,115,151,14,ES_PASSWORD | ES_AUTOHSCROLL
COMBOBOX IDC_PKCS5_PRF_ID,112,136,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
EDITTEXT IDC_PIM,112,156,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE
CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,161,97,10
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,158,159,112,8,NOT WS_VISIBLE
CONTROL "&Display password",IDC_SHOW_PASSWORD_MO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,174,90,10
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE_HIDVOL_PROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,112,187,90,10
PUSHBUTTON "&Keyfiles...",IDC_KEYFILES_HIDVOL_PROT,204,183,60,14
DEFPUSHBUTTON "OK",IDOK,211,7,60,14
PUSHBUTTON "Cancel",IDCANCEL,211,24,60,14
LTEXT "What is hidden volume protection?",IDC_LINK_HIDVOL_PROTECTION_INFO,16,202,247,10,SS_NOTIFY
RTEXT "P&assword to hidden volume:\n(if empty, cache is used)",IDT_HIDDEN_PROT_PASSWD,15,114,91,17,0,WS_EX_RIGHT
GROUPBOX "Hidden Volume Protection",IDT_HIDDEN_VOL_PROTECTION,6,83,265,136
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,15,137,91,17
RTEXT "Volume PIM:",IDT_PIM,15,159,91,17,NOT WS_VISIBLE
LTEXT "Volume Label in Windows:",IDT_VOLUME_LABEL,12,70,95,8
END END
IDD_KEYFILES DIALOGEX 0, 0, 345, 237 IDD_KEYFILES DIALOGEX 0, 0, 345, 251
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - Keyfiles" CAPTION "VeraCrypt - Keyfiles"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
@@ -101,15 +109,17 @@ BEGIN
PUSHBUTTON "Add &Token Files...",IDC_TOKEN_FILES_ADD,139,132,65,14 PUSHBUTTON "Add &Token Files...",IDC_TOKEN_FILES_ADD,139,132,65,14
PUSHBUTTON "&Remove",IDC_KEYREMOVE,209,132,61,14 PUSHBUTTON "&Remove",IDC_KEYREMOVE,209,132,61,14
PUSHBUTTON "Remove &All",IDC_KEYREMOVEALL,275,132,61,14 PUSHBUTTON "Remove &All",IDC_KEYREMOVEALL,275,132,61,14
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,219,83,11 CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,232,83,11
PUSHBUTTON "&Generate Random Keyfile...",IDC_GENERATE_KEYFILE,213,217,123,14 PUSHBUTTON "&Generate Random Keyfile...",IDC_GENERATE_KEYFILE,213,230,123,14
DEFPUSHBUTTON "OK",IDOK,279,8,59,14 DEFPUSHBUTTON "OK",IDOK,279,8,59,14
PUSHBUTTON "Cancel",IDCANCEL,279,25,59,14 PUSHBUTTON "Cancel",IDCANCEL,279,25,59,14
LTEXT "",IDT_KEYFILES_NOTE,10,161,324,41,0,WS_EX_TRANSPARENT LTEXT "",IDT_KEYFILES_NOTE,10,161,324,41,0,WS_EX_TRANSPARENT
LTEXT "WARNING: If you lose a keyfile or if any bit of its first 1024 kilobytes changes, it will be impossible to mount volumes that use the keyfile!",IDT_KEYFILE_WARNING,279,44,58,85,0,WS_EX_TRANSPARENT LTEXT "WARNING: If you lose a keyfile or if any bit of its first 1024 kilobytes changes, it will be impossible to mount volumes that use the keyfile!",IDT_KEYFILE_WARNING,279,44,58,85,0,WS_EX_TRANSPARENT
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,154,343,1,WS_EX_STATICEDGE CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,154,343,1,WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,209,343,1,WS_EX_STATICEDGE CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,2,209,343,1,WS_EX_STATICEDGE
LTEXT "More information on keyfiles",IDC_LINK_KEYFILES_INFO,96,220,108,10,SS_NOTIFY LTEXT "More information on keyfiles",IDC_LINK_KEYFILES_INFO,96,233,108,10,SS_NOTIFY
CONTROL "Try first to mount with an empty password",IDC_KEYFILES_TRY_EMPTY_PASSWORD,
"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,217,205,10
END END
IDD_LANGUAGE DIALOGEX 0, 0, 209, 183 IDD_LANGUAGE DIALOGEX 0, 0, 209, 183
@@ -172,9 +182,9 @@ BEGIN
GROUPBOX "Plaintext (hexadecimal)",IDT_TEST_PLAINTEXT,1,140,323,33 GROUPBOX "Plaintext (hexadecimal)",IDT_TEST_PLAINTEXT,1,140,323,33
GROUPBOX "Ciphertext (hexadecimal)",IDT_TEST_CIPHERTEXT,1,174,323,33 GROUPBOX "Ciphertext (hexadecimal)",IDT_TEST_CIPHERTEXT,1,174,323,33
RTEXT "",IDC_TESTS_MESSAGE,50,213,178,10 RTEXT "",IDC_TESTS_MESSAGE,50,213,178,10
CONTROL "",IDC_REDTICK,"REDTICK",0x0,234,214,10,8 CONTROL "",IDC_REDTICK,"VCREDTICK",0x0,234,214,10,8
RTEXT "Key size:",IDT_KEY,8,57,56,8 RTEXT "Key size:",IDT_KEY,8,57,56,8
RTEXT "Plaintext size:",IDT_PLAINTEXT,190,153,63,8 RTEXT "Plaintext size:",IDT_PLAINTEXT,174,153,79,8
LTEXT "bits",IDT_KEY_UNIT,114,57,45,8 LTEXT "bits",IDT_KEY_UNIT,114,57,45,8
RTEXT "Cipher:",IDT_CIPHER,38,13,68,8 RTEXT "Cipher:",IDT_CIPHER,38,13,68,8
LTEXT "bits",IDT_PLAINTEXT_SIZE_UNIT,298,153,22,8 LTEXT "bits",IDT_PLAINTEXT_SIZE_UNIT,298,153,22,8
@@ -191,27 +201,37 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
DEFPUSHBUTTON "OK",IDOK,305,200,58,14 DEFPUSHBUTTON "OK",IDOK,305,200,58,14
PUSHBUTTON "&Print",IDC_PRINT,156,200,58,14 PUSHBUTTON "&Print",IDC_PRINT,156,200,58,14
CONTROL "",IDC_INFO_BOX_TEXT,"RichEdit20A",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,5,6,361,188 CONTROL "",IDC_INFO_BOX_TEXT,"RichEdit20W",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,5,6,361,188
END END
IDD_KEYFILE_GENERATOR DIALOGEX 0, 0, 308, 270 IDD_KEYFILE_GENERATOR DIALOGEX 0, 0, 357, 362
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - Keyfile Generator" CAPTION "VeraCrypt - Keyfile Generator"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Close",IDCLOSE,237,10,59,14 DEFPUSHBUTTON "Close",IDCLOSE,291,10,59,14
COMBOBOX IDC_PRF_ID,79,49,91,90,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_PRF_ID,97,49,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
PUSHBUTTON "Generate and Save Keyfile...",IDC_GENERATE_AND_SAVE_KEYFILE,89,248,131,14 CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,51,141,10
LTEXT "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 keyfile.",IDT_KEYFILE_GENERATOR_NOTE,11,5,213,33 EDITTEXT IDC_NUMBER_KEYFILES,124,278,51,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,40,307,1,WS_EX_STATICEDGE EDITTEXT IDC_KEYFILES_SIZE,124,298,51,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
RTEXT "Mixing PRF:",IDT_PRF,6,51,67,10,SS_CENTERIMAGE CONTROL "Random size ( 64 <-> 1048576 )",IDC_KEYFILES_RANDOM_SIZE,
GROUPBOX "Current Pool Content",IDT_POOL_CONTENTS,6,70,296,170 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,181,300,174,10
CONTROL "",IDC_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,16,83,282,148,WS_EX_TRANSPARENT EDITTEXT IDC_KEYFILES_BASE_NAME,124,318,141,14,ES_AUTOHSCROLL
CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,191,51,111,10 PUSHBUTTON "Generate and Save Keyfile...",IDC_GENERATE_AND_SAVE_KEYFILE,124,336,141,14
LTEXT "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 keyfile.",IDT_KEYFILE_GENERATOR_NOTE,11,5,271,33
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,40,356,1,WS_EX_STATICEDGE
RTEXT "Mixing PRF:",IDT_PRF,7,51,85,10,SS_CENTERIMAGE
GROUPBOX "Current Pool Content",IDT_POOL_CONTENTS,6,70,344,170
CTEXT "",IDC_POOL_CONTENTS,16,83,323,148,0,WS_EX_TRANSPARENT
RTEXT "Number of keyfiles:",IDT_NUMBER_KEYFILES,9,281,110,8
RTEXT "Keyfiles base name:",IDT_KEYFILES_BASE_NAME,9,321,110,8
RTEXT "Keyfiles size (in Bytes):",IDT_KEYFILES_SIZE,9,300,110,8
CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,18,255,321,12
GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,6,244,344,29
END END
IDD_MULTI_CHOICE_DLG DIALOGEX 0, 0, 167, 322 IDD_MULTI_CHOICE_DLG DIALOGEX 0, 0, 167, 322
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN BEGIN
PUSHBUTTON "",IDC_CHOICE10,7,292,153,24,BS_CENTER | BS_MULTILINE,WS_EX_STATICEDGE PUSHBUTTON "",IDC_CHOICE10,7,292,153,24,BS_CENTER | BS_MULTILINE,WS_EX_STATICEDGE
@@ -275,12 +295,12 @@ BEGIN
GROUPBOX "",IDC_STATIC,5,2,228,51 GROUPBOX "",IDC_STATIC,5,2,228,51
END END
IDD_RANDOM_POOL_ENRICHMENT DIALOGEX 0, 0, 308, 270 IDD_RANDOM_POOL_ENRICHMENT DIALOGEX 0, 0, 308, 301
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - Random Pool Enrichment" CAPTION "VeraCrypt - Random Pool Enrichment"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "&Continue",IDC_CONTINUE,119,248,71,14 DEFPUSHBUTTON "&Continue",IDC_CONTINUE,119,278,71,14
COMBOBOX IDC_PRF_ID,79,49,91,90,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX IDC_PRF_ID,79,49,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
LTEXT "IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases security. When done, click 'Continue'.",IDT_RANDOM_POOL_ENRICHMENT_NOTE,11,6,282,25 LTEXT "IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases security. When done, click 'Continue'.",IDT_RANDOM_POOL_ENRICHMENT_NOTE,11,6,282,25
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,37,307,1,WS_EX_STATICEDGE CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,37,307,1,WS_EX_STATICEDGE
@@ -288,6 +308,8 @@ BEGIN
GROUPBOX "Current Pool Content",IDT_POOL_CONTENTS,6,70,296,170 GROUPBOX "Current Pool Content",IDT_POOL_CONTENTS,6,70,296,170
CONTROL "",IDC_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,16,83,282,148,WS_EX_TRANSPARENT CONTROL "",IDC_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,16,83,282,148,WS_EX_TRANSPARENT
CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,191,51,111,10 CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,191,51,111,10
CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,16,255,275,12
GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,7,244,294,29
END END
IDD_STATIC_MODELESS_WAIT_DLG DIALOGEX 0, 0, 292, 42 IDD_STATIC_MODELESS_WAIT_DLG DIALOGEX 0, 0, 292, 42
@@ -299,6 +321,15 @@ BEGIN
LTEXT "Please wait. This process may take a long time...",IDT_STATIC_MODELESS_WAIT_DLG_INFO,9,8,274,9 LTEXT "Please wait. This process may take a long time...",IDT_STATIC_MODELESS_WAIT_DLG_INFO,9,8,274,9
END END
IDD_STATIC_MODAL_WAIT_DLG DIALOGEX 0, 0, 292, 74
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
CAPTION "VeraCrypt"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
CTEXT "Please wait...\nThis process may take a long time and VeraCrypt may seem unresponsive.",IDT_STATIC_MODAL_WAIT_DLG_INFO,9,11,274,33
CONTROL "",IDC_WAIT_PROGRESS_BAR,"msctls_progress32",WS_BORDER,7,49,278,14
END
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@@ -308,9 +339,13 @@ END
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO GUIDELINES DESIGNINFO
BEGIN BEGIN
IDD_ABOUT_DLG, DIALOG
BEGIN
END
IDD_COMMANDHELP_DLG, DIALOG IDD_COMMANDHELP_DLG, DIALOG
BEGIN BEGIN
BOTTOMMARGIN, 205 BOTTOMMARGIN, 266
END END
IDD_RAWDEVICES_DLG, DIALOG IDD_RAWDEVICES_DLG, DIALOG
@@ -325,7 +360,7 @@ BEGIN
BEGIN BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 166 BOTTOMMARGIN, 225
END END
IDD_KEYFILES, DIALOG IDD_KEYFILES, DIALOG
@@ -333,7 +368,7 @@ BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 330 RIGHTMARGIN, 330
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 230 BOTTOMMARGIN, 244
END END
IDD_LANGUAGE, DIALOG IDD_LANGUAGE, DIALOG
@@ -371,9 +406,8 @@ BEGIN
IDD_KEYFILE_GENERATOR, DIALOG IDD_KEYFILE_GENERATOR, DIALOG
BEGIN BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 299
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 266 BOTTOMMARGIN, 358
END END
IDD_MULTI_CHOICE_DLG, DIALOG IDD_MULTI_CHOICE_DLG, DIALOG
@@ -421,7 +455,7 @@ BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 301 RIGHTMARGIN, 301
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 267 BOTTOMMARGIN, 298
END END
IDD_STATIC_MODELESS_WAIT_DLG, DIALOG IDD_STATIC_MODELESS_WAIT_DLG, DIALOG
@@ -431,6 +465,14 @@ BEGIN
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 35 BOTTOMMARGIN, 35
END END
IDD_STATIC_MODAL_WAIT_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 285
TOPMARGIN, 7
BOTTOMMARGIN, 67
END
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
@@ -449,6 +491,17 @@ IDR_BOOT_LOADER BIN "..\\Boot\\Windows\\Release\\Boo
IDR_BOOT_LOADER_AES BIN "..\\Boot\\Windows\\Release_AES\\BootLoader.com.gz" IDR_BOOT_LOADER_AES BIN "..\\Boot\\Windows\\Release_AES\\BootLoader.com.gz"
IDR_BOOT_LOADER_SERPENT BIN "..\\Boot\\Windows\\Release_Serpent\\BootLoader.com.gz" IDR_BOOT_LOADER_SERPENT BIN "..\\Boot\\Windows\\Release_Serpent\\BootLoader.com.gz"
IDR_BOOT_LOADER_TWOFISH BIN "..\\Boot\\Windows\\Release_Twofish\\BootLoader.com.gz" IDR_BOOT_LOADER_TWOFISH BIN "..\\Boot\\Windows\\Release_Twofish\\BootLoader.com.gz"
IDR_BOOT_SECTOR_SHA2 BIN "..\\Boot\\Windows\\Release_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_AES_SHA2 BIN "..\\Boot\\Windows\\Release_AES_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Release_Serpent_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Release_Twofish_SHA2\\BootSector.bin"
IDR_BOOT_LOADER_SHA2 BIN "..\\Boot\\Windows\\Release_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_AES_SHA2 BIN "..\\Boot\\Windows\\Release_AES_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Release_Serpent_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Release_Twofish_SHA2\\BootLoader.com.gz"
IDR_RESCUE_BOOT_SECTOR BIN "..\\Boot\\Windows\\Rescue\\BootSector.bin" IDR_RESCUE_BOOT_SECTOR BIN "..\\Boot\\Windows\\Rescue\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_AES BIN "..\\Boot\\Windows\\Rescue_AES\\BootSector.bin" IDR_RESCUE_BOOT_SECTOR_AES BIN "..\\Boot\\Windows\\Rescue_AES\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_SERPENT BIN "..\\Boot\\Windows\\Rescue_Serpent\\BootSector.bin" IDR_RESCUE_BOOT_SECTOR_SERPENT BIN "..\\Boot\\Windows\\Rescue_Serpent\\BootSector.bin"
@@ -458,6 +511,15 @@ IDR_RESCUE_LOADER_AES BIN "..\\Boot\\Windows\\Rescue_AES\\
IDR_RESCUE_LOADER_SERPENT BIN "..\\Boot\\Windows\\Rescue_Serpent\\BootLoader.com.gz" IDR_RESCUE_LOADER_SERPENT BIN "..\\Boot\\Windows\\Rescue_Serpent\\BootLoader.com.gz"
IDR_RESCUE_LOADER_TWOFISH BIN "..\\Boot\\Windows\\Rescue_Twofish\\BootLoader.com.gz" IDR_RESCUE_LOADER_TWOFISH BIN "..\\Boot\\Windows\\Rescue_Twofish\\BootLoader.com.gz"
IDR_RESCUE_BOOT_SECTOR_SHA2 BIN "..\\Boot\\Windows\\Rescue_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_AES_SHA2 BIN "..\\Boot\\Windows\\Rescue_AES_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Rescue_Serpent_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Rescue_Twofish_SHA2\\BootSector.bin"
IDR_RESCUE_LOADER_SHA2 BIN "..\\Boot\\Windows\\Rescue_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_AES_SHA2 BIN "..\\Boot\\Windows\\Rescue_AES_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Rescue_Serpent_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Rescue_Twofish_SHA2\\BootLoader.com.gz"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// XML // XML
+9 -7
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#include "Tcdefs.h" #include "Tcdefs.h"
+9 -7
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#ifndef TC_HEADER_CRC #ifndef TC_HEADER_CRC
+123 -936
View File
File diff suppressed because it is too large Load Diff
+81 -50
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
/* Update the following when adding a new cipher or EA: /* Update the following when adding a new cipher or EA:
@@ -42,21 +44,16 @@ extern "C" {
// Size of the volume header area containing concatenated master key(s) and secondary key(s) (XTS mode) // Size of the volume header area containing concatenated master key(s) and secondary key(s) (XTS mode)
#define MASTER_KEYDATA_SIZE 256 #define MASTER_KEYDATA_SIZE 256
// Size of the deprecated volume header item containing either an IV seed (CBC mode) or tweak key (LRW mode)
#define LEGACY_VOL_IV_SIZE 32
// The first PRF to try when mounting // The first PRF to try when mounting
#define FIRST_PRF_ID 1 #define FIRST_PRF_ID 1
// Hash algorithms (pseudorandom functions). // Hash algorithms (pseudorandom functions).
enum enum
{ {
RIPEMD160 = FIRST_PRF_ID, SHA512 = FIRST_PRF_ID,
#ifndef TC_WINDOWS_BOOT
SHA512,
WHIRLPOOL, WHIRLPOOL,
SHA1, // Deprecated/legacy SHA256,
#endif RIPEMD160,
HASH_ENUM_END_ID HASH_ENUM_END_ID
}; };
@@ -66,8 +63,8 @@ enum
#define RIPEMD160_BLOCKSIZE 64 #define RIPEMD160_BLOCKSIZE 64
#define RIPEMD160_DIGESTSIZE 20 #define RIPEMD160_DIGESTSIZE 20
#define SHA1_BLOCKSIZE 64 #define SHA256_BLOCKSIZE 64
#define SHA1_DIGESTSIZE 20 #define SHA256_DIGESTSIZE 32
#define SHA512_BLOCKSIZE 128 #define SHA512_BLOCKSIZE 128
#define SHA512_DIGESTSIZE 64 #define SHA512_DIGESTSIZE 64
@@ -78,7 +75,7 @@ enum
#define MAX_DIGESTSIZE WHIRLPOOL_DIGESTSIZE #define MAX_DIGESTSIZE WHIRLPOOL_DIGESTSIZE
#define DEFAULT_HASH_ALGORITHM FIRST_PRF_ID #define DEFAULT_HASH_ALGORITHM FIRST_PRF_ID
#define DEFAULT_HASH_ALGORITHM_BOOT RIPEMD160 #define DEFAULT_HASH_ALGORITHM_BOOT SHA256
// The mode of operation used for newly created volumes and first to try when mounting // The mode of operation used for newly created volumes and first to try when mounting
#define FIRST_MODE_OF_OPERATION_ID 1 #define FIRST_MODE_OF_OPERATION_ID 1
@@ -89,12 +86,6 @@ enum
/* If you add/remove a mode, update the following: GetMaxPkcs5OutSize(), EAInitMode() */ /* If you add/remove a mode, update the following: GetMaxPkcs5OutSize(), EAInitMode() */
XTS = FIRST_MODE_OF_OPERATION_ID, XTS = FIRST_MODE_OF_OPERATION_ID,
#ifndef TC_WINDOWS_BOOT
LRW, // Deprecated/legacy
CBC, // Deprecated/legacy
OUTER_CBC, // Deprecated/legacy
INNER_CBC, // Deprecated/legacy
#endif
MODE_ENUM_END_ID MODE_ENUM_END_ID
}; };
@@ -115,18 +106,17 @@ enum
NONE = 0, NONE = 0,
AES, AES,
SERPENT, SERPENT,
TWOFISH, TWOFISH
#ifndef TC_WINDOWS_BOOT
BLOWFISH, // Deprecated/legacy
CAST, // Deprecated/legacy
TRIPLEDES // Deprecated/legacy
#endif
}; };
typedef struct typedef struct
{ {
int Id; // Cipher ID int Id; // Cipher ID
#ifdef TC_WINDOWS_BOOT
char *Name; // Name char *Name; // Name
#else
wchar_t *Name; // Name
#endif
int BlockSize; // Block size (bytes) int BlockSize; // Block size (bytes)
int KeySize; // Key size (bytes) int KeySize; // Key size (bytes)
int KeyScheduleSize; // Scheduled key size (bytes) int KeyScheduleSize; // Scheduled key size (bytes)
@@ -139,13 +129,15 @@ typedef struct
int FormatEnabled; int FormatEnabled;
} EncryptionAlgorithm; } EncryptionAlgorithm;
#ifndef TC_WINDOWS_BOOT
typedef struct typedef struct
{ {
int Id; // Hash ID int Id; // Hash ID
char *Name; // Name wchar_t *Name; // Name
BOOL Deprecated; BOOL Deprecated;
BOOL SystemEncryption; // Available for system encryption BOOL SystemEncryption; // Available for system encryption
} Hash; } Hash;
#endif
// Maxium length of scheduled key // Maxium length of scheduled key
#if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES) #if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES)
@@ -177,6 +169,9 @@ typedef struct
# define PRAND_DISK_WIPE_PASSES 256 # define PRAND_DISK_WIPE_PASSES 256
#endif #endif
/* specific value for volume header wipe used only when drive is fully wiped. */
#define PRAND_HEADER_WIPE_PASSES 3
#if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES) #if !defined (TC_WINDOWS_BOOT) || defined (TC_WINDOWS_BOOT_AES)
# include "Aes.h" # include "Aes.h"
#else #else
@@ -184,15 +179,11 @@ typedef struct
#endif #endif
#include "Aes_hw_cpu.h" #include "Aes_hw_cpu.h"
#include "Blowfish.h"
#include "Cast.h"
#include "Des.h"
#include "Serpent.h" #include "Serpent.h"
#include "Twofish.h" #include "Twofish.h"
#include "Rmd160.h" #include "Rmd160.h"
#ifndef TC_WINDOWS_BOOT #ifndef TC_WINDOWS_BOOT
# include "Sha1.h"
# include "Sha2.h" # include "Sha2.h"
# include "Whirlpool.h" # include "Whirlpool.h"
#endif #endif
@@ -200,19 +191,28 @@ typedef struct
#include "GfMul.h" #include "GfMul.h"
#include "Password.h" #include "Password.h"
#ifndef TC_WINDOWS_BOOT
#include "config.h"
typedef struct keyInfo_t typedef struct keyInfo_t
{ {
int noIterations; /* Number of times to iterate (PKCS-5) */ int noIterations; /* Number of times to iterate (PKCS-5) */
int keyLength; /* Length of the key */ int keyLength; /* Length of the key */
__int8 userKey[MAX_PASSWORD]; /* Password (to which keyfiles may have been applied). WITHOUT +1 for the null terminator. */ uint64 dummy; /* Dummy field to ensure 16-byte alignment of this structure */
__int8 salt[PKCS5_SALT_SIZE]; /* PKCS-5 salt */ __int8 salt[PKCS5_SALT_SIZE]; /* PKCS-5 salt */
__int8 master_keydata[MASTER_KEYDATA_SIZE]; /* Concatenated master primary and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */ __int8 master_keydata[MASTER_KEYDATA_SIZE]; /* Concatenated master primary and secondary key(s) (XTS mode). For LRW (deprecated/legacy), it contains the tweak key before the master key(s). For CBC (deprecated/legacy), it contains the IV seed before the master key(s). */
CRYPTOPP_ALIGN_DATA(16) __int8 userKey[MAX_PASSWORD]; /* Password (to which keyfiles may have been applied). WITHOUT +1 for the null terminator. */
} KEY_INFO, *PKEY_INFO; } KEY_INFO, *PKEY_INFO;
#endif
typedef struct CRYPTO_INFO_t typedef struct CRYPTO_INFO_t
{ {
int ea; /* Encryption algorithm ID */ int ea; /* Encryption algorithm ID */
int mode; /* Mode of operation (e.g., XTS) */ int mode; /* Mode of operation (e.g., XTS) */
int pkcs5; /* PRF algorithm */
unsigned __int8 ks[MAX_EXPANDED_KEY]; /* Primary key schedule (if it is a cascade, it conatins multiple concatenated keys) */ unsigned __int8 ks[MAX_EXPANDED_KEY]; /* Primary key schedule (if it is a cascade, it conatins multiple concatenated keys) */
unsigned __int8 ks2[MAX_EXPANDED_KEY]; /* Secondary key schedule (if cascade, multiple concatenated) for XTS mode. */ unsigned __int8 ks2[MAX_EXPANDED_KEY]; /* Secondary key schedule (if cascade, multiple concatenated) for XTS mode. */
@@ -227,7 +227,8 @@ typedef struct CRYPTO_INFO_t
unsigned __int8 k2[MASTER_KEYDATA_SIZE]; /* For XTS, this contains the secondary key (if cascade, multiple concatenated). For LRW (deprecated/legacy), it contains the tweak key. For CBC (deprecated/legacy), it contains the IV seed. */ unsigned __int8 k2[MASTER_KEYDATA_SIZE]; /* For XTS, this contains the secondary key (if cascade, multiple concatenated). For LRW (deprecated/legacy), it contains the tweak key. For CBC (deprecated/legacy), it contains the IV seed. */
unsigned __int8 salt[PKCS5_SALT_SIZE]; unsigned __int8 salt[PKCS5_SALT_SIZE];
int noIterations; int noIterations;
int pkcs5; BOOL bTrueCryptMode;
int volumePim;
uint64 volume_creation_time; // Legacy uint64 volume_creation_time; // Legacy
uint64 header_creation_time; // Legacy uint64 header_creation_time; // Legacy
@@ -261,18 +262,44 @@ typedef struct CRYPTO_INFO_t
} CRYPTO_INFO, *PCRYPTO_INFO; } CRYPTO_INFO, *PCRYPTO_INFO;
#ifdef _WIN32
#pragma pack (push)
#pragma pack(1)
typedef struct BOOT_CRYPTO_HEADER_t
{
__int16 ea; /* Encryption algorithm ID */
__int16 mode; /* Mode of operation (e.g., XTS) */
__int16 pkcs5; /* PRF algorithm */
} BOOT_CRYPTO_HEADER, *PBOOT_CRYPTO_HEADER;
#pragma pack (pop)
#endif
PCRYPTO_INFO crypto_open (void); PCRYPTO_INFO crypto_open (void);
#ifndef TC_WINDOWS_BOOT
void crypto_loadkey (PKEY_INFO keyInfo, char *lpszUserKey, int nUserKeyLen); void crypto_loadkey (PKEY_INFO keyInfo, char *lpszUserKey, int nUserKeyLen);
#endif
void crypto_close (PCRYPTO_INFO cryptoInfo); void crypto_close (PCRYPTO_INFO cryptoInfo);
int CipherGetBlockSize (int cipher); int CipherGetBlockSize (int cipher);
int CipherGetKeySize (int cipher); int CipherGetKeySize (int cipher);
int CipherGetKeyScheduleSize (int cipher); int CipherGetKeyScheduleSize (int cipher);
BOOL CipherSupportsIntraDataUnitParallelization (int cipher); BOOL CipherSupportsIntraDataUnitParallelization (int cipher);
char * CipherGetName (int cipher);
#ifndef TC_WINDOWS_BOOT
const wchar_t * CipherGetName (int cipher);
#endif
int CipherInit (int cipher, unsigned char *key, unsigned char *ks); int CipherInit (int cipher, unsigned char *key, unsigned char *ks);
#ifndef TC_WINDOWS_BOOT_SINGLE_CIPHER_MODE
int EAInit (int ea, unsigned char *key, unsigned char *ks); int EAInit (int ea, unsigned char *key, unsigned char *ks);
#else
int EAInit (unsigned char *key, unsigned char *ks);
#endif
BOOL EAInitMode (PCRYPTO_INFO ci); BOOL EAInitMode (PCRYPTO_INFO ci);
void EncipherBlock(int cipher, void *data, void *ks); void EncipherBlock(int cipher, void *data, void *ks);
void DecipherBlock(int cipher, void *data, void *ks); void DecipherBlock(int cipher, void *data, void *ks);
@@ -284,12 +311,16 @@ void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount);
int EAGetFirst (); int EAGetFirst ();
int EAGetCount (void); int EAGetCount (void);
int EAGetNext (int previousEA); int EAGetNext (int previousEA);
char * EAGetName (char *buf, int ea); #ifndef TC_WINDOWS_BOOT
int EAGetByName (char *name); wchar_t * EAGetName (wchar_t *buf, int ea, int guiDisplay);
int EAGetByName (wchar_t *name);
#endif
int EAGetKeySize (int ea); int EAGetKeySize (int ea);
int EAGetFirstMode (int ea); int EAGetFirstMode (int ea);
int EAGetNextMode (int ea, int previousModeId); int EAGetNextMode (int ea, int previousModeId);
char * EAGetModeName (int ea, int mode, BOOL capitalLetters); #ifndef TC_WINDOWS_BOOT
wchar_t * EAGetModeName (int ea, int mode, BOOL capitalLetters);
#endif
int EAGetKeyScheduleSize (int ea); int EAGetKeyScheduleSize (int ea);
int EAGetLargestKey (); int EAGetLargestKey ();
int EAGetLargestKeyForMode (int mode); int EAGetLargestKeyForMode (int mode);
@@ -302,10 +333,17 @@ int EAGetPreviousCipher (int ea, int previousCipherId);
int EAIsFormatEnabled (int ea); int EAIsFormatEnabled (int ea);
BOOL EAIsModeSupported (int ea, int testedMode); BOOL EAIsModeSupported (int ea, int testedMode);
char *HashGetName (int hash_algo_id);
BOOL HashIsDeprecated (int hashId);
#ifndef TC_WINDOWS_BOOT
const wchar_t *HashGetName (int hash_algo_id);
Hash *HashGet (int id);
void HashGetName2 (wchar_t *buf, int hashId);
BOOL HashIsDeprecated (int hashId);
BOOL HashForSystemEncryption (int hashId);
int GetMaxPkcs5OutSize (void); int GetMaxPkcs5OutSize (void);
#endif
void EncryptDataUnits (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, uint32 nbrUnits, PCRYPTO_INFO ci); void EncryptDataUnits (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, uint32 nbrUnits, PCRYPTO_INFO ci);
void EncryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci); void EncryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci);
@@ -313,13 +351,6 @@ void DecryptDataUnits (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo,
void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci); void DecryptDataUnitsCurrentThread (unsigned __int8 *buf, const UINT64_STRUCT *structUnitNo, TC_LARGEST_COMPILER_UINT nbrUnits, PCRYPTO_INFO ci);
void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo); void EncryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo);
void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo); void DecryptBuffer (unsigned __int8 *buf, TC_LARGEST_COMPILER_UINT len, PCRYPTO_INFO cryptoInfo);
#ifndef TC_NO_COMPILER_INT64
void EncryptBufferLRW128 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
void DecryptBufferLRW128 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
void EncryptBufferLRW64 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
void DecryptBufferLRW64 (byte *buffer, uint64 length, uint64 blockIndex, PCRYPTO_INFO cryptoInfo);
uint64 DataUnit2LRWIndex (uint64 dataUnit, int blockSize, PCRYPTO_INFO ci);
#endif // #ifndef TC_NO_COMPILER_INT64
BOOL IsAesHwCpuSupported (); BOOL IsAesHwCpuSupported ();
void EnableHwEncryption (BOOL enable); void EnableHwEncryption (BOOL enable);
+16 -8
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2005-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "../Common/Dictionary.h" #include "../Common/Dictionary.h"
@@ -22,11 +26,15 @@ static size_t DataPoolSize = 0;
void AddDictionaryEntry (char *key, int intKey, void *value) void AddDictionaryEntry (char *key, int intKey, void *value)
{ {
if (key) try
StringKeyMap[key] = value; {
if (key)
StringKeyMap[key] = value;
if (intKey != 0) if (intKey != 0)
IntKeyMap[intKey] = value; IntKeyMap[intKey] = value;
}
catch (exception&) {}
} }
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2005-2009 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef DICTIONARY_H #ifndef DICTIONARY_H
+3232 -1519
View File
File diff suppressed because it is too large Load Diff
+199 -150
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#ifndef TC_HEADER_DLGCODE #ifndef TC_HEADER_DLGCODE
@@ -46,10 +48,10 @@ enum
#define TC_APPLICATION_ID L"IDRIX.VeraCrypt" #define TC_APPLICATION_ID L"IDRIX.VeraCrypt"
#define TC_MUTEX_NAME_SYSENC "Global\\VeraCrypt System Encryption Wizard" #define TC_MUTEX_NAME_SYSENC L"Global\\VeraCrypt System Encryption Wizard"
#define TC_MUTEX_NAME_NONSYS_INPLACE_ENC "Global\\VeraCrypt In-Place Encryption Wizard" #define TC_MUTEX_NAME_NONSYS_INPLACE_ENC L"Global\\VeraCrypt In-Place Encryption Wizard"
#define TC_MUTEX_NAME_APP_SETUP "Global\\VeraCrypt Setup" #define TC_MUTEX_NAME_APP_SETUP L"Global\\VeraCrypt Setup"
#define TC_MUTEX_NAME_DRIVER_SETUP "Global\\VeraCrypt Driver Setup" #define TC_MUTEX_NAME_DRIVER_SETUP L"Global\\VeraCrypt Driver Setup"
#define IDC_ABOUT 0x7fff /* ID for AboutBox on system menu in wm_user range */ #define IDC_ABOUT 0x7fff /* ID for AboutBox on system menu in wm_user range */
@@ -66,16 +68,18 @@ enum
#define MAX_MULTI_CHOICES 10 /* Maximum number of options for mutliple-choice dialog */ #define MAX_MULTI_CHOICES 10 /* Maximum number of options for mutliple-choice dialog */
#define TC_APPD_FILENAME_CONFIGURATION "Configuration.xml" #define TC_APPD_FILENAME_CONFIGURATION L"Configuration.xml"
#define TC_APPD_FILENAME_SYSTEM_ENCRYPTION "System Encryption.xml" #define TC_APPD_FILENAME_SYSTEM_ENCRYPTION L"System Encryption.xml"
#define TC_APPD_FILENAME_DEFAULT_KEYFILES "Default Keyfiles.xml" #define TC_APPD_FILENAME_DEFAULT_KEYFILES L"Default Keyfiles.xml"
#define TC_APPD_FILENAME_HISTORY "History.xml" #define TC_APPD_FILENAME_HISTORY L"History.xml"
#define TC_APPD_FILENAME_FAVORITE_VOLUMES "Favorite Volumes.xml" #define TC_APPD_FILENAME_FAVORITE_VOLUMES L"Favorite Volumes.xml"
#define TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES TC_APP_NAME " System Favorite Volumes.xml" #define TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES _T(TC_APP_NAME) L" System Favorite Volumes.xml"
#define TC_APPD_FILENAME_NONSYS_INPLACE_ENC "In-Place Encryption" #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC L"In-Place Encryption"
#define TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE "In-Place Encryption Wipe Algo" #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE L"In-Place Encryption Wipe Algo"
#define TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL "Post-Install Task - Tutorial" #define TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL L"Post-Install Task - Tutorial"
#define TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES "Post-Install Task - Release Notes" #define TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES L"Post-Install Task - Release Notes"
#define VC_FILENAME_RENAMED_SUFFIX L"_old"
#ifndef USER_DEFAULT_SCREEN_DPI #ifndef USER_DEFAULT_SCREEN_DPI
#define USER_DEFAULT_SCREEN_DPI 96 #define USER_DEFAULT_SCREEN_DPI 96
@@ -94,9 +98,9 @@ enum
extern char *LastDialogId; extern char *LastDialogId;
extern char *ConfigBuffer; extern char *ConfigBuffer;
extern char szHelpFile[TC_MAX_PATH]; extern wchar_t szHelpFile[TC_MAX_PATH];
extern char szHelpFile2[TC_MAX_PATH]; extern wchar_t szHelpFile2[TC_MAX_PATH];
extern char SecurityTokenLibraryPath[TC_MAX_PATH]; extern wchar_t SecurityTokenLibraryPath[TC_MAX_PATH];
extern HFONT hFixedDigitFont; extern HFONT hFixedDigitFont;
extern HFONT hBoldFont; extern HFONT hBoldFont;
extern HFONT hTitleFont; extern HFONT hTitleFont;
@@ -111,6 +115,7 @@ extern HWND MainDlg;
extern BOOL Silent; extern BOOL Silent;
extern BOOL bHistory; extern BOOL bHistory;
extern BOOL bPreserveTimestamp; extern BOOL bPreserveTimestamp;
extern BOOL bShowDisconnectedNetworkDrives;
extern BOOL bStartOnLogon; extern BOOL bStartOnLogon;
extern BOOL bMountDevicesOnLogon; extern BOOL bMountDevicesOnLogon;
extern BOOL bMountFavoritesOnLogon; extern BOOL bMountFavoritesOnLogon;
@@ -128,9 +133,14 @@ extern WipeAlgorithmId nWipeMode;
extern BOOL bSysPartitionSelected; extern BOOL bSysPartitionSelected;
extern BOOL bSysDriveSelected; extern BOOL bSysDriveSelected;
extern wchar_t SysPartitionDevicePath [TC_MAX_PATH];
extern wchar_t SysDriveDevicePath [TC_MAX_PATH];
extern char bCachedSysDevicePathsValid;
extern BOOL bHyperLinkBeingTracked; extern BOOL bHyperLinkBeingTracked;
extern BOOL bInPlaceEncNonSysPending; extern BOOL bInPlaceEncNonSysPending;
extern BOOL PimEnable;
extern BOOL KeyFilesEnable; extern BOOL KeyFilesEnable;
extern KeyFile *FirstKeyFile; extern KeyFile *FirstKeyFile;
extern KeyFilesDlgParam defaultKeyFilesParam; extern KeyFilesDlgParam defaultKeyFilesParam;
@@ -217,20 +227,21 @@ typedef struct
#define ICON_HAND MB_ICONHAND #define ICON_HAND MB_ICONHAND
#define YES_NO MB_YESNO #define YES_NO MB_YESNO
#define ISO_BURNER_TOOL "isoburn.exe" #define ISO_BURNER_TOOL L"isoburn.exe"
#define PRINT_TOOL "notepad" #define PRINT_TOOL L"notepad.exe"
void cleanup ( void ); void cleanup ( void );
void LowerCaseCopy ( char *lpszDest , const char *lpszSource ); void LowerCaseCopy ( wchar_t *lpszDest , const wchar_t *lpszSource );
void UpperCaseCopy ( char *lpszDest , const char *lpszSource ); void UpperCaseCopy ( wchar_t *lpszDest , size_t cbDest, const wchar_t *lpszSource );
void CreateFullVolumePath ( char *lpszDiskFile , const char *lpszFileName , BOOL *bDevice ); void CreateFullVolumePath ( wchar_t *lpszDiskFile , size_t cbDiskFile, const wchar_t *lpszFileName , BOOL *bDevice );
int FakeDosNameForDevice ( const char *lpszDiskFile , char *lpszDosDevice , char *lpszCFDevice , BOOL bNameOnly ); int FakeDosNameForDevice ( const wchar_t *lpszDiskFile , wchar_t *lpszDosDevice , size_t cbDosDevice, wchar_t *lpszCFDevice , size_t cbCFDevice, BOOL bNameOnly );
int RemoveFakeDosName ( char *lpszDiskFile , char *lpszDosDevice ); int RemoveFakeDosName ( wchar_t *lpszDiskFile , wchar_t *lpszDosDevice );
void AbortProcessDirect ( wchar_t *abortMsg );
void AbortProcess ( char *stringId ); void AbortProcess ( char *stringId );
void AbortProcessSilent ( void ); void AbortProcessSilent ( void );
void *err_malloc ( size_t size ); void *err_malloc ( size_t size );
char *err_strdup ( char *lpszText ); char *err_strdup ( char *lpszText );
DWORD handleWin32Error ( HWND hwndDlg ); DWORD handleWin32Error ( HWND hwndDlg, const char* srcPos );
BOOL IsDiskReadError (DWORD error); BOOL IsDiskReadError (DWORD error);
BOOL IsDiskWriteError (DWORD error); BOOL IsDiskWriteError (DWORD error);
BOOL IsDiskError (DWORD error); BOOL IsDiskError (DWORD error);
@@ -241,13 +252,11 @@ void DisplayStaticModelessWaitDlg (HWND parent);
void CloseStaticModelessWaitDlg (void); void CloseStaticModelessWaitDlg (void);
BOOL IsButtonChecked ( HWND hButton ); BOOL IsButtonChecked ( HWND hButton );
void CheckButton ( HWND hButton ); void CheckButton ( HWND hButton );
void LeftPadString (char *szTmp, int len, int targetLen, char filler); void LeftPadString (wchar_t *szTmp, int len, int targetLen, wchar_t filler);
void ToSBCS ( LPWSTR lpszText );
void ToUNICODE ( char *lpszText );
void InitDialog ( HWND hwndDlg ); void InitDialog ( HWND hwndDlg );
void ProcessPaintMessages (HWND hwnd, int maxMessagesToProcess); void ProcessPaintMessages (HWND hwnd, int maxMessagesToProcess);
HDC CreateMemBitmap ( HINSTANCE hInstance , HWND hwnd , char *resource ); HDC CreateMemBitmap ( HINSTANCE hInstance , HWND hwnd , wchar_t *resource );
HBITMAP RenderBitmap ( char *resource , HWND hwndDest , int x , int y , int nWidth , int nHeight , BOOL bDirectRender , BOOL bKeepAspectRatio); HBITMAP RenderBitmap ( wchar_t *resource , HWND hwndDest , int x , int y , int nWidth , int nHeight , BOOL bDirectRender , BOOL bKeepAspectRatio);
LRESULT CALLBACK RedTick ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam ); LRESULT CALLBACK RedTick ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam );
BOOL RegisterRedTick ( HINSTANCE hInstance ); BOOL RegisterRedTick ( HINSTANCE hInstance );
BOOL UnregisterRedTick ( HINSTANCE hInstance ); BOOL UnregisterRedTick ( HINSTANCE hInstance );
@@ -256,16 +265,15 @@ void WaitCursor ( void );
void NormalCursor ( void ); void NormalCursor ( void );
void ArrowWaitCursor ( void ); void ArrowWaitCursor ( void );
void HandCursor (); void HandCursor ();
void AddComboPair (HWND hComboBox, const char *lpszItem, int value); void AddComboPair (HWND hComboBox, const wchar_t *lpszItem, int value);
void AddComboPairW (HWND hComboBox, const wchar_t *lpszItem, int value);
void SelectAlgo ( HWND hComboBox , int *nCipher ); void SelectAlgo ( HWND hComboBox , int *nCipher );
void PopulateWipeModeCombo (HWND hComboBox, BOOL bNA, BOOL bInPlaceEncryption); void PopulateWipeModeCombo (HWND hComboBox, BOOL bNA, BOOL bInPlaceEncryption, BOOL bHeaderWipe);
wchar_t *GetWipeModeName (WipeAlgorithmId modeId); wchar_t *GetWipeModeName (WipeAlgorithmId modeId);
wchar_t *GetPathType (const char *path, BOOL bUpperCase, BOOL *bIsPartition); wchar_t *GetPathType (const wchar_t *path, BOOL bUpperCase, BOOL *bIsPartition);
LRESULT CALLBACK CustomDlgProc ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam ); LRESULT CALLBACK CustomDlgProc ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam );
BOOL TCCreateMutex (volatile HANDLE *hMutex, char *name); BOOL TCCreateMutex (volatile HANDLE *hMutex, wchar_t *name);
void TCCloseMutex (volatile HANDLE *hMutex); void TCCloseMutex (volatile HANDLE *hMutex);
BOOL MutexExistsOnSystem (char *name); BOOL MutexExistsOnSystem (wchar_t *name);
BOOL CreateSysEncMutex (void); BOOL CreateSysEncMutex (void);
BOOL InstanceHasSysEncMutex (void); BOOL InstanceHasSysEncMutex (void);
void CloseSysEncMutex (void); void CloseSysEncMutex (void);
@@ -281,21 +289,23 @@ void CloseAppSetupMutex (void);
BOOL IsTrueCryptInstallerRunning (void); BOOL IsTrueCryptInstallerRunning (void);
uint32 ReadDriverConfigurationFlags (); uint32 ReadDriverConfigurationFlags ();
uint32 ReadEncryptionThreadPoolFreeCpuCountLimit (); uint32 ReadEncryptionThreadPoolFreeCpuCountLimit ();
BOOL LoadSysEncSettings (HWND hwndDlg); BOOL LoadSysEncSettings ();
int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm); int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm);
void RemoveNonSysInPlaceEncNotifications (void); void RemoveNonSysInPlaceEncNotifications (void);
void SavePostInstallTasksSettings (int command); void SavePostInstallTasksSettings (int command);
void DoPostInstallTasks (void); void DoPostInstallTasks (HWND hwndDlg);
void InitOSVersionInfo (); void InitOSVersionInfo ();
void InitApp ( HINSTANCE hInstance, char *lpszCommandLine ); void InitApp ( HINSTANCE hInstance, wchar_t *lpszCommandLine );
void FinalizeApp (void);
void InitHelpFileName (void); void InitHelpFileName (void);
BOOL OpenDevice (const char *lpszPath, OPEN_TEST_STRUCT *driver, BOOL detectFilesystem); BOOL OpenDevice (const wchar_t *lpszPath, OPEN_TEST_STRUCT *driver, BOOL detectFilesystem);
void NotifyDriverOfPortableMode (void); void NotifyDriverOfPortableMode (void);
int GetAvailableFixedDisks ( HWND hComboBox , char *lpszRootPath ); int GetAvailableFixedDisks ( HWND hComboBox , char *lpszRootPath );
int GetAvailableRemovables ( HWND hComboBox , char *lpszRootPath ); int GetAvailableRemovables ( HWND hComboBox , char *lpszRootPath );
int IsSystemDevicePath (char *path, HWND hwndDlg, BOOL bReliableRequired); int IsSystemDevicePath (const wchar_t *path, HWND hwndDlg, BOOL bReliableRequired);
int IsNonSysPartitionOnSysDrive (const wchar_t *path);
BOOL CALLBACK RawDevicesDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam ); BOOL CALLBACK RawDevicesDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
BOOL TextInfoDialogBox (int nID); INT_PTR TextInfoDialogBox (int nID);
BOOL CALLBACK TextInfoDialogBoxDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK TextInfoDialogBoxDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
char * GetLegalNotices (); char * GetLegalNotices ();
BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -306,110 +316,117 @@ int DriverAttach ( void );
BOOL CALLBACK CipherTestDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam ); BOOL CALLBACK CipherTestDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
void ResetCipherTest ( HWND hwndDlg , int idTestCipher ); void ResetCipherTest ( HWND hwndDlg , int idTestCipher );
void ResetCurrentDirectory (); void ResetCurrentDirectory ();
BOOL BrowseFiles (HWND hwndDlg, char *stringId, char *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter); BOOL BrowseFiles (HWND hwndDlg, char *stringId, wchar_t *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter);
BOOL BrowseDirectories (HWND hWnd, char *lpszTitle, char *dirName); BOOL BrowseDirectories (HWND hWnd, char *lpszTitle, wchar_t *dirName);
void handleError ( HWND hwndDlg , int code ); void handleError ( HWND hwndDlg , int code, const char* srcPos );
BOOL CheckFileStreamWriteErrors (FILE *file, const char *fileName); BOOL CheckFileStreamWriteErrors (HWND hwndDlg, FILE *file, const wchar_t *fileName);
void LocalizeDialog ( HWND hwnd, char *stringId ); void LocalizeDialog ( HWND hwnd, char *stringId );
void OpenVolumeExplorerWindow (int driveNo); void OpenVolumeExplorerWindow (int driveNo);
static BOOL CALLBACK CloseVolumeExplorerWindowsEnum( HWND hwnd, LPARAM driveNo); static BOOL CALLBACK CloseVolumeExplorerWindowsEnum( HWND hwnd, LPARAM driveNo);
BOOL CloseVolumeExplorerWindows (HWND hwnd, int driveNo); BOOL CloseVolumeExplorerWindows (HWND hwnd, int driveNo);
BOOL UpdateDriveCustomLabel (int driveNo, wchar_t* effectiveLabel, BOOL bSetValue);
BOOL CheckCapsLock (HWND hwnd, BOOL quiet); BOOL CheckCapsLock (HWND hwnd, BOOL quiet);
BOOL CheckFileExtension (char *fileName); BOOL CheckFileExtension (wchar_t *fileName);
void CorrectFileName (wchar_t* fileName);
void IncreaseWrongPwdRetryCount (int count); void IncreaseWrongPwdRetryCount (int count);
void ResetWrongPwdRetryCount (void); void ResetWrongPwdRetryCount (void);
BOOL WrongPwdRetryCountOverLimit (void); BOOL WrongPwdRetryCountOverLimit (void);
DWORD GetUsedLogicalDrives (void);
int GetFirstAvailableDrive (); int GetFirstAvailableDrive ();
int GetLastAvailableDrive (); int GetLastAvailableDrive ();
BOOL IsDriveAvailable (int driveNo); BOOL IsDriveAvailable (int driveNo);
BOOL IsDeviceMounted (char *deviceName); BOOL IsDeviceMounted (wchar_t *deviceName);
int DriverUnmountVolume (HWND hwndDlg, int nDosDriveNo, BOOL forced); int DriverUnmountVolume (HWND hwndDlg, int nDosDriveNo, BOOL forced);
void BroadcastDeviceChange (WPARAM message, int nDosDriveNo, DWORD driveMap); void BroadcastDeviceChange (WPARAM message, int nDosDriveNo, DWORD driveMap);
int MountVolume (HWND hwndDlg, int driveNo, char *volumePath, Password *password, BOOL cachePassword, BOOL sharedAccess, const MountOptions* const mountOptions, BOOL quiet, BOOL bReportWrongPassword); int MountVolume (HWND hwndDlg, int driveNo, wchar_t *volumePath, Password *password, int pkcs5, int pim, BOOL truecryptMode, BOOL cachePassword, BOOL cachePim, BOOL sharedAccess, const MountOptions* const mountOptions, BOOL quiet, BOOL bReportWrongPassword);
BOOL UnmountVolume (HWND hwndDlg , int nDosDriveNo, BOOL forceUnmount); BOOL UnmountVolume (HWND hwndDlg , int nDosDriveNo, BOOL forceUnmount);
BOOL UnmountVolumeAfterFormatExCall (HWND hwndDlg, int nDosDriveNo);
BOOL IsPasswordCacheEmpty (void); BOOL IsPasswordCacheEmpty (void);
BOOL IsMountedVolume (const char *volname); BOOL IsMountedVolume (const wchar_t *volname);
int GetMountedVolumeDriveNo (char *volname); int GetMountedVolumeDriveNo (wchar_t *volname);
BOOL IsAdmin (void); BOOL IsAdmin (void);
BOOL IsBuiltInAdmin (); BOOL IsBuiltInAdmin ();
BOOL IsUacSupported (); BOOL IsUacSupported ();
BOOL ResolveSymbolicLink (const wchar_t *symLinkName, PWSTR targetName); BOOL ResolveSymbolicLink (const wchar_t *symLinkName, PWSTR targetName, size_t cbTargetName);
int GetDiskDeviceDriveLetter (PWSTR deviceName); int GetDiskDeviceDriveLetter (PWSTR deviceName);
int FileSystemAppearsEmpty (const char *devicePath); int FileSystemAppearsEmpty (const wchar_t *devicePath);
__int64 GetStatsFreeSpaceOnPartition (const char *devicePath, float *percent, __int64 *occupiedBytes, BOOL silent); __int64 GetStatsFreeSpaceOnPartition (const wchar_t *devicePath, float *percent, __int64 *occupiedBytes, BOOL silent);
__int64 GetDeviceSize (const char *devicePath); __int64 GetDeviceSize (const wchar_t *devicePath);
HANDLE DismountDrive (char *devName, char *devicePath); HANDLE DismountDrive (wchar_t *devName, wchar_t *devicePath);
int64 FindString (const char *buf, const char *str, int64 bufLen, size_t strLen, int64 startOffset); int64 FindString (const char *buf, const char *str, int64 bufLen, int64 strLen, int64 startOffset);
BOOL FileExists (const char *filePathPtr); BOOL FileExists (const wchar_t *filePathPtr);
__int64 FindStringInFile (const char *filePath, const char *str, int strLen); __int64 FindStringInFile (const wchar_t *filePath, const char *str, int strLen);
BOOL TCCopyFile (char *sourceFileName, char *destinationFile); BOOL TCCopyFile (wchar_t *sourceFileName, wchar_t *destinationFile);
BOOL SaveBufferToFile (const char *inputBuffer, const char *destinationFile, DWORD inputLength, BOOL bAppend); BOOL SaveBufferToFile (const char *inputBuffer, const wchar_t *destinationFile, DWORD inputLength, BOOL bAppend, BOOL bRenameIfFailed);
BOOL TCFlushFile (FILE *f); BOOL TCFlushFile (FILE *f);
BOOL PrintHardCopyTextUTF16 (wchar_t *text, char *title, int byteLen); BOOL PrintHardCopyTextUTF16 (wchar_t *text, wchar_t *title, size_t byteLen);
void GetSpeedString (unsigned __int64 speed, wchar_t *str); void GetSpeedString (unsigned __int64 speed, wchar_t *str, size_t cbStr);
BOOL IsNonInstallMode (); BOOL IsNonInstallMode ();
BOOL DriverUnload (); BOOL DriverUnload ();
LRESULT SetCheckBox (HWND hwndDlg, int dlgItem, BOOL state); LRESULT SetCheckBox (HWND hwndDlg, int dlgItem, BOOL state);
BOOL GetCheckBox (HWND hwndDlg, int dlgItem); BOOL GetCheckBox (HWND hwndDlg, int dlgItem);
void SetListScrollHPos (HWND hList, int topMostVisibleItem); void SetListScrollHPos (HWND hList, int topMostVisibleItem);
void ManageStartupSeq (void); void ManageStartupSeq (void);
void ManageStartupSeqWiz (BOOL bRemove, const char *arg); void ManageStartupSeqWiz (BOOL bRemove, const wchar_t *arg);
void CleanLastVisitedMRU (void); void CleanLastVisitedMRU (void);
void ClearHistory (HWND hwndDlgItem); void ClearHistory (HWND hwndDlgItem);
LRESULT ListItemAdd (HWND list, int index, char *string); LRESULT ListItemAdd (HWND list, int index, const wchar_t *string);
LRESULT ListItemAddW (HWND list, int index, wchar_t *string); LRESULT ListSubItemSet (HWND list, int index, int subIndex, const wchar_t *string);
LRESULT ListSubItemSet (HWND list, int index, int subIndex, char *string);
LRESULT ListSubItemSetW (HWND list, int index, int subIndex, wchar_t *string);
BOOL GetMountList (MOUNT_LIST_STRUCT *list); BOOL GetMountList (MOUNT_LIST_STRUCT *list);
int GetDriverRefCount (); int GetDriverRefCount ();
void GetSizeString (unsigned __int64 size, wchar_t *str); void GetSizeString (unsigned __int64 size, wchar_t *str, size_t cbStr);
__int64 GetFileSize64 (const char *path); __int64 GetFileSize64 (const wchar_t *path);
BOOL LoadInt16 (char *filePath, int *result, __int64 fileOffset); BOOL LoadInt16 (const wchar_t *filePath, int *result, __int64 fileOffset);
BOOL LoadInt32 (char *filePath, unsigned __int32 *result, __int64 fileOffset); BOOL LoadInt32 (const wchar_t *filePath, unsigned __int32 *result, __int64 fileOffset);
char *LoadFile (const char *fileName, DWORD *size); char *LoadFile (const wchar_t *fileName, DWORD *size);
char *LoadFileBlock (char *fileName, __int64 fileOffset, size_t count); char *LoadFileBlock (const wchar_t *fileName, __int64 fileOffset, DWORD count);
char *GetModPath (char *path, int maxSize); wchar_t *GetModPath (wchar_t *path, int maxSize);
char *GetConfigPath (char *fileName); wchar_t *GetConfigPath (wchar_t *fileName);
char *GetProgramConfigPath (char *fileName); wchar_t *GetProgramConfigPath (wchar_t *fileName);
char GetSystemDriveLetter (void); wchar_t GetSystemDriveLetter (void);
void OpenPageHelp (HWND hwndDlg, int nPage); void OpenPageHelp (HWND hwndDlg, int nPage);
void TaskBarIconDisplayBalloonTooltip (HWND hwnd, wchar_t *headline, wchar_t *text, BOOL warning); void TaskBarIconDisplayBalloonTooltip (HWND hwnd, wchar_t *headline, wchar_t *text, BOOL warning);
void InfoBalloon (char *headingStringId, char *textStringId); void InfoBalloon (char *headingStringId, char *textStringId, HWND hwnd);
void InfoBalloonDirect (wchar_t *headingString, wchar_t *textString); void InfoBalloonDirect (wchar_t *headingString, wchar_t *textString, HWND hwnd);
void WarningBalloon (char *headingStringId, char *textStringId); void WarningBalloon (char *headingStringId, char *textStringId, HWND hwnd);
void WarningBalloonDirect (wchar_t *headingString, wchar_t *textString); void WarningBalloonDirect (wchar_t *headingString, wchar_t *textString, HWND hwnd);
int Info (char *stringId); int Info (char *stringId, HWND hwnd);
int InfoTopMost (char *stringId); int InfoTopMost (char *stringId, HWND hwnd);
int InfoDirect (const wchar_t *msg); int InfoDirect (const wchar_t *msg, HWND hwnd);
int Warning (char *stringId); int Warning (char *stringId, HWND hwnd);
int WarningTopMost (char *stringId); int WarningTopMost (char *stringId, HWND hwnd);
int WarningDirect (const wchar_t *warnMsg); int WarningDirect (const wchar_t *warnMsg, HWND hwnd);
int Error (char *stringId); int Error (char *stringId, HWND hwnd);
int ErrorDirect (const wchar_t *errMsg); int ErrorRetryCancel (char *stringId, HWND hwnd);
int ErrorTopMost (char *stringId); int ErrorDirect (const wchar_t *errMsg, HWND hwnd);
int AskYesNo (char *stringId); int ErrorTopMost (char *stringId, HWND hwnd);
int AskYesNoString (const wchar_t *str); int AskYesNo (char *stringId, HWND hwnd);
int AskYesNoTopmost (char *stringId); int AskYesNoString (const wchar_t *str, HWND hwnd);
int AskNoYes (char *stringId); int AskYesNoTopmost (char *stringId, HWND hwnd);
int AskOkCancel (char *stringId); int AskNoYes (char *stringId, HWND hwnd);
int AskWarnYesNo (char *stringId); int AskNoYesString (const wchar_t *string, HWND hwnd);
int AskWarnYesNoString (const wchar_t *string); int AskOkCancel (char *stringId, HWND hwnd);
int AskWarnYesNoTopmost (char *stringId); int AskWarnYesNo (char *stringId, HWND hwnd);
int AskWarnYesNoStringTopmost (const wchar_t *string); int AskWarnYesNoString (const wchar_t *string, HWND hwnd);
int AskWarnNoYes (char *stringId); int AskWarnYesNoTopmost (char *stringId, HWND hwnd);
int AskWarnNoYesString (const wchar_t *string); int AskWarnYesNoStringTopmost (const wchar_t *string, HWND hwnd);
int AskWarnNoYesTopmost (char *stringId); int AskWarnNoYes (char *stringId, HWND hwnd);
int AskWarnOkCancel (char *stringId); int AskWarnNoYesString (const wchar_t *string, HWND hwnd);
int AskWarnCancelOk (char *stringId); int AskWarnNoYesTopmost (char *stringId, HWND hwnd);
int AskErrYesNo (char *stringId); int AskWarnOkCancel (char *stringId, HWND hwnd);
int AskErrNoYes (char *stringId); int AskWarnCancelOk (char *stringId, HWND hwnd);
int AskMultiChoice (void *strings[], BOOL bBold); int AskErrYesNo (char *stringId, HWND hwnd);
int AskErrNoYes (char *stringId, HWND hwnd);
int AskMultiChoice (void *strings[], BOOL bBold, HWND hwnd);
BOOL ConfigWriteBegin (); BOOL ConfigWriteBegin ();
BOOL ConfigWriteEnd (); BOOL ConfigWriteEnd (HWND hwnd);
BOOL ConfigWriteString (char *configKey, char *configValue); BOOL ConfigWriteString (char *configKey, char *configValue);
BOOL ConfigWriteStringW (char *configKey, wchar_t *configValue);
BOOL ConfigWriteInt (char *configKey, int configValue); BOOL ConfigWriteInt (char *configKey, int configValue);
int ConfigReadInt (char *configKey, int defaultValue); int ConfigReadInt (char *configKey, int defaultValue);
char *ConfigReadString (char *configKey, char *defaultValue, char *str, int maxLen); char *ConfigReadString (char *configKey, char *defaultValue, char *str, int maxLen);
void ConfigReadCompareInt(char *configKey, int defaultValue, int* pOutputValue, BOOL bOnlyCheckModified, BOOL* pbModified);
void ConfigReadCompareString (char *configKey, char *defaultValue, char *str, int maxLen, BOOL bOnlyCheckModified, BOOL *pbModified);
void RestoreDefaultKeyFilesParam (void); void RestoreDefaultKeyFilesParam (void);
BOOL LoadDefaultKeyFilesParam (void); BOOL LoadDefaultKeyFilesParam (void);
void Debug (char *format, ...); void Debug (char *format, ...);
@@ -422,20 +439,21 @@ BOOL IsHiddenOSRunning (void);
BOOL EnableWow64FsRedirection (BOOL enable); BOOL EnableWow64FsRedirection (BOOL enable);
BOOL RestartComputer (void); BOOL RestartComputer (void);
void Applink (char *dest, BOOL bSendOS, char *extraOutput); void Applink (char *dest, BOOL bSendOS, char *extraOutput);
char *RelativePath2Absolute (char *szFileName); wchar_t *RelativePath2Absolute (wchar_t *szFileName);
void HandleDriveNotReadyError (); void HandleDriveNotReadyError (HWND hwnd);
BOOL CALLBACK CloseTCWindowsEnum( HWND hwnd, LPARAM lParam); BOOL CALLBACK CloseTCWindowsEnum( HWND hwnd, LPARAM lParam);
BOOL CALLBACK FindTCWindowEnum (HWND hwnd, LPARAM lParam); BOOL CALLBACK FindTCWindowEnum (HWND hwnd, LPARAM lParam);
BYTE *MapResource (char *resourceType, int resourceId, PDWORD size); BYTE *MapResource (wchar_t *resourceType, int resourceId, PDWORD size);
void InconsistencyResolved (char *msg); void InconsistencyResolved (char *msg);
void ReportUnexpectedState (char *techInfo); void ReportUnexpectedState (char *techInfo);
BOOL SelectMultipleFiles (HWND hwndDlg, char *stringId, char *lpszFileName, BOOL keepHistory); BOOL SelectMultipleFiles (HWND hwndDlg, const char *stringId, wchar_t *lpszFileName, size_t cbFileName, BOOL keepHistory);
BOOL SelectMultipleFilesNext (char *lpszFileName); BOOL SelectMultipleFilesNext (wchar_t *lpszFileName, size_t cbFileName);
void OpenOnlineHelp (); void OpenOnlineHelp ();
BOOL GetPartitionInfo (const char *deviceName, PPARTITION_INFORMATION rpartInfo); BOOL GetPartitionInfo (const wchar_t *deviceName, PPARTITION_INFORMATION rpartInfo);
BOOL GetDeviceInfo (const char *deviceName, DISK_PARTITION_INFO_STRUCT *info); BOOL GetDeviceInfo (const wchar_t *deviceName, DISK_PARTITION_INFO_STRUCT *info);
BOOL GetDriveGeometry (const char *deviceName, PDISK_GEOMETRY diskGeometry); BOOL GetDriveGeometry (const wchar_t *deviceName, PDISK_GEOMETRY diskGeometry);
BOOL IsVolumeDeviceHosted (const char *lpszDiskFile); BOOL GetPhysicalDriveGeometry (int driveNumber, PDISK_GEOMETRY diskGeometry);
BOOL IsVolumeDeviceHosted (const wchar_t *lpszDiskFile);
int CompensateXDPI (int val); int CompensateXDPI (int val);
int CompensateYDPI (int val); int CompensateYDPI (int val);
int CompensateDPIFont (int val); int CompensateDPIFont (int val);
@@ -443,31 +461,45 @@ int GetTextGfxWidth (HWND hwndDlgItem, const wchar_t *text, HFONT hFont);
int GetTextGfxHeight (HWND hwndDlgItem, const wchar_t *text, HFONT hFont); int GetTextGfxHeight (HWND hwndDlgItem, const wchar_t *text, HFONT hFont);
BOOL ToHyperlink (HWND hwndDlg, UINT ctrlId); BOOL ToHyperlink (HWND hwndDlg, UINT ctrlId);
BOOL ToCustHyperlink (HWND hwndDlg, UINT ctrlId, HFONT hFont); BOOL ToCustHyperlink (HWND hwndDlg, UINT ctrlId, HFONT hFont);
void DisableCloseButton (HWND hwndDlg);
void EnableCloseButton (HWND hwndDlg);
void ToBootPwdField (HWND hwndDlg, UINT ctrlId); void ToBootPwdField (HWND hwndDlg, UINT ctrlId);
void AccommodateTextField (HWND hwndDlg, UINT ctrlId, BOOL bFirstUpdate, HFONT hFont); void AccommodateTextField (HWND hwndDlg, UINT ctrlId, BOOL bFirstUpdate, HFONT hFont);
BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize); BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize);
BOOL GetSysDevicePaths (HWND hwndDlg);
BOOL DoDriverInstall (HWND hwndDlg); BOOL DoDriverInstall (HWND hwndDlg);
int OpenVolume (OpenVolumeContext *context, const char *volumePath, Password *password, BOOL write, BOOL preserveTimestamps, BOOL useBackupHeader); int OpenVolume (OpenVolumeContext *context, const wchar_t *volumePath, Password *password, int pkcs5_prf, int pim, BOOL truecryptMode, BOOL write, BOOL preserveTimestamps, BOOL useBackupHeader);
void CloseVolume (OpenVolumeContext *context); void CloseVolume (OpenVolumeContext *context);
int ReEncryptVolumeHeader (char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, BOOL wipeMode); int ReEncryptVolumeHeader (HWND hwndDlg, char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, int pim, BOOL wipeMode);
BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly); BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly);
BOOL IsPagingFileWildcardActive (); BOOL IsPagingFileWildcardActive ();
BOOL DisablePagingFile (); BOOL DisablePagingFile ();
BOOL CALLBACK SecurityTokenPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK SecurityTokenPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
BOOL InitSecurityTokenLibrary (); BOOL InitSecurityTokenLibrary (HWND hwndDlg);
BOOL FileHasReadOnlyAttribute (const char *path); BOOL FileHasReadOnlyAttribute (const wchar_t *path);
BOOL IsFileOnReadOnlyFilesystem (const char *path); BOOL IsFileOnReadOnlyFilesystem (const wchar_t *path);
void CheckFilesystem (int driveNo, BOOL fixErrors); void CheckFilesystem (HWND hwndDlg, int driveNo, BOOL fixErrors);
BOOL BufferContainsString (const byte *buffer, size_t bufferSize, const char *str); BOOL BufferContainsString (const byte *buffer, size_t bufferSize, const char *str);
int AskNonSysInPlaceEncryptionResume (); int AskNonSysInPlaceEncryptionResume (HWND hwndDlg, BOOL* pbDecrypt);
BOOL RemoveDeviceWriteProtection (HWND hwndDlg, char *devicePath); BOOL RemoveDeviceWriteProtection (HWND hwndDlg, wchar_t *devicePath);
void EnableElevatedCursorChange (HWND parent); void EnableElevatedCursorChange (HWND parent);
BOOL DisableFileCompression (HANDLE file); BOOL DisableFileCompression (HANDLE file);
BOOL VolumePathExists (char *volumePath); BOOL VolumePathExists (const wchar_t *volumePath);
BOOL IsWindowsIsoBurnerAvailable (); BOOL IsWindowsIsoBurnerAvailable ();
BOOL LaunchWindowsIsoBurner (HWND hwnd, const char *isoPath); BOOL LaunchWindowsIsoBurner (HWND hwnd, const wchar_t *isoPath);
BOOL IsApplicationInstalled (const char *appName); BOOL IsApplicationInstalled (const wchar_t *appName);
int GetPim (HWND hwndDlg, UINT ctrlId);
void SetPim (HWND hwndDlg, UINT ctrlId, int pim);
BOOL GetPassword (HWND hwndDlg, UINT ctrlID, char* passValue, int bufSize, BOOL bShowError);
void SetPassword (HWND hwndDlg, UINT ctrlID, char* passValue);
void HandleShowPasswordFieldAction (HWND hwndDlg, UINT checkBoxId, UINT edit1Id, UINT edit2Id);
HKEY OpenDeviceClassRegKey (const GUID *deviceClassGuid);
LSTATUS DeleteRegistryKey (HKEY, LPCTSTR);
HIMAGELIST CreateImageList(int cx, int cy, UINT flags, int cInitial, int cGrow);
int AddBitmapToImageList(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask);
HRESULT VCStrDupW(LPCWSTR psz, LPWSTR *ppwsz);
void ProcessEntropyEstimate (HWND hProgress, DWORD* pdwInitialValue, DWORD dwCounter, DWORD dwMaxLevel, DWORD* pdwEntropy);
#ifdef __cplusplus #ifdef __cplusplus
} }
@@ -487,7 +519,8 @@ struct HostDevice
IsVirtualPartition (false), IsVirtualPartition (false),
HasUnencryptedFilesystem (false), HasUnencryptedFilesystem (false),
Removable (false), Removable (false),
Size (0) Size (0),
SystemNumber((uint32) -1)
{ {
} }
@@ -500,9 +533,9 @@ struct HostDevice
bool IsPartition; bool IsPartition;
bool IsVirtualPartition; bool IsVirtualPartition;
bool HasUnencryptedFilesystem; bool HasUnencryptedFilesystem;
std::string MountPoint; std::wstring MountPoint;
std::wstring Name; std::wstring Name;
std::string Path; std::wstring Path;
bool Removable; bool Removable;
uint64 Size; uint64 Size;
uint32 SystemNumber; uint32 SystemNumber;
@@ -510,22 +543,38 @@ struct HostDevice
std::vector <HostDevice> Partitions; std::vector <HostDevice> Partitions;
}; };
BOOL BrowseFilesInDir (HWND hwndDlg, char *stringId, char *initialDir, char *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter, const wchar_t *initialFileName = NULL, const wchar_t *defaultExtension = NULL); struct RawDevicesDlgParam
{
std::vector <HostDevice> devices;
wchar_t *pszFileName;
};
BOOL BrowseFilesInDir (HWND hwndDlg, char *stringId, wchar_t *initialDir, wchar_t *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter, const wchar_t *initialFileName = NULL, const wchar_t *defaultExtension = NULL);
std::wstring SingleStringToWide (const std::string &singleString); std::wstring SingleStringToWide (const std::string &singleString);
std::wstring Utf8StringToWide (const std::string &utf8String); std::wstring Utf8StringToWide (const std::string &utf8String);
std::string WideToSingleString (const std::wstring &wideString);
std::string WideToUtf8String (const std::wstring &wideString); std::string WideToUtf8String (const std::wstring &wideString);
std::string StringToUpperCase (const std::string &str);
std::vector <HostDevice> GetAvailableHostDevices (bool noDeviceProperties = false, bool singleList = false, bool noFloppy = true, bool detectUnencryptedFilesystems = false); std::vector <HostDevice> GetAvailableHostDevices (bool noDeviceProperties = false, bool singleList = false, bool noFloppy = true, bool detectUnencryptedFilesystems = false);
std::string ToUpperCase (const std::string &str); std::wstring ToUpperCase (const std::wstring &str);
std::wstring GetWrongPasswordErrorMessage (HWND hwndDlg); std::wstring GetWrongPasswordErrorMessage (HWND hwndDlg);
std::string GetWindowsEdition (); std::wstring GetWindowsEdition ();
std::string FitPathInGfxWidth (HWND hwnd, HFONT hFont, LONG width, const std::string &path); std::wstring FitPathInGfxWidth (HWND hwnd, HFONT hFont, LONG width, const std::wstring &path);
std::string GetServiceConfigPath (const char *fileName); std::wstring GetServiceConfigPath (const wchar_t *fileName, bool useLegacy);
std::string VolumeGuidPathToDevicePath (std::string volumeGuidPath); std::wstring VolumeGuidPathToDevicePath (std::wstring volumeGuidPath);
std::string HarddiskVolumePathToPartitionPath (const std::string &harddiskVolumePath); std::wstring HarddiskVolumePathToPartitionPath (const std::wstring &harddiskVolumePath);
std::string FindLatestFileOrDirectory (const std::string &directory, const char *namePattern, bool findDirectory, bool findFile); std::wstring FindLatestFileOrDirectory (const std::wstring &directory, const wchar_t *namePattern, bool findDirectory, bool findFile);
std::string GetUserFriendlyVersionString (int version); std::wstring GetUserFriendlyVersionString (int version);
std::wstring IntToWideString (int val);
void RegisterDriverInf (bool registerFilter, const std::string& filter, const std::string& filterReg, HWND ParentWindow, HKEY regKey);
std::wstring GetTempPathString ();
inline std::wstring AppendSrcPos (const wchar_t* msg, const char* srcPos)
{
return std::wstring (msg? msg : L"") + L"\n\nSource: " + SingleStringToWide (srcPos);
}
// Display a wait dialog while calling the provided callback with the given parameter
typedef void (CALLBACK* WaitThreadProc)(void* pArg, HWND hWaitDlg);
void BringToForeground(HWND hWnd);
void ShowWaitDialog(HWND hwnd, BOOL bUseHwndAsParent, WaitThreadProc callback, void* pArg);
#endif // __cplusplus #endif // __cplusplus
+11 -7
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#include "EncryptionThreadPool.h" #include "EncryptionThreadPool.h"
@@ -159,7 +163,7 @@ static TC_THREAD_PROC EncryptionThreadProc (void *threadArg)
switch (workItem->KeyDerivation.Pkcs5Prf) switch (workItem->KeyDerivation.Pkcs5Prf)
{ {
case RIPEMD160: case RIPEMD160:
derive_key_ripemd160 (TRUE, workItem->KeyDerivation.Password, workItem->KeyDerivation.PasswordLength, workItem->KeyDerivation.Salt, PKCS5_SALT_SIZE, derive_key_ripemd160 (workItem->KeyDerivation.Password, workItem->KeyDerivation.PasswordLength, workItem->KeyDerivation.Salt, PKCS5_SALT_SIZE,
workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize()); workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize());
break; break;
@@ -173,8 +177,8 @@ static TC_THREAD_PROC EncryptionThreadProc (void *threadArg)
workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize()); workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize());
break; break;
case SHA1: case SHA256:
derive_key_sha1 (workItem->KeyDerivation.Password, workItem->KeyDerivation.PasswordLength, workItem->KeyDerivation.Salt, PKCS5_SALT_SIZE, derive_key_sha256 (workItem->KeyDerivation.Password, workItem->KeyDerivation.PasswordLength, workItem->KeyDerivation.Salt, PKCS5_SALT_SIZE,
workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize()); workItem->KeyDerivation.IterationCount, workItem->KeyDerivation.DerivedKey, GetMaxPkcs5OutSize());
break; break;
+8 -4
View File
@@ -1,9 +1,13 @@
/* /*
Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved. Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Governed by the TrueCrypt License 3.0 the full text of which is contained in Modifications and additions to the original source code (contained in this file)
the file License.txt included in TrueCrypt binary and source code distribution and all other portions of this file are Copyright (c) 2013-2016 IDRIX
packages. and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/ */
#ifndef TC_HEADER_ENCRYPTION_THREAD_POOL #ifndef TC_HEADER_ENCRYPTION_THREAD_POOL
+9 -7
View File
@@ -1,12 +1,14 @@
/* /*
Legal Notice: Some portions of the source code contained in this file were Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
Agreement for Encryption for the Masses'. Modifications and additions to governed by the TrueCrypt License 3.0, also from the source code of
the original source code (contained in this file) and all other portions Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
of this file are Copyright (c) 2003-2009 TrueCrypt Developers Association and which is governed by the 'License Agreement for Encryption for the Masses'
and are governed by the TrueCrypt License 3.0 the full text of which is Modifications and additions to the original source code (contained in this file)
contained in the file License.txt included in TrueCrypt binary and source and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */ code distribution packages. */
#include "Tcdefs.h" #include "Tcdefs.h"

Some files were not shown because too many files have changed in this diff Show More