Jeffrey Walton
dfeae9e983
Guard compile assert for Borland/Embarcadero (GH #512 )
2017-09-21 02:01:04 -04:00
Jeffrey Walton
c6b096ddd4
Move Rijndael_UncheckedSetKey_POWER8 prior to GetUserKey call
...
Arg... GetUserKey was performing a 32-bit word reverse. It was part of the problem on little endian machines
2017-09-21 01:08:44 -04:00
Jeffrey Walton
9fd5d023f9
Load r5 mask once for key expansion
2017-09-20 20:27:58 -04:00
Jeffrey Walton
e4498a105e
Use ::time() and ::log() instead of std::time() and std::log() (GH #512 )
...
The 35c0fa82fd change broke GCC 4.8
2017-09-20 18:43:51 -04:00
Jeffrey Walton
4b7549a990
Use 'static const int' for constant Borland/Embarcadero (GH #512 )
2017-09-20 18:18:51 -04:00
Jeffrey Walton
35c0fa82fd
Use <time.h> for Borland/Embarcadero (GH #512 )
2017-09-20 18:10:07 -04:00
Jeffrey Walton
c5a427d690
Add PowerPC VectorLoadKeyUnaligned for AES-192
...
Make internal functions static. We get better optimizations depsice using unnamed namespaces
Add PowerPC uint32x4 functions for handling 32-bit rcon and mask
2017-09-20 08:57:53 -04:00
Jeffrey Walton
c94d076aa1
Move r1 write to caller; remove from Rijndael_Subkey_POWER8
...
Signed-off-by: Jeffrey Walton <noloader@gmail.com>
2017-09-20 04:38:53 -04:00
Jeffrey Walton
5159d0803d
Add Power8 key expansion for big endian
...
This is AES-128 key expansion for big endian. Little endian has a bug in it so it can't be enabled at the moment. GDB is acting up on GCC112, so I've had trouble investigating it
2017-09-20 03:34:54 -04:00
Jeffrey Walton
6102333fc3
Add CRYPTOPP_NO_CPU_FEATURE_PROBES (GH #511 )
...
We determine machine capabilities by performing an os/platform *query* first, like getauxv(). If the *query* fails, we move onto a cpu *probe*. The cpu *probe* tries to exeute an instruction and then catches a SIGILL on Linux or the exception EXCEPTION_ILLEGAL_INSTRUCTION on Windows. Some OSes fail to hangle a SIGILL gracefully, like Apple OSes. Apple machines corrupt memory and variables around the probe.
2017-09-19 21:08:37 -04:00
Jeffrey Walton
6440921723
Add Rijndael_UncheckedSetKey_POWER8
...
We are going to attempt to perform key setup using Power8 in-core vector instructions
2017-09-19 04:55:15 -04:00
Jeffrey Walton
3290711a82
Clear duplicate symbol warning from AIX linker
2017-09-18 21:05:26 -04:00
Jeffrey Walton
923cf95571
ByteReverseArray → ReverseByteArrayLE
2017-09-18 18:40:19 -04:00
Jeffrey Walton
2c18fe8af8
Refactor LoadT() and StoreT(). Add separate ReverseT() for little endian machines
...
The refactoring has no effect on little endian machines. However, on big endian GCC119 using GCC 7.1 the performance improved by 2.5x for ECB and CTR modes:
BEFORE:
<TR><TH>AES/CTR (128-bit key)<TD>2723<TD>1.4<TD>0.163<TD>670
<TR><TH>AES/CTR (192-bit key)<TD>2560<TD>1.5<TD>0.175<TD>719
<TR><TH>AES/CTR (256-bit key)<TD>2728<TD>1.4<TD>0.183<TD>749
<TR><TH>AES/CBC (128-bit key)<TD>1204<TD>3.2<TD>0.135<TD>554
<TR><TH>AES/CBC (192-bit key)<TD>1066<TD>3.7<TD>0.148<TD>605
<TR><TH>AES/CBC (256-bit key)<TD>948<TD>4.1<TD>0.155<TD>635
<TR><TH>AES/OFB (128-bit key)<TD>1019<TD>3.8<TD>0.158<TD>648
<TR><TH>AES/CFB (128-bit key)<TD>949<TD>4.1<TD>0.192<TD>787
<TR><TH>AES/ECB (128-bit key)<TD>3564<TD>1.1<TD>0.082<TD>337
AFTER:
<TR><TH>AES/CTR (128-bit key)<TD>6484<TD>0.6<TD>0.163<TD>677
<TR><TH>AES/CTR (192-bit key)<TD>5641<TD>0.7<TD>0.176<TD>728
<TR><TH>AES/CTR (256-bit key)<TD>5005<TD>0.8<TD>0.183<TD>761
<TR><TH>AES/CBC (128-bit key)<TD>1223<TD>3.2<TD>0.135<TD>559
<TR><TH>AES/CBC (192-bit key)<TD>1080<TD>3.7<TD>0.147<TD>611
<TR><TH>AES/CBC (256-bit key)<TD>966<TD>4.1<TD>0.155<TD>642
<TR><TH>AES/OFB (128-bit key)<TD>1057<TD>3.7<TD>0.158<TD>656
<TR><TH>AES/CFB (128-bit key)<TD>1217<TD>3.3<TD>0.186<TD>774
<TR><TH>AES/ECB (128-bit key)<TD>7289<TD>0.5<TD>0.082<TD>342
2017-09-18 18:15:25 -04:00
Jeffrey Walton
1661ff127a
Fix dead code strip test on AIX
2017-09-18 02:45:03 -04:00
Jeffrey Walton
cc855dd181
Update cryptest-android.sh file with LLVM
2017-09-18 02:26:50 -04:00
Jeffrey Walton
f0c2324f6b
Fix armeabi and armv7-a for Android (GH #509 )
2017-09-17 20:07:53 -04:00
Jeffrey Walton
09f1a2fb38
Add i686 and x86_64 specific flags (GH #508 )
2017-09-17 15:33:41 -04:00
Deadpikle
723d87c9b5
Make sure _SC_LEVEL1_DCACHE_LINESIZE is defined ( #507 )
2017-09-17 14:34:05 -04:00
Jeffrey Walton
7097546cfc
Fix "X causes a section type conflict with Y" for GCC on AIX (GH #499 )
...
These surfaced during testing with cryptest.sh
2017-09-17 07:08:14 -04:00
Jeffrey Walton
3e237540fe
Query sysconf for _SC_LEVEL1_DCACHE_LINESIZE on ARM and PPC
2017-09-17 02:39:41 -04:00
Jeffrey Walton
a835443b34
Fix compile on CentOS 6 with GCC 4.7
...
The system uses Glibc 2.12, which is below 2.16 required for getauxv
2017-09-17 00:41:48 -04:00
Jeffrey Walton
8f6afb3079
Fix -pipe warning under SunCC
2017-09-16 22:09:50 -04:00
Jeffrey Walton
f3c04dbcb7
Remove CMake testing support (GH #506 )
...
CMake can now be found at http://www.cryptopp.com/wiki/CMake . The Cmake project files are now maintianed by the community.
2017-09-16 21:23:35 -04:00
Jeffrey Walton
913a9e60d3
Remove CMake from library sources (GH #506 )
...
CMake can now be found at http://www.cryptopp.com/wiki/CMake . The Cmake project files are now maintianed by the community.
2017-09-16 21:09:40 -04:00
Jeffrey Walton
1c740b0a09
Add sunset message to CMakeList.txt file
...
The commit also attempts to avoid the shell command for Windows machines.
If no one has patches to offer for the outstanding CMake bugs, then this is the version that will be moved to the Wiki Patch Page. The community will have to tend to the outstanding bugs when someone with domain experience can work them
2017-09-16 18:33:07 -04:00
Jeffrey Walton
da0dc66952
Route Borland/Embarcadero into MS inline ASM code for CPUID
...
The inline ASM code now uses local variables to save the EAX-EDX registers, and then copies the locals into the function parameters. It side steps problems with calling conventions
2017-09-16 18:03:24 -04:00
Jeffrey Walton
7464cbba51
Update README to sync with Crypto++ website
...
* Switch from cryptolounge.com to Crypto++ wiki
* Add latest algorithms
2017-09-16 16:30:32 -04:00
Jeffrey Walton
30d519c0bc
Use -O3 for IBM XL C/C++ (GH #502 )
...
We held back XL C/C++ due to warnings and self test failures. Since clearing Issue 502, we are OK for -O3 so we can live with the warnings.
2017-09-16 08:22:25 -04:00
Jeffrey Walton
fc0867827e
Fix TEA and XTE hand with IBM XL C/C++ compiler (GH #503 )
...
It looks like Sun compilers had problems with the loop in the past, too. The Sun workarounds did not help with XL C/C++, however.
2017-09-16 08:20:35 -04:00
Jeffrey Walton
4670e3d5bc
Revert "Use -O3 for IBM XL C/C++ (GH #502 )"
...
This reverts commit aa348abd15 . It caused a hang in the TEA algorithm. Also see GH #503 .
2017-09-16 05:55:37 -04:00
Jeffrey Walton
aa348abd15
Use -O3 for IBM XL C/C++ (GH #502 )
...
We held back XL C/C++ due to warnings and self test failures. Since clearing Issue 502, we are OK for -O3 so we can live with the warnings.
2017-09-16 02:19:06 -04:00
Jeffrey Walton
205ebe0871
Add missing newline to IA-32 config output
...
Avoid flushing stream for config line items
Use memcpy in std:: namespace
2017-09-16 01:36:45 -04:00
Jeffrey Walton
2814842b97
Switch to CRYPTOPP_CONSTANT for cpu flags
2017-09-16 01:21:14 -04:00
Jeffrey Walton
5296e087ad
Fix func/subfunc parameter names (GH #502 )
2017-09-16 00:19:14 -04:00
Jeffrey Walton
7bdb62b336
Fix bad SHA152 hash under IBM XL C/C++ compiler (GH #502 )
2017-09-15 18:33:05 -04:00
Jeffrey Walton
b079803856
Fix compile under Embarcadero (GH #498 )
...
[bcc32c Error] blake2.cpp(49): 'alignas' must be specified on definition if it is specified on any declaration
2017-09-15 12:43:18 -04:00
Jeffrey Walton
173a7a8025
Fix compile under Embarcadero (GH #498 )
...
[bcc32 Error] cpu.cpp (131): E2211 Inline assembly not allowed in inline and template functions
2017-09-15 12:42:50 -04:00
Jeffrey Walton
adea69ab68
Avoid increment during stores of 6x blocks
...
This provides another 0.1 cpb with GCC
2017-09-14 21:06:44 -04:00
Jeffrey Walton
25efb7a140
Use 6x blocks for ARMv8 AES rather than 4x
...
We gain 0.1 to 0.3 cpb, depending on the mode
2017-09-14 20:32:06 -04:00
Jeffrey Walton
51752cb91a
Fix "X causes a section type conflict with Y" for GCC on AIX (GH #499 )
...
We have no idea what caused the issue or why it fixed it
2017-09-14 17:45:55 -04:00
Jeffrey Walton
58890ff053
Use 6x blocks for Power8 AES rather than 4x
...
Perforamnce increased for all modes when performing 6x vs 4x. 8x and 12x performed worse.
Here are the numbers:
4x Blocks:
<TR><TH>AES/CTR (128-bit key)<TD>1563<TD>2.1<TD>0.409<TD>1392
<TR><TH>AES/CTR (192-bit key)<TD>1403<TD>2.3<TD>0.450<TD>1529
<TR><TH>AES/CTR (256-bit key)<TD>1280<TD>2.5<TD>0.482<TD>1639
<TR><TH>AES/CBC (128-bit key)<TD>582<TD>5.6<TD>0.359<TD>1222
<TR><TH>AES/CBC (192-bit key)<TD>517<TD>6.3<TD>0.394<TD>1339
<TR><TH>AES/CBC (256-bit key)<TD>474<TD>6.8<TD>0.432<TD>1469
<TR><TH>AES/OFB (128-bit key)<TD>533<TD>6.1<TD>0.402<TD>1368
<TR><TH>AES/CFB (128-bit key)<TD>563<TD>5.8<TD>0.461<TD>1568
<TR><TH>AES/ECB (128-bit key)<TD>1829<TD>1.8<TD>0.240<TD>817
6x Blocks:
<TR><TH>AES/CTR (128-bit key)<TD>1750<TD>1.7<TD>0.406<TD>1300
<TR><TH>AES/CTR (192-bit key)<TD>1638<TD>1.9<TD>0.447<TD>1432
<TR><TH>AES/CTR (256-bit key)<TD>1528<TD>2.0<TD>0.482<TD>1541
<TR><TH>AES/CBC (128-bit key)<TD>582<TD>5.2<TD>0.358<TD>1145
<TR><TH>AES/CBC (192-bit key)<TD>517<TD>5.9<TD>0.394<TD>1260
<TR><TH>AES/CBC (256-bit key)<TD>474<TD>6.4<TD>0.431<TD>1379
<TR><TH>AES/OFB (128-bit key)<TD>533<TD>5.7<TD>0.400<TD>1281
<TR><TH>AES/CFB (128-bit key)<TD>563<TD>5.4<TD>0.461<TD>1476
<TR><TH>AES/ECB (128-bit key)<TD>1950<TD>1.6<TD>0.238<TD>763
2017-09-14 16:07:21 -04:00
Jeffrey Walton
08e4ee422e
Avoid increment during stores of 4x blocks
...
This provides another 0.1 cpb with GCC
2017-09-14 15:12:07 -04:00
Jeffrey Walton
ddeae859d0
Use vec_xl_be and vec_xst_be for IBM XL C/C++ compiler
2017-09-14 13:27:49 -04:00
Jeffrey Walton
5289915d72
Fix compiler crash in ppc-simd.cpp
...
I think this is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82112
2017-09-14 01:01:00 -04:00
Jeffrey Walton
63a0af4efa
Fix endianess for s_one on ARM big-endian
2017-09-13 22:52:29 -04:00
Jeffrey Walton
8e52ce6dd2
Load correct value fo 1 under ARM big endian
2017-09-13 21:42:15 -04:00
Jeffrey Walton
c22507e38b
Clear unused variable warnings under Clang
2017-09-13 21:37:55 -04:00
Jeffrey Walton
e891347212
Clear TODO items for setenv-android.sh for 6.0 (GH #491 )
2017-09-13 19:37:48 -04:00
Jeffrey Walton
1c41da35bc
Use AOSP_CPU_OBJ instead of cpu-features.o
2017-09-13 18:58:07 -04:00