Jeffrey Walton
08c37e5887
Update comments in Rijndael head comments
2017-08-15 14:26:30 -04:00
Jeffrey Walton
2aff92ddb6
Fix bad SHA::Transform calculation (Issue 455)
...
Reworked SHA class internals to align all the implementations. Formerly all hashes were software based, IterHashBase handled endian conversions, IterHashBase repeatedly called the single block SHA{N}::Transform. The rework added SHA{N}::HashMultipleBlocks, and the SHA classes attempt to always use it.
Now SHA{N}::Transform calls into SHA{N}_HashMultipleBlocks, which is a free standing function. An added wrinkle is hardware wants little endian data and software presents big endian data, so HashMultipleBlocks accepts a ByteOrder for the incoming data. Hardware based SHA{N}_HashMultipleBlocks can often perform the endian swap much easier by setting an EPI mask so it was profitable to defer to hardware when available.
The rework also removed the hacked-in pointers to implementations. The class now looks more like AES, GCM, etc.
2017-08-13 16:05:39 -04:00
Jeffrey Walton
863bf9133c
Cleanup casts due to Clang
2017-08-13 06:32:09 -04:00
Jeffrey Walton
173dd0b530
Add AES for ARMv8 (Issue 458)
2017-08-11 07:31:09 -04:00
Jeffrey Walton
301437e693
Updated static initializers
...
When MSVC init_seg or GCC init_priority is available, we don't need to use the Singleton. We only need to create a file scope class variable and place it in the segment for MSVC or provide the attribute for GCC.
An additional upside is we cleared all the memory leaks that used to be reported by MSVC for debug builds.
2017-03-17 20:47:32 -04:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383)
2017-03-01 06:10:06 -05:00
Jeffrey Walton
733a073d65
Fix mismatched arch capabilities (Issue 283)
2016-10-27 01:01:01 -04:00
Jeffrey Walton
19ebf769e7
Add debug instrumentation to Rijndael
...
We added asserts due to Coverity findings. We beieve the findings were false positives
2016-09-30 13:14:29 -04:00
Jeffrey Walton
2b328e8f8b
Fix AES and X86 compile on Solaris
2016-09-30 09:31:23 -04:00
Jeffrey Walton
4c1b5472cc
Cutover to SecByteBlock member for AES (Issue 302, CVE-2016-7544)
2016-09-30 01:09:21 -04:00
Jeffrey Walton
bfd23861f4
Whitespace cleanup
2016-09-24 18:59:55 -04:00
John Byrd
a33b95325f
When calculating the AES block cipher, allocate 4K of memory on the stack instead of 256+ bytes. Search within that 4K space to put the 256-byte aligned Locals struct in a place which does not have 4K cache conflicts with the Te temporary buffer. This permits us to call _malloca() or alloca() once per call of this function. This commit also makes sure that the Microsoft-only _freea() occurs at the correct location instead of at a pointer to the middle of the stack, when the memory allocated by _malloca() or alloca() is not 256-byte aligned.
2016-09-22 17:43:57 -07:00
Jeffrey Walton
399a1546de
Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)
...
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
2016-09-16 11:27:15 -04:00
Jeffrey Walton
ada2aa55ed
Fix typo on SunCC version
2016-08-26 05:08:57 -04:00
Jeffrey Walton
4fd51eb06c
Add vec_swap for compilers which do not support std::swap'ing SSE and NEON types
2016-07-17 21:25:55 -04:00
Jeffrey Walton
1cb906938d
Fix SunCC 12.2 and 12.3 failed compile in rijndael.cpp due to std::swap(__m128i, __m128i)
2016-07-16 23:45:16 -04:00
Jeffrey Walton
ba2c778f1b
Fix typo in SunCC check
2016-07-15 01:53:01 -04:00
Jeffrey Walton
b099030c46
Fix broken rijndael.cpp compile under Sun Studio (Issue 224)
2016-07-15 00:40:13 -04:00
Jeffrey Walton
c1f025343a
Add C++11 alignas support. Deleting 'alignas' branch
2016-06-14 19:14:09 -04:00
Marcel Raad
f43b7c95cd
Check for SSE4 support before using SSE4.1 instruction
...
In a 32-bit Windows program compiled with Visual C++ 2013 Update 5, we
sometimes get crashes because of an exception "0xC000001D: Illegal Instruction"
on the pextrd (_mm_extract_epi32) instruction. Explicitly check for SSE4
support instead of only AES-NI before using this SSE4.1 instruction.
2016-05-10 12:43:49 +02:00
Jeffrey Walton
22f493dda9
Fix the Rijndael timing attack counter measure (Issue 146)
2016-04-12 14:43:39 -04:00
Jeffrey Walton
50e5c14c18
Improve constant propagation of fix for Issue 146
2016-04-07 19:20:33 -04:00
Jeffrey Walton
ab393851ec
Revert "Improve performance of fix to Issue 146"
...
This reverts commit 5cce8c33ca
. It was an incomplete remediation because it was applied to one area of the code, and not both areas of the code. The complete remediation will be checked-in next.
2016-04-07 19:14:11 -04:00
Jeffrey Walton
5cce8c33ca
Improve performance of fix to Issue 146
2016-04-07 19:05:30 -04:00
Pierre Lestringant
9f335d719e
Fix the Rijndael timing attack counter measure
2016-04-06 15:51:17 +02:00
Jeffrey Walton
823bc93357
Add call for _malloca/_freea. They are SDLC compliance items on Windows platform
2016-02-09 16:37:19 -05:00
Jeffrey Walton
b773052b3d
Temporary fix for Issue 42 and 132
2016-02-07 04:52:59 -05:00
Jeffrey Walton
c8de423ab5
Fix missing CryptoPP::rdtable::Te symbol for Microsoft SSE2 non-AESNI X64 platforms when CRYPTOPP_NO_UNALIGNED_DATA_ACCESS defined
2016-02-06 22:19:53 -05:00
Jeffrey Walton
58ed2fcd37
Removed CRYPTOPP_ALLOW_RIJNDAEL_UNALIGNED_DATA_ACCESS. No longer necessary
2016-02-05 02:46:26 -05:00
Jeffrey Walton
d55d7fe90a
Removed garbage charcters suffixed to CRYPTOPP_GENERATE_X64_MASM. They appear to have entered on November 15, 2015 with commit 48809d4e85
2016-02-05 00:27:23 -05:00
Jeffrey Walton
ab320ad59b
Cleared -Wcast-align (Issue 122)
2016-01-25 22:03:07 -05:00
Jeffrey Walton
a44e823c3c
Re-constify intermediate void* cast
2016-01-25 19:56:17 -05:00
Jeffrey Walton
c76114705c
Cleared -Wcast-align (Issue 122). No asserts added because X86/X32/X64 uses unaligned accesses with the compressed tables
2016-01-25 19:30:35 -05:00
Jeffrey Walton
0e3ee98ff6
Fixed Clang 3.4 compiler error on Linux
2015-12-25 08:00:05 -05:00
Jeffrey Walton
6ac1e46a1f
Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup)
2015-11-18 15:32:28 -05:00
Jeffrey Walton
48809d4e85
CRYPTOPP 5.6.3 RC6 checkin
2015-11-05 01:59:46 -05:00
Jeffrey Walton
25cc4c2db1
Fixed compile error on MinGW due to including <alloca.h>
2015-07-27 16:36:05 -04:00
Jeffrey Walton
6b2129afb3
Added "include <alloca.h>" due to compile failure on Cygwin
2015-07-27 02:06:11 -04:00
Jeffrey Walton
b7de164d62
Cut-in CRYPTOPP_ASSERT in all remaining header and source files
2015-07-26 16:03:14 -04:00
Jeffrey Walton
7b64ca489a
Added "trap.h" include for header and source files that assert
2015-07-26 15:51:16 -04:00
Jeffrey Walton
4d5be2d690
Cleared "signed/unsigned" warning under GCC 4.8 (this may have been a GCC 4.8/Debian-i686 issue because both types were unsigned)
2015-07-26 01:14:59 -04:00
Jeffrey Walton
3c56063c3f
Added CRYPTOPP_CLANG_NO_INTEGRATED_AS as a guard in config.h (disabled by default since integrated-as is default behavior and the bug is active). GNU_ATT_SYNTAX → GNU_AS_ATT_SYNTAX and GNUINTEL_SYNTAX → GNU_AS_INTEL_SYNTAX
2015-07-21 18:05:48 -04:00
Jeffrey Walton
444d1f1a3b
Cut-in to utilize GNU_ATT_SYNTAX and GNU_INTEL_SYNTAX macros. Also see LLVM Bug 18916 ( https://llvm.org/bugs/show_bug.cgi?id=18916 )
2015-07-21 14:37:55 -04:00
Jeffrey Walton
8f59d9af35
Cleared unused variable and function warnings
2015-07-19 10:22:16 -04:00
Jeffrey Walton
f5e4f6318e
Cleared unknown pragma warning with -Wall
2015-06-08 02:30:53 -04:00
weidai
4621a652a8
fix for Valgrind error http://tahoe-lafs.org/trac/pycryptopp/ticket/67
2011-01-28 01:22:27 +00:00
weidai
5b3f486767
fix for https://sourceforge.net/apps/trac/cryptopp/ticket/6
2011-01-07 01:38:48 +00:00
weidai
a3f2091bcd
fix compile on GCC 4.4 and greater
2010-07-29 08:51:39 +00:00
weidai
797192ea60
fix compile on Linux
2010-07-24 06:12:23 +00:00
weidai
7adbf89681
add support for AES-NI and CLMUL instruction sets in AES and GMAC/GCM
2010-07-24 05:55:22 +00:00