1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00
Commit Graph

287 Commits

Author SHA1 Message Date
lealem47
9247ce1bb9 wolfCrypt as crypto backend for VeraCrypt (#1227)
* wolfCrypt as crypto backend for VeraCrypt

* Refactor to use EncryptionModeWolfCryptXTS class
2023-11-13 00:51:31 +01:00
Mounir IDRASSI
bfd1abcabb Windows: Don't close Setup when exiting VeraCrypt process through system tray Exit menu 2023-10-11 22:09:09 +02:00
Mounir IDRASSI
c91e5792ef Windows: Modified implementation for Secure Desktop handling to overcome Windows 11 issues
We use only alphanumeric characters for the name in addition to the '_' character
We ensure the random desktop name doesn't already exist
We create the random desktop on the Secure Desktop thread and we look over SwitchDesktop until it works.
We call SetThreadDesktop (hOriginalDesk) in main thread once we finish
2023-10-08 01:55:07 +02:00
Mounir IDRASSI
42857b4930 Update various copyright dates 2023-10-05 09:07:35 +02:00
Mounir IDRASSI
662b8d1b2f Windows: during Setup, and if VeraCrypt already installed, open online help only if PC connected to Internet 2023-09-26 01:22:24 +02:00
Mounir IDRASSI
937c5cd5cd Windows: always open online help in case of Setup because local help may be outdated 2023-09-24 01:41:35 +02:00
Mounir IDRASSI
76c64d49ea Windows: Add tooltip message and help button for new option to disable memory protection
Also a dedicated page in the documentation was added for it.
2023-09-24 01:26:02 +02:00
Mounir IDRASSI
81c87a8f0b Windows: Load Riched20.dll to use RichEdit control. Use InitCommonControlsEx instead of InitCommonControls 2023-09-21 22:42:35 +02:00
Mounir IDRASSI
6c7e055f3f Windows: use separate name for SetProcessMitigationPolicy function point. Remove unneeded boolean 2023-09-21 01:16:11 +02:00
Mounir IDRASSI
0f3ae268a4 Windows: Add setting in main UI and setup wizard to disable memory protection
This can be useful for users who need Accessibility software that may not work when memory protection is active in VeraCrypt
2023-09-20 09:39:22 +02:00
Mounir IDRASSI
b1657e88e4 Windows Security: make memory protection enabled by default. Add process mitigation (ASLR, Dynamic code, extension points)
Memory protection can be disabled using registry value "VeraCryptEnableMemoryProtection" under the key "HKLM\SYSTEM\CurrentControlSet\Services\veracrypt"
2023-09-18 00:13:52 +02:00
Mounir IDRASSI
d2f2defca9 Windows: replace CoInitialize calls with CoInitializeEx 2023-09-11 00:03:28 +02:00
Mounir IDRASSI
f15052e68d Windows: Add link in keyfiles dialog to documentation page for risks of third-party file extensions usage. 2023-09-08 09:38:51 +02:00
Mounir IDRASSI
2a6726b00e Windows: Replace legacy file/dir selection APIs with modern IFileDialog interface
We remove usage of GetOpenFileNameW/GetSaveFileNameW/SHBrowseForFolderW which are deprecated by Microsoft
2023-09-03 23:42:41 +02:00
Mounir IDRASSI
201d09ff5a Windows: remove legacy code (XP, Vista). Simplify code since Windows 7 is now minimal OS version. 2023-09-03 16:47:41 +02:00
Mounir IDRASSI
d68b9546bd Windows: simpler and more robust safe dll loading combined with delay loading thanks to Windows 7 being minimum supported version.
We also block execution on Windows versions older than Windows 7.
A lot of code was removed thanks to this.
2023-09-03 00:58:34 +02:00
Mounir IDRASSI
f84d235cf1 Windows: Implement support for mounting partially encrypted system partitions
For now, we force ReadOnly mounting for such partitions.
2023-08-13 22:50:37 +02:00
Mounir IDRASSI
8c7962bda7 Windows: Better way to enable required privileges for FastCreate Options
If we can set required privilege, we ask the user using UAC to enable them.
2023-08-13 00:56:49 +02:00
Mounir IDRASSI
c15b84b32d Windows: Fix failure creating Traveler Disk caused by outdated hardcoded value of MS certificate
We also rename the variables gpbSha256CodeSignCertFingerprint and gpbSha256MSCodeSignCertFingerprint to gpbSha512CodeSignCertFingerprint and gpbSha512MSCodeSignCertFingerprint respectively to reflect the fact that they are actually SHA512 hash values and not SHA256 ones.
2023-08-10 01:23:24 +02:00
Mounir IDRASSI
e8f83544ea Windows: Fix false positive detection of new device insertion when clear keys option is enable
When this option is enabled, we first build the list of currently inserted devices then we start listening to insertion events.
When a device insertion occurs, we check if this device is on our list and if yes, we ignore its insertion.
We also ignore devices whose Device ID starts with "SWD\" and "ROOT\" since these are not real devices.
2023-08-05 00:45:39 +02:00
Mounir IDRASSI
3f976c24d2 Linux/macOS: Remove TrueCrypt support 2023-07-24 08:48:52 +02:00
Mounir IDRASSI
fa6359d424 Windows: Remove TrueCrypt support. Increment version to 1.26.4. 2023-07-22 10:25:22 +02:00
Mounir IDRASSI
34b00fa825 Windows: Fix compiler warnings 2023-07-18 08:38:02 +02:00
Mounir IDRASSI
c0785aa1d4 Windows: Fix buffer overrun caused by bug in UpperCaseCopy function 2023-07-17 14:28:45 +02:00
Mounir IDRASSI
7ada94d36b Windows: enhance secure desktop handling to try to workaround Windows 11 issue
Several enhancements implemented:
 - replace CreateThread by _beginthreadex to avoid potential issues when using C runtime
 - use an event to notify monitoring thread to stop instead of a volatile boolean
 - perform switch to the regular desktop in the main thread and not in the secure desktop thread
2023-07-15 02:59:13 +02:00
Mounir IDRASSI
0e49b7bc33 Windows: Fix regression when creating multiple keyfiles with a fixed size 2023-07-02 22:36:33 +02:00
Mounir IDRASSI
a388262a2e Windows: fix compilation warnings 2023-07-01 15:17:24 +02:00
Mounir IDRASSI
034b64f415 EMV keyfile support: Overall code improvements and bug fixes 2023-06-29 00:06:20 +02:00
mmauv
502ab9112a Add EMV functionality (#1080)
* Add basic strcture needed for EMV implementation

* Add demo EMV functionality with C code pasted in a very dirty and unsafe way. NOT FINAL

* Refactor IccExtractor Structure

* Fix Makefile

* fix include file

* move global variables from h to c

* revert to memcpy

* fix icc data recovery functions

* Add EMV functionalities on windows

* Make EMVToken structures like SecurityToken

* Define constants instead of hard coded values

* Token structures created with inheritance

* refactor TokenKeyfile to use inherit. + polymor.

* add Token.h + Token.cpp in modules in VS2010

* Add a comment at each use of SecurityToken class or objects

* SecurityTokenKeyfilesDialog preparation

* Implemennt GetAvailableTokens in Token class on windows

* merge

* up (patching for Windows)

* foreach Token.cpp corrected

* Display EMV keyfiles on first window in graphic interface

* Add token to Windows UI

* EMVToken selection on OKButton on Linux

* Keyfile.cpp optimization

* Move getKeyfileData in the token class

* EMV::Token GetAvailableKeyfiles() base

* Move getKeyfileData in the token class on unix

* Remove test comments

* Warnings resolved

* RemoveeSecurityTokenLibraryNotInitialized exception if at least one emv token is detected

* Adding new files

* Remove old files and add the new version to the windows project

* Change make_shared to shared_ptr constructor

* IccExtractor integration working on linux

* Throwing card not EMV execption

* catch error when not EMV type in EMVToken::GetAvailableKeyfiles

* Change types to compile on windows

* list all keyfiles, security keyfiles and emv keyfiles in command line

* Change type to be coherent and remove old todo comments

* Remove todo comments

* Change indentation and resolve a bug from previous commit

* Use polymorphism for GetKeyfileData and add export option for EMVTokens on Linux

* Linux : Allow to export EMV Tokens in command lines, Windows : Disable the delete button when EMV Keyfiles are selected

* Remove SlotId from TokenInfo as it is already in Token

* Correct errors on Linux

* Disable delete option if one EMV Token is selected on Linux

* Fix bug enabling delete button if nothing is selected

* emv data used as reference then burnt

* use of normal files in linux corrected

* help updated

* help updated for export functionnality

* option EMV added to graphic interface but not yet working

* Bug fix : Allow to use multiple EMV on windows

* EMV Option added to UserPreferences

* EMV Option working for Linux

* EMV option added to Windows (not working yet)

* [NOT TESTED] EMV option for Windows

* Working EMV option on Windows

* EMV Option for data extraction working for volume creation

* EMV Option for data extraction working for Mount

* EMV Option for data extraction working for mounting favorites volumes

* EMV Option for extraction working for Changing volume password, Set Derivation Key Algorithm and Add or remove keyfile from volume

* Windows : re-checking EMV Option when getting data

* Removing error catches in the IccDataExtractor classe (It only throws error now). Changing GetPan signature to resemble the other functions signatures more

* Changing EMV errors

- Only throwing ICCExtractionException from outside of the ICC module.
- Catching all TLVExceptions and PCSCExceptions to throw the right ICCExtractionException

- Deleting APDU exceptions.

* First version of the documentation

* Adding function pointers for winscard library (but it crashes VeraCrypt)

* Debugging function pointers

* The import of the library on windows work as expected now

* Reverting EMVToken.cpp changes used to test to library import

* Searching for the System32 path instead of hard codding it

* Fixing the bug were VeraCrypt crashes if there is no readers when  "add Token files" is clicked

* Winscard library not initialized in object constructor anymore to delay it after EMVOption check

* Remove winscard lib from windows dependencies

* Properly displaying errors

* Adding a dot in Language.xml

* Catching TLVException

* Removing unused code

* Remove unusefull comments

* Trying to fix 0x1f error

* Update IccDataExtractor.cpp

* Delete History.xml

* Fix get data without get pan

* Cleanup code

* changes for linux compilation but linking not working

* error handling for linux

* erasing emv data

* Burn PAN

* Burn PAN from memory

* Uncomment selfcheck before merging master

* burn corrected

* EMV errors handling for Linux

* EMV working for Linux CLI

* Doc : Winscard Linux package and VeraCrypt versions

---------

Co-authored-by: doriandu45 <d45.poubelle@gmail.com>
Co-authored-by: red4game <redemgaiming@gmail.com>
Co-authored-by: Brice.Namy <brice.namy@insa-rennes.fr>
Co-authored-by: vocthor <pieceo108@gmail.com>
Co-authored-by: vocthor <67202139+vocthor@users.noreply.github.com>
Co-authored-by: Andrei COCAN <andrei.cocan@insa-rennes.fr>
Co-authored-by: AndreiCocan <95496161+AndreiCocan@users.noreply.github.com>
Co-authored-by: francoisLEROUX <francois3443@gmail.com>
2023-06-28 22:51:43 +02:00
Mounir IDRASSI
0e4f1ecee3 Windows: Make SetPrivilege return error if AdjustTokenPrivileges cannot adjust privileges 2023-06-23 00:32:24 +02:00
Mounir IDRASSI
fbb1d18034 Windows: Allow selecting size unit (KB/MB/GB) for generated keyfiles
This change also makes it possible to generate keyfiles larger than 1 MiB although only the first 1 MiB will be taken into account by VeraCrypt.
Update strings in XML files
2023-06-20 23:15:46 +02:00
Mounir IDRASSI
5ced64881c Update copyright on various files 2023-06-06 00:03:12 +02:00
Mounir IDRASSI
5e4e2e0483 Windows: Add dropdown menu to Mount button to allow mounting without cache 2023-06-02 09:39:14 +02:00
Mounir IDRASSI
44c9c077f3 Revert "New sys enc wizard (#957)"
This reverts commit c0ff7a7c52.
2022-12-11 13:01:14 +01:00
Felix Reichmann
c0ff7a7c52 New sys enc wizard (#957)
* New VeraCrypt interface (for system encryption) with improved usability

* System Encryption: translate password to US keyboard layout + improved new interface

* Windows: Fix build error following merge

* Windows: Remove unused variable

* Windows: Add missing string in Language.xml

* Windows: fix buffer overrun caused by wrong use of wmemset

* Do not delete password file

Since the file is only available in \Release\Setup Files\ it would be fully deleted after running this script the first time.

* Correct return code

Originally the function would have always returned the return-code 1 resulting that the user is not able to change the location for the rescue zip.

* Added hint for sysenc

Added a hint why the field for repeating the password is initially greyed out within the system encryption.

* Corrected spelling mistake

Corrected spelling mistake

* Removed not working copy job

The file to be copied was stored at the source location. Therefore the copyjob will not work. Instead the file is already in the target folder.

* Removed RIPEMD-160 from Product64.wxs

See commit from 21.03.2022

* Added german translation for new interface

* Fixed PIM bug

* Corrected translation file based on the guidelines within the pull request

* Fixing merge conflicts

* Fixed Compiling issues. Reverted keyboard translation

* Removed artifacts of password translation

* Corrected language.xml

* Fixed order within german language file

* Corrected positions

Co-authored-by: Bruna2803 <bruna.radeljak@hotmail.com>
Co-authored-by: felixreichmann <30237956+felixreichmann@users.noreply.github.com>
Co-authored-by: Mounir IDRASSI <mounir.idrassi@idrix.fr>
2022-08-25 09:46:58 +02:00
Wendigo
46ecb1a66d Minor bugfixes (#950)
* Update Dlgcode.c

minor bugfixes

* GlobalMemoryStatus x64 bugfix

GlobalMemoryStatus deprecated in x64
2022-08-25 08:57:34 +02:00
Mounir IDRASSI
762065917f Windows: Add various checks to address Coverity reported issues. 2022-03-26 21:15:11 +01:00
Mounir IDRASSI
36795a688f Implement support of Blake2s-256 hash algorithm and remove deprecated algorithms RIPEMD-160 and GOST89. 2022-03-08 00:29:26 +01:00
Mounir IDRASSI
b1ae5f4740 Update copyrights following integration of LZMA SDK 2022-02-11 00:37:25 +01:00
Mounir IDRASSI
302dc37fb9 Windows: Make Travel Disk contains 32-bit and arm64 binaries when VeraCrypt installed using MSI 2022-02-10 01:20:25 +01:00
Mounir IDRASSI
5c319dec94 Windows: Fix failure to verify driver file signature since it is signed by Microsoft not us.
This caused a failure when creating Traveler Disk
2022-02-02 01:55:23 +01:00
Mounir IDRASSI
9b88625d97 Windows: Make MSI installer compatible with System Encryption by leveraging VeraCrypt service capabilities 2022-02-01 23:32:55 +01:00
Mounir IDRASSI
8ad93e6648 Windows: Fix wrong check on IUnknown_QueryService function pointer 2022-01-30 17:25:09 +01:00
Mounir IDRASSI
87efa35c38 Windows: Enhancement to CVE-2019-19501 fix to using IShellDispatch2::ShellExecuteW if RunAsDesktopUser fails. Also we don't use the fix if UAC is disabled since in this case the Shell Explorer.exe will be elevated anyway so we can't use to reduce elevation. 2022-01-30 16:48:49 +01:00
Mounir IDRASSI
897b676e61 Windows: Update IDRIX SHA-256 code signing certificate to latest one 2022-01-07 00:35:31 +01:00
Mounir IDRASSI
88e4a6cb0d Windows: Restore support of Windows 7, 8/8.1 by using single attestation signature for driver and add checks on needed KBs for Windows Vista and Windows 7. Add signed driver files.
- Windows 7 needs KB3033929 or KB4474419
 - Windows Vista needs KB4039648 or KB4474419
2022-01-02 21:52:39 +01:00
Mounir IDRASSI
ce733d547e Update copyright year to 2022 2022-01-02 21:52:23 +01:00
Mounir IDRASSI
a21b2270e8 Windows: Implement TESTSIGNING build configuration that allows running under Windows Vista,7, 8 and 8.1. 2021-12-04 23:59:01 +01:00
Mounir IDRASSI
5f5b8a15fc Windows: Restrict supported Windows versions to XP, 10 and 11 because of new requirement on driver code signing.
For now, we are not able to put in place HCK/WLK certification of VeraCrypt driver that is needed for Windows 7, 8 and 8.1.
2021-11-21 21:44:51 +01:00
Mounir IDRASSI
4dc3d9c1a7 Windows: Implement a new way to detect Windows version to overcome MSI limitation 2021-09-02 00:19:57 +02:00