Commit Graph

40 Commits

Author SHA1 Message Date
Jeffrey Walton
f5f63850f9
Use std namespace for memset, memcpy, memcmp (#1204) 2023-04-15 16:45:02 -04:00
Jeffrey Walton
52035583de
Cleanup Panama cihers 2018-12-07 01:46:49 -05:00
Jeffrey Walton
64981be36b
Remove unneeded assert in panama.cpp
The code handles both aligned and unaligned cases
2018-11-22 04:28:38 -05:00
Jeffrey Walton
1bbbfb6b75
Fix partial specializations for FixedSizeAllocatorWithCleanup (PR #710)
Commit afbd3e60f6 effectively treated a symptom and not the underlying problem. The problem was linkers on 32-bit systems ignore CRYPTOPP_ALIGN_DAT(16) passed down by the compiler and align to 8-bytes or less. We have to use Wei's original code in some places. It is not a bad thing, but the bit fiddling is something we would like to contain a little more by depending more on language or platform features.

This commit keeps the original changes which improve partial specializations; but fixes 32-bit linker behavior by effectively reverting afbd3e60f6 and e054d36dc8. We also add more comments so the next person has understands why things are done they way they are.
2018-08-24 08:13:23 -04:00
Jeffrey Walton
afbd3e60f6
Fix alignment on Win32 and Solaris Sparc (PR #709)
These fixes were interesting in a morbid sort of way. I thought the FixedSizeAllocatorWithCleanup specializations faithfully reproduced semantics but I was wrong on Win32 and Sparc. Also see Commit e054d36dc8.

It seems there was another requirement or dependency that we missed, but it was not readily apparent. If I am parsing results correctly (which I may not be), it appears the bit twiddling using 8 byte alignment had more influence on alignment than I originally thought based on use of CRYPTOPP_BOOL_ALIGN16 and T_Align16. Or maybe the alignment attributes specified by CRYPTOPP_ALIGN_DATA are not being honored like they should for stack allocations.

This check-in avoids some uses of x86 movdqa (aligned) in favor of movdqu (unaligned). The uses were concentrated on memory operands which were 8-byte aligned instead of 16-byte aligned. It is not clear to me how the specializations lost 8-bytes of alignment. The check-in also enlists CRYPTOPP_ASSERT to tell us when there's a problem so we don't need to go hunting for bugs.
2018-08-23 14:42:29 -04:00
Jeffrey Walton
03d78fb783
Add Panama cipher AlgorithmProvider() 2018-08-18 14:31:00 -04:00
Jeffrey Walton
7851a0d510 Remove BOOL macro value (GH #462)
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
2017-08-20 21:25:29 -04:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383) 2017-03-01 06:10:06 -05: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
e794d53806
Cleanup comments 2016-10-18 02:23:07 -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
a62aee441f Backed out use of "static const" to declare constant; switch to "enum" (Issue 255) 2016-09-06 04:04:03 -04:00
Jeffrey Walton
45323bddd8 Initial fix for older Apple ld's non_lazy_ptr missing symbols (Issue 255) 2016-09-06 02:51:16 -04:00
Jeffrey Walton
be8ad11098 Backed-off on assert. Panama_SSE2_Pull is ASM, and its not bound by C language fodder 2016-01-25 17:25:39 -05:00
Jeffrey Walton
be491ef007 Cleared -Wcast-align (Issue 122) 2016-01-25 09:48:26 -05:00
Jeffrey Walton
475c574e5f Cleared -Wcast-align (Issue 122) 2016-01-24 23:40:49 -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
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
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
242187d80d Cleared GCC/Clang waning on unknown pragma 2015-06-09 09:36:11 -04:00
weidai
0171970142 fix for makefile and Panama cipher validation failure on armel http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619856 2011-04-25 17:42:11 +00:00
weidai
a3a3ff3c86 fix for compiling with Clang from Marshall Clow 2011-01-07 01:30:24 +00:00
weidai
045d804f9b fix compile with GCC 4.4 and -march=i386
fix minor documentation issues
fix compile w/o GAS 2.19 or later
2010-08-08 23:02:36 +00:00
weidai
21e2d55f9d disable Panama SSE2 code for P4 2009-04-05 20:01:05 +00:00
weidai
26666baa38 fixed Panama x64 MASM code not saving RDI 2009-03-29 21:41:30 +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
645b318c4d fix compile for ICC 10 2007-09-24 05:35:59 +00:00
weidai
9ee3a25d0d remove -msse2 since we don't use SSE2 intrinsics anymore 2007-09-24 03:52:17 +00:00
weidai
4c18c1720d fix compile with GAS 2.15 2007-09-24 01:19:38 +00:00
weidai
23accd43c5 - port x64 assembly code to MASM
- improve stack unwindability on x64 for GCC by not modifying RBP/RSP registers in inline assembly
2007-09-24 00:43:57 +00:00
weidai
f018ac354a fix compile on Turbo C++ 2006 2007-05-05 18:29:44 +00:00
weidai
d2510f30c7 fix compile for x64, DLL and VC 6 2007-05-04 15:24:09 +00:00
weidai
bbbd09553b SSE2 optimizations 2007-04-15 22:54:31 +00:00
weidai
1db8ea5084 port to MSVC .NET 2005 beta 2 2005-07-12 04:23:32 +00:00
weidai
f78fccb3cc port to GCC 3.4 2004-06-19 08:28:09 +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