Mounir IDRASSI
d2efeaffe7
Correctly detect ARM builds when listing CPU features in headers
2023-06-30 00:34:16 +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
40caafdb1b
Windows: Add missing Blake2s source files to VS 2019 crypto project
2023-05-26 00:36:05 +02:00
Matteo Baccan
53b4019d1f
Fixed a typo error ( #929 )
...
Hi
I have fixed a little typo error: a double semicolon at the end of one line
ciao
matteo
2022-08-21 17:56:31 +02:00
Mounir IDRASSI
762065917f
Windows: Add various checks to address Coverity reported issues.
2022-03-26 21:15:11 +01:00
Mounir IDRASSI
05fd14006d
Remove dead code from chacha_ECRYPT_encrypt_bytes (Coverity)
2022-03-26 21:14:57 +01:00
Mounir IDRASSI
a239789317
Add missing Blake2s source files
2022-03-21 01:18:55 +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
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
fb1a4893b8
Windows: Fix some VS static analyzed warnings
2021-08-30 00:26:57 +02: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
d3489f4771
Windows: Fix compilation error on ARM64 caused by definition of UINT64_MAX
2021-07-13 22:07:49 +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
Mounir IDRASSI
b48d437c80
Windows Driver: Fix build error using Windows 10 WDK caused by name conflict for KeSaveExtendedProcessorState/KeRestoreExtendedProcessorState functions
2020-12-11 23:42:08 +01:00
Mounir IDRASSI
20e0247471
Crypto: small speed optimization of Streebog and removal of unused macro
2020-12-11 02:11:59 +01:00
Mounir IDRASSI
27a45037df
Remove unused variable in Streebog implementation
2020-07-25 22:52:38 +02:00
Mounir IDRASSI
425e4e7d36
Enable FIPS mode in JitterEntropy random generator in order to let the function jent_read_entropy report failure if any of the continuous statistical tests fail.
2020-07-15 00:01:54 +02:00
Mounir IDRASSI
4137c5e15b
Whirlpool: Remove unused "num" variable affectation in WHIRLPOOL_add
2020-06-26 01:22:10 +02:00
Mounir IDRASSI
7d1724e93b
Crypto: Fix random crash in Streebog in 32-bit, caused by use of aligned SSE2 instructions _mm_load_si128. Now we use _mm_loadu_si128 instead which is not slower than _mm_load_si128 on recent CPUs
2020-06-25 01:32:39 +02:00
Mounir IDRASSI
0e3f4c40e3
Windows: remove duplicated function to detect AES-NI support in CPU
2020-06-19 01:28:07 +02:00
Mounir IDRASSI
31c4fbfc12
Fix wrong check on the define CRYPTOPP_BOOL_X64
2019-12-09 18:59:20 +01:00
Mounir IDRASSI
08593aa7ab
Linux/MacOSX: use x64 optimized SHA256 implementation instead of limiting it to Windows.
2019-12-09 18:10:21 +01:00
Hanno Böck
e6aae8bd71
Add burn calls for temporary ss variable ( #569 )
2019-12-09 17:45:35 +01:00
alt3r 3go
0364a36f84
Linux: fix NOASM compilation ( #563 ) ( #568 )
...
Signed-off-by: alt3r 3go <alt3r.3go@protonmail.com >
2019-12-09 17:43:33 +01:00
Mounir IDRASSI
3818b443c3
Windows: include rdrand.h file only in Windows case since it is not yet included for other OSes
2019-11-09 00:26:21 +01:00
Mounir IDRASSI
dc08b69240
Windows: fix driver build error caused by missing header
2019-11-07 00:47:45 +01:00
Mounir IDRASSI
bd7200e2b5
Linux/MacOSX: Fix build error caused by RDRAND_getBytes/RDSEED_getBytes implemented only on Windows
2019-11-03 15:38:35 +01:00
Mounir IDRASSI
1994520e75
Windows: when building for EFI bootloader, don't make calls to RDRAND/RDSEED functions since we don't link against their implementation in EFI bootloader
2019-11-02 01:00:16 +01:00
Mounir IDRASSI
6252d96b0d
Update Jitterentropy Library to version 2.2.0
2019-10-30 22:05:25 +01:00
Mounir IDRASSI
3565cb1afe
Disable both RDRAND and RDSEED if a failure is detected
2019-10-30 09:09:45 +01:00
Mounir IDRASSI
5ecff99edc
Add check for buggy RDRAND (AMD Ryzen CPU case) even if we always use RDSEED instead of RDRAND when RDSEED is available (which is the case on modern CPUs)
2019-10-30 08:53:03 +01:00
Mounir IDRASSI
7a35ecb154
Windows: use separate assembly files for RDRAND and RDSEED in order to fix a mysterious crash when MASM_RDSEED_GenerateBlock is called after MASM_RDRAND_GenerateBlock.
2019-10-30 08:52:55 +01:00
Mounir IDRASSI
3b5d4771a0
Fix wrong detection of AMD CPUs.
2019-10-29 15:42:43 +01:00
Mounir IDRASSI
afe6b2f45b
Linux: Fix compilation error on non-x86 platform by providing generic implementation for jent_get_nstime function
2019-10-28 23:18:11 +01:00
Mounir IDRASSI
3fa636d477
Linux: Fix compilation error if type __u64 is already defined by gcc
...
This is the case with Mageia Cauldron which has gcc 9.2.1
2019-10-28 18:59:07 +01:00
Mounir IDRASSI
96c90d18c2
Linux/MacOSX: Better approach to avoid that jitterentropy code is optimized by the compiler
2019-10-24 21:07:39 +02:00
Mounir IDRASSI
478066c607
Linux/MacOSX: Add missing JitterEntropy implementation
2019-10-23 22:46:25 +02:00
Mounir IDRASSI
4119521f9e
Linux: Workaround for gcc 4.4.7 bug under CentOS 6 that causes VeraCrypt built under CentOS 6 to crash when Whirlpool hash is used.
2019-10-17 15:00:37 +02: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
Hans-Peter Jansen
0d91dab5b9
Align section types of Whirlpool_C and SHA256_K ( #479 )
...
in order to fix LTO linking.
After switching to LTO for openSUSE Tumbleweed, veracrypt build failed with:
[ 185s] ../Crypto/Whirlpool.c:105:45: error: 'Whirlpool_C' causes a section type conflict with 'SHA256_K'
[ 185s] 105 | CRYPTOPP_ALIGN_DATA(16) static const uint64 Whirlpool_C[8*256+R] CRYPTOPP_SECTION_ALIGN16 = {
[ 185s] | ^
[ 185s] ../Crypto/Sha2.c:321:34: note: 'SHA256_K' was declared here
[ 185s] 321 | CRYPTOPP_ALIGN_DATA(16) uint_32t SHA256_K[64] CRYPTOPP_SECTION_ALIGN16 = {
[ 185s] | ^
[ 185s] lto-wrapper: fatal error: g++ returned 1 exit status
Aligning section types of Whirlpool_C and SHA256_K fixes this.
2019-10-02 21:25: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
321715202a
Windows: Generalize RAM encryption for keys to VeraCrypt binaries, especially Format and Expander
2019-03-02 10:23:39 +01:00
Mounir IDRASSI
cf48b532b4
Windows: Implement RAM encryption for keys on 64-bit machines using ChaCha12 cipher and t1ha non-cryptographic fast hash ( https://github.com/leo-yuriev/t1ha )
2019-03-01 00:35:13 +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
61c1baa4bf
Windows: use CPU RDRAND or RDSEED as an additional entropy source for our random generator when available
2019-02-01 00:35:50 +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
a11cada735
crypto: cleaner code for Streebog carry bit handling and add comment about missing handling of overflow caused by carry bit.
2018-08-06 00:13:15 +02:00