VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/cpu.h
AgeCommit message (Collapse)AuthorFilesLines
2019-10-04Fix "error "SSSE3 instruction set not enabled" when compiling using GCC ↵El Mostafa Idrassi1-0/+2
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-08-26Windows: fix compilation error of legacy MBR bootloader caused by missing ↵Mounir IDRASSI1-1/+1
intrin.h header
2019-03-21Linux: Fix compilation error caused by wrong include of "intrin.h"Mounir IDRASSI1-3/+1
2019-02-12Windows: Use Hardware RNG based on CPU timing jitter "Jitterentropy" by ↵Mounir IDRASSI1-0/+17
Stephan Mueller as a good alternative to RDRAND (http://www.chronox.de/jent.html, smueller@chronox.de)
2019-02-08Windows: Add implementation of ChaCha20 based random generator. Use it for ↵Mounir IDRASSI1-3/+7
driver need of random bytes (currently only wipe bytes but more to come later).
2019-02-01Fix detection of CPU features AVX2 & BMI2. Add detection of RDRAND & RDSEED ↵Mounir IDRASSI1-0/+4
CPU features. Detect Hygon CPU as AMD one.
2019-01-30Help compiler optimize some crypto code on 64-bit build since x64 capable ↵Mounir IDRASSI1-0/+5
CPUs always support SSE and SSE2
2017-07-04Windows: correctly handle SEH exceptions during self-tests in order to ↵Mounir IDRASSI1-26/+19
disable CPU extended features in such case.
2017-06-21Crypto: Add optimized Camellia assembly implementation for x86_64 based on ↵Mounir IDRASSI1-0/+4
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-01-12Fix build error in Crypto/Whirpool.c when using LLVM Clang compiler by ↵Mounir IDRASSI1-29/+24
disabling inline assembly in this case (caused by http://llvm.org/bugs/show_bug.cgi?id=24232)
2016-10-17Implement detection of new CPU features: AVX2 and BMI2Mounir IDRASSI1-0/+4
2016-10-17Crypto: Use SIMD optimized Serpent implementation from Botan. 2.5x speed ↵Mounir IDRASSI1-0/+38
gain factor. Update credits and copyrights notice.
2016-08-15Windows EFI Bootloader: modifications to prepare EFI system encryption ↵Alex1-4/+4
support (common files with DcsBoot)
2016-06-20Windows:solve compilation error under VC++ 2008 by using extern "C" only ↵Mounir IDRASSI1-8/+32
when needed.
2016-06-18Windows Driver: add declaration of missing intrinsic _mm_setr_epi32 (to be ↵Mounir IDRASSI1-0/+1
used by upcoming implementation)
2016-06-17Update intrinsic support and cpu detection.Mounir IDRASSI1-14/+80
2016-05-10Remove trailing whitespaceDavid Foerster1-1/+1
2016-05-10Normalize all line terminatorsDavid Foerster1-308/+308
2016-05-01Reset bogus executable permissionsDavid Foerster1-0/+0
2016-02-21Crypto: update Whirlpool implementation using latest code from Crypto++.Mounir IDRASSI1-18/+68
2015-12-31Cryptography: Optimize Whirlpool implementation by using public domain ↵Mounir IDRASSI1-0/+258
assembly code developed by Wei Dai