summaryrefslogtreecommitdiff
path: root/sha.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix func/subfunc parameter names (GH #502)Jeffrey Walton2017-09-161-2/+2
|
* Fix bad SHA152 hash under IBM XL C/C++ compiler (GH #502)Jeffrey Walton2017-09-151-13/+79
|
* Clear uninitialized variable warnings under xlCJeffrey Walton2017-09-011-3/+2
|
* Fix build on FreeBSD 10.3 x86 with clang++ 3.4.1. (#483)Wyatt O'Day2017-08-301-1/+2
| | | | | | * Fix build on FreeBSD 10.3 x86 with clang++ v. 3.4.1. The x64 build (also clang++ 3.4.1) doesn't require CRYPTOPP_DISABLE_SHA_ASM. It seems to be a bug specific to the x86 version of clang++. * Based on suggestion from @noloader, don't split x86/x64 clang++ version detection. Just wait until clang++ is consistently working in both x86/x64.
* Remove BOOL macro value (GH #462)Jeffrey Walton2017-08-201-12/+18
| | | | Currently the CRYPTOPP_BOOL_XXX macros set the macro value to 0 or 1. If we remove setting the 0 value (the #else part of the expression), then the self tests speed up by about 0.3 seconds. I can't explain it, but I have observed it repeatedly. This check-in prepares for the removal in Upstream master
* Split source files to support Base Implementation + SIMD implementation (GH ↵Jeffrey Walton2017-08-171-874/+59
| | | | | #461) Split source files to support Base Implementation + SIMD implementation
* Move free standing function into anonymous namespaceJeffrey Walton2017-08-141-166/+230
| | | | Update comments and use class constants when available
* Fix bad SHA::Transform calculation (Issue 455)Jeffrey Walton2017-08-131-563/+598
| | | | | | | | 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.
* Use MOVDQU for SSE2 in static transform (Issue 455)Jeffrey Walton2017-08-051-23/+23
| | | | Updated documentation
* Avoid extra ByteReverse when using Intel SHA extensionsJeffrey Walton2017-05-261-2/+26
| | | | This gains about 0.6 cpb. SHA-1 is down to 1.7 to 1.9 cpb. SHA-256 is not affected
* Revert "Avoid extra ByteReverse"Jeffrey Walton2017-05-251-1/+1
| | | | This reverts commit 3b56ba118f34. It broke Tiger and SEAL. Arg...
* Avoid extra ByteReverseJeffrey Walton2017-05-251-1/+1
| | | | This gains about 0.6 cpb. SHA-1 is down to 1.9 cpb. SHA-256 is not affected
* Revert "Some fixes related to SunCC compiler bugs."Anton Gorev2017-04-271-15/+1
| | | | This reverts commit 72d8cbe9177bade320b51c149aac1c67c4dd13ec.
* Fix endian-reversal and loading of MSG0-MSG3Jeffrey Walton2017-04-221-7/+1
| | | | | | Initially we performed a 32-bit word-size ByteReverse() on the entire 64-byte buffer being hashed. Then we performed another fix-up when loading each 16-byte portion of the buffer into the SSE2 registers for SHA processing. The [undesired] consequence was byte swapping and reversals happened twice. Worse, the call to ByteReverse() produced 16 bswaps instead of 1 call pshufb, so it was orders of magnitude slower than it needed to be. This check-in takes the sane approach to byte reversals and swapping. It performs it once when the message is loaded for SSE processing. The result is SHA1 calculations drop from about 3.0 cpb to about 2.5 cpb.
* Some fixes related to SunCC compiler bugs.Anton Gorev2017-04-211-1/+15
| | | | | Fixes for "invalid address alignment" errors. See https://groups.google.com/d/topic/cryptopp-users/OYaByDEbSI0/discussion for details. Changed config.h in accordance to Jeffrey Walton's request;
* Fix SHA512_SSE2_Transform after whitespace checkin (Issue 365)Jeffrey Walton2017-01-171-0/+1
|
* Update attribution of ARM SHA extensionsJeffrey Walton2017-01-151-15/+15
| | | | Also see http://github.com/weidai11/cryptopp/commit/d3bb0e13def80a4bf59ea324eed80becdf0045ce#commitcomment-20482554
* Fix typoJeffrey Walton2017-01-141-1/+1
|
* Add ARM SHA extensions for SHA-224 and SHA-256Jeffrey Walton2017-01-141-9/+195
|
* Add ARM SHA extensions for SHA1Jeffrey Walton2017-01-131-3/+187
| | | | Benchmarking on ARMv8/Aarch64 dev-board shows SHA-1 speeds up by 2.5x
* Whitespace checkinJeffrey Walton2017-01-131-601/+600
|
* Remove temporary array for SHA1. Whitespace and commentsJeffrey Walton2016-12-061-10/+13
|
* Removed MAINTAIN_BACKWARDS_COMPATIBILITY_562 (Issue 70)Jeffrey Walton2016-12-031-10/+1
|
* Fix anachronism warning for *_HashBlocks functions under Win64Jeffrey Walton2016-12-021-2/+2
|
* Fix missing __fastcall for *_HashBlocks functions under Win32Jeffrey Walton2016-12-021-4/+4
|
* Backed-off automatically setting CRYPTOPP_BOOL_SSE_SHA_INTRINSICS_AVAILABLE ↵Jeffrey Walton2016-12-011-12/+22
| | | | due to bad interaction with '-march=x86-64'. Disgorge SSE2 implementation from CXX implementation
* Fix "X86_SHA256_HashBlocks was not declared in this scope" when using ↵Jeffrey Walton2016-12-011-13/+27
| | | | CRYPTOPP_DISABLE_ASM
* Add Intel SHA1 extension support (Issue 139)Jeffrey Walton2016-12-011-16/+259
|
* Add Intel SHA1 extension supportJeffrey Walton2016-12-011-14/+223
|
* Fix Clang 3.3 and 3.4 compiles (Issue 264)Jeffrey Walton2016-09-211-2/+9
|
* Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)Jeffrey Walton2016-09-161-2/+2
| | | | 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
* Uncomment existing SHA256::Transform, enable when __OPTIMIZE_SIZE__ is definedJeffrey Walton2016-09-131-34/+34
| | | | This is Wei's original code. It was commented out, but it might be useful to some since IoT gadgets are becoming more popular
* Add virtual dtor for IteratedHash and ClonableImpl due to non-trivial data ↵Jeffrey Walton2016-09-131-1/+4
| | | | | | members Solaris is showing unusual signs with SunCC 5.13 and 5.14. One user is experiencing a SIGBUS in SHA512::Transform due to data alignment of 'data', which was only 2-byte aligned. The project experienced an exception "Coneable not implemented" during the hashing test after building with Cmake. Its not clear how much Cmake influenced the project's results.
* Whitespace checkinJeffrey Walton2016-09-101-6/+6
|
* Fixed compile under Clang x86Jeffrey Walton2016-02-011-0/+2
|
* Fixed Clang 3.4 compiler error on LinuxJeffrey Walton2015-12-251-0/+4
|
* Fixed Clang 3.3 integrated assembler crash on LinuxJeffrey Walton2015-12-251-4/+4
|
* Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 ↵Jeffrey Walton2015-11-181-4/+4
| | | | (Coverity rollup)
* CRYPTOPP 5.6.3 RC6 checkinJeffrey Walton2015-11-051-902/+925
|
* Cleared remaining issues related to Clang's integarted assembler parsing of ↵Jeffrey Walton2015-07-221-1/+1
| | | | the syntax string
* Specialized defines to work with/around Clang integrated assembler. The two ↵Jeffrey Walton2015-07-221-1/+1
| | | | defines are WORKAROUND_LLVM_BUG_18916 and CRYPTOPP_USING_CLANG_INTEGRATED_ASSEMBLER. Once the 18916 bug is fixed, the other issues around the integrated assembler will remain
* Added CRYPTOPP_CLANG_NO_INTEGRATED_AS as a guard in config.h (disabled by ↵Jeffrey Walton2015-07-211-4/+4
| | | | 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
* Cut-in to utilize GNU_ATT_SYNTAX and GNU_INTEL_SYNTAX macros. Also see LLVM ↵Jeffrey Walton2015-07-211-4/+4
| | | | Bug 18916 (https://llvm.org/bugs/show_bug.cgi?id=18916)
* Cleared GCC/Clang warning on unknown pragmaJeffrey Walton2015-06-091-1/+3
|
* fix incorrect SHA-256 hash on x64 when compiled with GCC with optimizations ↵weidai2010-06-291-1/+1
| | | | enabled
* fix for http://sourceforge.net/apps/trac/cryptopp/ticket/2 (Ken Raeburn)weidai2010-05-131-3/+3
|
* fix incorrect SHA-256 computation on non-SSE2 x86 machines on non-aligned ↵weidai2009-07-051-5/+6
| | | | | | input (reported by pycryptopp project)
* fix compile on MSVC 6 and MSVC 2003weidai2009-03-151-3/+12
|
* fix compile on OpenSolaris 8.11weidai2009-03-131-7/+3
|
* fix compile on MSVC 6weidai2009-03-131-2/+12
|