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

308 Commits

Author SHA1 Message Date
Mounir IDRASSI
3c17b8ced2 Windows: Add support for Argon2id as an alternative to PBKDF2 key derivation 2025-06-25 15:44:31 +09:00
Mounir IDRASSI
08c813efd6 Increment version to 1.26.24. Update Release Notes and Windows drivers. 2025-05-29 18:10:59 +09:00
Mounir IDRASSI
e68c98ab6b Increment version to 1.26.3. Update Release Notes and signed drivers 2025-05-28 19:28:32 +09:00
Mounir IDRASSI
4b46d992da Increment version to 1.26.22. Update Release Notes. Update signed drivers. 2025-05-25 09:49:49 +09:00
Mounir IDRASSI
44a9f8bcff Remove SM4 support! 2025-05-18 18:31:39 +09:00
Mounir IDRASSI
cf5a0ad003 Update Release Notes.html and release date. 2025-05-16 15:41:10 +09:00
Mounir IDRASSI
acac37b5b7 Update Release Notes and CHM. Set release date and update signed Windows drivers. 2025-05-12 10:21:58 +09:00
Mounir IDRASSI
b673901503 Move copyright and links to "AM Crypo", amcrypto.jp and veracrypt.jp 2025-05-11 16:02:20 +09:00
Mounir IDRASSI
bbc9fbf175 Increment version to 1.26.21 2025-05-04 03:43:45 +09:00
Mounir IDRASSI
7924f06e39 Initial support of SM4 cipher for normal volumes 2025-05-04 02:27:05 +09:00
Bernard Ladenthin
5eb358ca18 Refactor: Use symbolic constants for volume header magic numbers (#1525)
Replaced hardcoded 0x56455241 ('VERA') with TC_HEADER_MAGIC for better readability and maintainability.
Also replaced 0x5645524142455854 with TC_BOOT_DRIVE_FILTER_EXTENSION_MAGIC and added 'ULL' suffix for 64-bit safety.
2025-04-21 11:24:02 +02:00
Mounir IDRASSI
2180020cee Windows driver: Fix regression that always allowed defragmentation and caused other side effects
Now we properly honor the AllowDefrag configuration.

This regression introduced other issues because, in order to allow defragmentation, we must provide Windows with an actual physical disk number. As a result, we assign the number of the physical disk where the VeraCrypt volume resides. This, in turn, causes Windows to send IOCTLs directly to this disk instead of to VeraCrypt. If these IOCTLs return values and properties not supported by VeraCrypt, inconsistencies arise, leading to failures.
2025-02-04 00:02:08 +01:00
Mounir IDRASSI
e73ea7193e Widnows driver: use correct value for HiddenSectors field in structures to match read MBR disks 2025-02-03 23:48:51 +01:00
Mounir IDRASSI
55563ffe42 Increment version to 1.26.20. Update Release Notes. 2025-02-03 17:52:19 +01:00
Mounir IDRASSI
c69ba240c4 Complete replacement of Dismount references by Unmount in various files 2025-02-02 23:37:36 +01:00
Helmut K. C. Tessarek
498dff9013 refactor: use the term unmount instead of dismount (#1478)
* refactor: use UNMOUNT instead of DISMOUNT in code

This change updates the term DISMOUNT in constants to UNMOUNT.
Other occurrences (e.g. variable names) are left alone for now.

* refactor(ui): use unmount instead of dismount

This change updates the GUI text and replaces dismount with unmount.

* docs: update term dismount -> unmount

* refactor(cmdline): add unmount

This change adds an argument 'unmount' for command line usage, while
trying to deprecate the old disnount argument.
The current dismount argument/flag will still work to not introduce
a breaking change.

* docs: mention that /dismount is deprecated

This change fixes the shorthand version of the argument /unmount
It also adds back the info for /dismount and that it is deprecated.
2025-01-31 23:18:26 +01:00
Mounir IDRASSI
247c98d954 Implement SHA256 acceleration on ARM64 platforms using CPU instructions 2025-01-26 16:21:13 +01:00
Mounir IDRASSI
16aa1a7be0 Increment version to 1.26.19. Update Release Notes. 2025-01-22 18:37:46 +01:00
Mounir IDRASSI
ff63e5aad0 Update Release Notes. Set version to 1.26.18. Update signed Windows drivers. 2025-01-17 07:44:09 +01:00
Mounir IDRASSI
54bd819990 Windows/Linux/macOS: implement AES hardware support on ARM64 (ARMv8) 2025-01-17 00:58:54 +01:00
Mounir IDRASSI
1b35abb191 Increment version to 1.26.18. Update copyright date. Update Release Notes. Update Windows drivers. 2025-01-14 12:26:28 +01:00
Mounir IDRASSI
f3af65b007 Windows driver: Use IO_DISK_INCREMENT for event signaling in IRP completion routine
This provides a slight priority boost for waiting threads and maintains standard practice for disk device drivers.
2024-12-25 17:58:12 +01:00
Mounir IDRASSI
81f0adcc35 Windows Driver: set Windows 10 version 1809 as minimum.
To support this, we had to replace ExAllocatePool2 by ExAllocatePoolUninitialized.
2024-12-25 16:18:19 +01:00
Mounir IDRASSI
283059523d Windows Driver: make UpdateBuffer function more robust by adding security region size parameter 2024-12-25 16:09:10 +01:00
Mounir IDRASSI
3bb5184645 Windows: Increment version to 1.26.17.2. Update signed drivers. 2024-11-27 01:05:55 +01:00
Mounir IDRASSI
7e398c96d0 Windows: don't test sign driver by default in Release mode. 2024-11-25 00:15:47 +01:00
Mounir IDRASSI
53bbee3a7c Windows Driver: Set version to 1.26.17.1. Update signed drivers. 2024-11-24 11:26:41 +01:00
Mounir IDRASSI
453ff2880e Windows Driver: Make max work items count configurable. Increase default to 1024. Queue write IRPs.
- Made the maximum work items count configurable to allow flexibility based on system needs.
  - Increased the default value of max work items count to 1024 to better handle high-throughput scenarios.
  - Queue write IRPs in system worker thread to avoid potential deadlocks in write scenarios.
2024-11-23 17:44:48 +01:00
Mounir IDRASSI
5a85c54c6e Windows Driver: Optimize spinlock usage in CompleteIrpWorkItemRoutine
Reduce the critical section protected by spinlock to only cover the list manipulation operation. Move the ActiveWorkItems counter decrement outside the spinlock using InterlockedDecrement, and separate event signaling from the locked section.
This change minimizes time spent at raised IRQL (DISPATCH_LEVEL) and reduces potential for lock contention.
2024-11-22 15:19:10 +01:00
Mounir IDRASSI
b85a2df224 Windows driver: use correct WDM type. Increment version to 1.26.17 2024-11-20 00:21:30 +01:00
Mounir IDRASSI
f9b9a9ca9f Increment version to 1.26.16. Update Release Notes. Update signed Windows drivers. 2024-11-18 00:04:26 +01:00
Mounir IDRASSI
93868acfdd Windows Driver: Use system functions directly instead of dynamic loading since we are targeting Windows 10 2024-11-17 21:37:16 +01:00
Mounir IDRASSI
42fdbcf3ce Windows Driver: Fix deadlock in EncryptedIoQueue due to re-entrant IRP completions
There was a deadlock issue in the driver caused by the CompletionThreadProc function in EncryptedIoQueue.c:
https://sourceforge.net/p/veracrypt/discussion/general/thread/f6e7f623d0/?page=20&limit=25#8362

The driver uses a single thread (CompletionThreadProc) to process IRP completions. When IoCompleteRequest is called within this thread, it can result in new IRPs being generated (e.g., for pagefile operations) that are intercepted by the driver and queued back into the CompletionThreadQueue. Since CompletionThreadProc is the only thread processing this queue and is waiting on IoCompleteRequest, these new IRPs are not handled, leading to a system freeze.

To resolve this issue, the following changes have been made:

Deferred IRP Completion Using Pre-allocated Work Items:
  - Introduced a pool of pre-allocated work items (COMPLETE_IRP_WORK_ITEM) to handle IRP completions without causing additional resource allocations that could trigger new IRPs.
  - The CompletionThreadProc now queues IRP completions to these work items, which are processed in a different context using IoQueueWorkItem, preventing re-entrant IRPs from blocking the completion thread.

Thread-Safe Work Item Pool Management:
  - Implemented a thread-safe mechanism using a semaphore (WorkItemSemaphore), spin lock (WorkItemLock), and a free list (FreeWorkItemsList) to manage the pool of work items.
  - Threads acquire and release work items safely, and if all work items are busy, threads wait until one becomes available.

Reference Counting and Improved Stop Handling:
  - Added an ActiveWorkItems counter to track the number of active work items.
  - Modified EncryptedIoQueueStop to wait for all active work items to complete before proceeding with cleanup, ensuring a clean shutdown.

These changes address the deadlock issue by preventing CompletionThreadProc from being blocked by re-entrant IRPs generated during IoCompleteRequest. By deferring IRP completion to a different context using pre-allocated work items and managing resources properly, we avoid the deadlock and ensure that all IRPs are processed correctly.
2024-11-17 19:39:58 +01:00
Mounir IDRASSI
b7f6270c0d Windows Driver: Add Unicode define to build and enhance tracing in debug mode 2024-11-16 18:33:28 +01:00
Mounir IDRASSI
9c9870b103 Windows: Avoid modifying BootArguments structure and use __unaligned keyword to inform compiler that pointer is unaligned.
This avoids issues with existing bootloaders
2024-11-16 01:50:06 +01:00
Mounir IDRASSI
c86577fc0e Windows: remove 32-bit logic from the code since we support only 64-bit. remove 32-bit EFI bootloader files.
We also fix intermediary files folder for Portable and Setup projects
2024-11-16 01:05:15 +01:00
Mounir IDRASSI
62e956942a Windows: remove VS 2019 solution and project files since we migrated to VS 2022. 2024-11-15 18:36:19 +01:00
Mounir IDRASSI
6d1ad12755 Windows: move main project files and solution from VS 2010 to VS 2022. Delete unused files. 2024-11-15 15:50:32 +01:00
Mounir IDRASSI
214fbb5cbd Windows: Upgrade VS 2019 solution/projects to VS 2022. Remove Win32 configuration for driver and binaries.
Only setup remains 32-bit to be compatible with both x64 and arm64 Windows.
2024-11-15 14:22:45 +01:00
Mounir IDRASSI
cb97351250 Windows: Remove support for 32-bit driver code. Set build target as Windows 10. Simplify code and fix all warnings in driver. 2024-11-13 02:08:51 +01:00
Mounir IDRASSI
04c747fb2d Add support for SHA-256 x86 instrinsic for enhance performance of PBKDF2-HMAC-SHA256 2024-11-10 21:08:00 +01:00
Mounir IDRASSI
4a8f068ba5 Windows: Add support for x86 and x64 build for driver and binaries using Visual Studio 2019
We also enable Control Flow Guard and Spectre Mitigation
2024-09-08 17:14:31 +02:00
Mounir IDRASSI
86bc9b56f0 Increment version to 1.26.13. Update release notes. Update signed Windows drivers. 2024-08-02 00:55:32 +02:00
Mounir IDRASSI
ed1263bf8c Implement detection of volumes with vulnerable XTS master key.
If vulnerability detected, a warning message is displayed during mount or backup/restore header, and changing the password is disallowed since it will not change the master key.
2024-08-02 00:20:53 +02:00
Mounir IDRASSI
0ea32b02b9 MacOSX: Fix compiler warning
Update friend declaration in FuseService.h and refactor GetCharWidth to ComputeCharWidth in WaitDialog.h to avoif hiding GetCharWidth inherited from wxWindow
2024-06-23 22:43:14 +02:00
Mounir IDRASSI
edde1d45f6 MacOSX: Add for using FUSE-T instead of MacFUSE
The build script build_veracrypt_macosx.h now accepts the argument -f to enable fuse-t support.
It is also possible to set the environment variable VC_OSX_FUSET to 1 for FUSE-T support.
A change was done in CoreUnix::GetMountedVolumes to add a waiting loop  for control file to be accessible because when using FUSE-T there always a delay before control file can be serialized.
2024-06-22 01:13:20 +02:00
Mounir IDRASSI
455a4f2176 Avoid conflict with C++17 features std::byte by using uint8 type instead of byte 2024-06-12 12:30:04 +02:00
Mounir IDRASSI
7e7d776338 Increment version to 1.26.10. Update signed Windows drivers. 2023-11-09 00:09:00 +01:00
Mounir IDRASSI
1688779bc3 Windows: Fix failure to format some disks (e.g. VHDX) caused by partition offset not 4K aligned
Now we set offset to 1MB which is a typical values used for MBR disks.
We also use a more standard way to calculate legacy number of cylinders
2023-11-08 22:43:18 +01:00
Mounir IDRASSI
4cfb4b03a7 Increment version to 1.26.9 2023-10-11 23:59:02 +02:00