Commit Graph

36 Commits

Author SHA1 Message Date
Jeffrey Walton
f1192fd044
Update comments in IterHashBase and friends
We also switched to "IsAligned<HashWordType>(input)". Using word64 was due to debug testing on Solaris (the alignment check is needed). Hard coding word64 should not have been checked in.
2018-07-21 06:51:41 -04:00
Jeffrey Walton
aeaa4f623f
Use blockSize throughout HashMultipleBlocks 2018-07-20 20:28:07 -04:00
Jeffrey Walton
414c5c5438
Fix Tiger crash on Sparc (GH #690)
Man, Sparc does not mess around with unaligned buffers. Without -xmemalign=4i the hardware wants 8-byte aligned word64's so it can use the high performance 64-bit move or add.
Since we do not use -xmemalign we get the default behavior of either -xmemalgin=8i or -xmemalgin=8s. It shoul dnot matter to us since we removed unaligned data access at GH #682.
2018-07-20 20:12:54 -04:00
Jeffrey Walton
0c0b68a4a2
Align input buffer in HashMultipleBlocks
IteratedHashBase::Update aligns the buffer, but IteratedHashBase::HashBlock does not. It was causing a fair number of asserts to fire when the code was instrumented with alignment checks. Linux benchmarks shows the code does not run materially slower on i686 or x86_64.
2018-07-20 18:56:41 -04:00
Jeffrey Walton
3159969808
Back-off on Hash asserts (GH #652)
The asserts were a little aggressive and caused very noisy Debug runs. The library itself was one of the biggest offenders.
2018-05-05 22:56:15 -04:00
Asen Kovachev
039db17da7 Add CRYPTOPP_ASSERT to match Keccak and SHA3 (#654)
As described in https://github.com/weidai11/cryptopp/issues/652 for consistency we should add assert in all hash transformations. The expectation is to have a good pointer and a non-0 length or a null pointer and 0-length.
2018-05-03 20:12:34 -04:00
Marcel Raad
d9de314e86 Fix Windows compilation issues (by RaptorFactor) (#444)
* Fix compilation on Windows with /DUNICODE

* Fix linking of fipstest for MSVC targeting ARM (__crt_debugger_hook is not available).

* Fix build for Clang on Windows with optimizations on.

* Fix a warning about a non-existant warning under Clang.

* Fix compilation under Intel C++ 18.0 on Windows
2017-07-17 12:10:38 -04:00
Jeffrey Walton
de1270656c
Avoid extra ByteReverse when using Intel SHA extensions
This gains about 0.6 cpb. SHA-1 is down to 1.7 to 1.9 cpb. SHA-256 is not affected
2017-05-26 01:51:44 -04:00
Jeffrey Walton
bd7aa155a6 Revert "Avoid extra ByteReverse"
This reverts commit 3b56ba118f. It broke Tiger and SEAL. Arg...
2017-05-25 06:46:40 -04:00
Jeffrey Walton
b447a7bf15
Add missing header 2017-05-25 06:26:43 -04:00
Jeffrey Walton
3b56ba118f
Avoid extra ByteReverse
This gains about 0.6 cpb. SHA-1 is down to 1.9 cpb. SHA-256 is not affected
2017-05-25 06:20:00 -04:00
Jeffrey Walton
81b1a18063
Change file preamble to include "originally written by Wei Dai"
We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
2017-01-27 07:05:45 -05:00
Jeffrey Walton
f197549662
Remove temporary array for SHA1. Whitespace and comments 2016-12-06 11:09:31 -05: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
9a5dde9013 Cleared -Wcast-align (Issue 122) 2016-01-24 22:27: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
77206baf56 Whitespace checkin 2015-07-30 13:07:33 -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
427e1cf028 Cleared UBsan warnings under GCC 5.1 2015-07-17 07:13:23 -04:00
weidai
79ed03344b fix memcpy with same src and dest (Peter Klotz) 2010-08-03 20:28:10 +00:00
weidai
8ca6148ad5 add x86/x64 assembly for SHA-256,
add DEFAULT_CHANNEL and AAD_CHANNEL,
fix macChannel for AuthenticatedEncryptionFilter
2009-03-10 02:56:19 +00:00
weidai
d8a644fc4e changes for 5.6:
- added AuthenticatedSymmetricCipher interface class and Filter wrappers
    - added CCM, GCM (with SSE2 assembly), CMAC, and SEED
    - improved AES speed on x86 and x64
    - removed WORD64_AVAILABLE; compiler 64-bit int support is now required
2009-03-02 02:39:17 +00:00
weidai
f871754502 fix compile with GCC 4.0.1 on MacOS X 64-bit 2008-12-22 06:55:08 +00:00
weidai
a81ba0ebd9 reduce executable size when only hash functions are used 2007-10-02 00:21:52 +00:00
weidai
de8b060ea1 optimizations 2007-04-16 00:33:09 +00:00
weidai
43b41c1042 update version number, port to Sun C++ 5.8 2006-12-18 02:34:33 +00:00
weidai
1db8ea5084 port to MSVC .NET 2005 beta 2 2005-07-12 04:23:32 +00:00
weidai
79e29d0de4 fix gcc 3.4.2 compile 2004-10-17 22:39:30 +00:00
weidai
c39b3de3c4 changes related to the next FIPS validation 2004-09-03 10:57:31 +00:00
weidai
6d4f31be8b add SHA-224 2004-07-23 09:57:11 +00:00
weidai
473e5df89b merge in 5.0.4 changes (exclude DES and SHA-2 from DLL),
attempt (failed) to build DLL with GCC
2003-07-10 04:34:23 +00:00
weidai
f278895908 create DLL version, fix GetNextIV() bug in CTR and OFB modes 2003-07-04 00:17:37 +00:00
weidai
538de80a91 various changes for 5.1 2003-03-20 01:24:12 +00:00
weidai
a3b6ece7ab Initial revision 2002-10-04 17:31:41 +00:00