Commit Graph

100 Commits (e22700f741af9071b166a74dd904a1bb7910c6b9)

Author SHA1 Message Date
Anton Gorev 1df5fc1e21 Revert "Some fixes related to SunCC compiler bugs."
This reverts commit 72d8cbe917.
2017-04-27 13:50:47 -05:00
Jeffrey Walton b9abd7141e
Fix endian-reversal and loading of MSG0-MSG3
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.
2017-04-22 12:19:55 -04:00
Anton Gorev 72d8cbe917 Some fixes related to SunCC compiler bugs.
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;
2017-04-21 15:26:16 -05:00
Jeffrey Walton d9df0961e0
Fix SHA512_SSE2_Transform after whitespace checkin (Issue 365) 2017-01-17 00:49:10 -05:00
Jeffrey Walton 3a1a14c885
Update attribution of ARM SHA extensions
Also see d3bb0e13de (commitcomment-20482554)
2017-01-15 20:41:54 -05:00
Jeffrey Walton c71803f383
Fix typo 2017-01-14 01:18:31 -05:00
Jeffrey Walton 69f812a7af
Add ARM SHA extensions for SHA-224 and SHA-256 2017-01-14 01:16:47 -05:00
Jeffrey Walton d3bb0e13de
Add ARM SHA extensions for SHA1
Benchmarking on ARMv8/Aarch64 dev-board shows SHA-1 speeds up by 2.5x
2017-01-13 05:44:19 -05:00
Jeffrey Walton fc306b6474
Whitespace checkin 2017-01-13 04:23:57 -05:00
Jeffrey Walton f197549662
Remove temporary array for SHA1. Whitespace and comments 2016-12-06 11:09:31 -05:00
Jeffrey Walton 40230dd3bf
Removed MAINTAIN_BACKWARDS_COMPATIBILITY_562 (Issue 70) 2016-12-03 00:32:07 -05:00
Jeffrey Walton 3fff6251aa
Fix anachronism warning for *_HashBlocks functions under Win64 2016-12-02 00:41:13 -05:00
Jeffrey Walton b896c13bcb
Fix missing __fastcall for *_HashBlocks functions under Win32 2016-12-02 00:25:58 -05:00
Jeffrey Walton c8b910aff5
Backed-off automatically setting CRYPTOPP_BOOL_SSE_SHA_INTRINSICS_AVAILABLE due to bad interaction with '-march=x86-64'. Disgorge SSE2 implementation from CXX implementation 2016-12-01 23:35:13 -05:00
Jeffrey Walton 50f0c84ea0
Fix "X86_SHA256_HashBlocks was not declared in this scope" when using CRYPTOPP_DISABLE_ASM 2016-12-01 19:00:24 -05:00
Jeffrey Walton cce56d3f79
Add Intel SHA1 extension support (Issue 139) 2016-12-01 15:05:41 -05:00
Jeffrey Walton 7ab9b00f90
Add Intel SHA1 extension support 2016-12-01 00:49:59 -05:00
Jeffrey Walton 6200029faa Fix Clang 3.3 and 3.4 compiles (Issue 264) 2016-09-21 13:57:37 -04: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 db768200ab Uncomment existing SHA256::Transform, enable when __OPTIMIZE_SIZE__ is defined
This is Wei's original code. It was commented out, but it might be useful to some since IoT gadgets are becoming more popular
2016-09-13 21:06:42 -04:00
Jeffrey Walton ff67abdec5 Add virtual dtor for IteratedHash and ClonableImpl due to non-trivial data 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.
2016-09-13 20:44:14 -04:00
Jeffrey Walton 894874fe75 Whitespace checkin 2016-09-10 04:57:48 -04:00
Jeffrey Walton db42a4ac2f Fixed compile under Clang x86 2016-02-01 01:12:44 -05:00
Jeffrey Walton 0e3ee98ff6 Fixed Clang 3.4 compiler error on Linux 2015-12-25 08:00:05 -05:00
Jeffrey Walton 885b94707c Fixed Clang 3.3 integrated assembler crash on Linux 2015-12-25 03:37:14 -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 29c4310aab Cleared remaining issues related to Clang's integarted assembler parsing of the syntax string 2015-07-22 03:59:21 -04:00
Jeffrey Walton 6d0dd41eb0 Specialized defines to work with/around Clang integrated assembler. The two 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 2015-07-22 03:48:10 -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 d7399e0fd7 Cleared GCC/Clang warning on unknown pragma 2015-06-09 11:33:32 -04:00
weidai 9a759e4492 fix incorrect SHA-256 hash on x64 when compiled with GCC with optimizations enabled 2010-06-29 00:46:23 +00:00
weidai 9d1843e8fc fix for http://sourceforge.net/apps/trac/cryptopp/ticket/2 (Ken Raeburn) 2010-05-13 16:58:21 +00:00
weidai 5221b19822 fix incorrect SHA-256 computation on non-SSE2 x86 machines on non-aligned input (reported by
pycryptopp project)
2009-07-05 18:10:10 +00:00
weidai 13c3aa2f4e fix compile on MSVC 6 and MSVC 2003 2009-03-15 03:53:58 +00:00
weidai 3202bf2809 fix compile on OpenSolaris 8.11 2009-03-13 11:15:21 +00:00
weidai d6b4e54448 fix compile on MSVC 6 2009-03-13 02:55:23 +00:00
weidai 2779fc6050 - add EAX mode, XSalsa20
- speed up GCM key setup
- wipe stack in AES assembly code
- speed up CFB mode
2009-03-12 11:24:12 +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 a145a37068 do not align to 16 when not needed 2007-10-26 09:50:49 +00:00
weidai d2510f30c7 fix compile for x64, DLL and VC 6 2007-05-04 15:24:09 +00:00
weidai 643b302227 MMX/SSE2 optimizations 2007-04-15 23:00:27 +00:00
weidai b3924f2108 changes done for FIPS-140 lab code drop 2005-01-20 04:19:35 +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 a3b6ece7ab Initial revision 2002-10-04 17:31:41 +00:00