Mounir IDRASSI
9dc24ba7d0
Windows: speedup PRF autodetection mode by implementing abort mechanism in PBKDF2/Argon2 primitives
2025-06-29 21:44:32 +09:00
Mounir IDRASSI
7924f06e39
Initial support of SM4 cipher for normal volumes
2025-05-04 02:27:05 +09:00
Mounir IDRASSI
247c98d954
Implement SHA256 acceleration on ARM64 platforms using CPU instructions
2025-01-26 16:21:13 +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
04c747fb2d
Add support for SHA-256 x86 instrinsic for enhance performance of PBKDF2-HMAC-SHA256
2024-11-10 21:08:00 +01:00
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
kovalev0
5a6b445f0e
fix warnings and UB ( #1164 )
...
* Crypto: fix warning mismatched bound
../Crypto/cpu.c:67:32: warning: argument 2 of type 'uint32[4]'
{aka 'unsigned int[4]'} with mismatched bound [-Warray-parameter=]
67 | int CpuId(uint32 input, uint32 output[4])
| ~~~~~~~^~~~~~~~~
In file included from ../Crypto/cpu.c:3:
../Crypto/cpu.h:236:33: note: previously declared as 'uint32 *'
{aka 'unsigned int *'}
236 | int CpuId(uint32 input, uint32 *output);
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org >
* Core/Unix: fix warning ignoring return value
Unix/CoreUnix.cpp: In member function 'virtual std::shared_ptr<VeraCrypt:\
:VolumeInfo> VeraCrypt::CoreUnix::MountVolume(VeraCrypt::MountOptions&)':
Unix/CoreUnix.cpp:682:55: warning: ignoring return value of
'int chown(const char*, __uid_t, __gid_t)' declared with attribute
'warn_unused_result' [-Wunused-result]
682 | chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId());
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org >
* Main/Forms: fix warning cast to pointer from integer of different size
Forms/MainFrame.cpp: In member function 'void VeraCrypt::MainFrame:\
:UpdateVolumeList()':
Forms/MainFrame.cpp:1718:106: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
1718 | Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex,
fields, 0, (void *) volume->SlotNumber);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Forms/MainFrame.cpp:1753:114: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
1753 | Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex,
fields, 0, (void *) slotNumber);
| ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org >
* Crypto: fix undefined behavior signed integer overflow
In function 'twofish_set_key':
cc1: warning: iteration 4 invokes undefined behavior
[-Waggressive-loop-optimizations]
../Crypto/Twofish.c:626:23: note: within this loop
626 | for (i = 0; i != 40; i += 2)
| ~~^~~~~
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org >
---------
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org >
Co-authored-by: Vasiliy Kovalev <kovalev@altlinux.org >
2023-08-04 23:49:11 +02:00
Mounir IDRASSI
4cc203e7b3
Crypto: Fix detection of SSSE3 intrinsics in compiler
...
We use correct define CRYPTOPP_BOOL_SSSE3_INTRINSICS_AVAILABLE
2023-06-13 23:26:02 +02: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
d417b2806c
Linux/FreeBSD: Enable building without AESNI support by setting environment variable DISABLE_AESNI to 1 during build or passing NOAESNI=1 to make command
...
This comes following Github issue #892 and which should be solved thanks to this.
2022-02-13 18:42:27 +01:00
Mounir IDRASSI
d448713e61
MacOSX: Make AESNI availability linked to compiler target and not compilation host
2021-08-16 00:26:37 +02:00
Mounir IDRASSI
9881744c95
Windows: Add support for ARM64 platform (e.g. Microsoft Surface Pro X). System encryption still not implemented on ARM64
2021-01-02 01:16:31 +01:00
El Mostafa Idrassi
9a895bedde
Fix "error "SSSE3 instruction set not enabled" when compiling using GCC version < 4.9 without -mssse3 option (SSSE3=1 when using make). ( #507 )
...
Compiling with -mxxx defines the corresponding macro of the intrinsics.
For example, -mssse3 defines __SSSE3__ macro to 1.
In GCC versions < 4.9, it is not possible to use and call x86 intrinsics only at runtime without
compiling the entire file with the -mxxx option.
For example, if we want to call SSSE3 intrinsics without compiling with -mssse3, the macro __SSSE3__ is not defined.
Therefore, when including <tmmintrin.h>, this results in "error "SSSE3 instruction set not enabled"" because of :
#ifndef __SSSE3__
# error "SSSE3 instruction set not enabled"
Since GCC 4.9, this has been fixed and it is possible to call x86 intrinsics from select functions in a file
that are tagged with the corresponding target attribute without having to compile the entire file with the -mxxx option.
This can be seen in <tmmintrin.h> which in recent versions (>= 4.9) contains :
#ifndef __SSSE3__
#pragma GCC push_options
#pragma GCC target("ssse3")
#define __DISABLE_SSSE3__
Since SSSE3 is only used under Windows for ChaCha256, this can be fixed by preceding '#include <tmmintrin.h>' with
#if defined (_MSC_VER) && !defined (TC_WINDOWS_BOOT).
See https://gcc.gnu.org/gcc-4.9/changes.html
2019-10-04 14:07:10 +02:00
Mounir IDRASSI
2ab57bcf70
Windows: fix compilation error of legacy MBR bootloader caused by missing intrin.h header
2019-08-26 00:50:25 +02:00
Mounir IDRASSI
08a8a0ce30
Linux: Fix compilation error caused by wrong include of "intrin.h"
2019-03-21 18:52:14 +01:00
Mounir IDRASSI
86f0fde6e7
Windows: Use Hardware RNG based on CPU timing jitter "Jitterentropy" by Stephan Mueller as a good alternative to RDRAND ( http://www.chronox.de/jent.html , smueller@chronox.de)
2019-02-12 19:06:14 +01:00
Mounir IDRASSI
ba5da0946c
Windows: Add implementation of ChaCha20 based random generator. Use it for driver need of random bytes (currently only wipe bytes but more to come later).
2019-02-08 01:50:12 +01:00
Mounir IDRASSI
915855f43b
Fix detection of CPU features AVX2 & BMI2. Add detection of RDRAND & RDSEED CPU features. Detect Hygon CPU as AMD one.
2019-02-01 00:35:42 +01:00
Mounir IDRASSI
f02882ce60
Help compiler optimize some crypto code on 64-bit build since x64 capable CPUs always support SSE and SSE2
2019-01-30 00:46:10 +01:00
Mounir IDRASSI
88cc8a00f4
Windows: correctly handle SEH exceptions during self-tests in order to disable CPU extended features in such case.
2017-07-04 12:28:17 +02:00
Mounir IDRASSI
70097ecfe5
Crypto: Add optimized Camellia assembly implementation for x86_64 based on work by Jussi Kivilinna ( https://github.com/jkivilin/supercop-blockciphers ). This improve speed by a factor of 2.5 when AES-NI supported by CPU and by 30% if AES-NI not supported.
2017-06-21 01:39:55 +02:00
Mounir IDRASSI
c0f46187de
Fix build error in Crypto/Whirpool.c when using LLVM Clang compiler by disabling inline assembly in this case (caused by http://llvm.org/bugs/show_bug.cgi?id=24232 )
2017-01-12 18:13:24 +01:00
Mounir IDRASSI
15b6c7d3b7
Implement detection of new CPU features: AVX2 and BMI2
2016-10-17 18:40:33 +02:00
Mounir IDRASSI
e5a9e9239b
Crypto: Use SIMD optimized Serpent implementation from Botan. 2.5x speed gain factor. Update credits and copyrights notice.
2016-10-17 18:40:23 +02:00
Alex
246233c402
Windows EFI Bootloader: modifications to prepare EFI system encryption support (common files with DcsBoot)
2016-08-15 01:09:12 +02:00
Mounir IDRASSI
c5b766969a
Windows:solve compilation error under VC++ 2008 by using extern "C" only when needed.
2016-06-20 12:10:08 +02:00
Mounir IDRASSI
e4efd6820a
Windows Driver: add declaration of missing intrinsic _mm_setr_epi32 (to be used by upcoming implementation)
2016-06-18 01:44:48 +02:00
Mounir IDRASSI
6ae982cccf
Update intrinsic support and cpu detection.
2016-06-17 15:50:46 +02:00
David Foerster
11716ed2da
Remove trailing whitespace
2016-05-10 22:18:34 +02:00
David Foerster
fc37cc4a02
Normalize all line terminators
2016-05-10 20:20:14 +02:00
David Foerster
0c51cfa5f6
Reset bogus executable permissions
2016-05-01 23:29:43 +02:00
Mounir IDRASSI
87df2fd2fc
Crypto: update Whirlpool implementation using latest code from Crypto++.
2016-02-21 10:59:13 +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