Jeffrey Walton
0c82df181c
Update documentation
2019-08-31 07:46:19 -04:00
Jeffrey Walton
033f204a86
Fix .Net 2002 compile
...
This testing occurs on Windows XP. We are still rockin it
2019-08-27 14:44:27 -04:00
Jeffrey Walton
b067d16e88
Update documentation
2019-08-27 10:28:13 -04:00
Jeffrey Walton
29453dcf08
Update comments
2019-08-27 07:52:33 -04:00
Jeffrey Walton
56165883fc
Update comments
2019-08-27 07:08:07 -04:00
Jeffrey Walton
54c8819c70
Fix ElGamal compile on Linux
2019-08-27 06:44:02 -04:00
Jeffrey Walton
fcbfd68dfb
Add specialized Validate() to ElGamal
...
This was added for compatibility with BouncyCastle and other libraries. ElGamals paper and the HAC says to select x over the interval [1,p-1]. Crypto++ selects x over [1,q-1] as with other GFP schemes. Crypto++ fails to validate some of the keys of other libraries.
DL_PublicKey_GFP_OldFormat used to perform a reduction on x, but I think it treated a symptom and not the underlying cause. The underlying cause was, Crypto++ wass too strict in validating the parameter.
Note that wikipedia says to select the privaye key x over [1,q-1]. We are unable to find a reference for the practice, though it is OK.
2019-08-27 06:38:25 -04:00
Jeffrey Walton
90b0699edd
Add private key test data for ElGamal
2019-08-27 06:10:38 -04:00
Jeffrey Walton
e06e3bd7a9
Fix ECP::Double and brainpoolP256r1 (GH #878 )
2019-08-26 18:33:26 -04:00
Jeffrey Walton
66a6994e99
Add asserts to pubkey.h
2019-08-26 14:44:52 -04:00
Jeffrey Walton
8fa8ec9913
Update documentation
2019-08-25 12:20:21 -04:00
Jeffrey Walton
db6d6b38b8
Update documentation
2019-08-25 12:00:28 -04:00
Jeffrey Walton
72f2b72920
Add test data from bug report (GH #876 )
2019-08-24 18:00:03 -04:00
Jeffrey Walton
f78c3c00d2
Regenerate ElGamal test data
2019-08-24 17:49:41 -04:00
Jeffrey Walton
ff941db163
Update documentation
2019-08-24 16:59:39 -04:00
Jeffrey Walton
a2c06c35b8
Use ASN1::elGamal() in ElGamal keys (GH #876 )
2019-08-24 16:17:03 -04:00
Jeffrey Walton
a7e83e6bf4
Update asserts in gfpcrypt.cpp
2019-08-24 15:48:14 -04:00
Jeffrey Walton
3d96234038
Fix typedef for MSVC (GH #876 )
2019-08-24 06:44:14 -04:00
Jeffrey Walton
29e3818fd2
Add typedef for ElGamal::PrivateKey and ElGamal::PublicKey (GH #876 )
2019-08-24 04:44:22 -04:00
Jeffrey Walton
b80693d532
Add OID for ElGamal encryption (GH #876 )
2019-08-24 03:18:29 -04:00
Jeffrey Walton
8130bd7a24
Update comments
2019-08-19 08:30:11 -04:00
Jeffrey Walton
b9ff95f35a
Add define for CRYPTOPP_BOOL_ARM64
2019-08-18 04:27:25 -04:00
Jeffrey Walton
6545754337
Check size_t to DWORD and ULONG conversions
...
DWORD and ULONG are 32-bit. The conversion from size_t could fail, and the RNG would return a truncated result. I think it is low risk, but the test for the conversion test is cheap.
2019-08-17 21:19:04 -04:00
Jeffrey Walton
d49c1a1605
Update documentation
2019-08-17 14:49:03 -04:00
Jeffrey Walton
e22700f741
Fix use of MaxDerivedKeyLength (GH #874 )
2019-08-16 07:12:14 -04:00
Jeffrey Walton
c0a5a06a82
Fix use of MaxDerivedKeyLength (GH #874 )
...
Also fix memcpy with NULL buffer
2019-08-16 06:45:30 -04:00
Jeffrey Walton
2ba9d3d00f
Restore former Test_RandomNumberGenerator behavior
...
There's no need to special case for HURD. No one uses it
2019-08-12 14:55:05 -04:00
Jeffrey Walton
7606c35fda
Update comments
2019-08-12 06:32:21 -04:00
Jeffrey Walton
ea08de08d6
Add missing pumpAll to Test_RandomNumberGenerator
2019-08-12 06:27:10 -04:00
Jeffrey Walton
197f5fb1df
Add ASSERT to check m_fd for values <0
...
We are seeing RNG falures on HURD, but we are not throwing when constructing BlockingRng or NonblockingRng. This is despite the fact that /dev/urandom is missing during testing. NonblockingRng should always thwo when /dev/urandom is missing.
2019-08-12 05:40:22 -04:00
Jeffrey Walton
6028587b9f
Tighten Test_RandomNumberGenerator test
...
Debian HURD was slipping between the cracks. HURD appeared to be a minor failure because entropy on the heap improved the test result. After we zero'd the block, it was a catastrophic failure.
2019-08-12 05:34:11 -04:00
Jeffrey Walton
34e49627b7
Use C++ dynamic initialization if available
2019-08-12 00:11:41 -04:00
Jeffrey Walton
2d6895acb4
Update documentation
2019-08-11 22:37:15 -04:00
Jeffrey Walton
247418eec0
Use Bash arithmetic operators
2019-08-11 14:54:14 -04:00
Jeffrey Walton
11c5d14f85
Whitespace check-in
2019-08-10 03:24:52 -04:00
Jeffrey Walton
04b2a20c5d
Restore ECP ABI (GH #869 )
...
Placing AdditionFunction as an inner class of ECP broke the ABI. We need to maintain the ABI so distros can patch Crypto++ 8.2.
2019-08-09 17:34:14 -04:00
Jeffrey Walton
7ac5791199
Fix cryptest.sh when swap is 0
...
If there is enough RAM then we don't need a swap file. I've got a Core i7-8800 with 64 GB or RAM that does not need a swap file.
2019-08-09 17:18:58 -04:00
Jeffrey Walton
242df465e8
Update comments
2019-08-07 23:30:48 -04:00
Jeffrey Walton
c4700ae0b9
Avoid bitwise operation on boolean values
2019-08-07 23:27:33 -04:00
Jeffrey Walton
348e8e3b30
Clear unreachable code warnings under VC++
2019-08-07 22:54:32 -04:00
Jeffrey Walton
1a5155fd96
Split public key benchmarks into integers and elliptic curves
2019-08-07 04:20:37 -04:00
Jeffrey Walton
f3dd3d2559
Avoid temporary ECP::Point in ECP Addition and Double
...
This regains a lot of performance lost to the const-timeness (GH #869 )
2019-08-07 02:43:13 -04:00
Jeffrey Walton
b5fe6ab383
Clear parenthesis warning with GCC
2019-08-07 01:57:59 -04:00
Jeffrey Walton
7dc3b73e92
Add rdseed.asm to FileList.txt
2019-08-06 23:25:01 -04:00
Jeffrey Walton
7bba334641
Whitespace check-in
2019-08-06 21:42:43 -04:00
Jeffrey Walton
b1c691b53a
Fix RDSEED hang on x86 (GH #872 ) ( #873 )
...
Calls to `MASM_RDSEED_GenerateBlock` would hang for an unknown reasons on Windows 10 and VS2017/VS2019 toolchains. Similar calls to `MASM_RDRAND_GenerateBlock` worked as expected. They were effectively the same code. The only differences were the function names and the opcodes (they were literally copy/paste).
Splitting `rdrand.asm` (with both `RDRAND` and `RDSEED`) into `rdrand.asm` (with `RDRAND`) and `rdseed.asm` (with `RDSEED`) resolved the issue. We don't know why.
2019-08-06 21:01:22 -04:00
Jeffrey Walton
e5ab7919f9
Remove unneeded T in ECP Add()
...
Switch to 'R' variable in AdditionFunction to avoid shadow warnings
2019-08-06 03:28:53 -04:00
Jeffrey Walton
0ded32192e
Avoid branches in Montgomery Add() (GH #869 )
2019-08-06 03:14:03 -04:00
Jeffrey Walton
5ae70e22b9
Avoid branches in Montgomery Double() (GH #869 )
2019-08-06 01:23:37 -04:00
Jeffrey Walton
df18c5b745
Add Debug and Release linker flags
2019-08-06 00:20:59 -04:00
Jeffrey Walton
41864fd49e
Use local labels for RDRAND and RDSEED code (GH #872 )
...
This did not fix the issue, but it is something on the TODO list.
2019-08-06 00:18:56 -04:00
Jeffrey Walton
a01711e347
Fix CopyToRoot target with spaces in path
2019-08-05 13:27:54 -04:00
Jeffrey Walton
c9ef9420e7
Fix ECP leakage in Add() and Double() (GH #869 , PR #871 )
...
This check-in provides the fix for leaks in ECP's Add() and Double(). The fixes were taken from Joost Renes, Craig Costello, and Lejla Batina's [Complete addition formulas for prime order elliptic curves](https://eprint.iacr.org/2015/1060.pdf ).
The Pull Request includes two additional changes that were related to testing the primary fix. First, an `AuthenticatedKeyAgreementWithRolesValidate` interface was added. It allows us to test key agreement when roles are involved. Roles are "client", "server", "initiator", "recipient", etc.
Second, `SetGlobalSeed` was added to `test.cpp` to help with reproducible results. We had code in two different places that set the seed value for the random number generator. But it was sloppy and doing a poor job since results could not be reproduced under some circumstances.
2019-08-05 03:51:58 -04:00
Jeffrey Walton
b3eb4c6a69
Fix AuthenticatedKeyAgreementWithRolesValidate messages
2019-08-03 23:59:25 -04:00
Jeffrey Walton
5aac8506bd
Use recipient rather than responder in authenticated key agreement
...
The recipient may not respond (though they do in the case of these key agreement schemes)
2019-08-03 23:52:50 -04:00
Jeffrey Walton
0b42a18cde
Update documentation
2019-08-03 23:25:15 -04:00
Jeffrey Walton
4e6dd922f7
Update documentation
2019-08-03 22:33:46 -04:00
Jeffrey Walton
c3e0d123b2
Update documentation
2019-08-03 22:08:07 -04:00
Jeffrey Walton
37c0fb7ba8
Update documentation
2019-08-03 22:05:01 -04:00
Jeffrey Walton
057c2b434b
Update documentation
2019-08-03 21:58:26 -04:00
Jeffrey Walton
47a58050c6
Update documentation
2019-08-03 19:22:17 -04:00
Jeffrey Walton
2e6ccd7fb1
Fix authenticated key agreement domain parameter consistency test
2019-08-03 17:01:02 -04:00
Jeffrey Walton
7eeb954b23
Add AuthenticatedKeyAgreementValidateWithRoles free standing test function
2019-08-03 16:32:36 -04:00
Jeffrey Walton
3c5cb828b1
Spelling
2019-08-03 15:38:39 -04:00
Jeffrey Walton
84c4ae429f
Fix const-ness in HMQV and FHMQV
2019-08-03 03:24:26 -04:00
Jeffrey Walton
176cab0dc5
Update comments
...
Reference the bug report in DL_SignerBase::SignAndRestart for future readers
2019-07-29 10:36:29 -04:00
Ján Jančár
f68f00f560
Fix ECDSA scalar multiplication leakage of bit-length. (GH #870 )
...
This fixes the timing leakage of bit-length of nonces in ECDSA by essentially
fixing the bit-length, by using a nonce equivalent modulo the subgroup order.
2019-07-29 10:12:14 -04:00
Jeffrey Walton
739e5799e3
Whitespace check-in
2019-07-27 15:56:15 -04:00
Jeffrey Walton
e4c402ace9
Clear truncation warning in rng.cpp (PR #867 )
2019-07-25 04:52:24 -04:00
Andrew Marshall
12382a14be
Use fixed size temporary in LC_RNG for consistency across platforms ( #867 )
2019-07-23 12:39:51 -04:00
Jeffrey Walton
614795f3e1
Add -DNDEBUG for openSUSE standrad build test
2019-07-22 16:10:43 -04:00
Jeffrey Walton
6eab4b7c32
Add openSUSE standard build test (GH #865 )
2019-07-22 15:37:25 -04:00
Jeffrey Walton
9d2cab7548
Add CRYPTOPP_CXX14 define
2019-07-22 01:08:12 -04:00
Jeffrey Walton
a7f2796dda
Update comments
2019-07-21 22:21:10 -04:00
Jeffrey Walton
7b7827e9cb
Clear Clang warning on SSE2 load
2019-07-21 22:20:55 -04:00
Jeffrey Walton
46e58df837
Add LINK_LIBRARY_PATH (GH #866 )
2019-07-21 15:57:26 -04:00
Jeffrey Walton
3747e3d944
Don't use BASH_SOURCE in cryptest.sh
2019-07-21 03:19:14 -04:00
Jeffrey Walton
ed7f4a0493
Use LINK_LIBRARY in cryptest-symbols.sh script (GH #866 )
2019-07-21 03:16:01 -04:00
Jeffrey Walton
dfaf2fc453
Remove references to GNUmakefile.shared (GH# 866)
2019-07-21 03:06:44 -04:00
Jeffrey Walton
ef6e57990e
Use LINK_LIBRARY in cryptest.sh script (GH #866 )
2019-07-21 03:02:43 -04:00
Jeffrey Walton
52ad132134
Add link-library variable to Makefiles (GH #866 )
...
This should help distros and Crypto++ test scripts
2019-07-21 02:24:06 -04:00
Jeffrey Walton
5957b19fb8
Fix AVX2 feature test under Clang 3.3
...
Clang 3.3 appears to support some of AVX2, but it is missing _mm256_broadcastsi128_si256.
2019-07-21 00:27:23 -04:00
Jeffrey Walton
22a55bbbc5
Use wildcard for FORTIFY_SOURCE filter on TCXXFLAGS (GH #865 )
2019-07-19 11:26:20 -04:00
Jeffrey Walton
417fbd719a
Fix missing if statement
...
Copy/paste error from the regular GNUmakefile
2019-07-19 00:16:23 -04:00
Jeffrey Walton
058a59814f
Fix TCXXFLAGS using openSUSE standard flags (GH #865 )
2019-07-19 00:14:25 -04:00
Jeffrey Walton
07c208dbc6
Filter out static_assert from Posix assert test
2019-07-14 22:43:31 -04:00
Jeffrey Walton
769643bbe1
Fix macro paste in CRYPTOPP_ASSERT_JOIN
2019-07-14 19:09:05 -04:00
Jeffrey Walton
388a2e6ded
Fix macro paste in CRYPTOPP_ASSERT_JOIN
2019-07-14 19:04:52 -04:00
Jeffrey Walton
f5881d121a
CRYPTOPP_CXX11_STATIC_ASSERT -> CRYPTOPP_CXX14_STATIC_ASSERT
...
WHoops, this is a C++14 feature
2019-07-14 19:02:58 -04:00
Jeffrey Walton
002e794ae2
Use C++ static_assert from N3928 when available
2019-07-14 18:28:51 -04:00
Jeffrey Walton
5de1089c8c
Update documentation
2019-07-14 12:50:50 -04:00
Jeffrey Walton
e8b07b162f
Avoid preprocessor error in SIZE_MAX (GH #864 )
2019-07-14 00:52:30 -04:00
Jeffrey Walton
6ae9c055cc
Move CRYPTOPP_CXX11 down in list of defines
2019-07-11 12:12:19 -04:00
Jeffrey Walton
f0d7917719
Move CRYPTOPP_NO_CXX11 and CRYPTOPP_NO_CXX17 to config_cxx.h
...
It looks like these two were overlooked during refactoring
2019-07-11 12:10:19 -04:00
Jeffrey Walton
8260dd1e81
Increase m_buf size (GH #862 )
2019-07-10 15:54:48 -04:00
Jeffrey Walton
6d69043403
Add BufferedTransformation GetWord64 and PutWord64 (GH #862 )
2019-07-10 10:04:58 -04:00
Jeffrey Walton
a76c6a203f
Update documentation
2019-07-10 08:10:44 -04:00
Jeffrey Walton
60e7bf3081
Update documentation
2019-07-08 18:46:27 -04:00
Jeffrey Walton
195cd6e7c8
Update documentation
2019-07-06 16:06:27 -04:00
Jeffrey Walton
2ffa70fbc6
Clear asserts under DEBUG builds
2019-07-06 15:57:08 -04:00
Jeffrey Walton
fd7115fc8b
Remove duplicate CRYPTOPP_GCC_VERSION test
2019-07-06 08:06:00 -04:00
Jeffrey Walton
b76a010dda
Cleanup PowerPC defines
2019-07-06 07:35:36 -04:00
Jeffrey Walton
f0a2967191
Fix missing binary operator
2019-07-06 07:07:16 -04:00
Jeffrey Walton
37de652635
Use C++ feature test macros when available
...
There are not too many of them. __cpp_threadsafe_static_init may be useful for less frequently used compilers and platforms.
2019-07-06 07:03:26 -04:00
Jeffrey Walton
76fa704cbe
Avoid potential uninitialized read in AutoSeededX917RNG
...
This is a minor fix to AutoSeededX917RNG::Reseed. Valgrind produces a finding if user input is too small or seed size is too large. The constraints make it a little tricky to use correctly. HKDF will always produce the correct amount of material with provable security, and avoid the Valgrind finding.
2019-07-06 02:58:43 -04:00
Jeffrey Walton
6c995e215a
Fold CRYPTOPP_VALGRIND into CRYPTOPP_COVERAGE
2019-07-05 19:10:01 -04:00
Jeffrey Walton
d4b3e1535a
Limit GCC workaround to 5.3 on PowerPC
...
GCC fixed the issue at GCC 5.3. Also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31690
2019-07-05 18:08:05 -04:00
Jeffrey Walton
9c28cf2227
Whitespace check-in
...
Cleanup after the VMAC fixes
2019-07-05 17:26:50 -04:00
Jeffrey Walton
ad99fc5b05
Clear Asan finding in VMAC under 32-bit inline ASM (GH #860 )
...
Second try. The first try cleared the Asan finding but broke at -O3. Eventually we will skin this cat.
2019-07-05 16:33:01 -04:00
Jeffrey Walton
7fd751ed36
Revert Asan finding in VMAC change (GH #860 )
...
cryptest.sh showed it broke at -O3
2019-07-05 11:58:35 -04:00
Jeffrey Walton
f7986129df
Clear Asan finding in VMAC under 32-bit inline ASM (GH #860 )
...
This one has been nagging us for a while. Tested OK under i686 and x86_64.
2019-07-05 03:38:03 -04:00
Jeffrey Walton
6bead34bd9
Update headers for 'make dep'
2019-07-05 02:42:27 -04:00
Jeffrey Walton
ae04195d1f
Use xattr in cryptest-autotools.sh
2019-07-04 16:06:51 -04:00
Jeffrey Walton
6afa6fc213
Fix cryptest-autotools.sh on OS X
...
Needed to remove quarantine bit
2019-07-04 15:36:17 -04:00
Jeffrey Walton
6eeebaf26b
Update documentation
2019-07-04 13:57:33 -04:00
Jeffrey Walton
2baa37efac
Clear unused parameter warnings for GCC with -Wextra (GH #856 )
2019-07-03 15:17:53 -04:00
Jeffrey Walton
cd0d145635
Add legacy ECIES EC2N cryptosystem and kat (GH #856 )
2019-07-03 03:06:58 -04:00
Jeffrey Walton
ce6d3c1306
Add legacy ECIES ECP cryptosystem and kat (GH #856 )
2019-07-03 01:41:23 -04:00
Mouse
5d0ceb3b04
Revert #857 for now
...
Travis CI fails "deep tests" of DLIES with #857 applied. Let's revert it for now and get back to
```c++
cipherKey = key + MAC::DEDAULT_KEYLENGTH;
```
and see if it improves the situation.
2019-07-02 23:24:45 -04:00
Jeffrey Walton
eeb7dadc76
Fix missing _mm_roti_epi32 and _mm_roti_epi64 under GCC (GH #859 )
2019-07-02 19:10:11 -04:00
Jeffrey Walton
fbbf0a08e8
Add missing XOP header for blake2b_simd.cpp (GH #859 )
...
The Gentoo folks caught a bug at https://bugs.gentoo.org/689162 . The 689162 bug uses -march=bdver1 -msse4.1 on a AMD Bulldozer machine.
Investigating the issue we are missing the XOP header blake2b_simd.cpp. However, adding the XOP header is not enough for this particular config. Four source files fail to compile with the expected headers. We are waiting on the GCC folks to get back to us with a fix.
2019-07-02 16:55:00 -04:00
Alon Bar-Lev
2eb400c52f
config: guard CRYPTOPP_SSE2_INTRIN_AVAILABLE with CRYPTOPP_DISABLE_SSE2 ( #858 )
...
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2019-07-02 16:45:03 -04:00
Mouse
c80a7ad028
Merge pull request #857 from rectalogic/nullhash
...
Use MAC::DIGESTSIZE in ECIES SymmetricEncrypt/SymmetricDecrypt
2019-07-02 11:06:29 -04:00
Mouse
97f5174226
Complete change from DEFAULT_KEYLENGTH to DIGESTSIZE in DLAES
...
Change from `MAC::DEFAULT_KEYLENGTH` to `MAC::DIGESTSIZE` in `DL_EncryptionAlgorithm_Xor` was only partially done. This was discovered when null hash was used. This, along with the proposed fix, was discovered by Andrew Wason (thanks!).
2019-07-02 11:02:07 -04:00
Andrew Wason
9c307ff4ba
Use MAC::DIGESTSIZE in ECIES SymmetricEncrypt/SymmetricDecrypt
...
Fixes #856
2019-07-02 10:47:46 -04:00
Jeffrey Walton
445ec61125
Remove copy ctor from DERGeneralEncoder and BERGeneralDecoder
...
GCC was giving too many warnings at -Wextra. We also could not comply with Rule of 3 because it resulted in compile failures in C++98 and C++03
2019-07-01 13:29:46 -04:00
Jeffrey Walton
c3d4e79a09
Use CRYPTOPP_CXX11_DELETED_FUNCTIONS in NotCopyable
2019-07-01 13:27:51 -04:00
Jeffrey Walton
36e8dfeca8
Add define for C++11 deleted functions
2019-07-01 08:17:22 -04:00
Jeffrey Walton
18d5e5528f
Fix divide by 0 finding (GH #855 )
...
I'm not sure which tool is producing this finding. I am pretty sure it is a false positive, but clear it for the sake of dark and silent cockpits
2019-06-28 14:22:03 -04:00
Jeffrey Walton
26a59cd94b
Update README
2019-06-15 06:42:34 -04:00
Jeffrey Walton
840bc65740
Update README
2019-06-15 06:20:49 -04:00
Mouse
03619c0800
Merge pull request #853 from DimaStebaev/pull-request
...
Compilation warning fix.
2019-06-12 07:37:52 -04:00
Dmytro Stebaiev
d24c991913
Pull changes from master branch
2019-06-10 11:25:46 +03:00
Jeffrey Walton
0ea4354157
Update comments
2019-06-09 12:52:10 -04:00
Jeffrey Walton
570a8e1b36
Whitespace check-in
2019-06-09 12:12:46 -04:00
Jeffrey Walton
955ac6fe24
Rework SSE2 and AVX2 loads and stores
2019-06-09 04:29:40 -04:00
Jeffrey Walton
8c78985de2
Add ModularArithmetic::operator=
2019-06-09 02:56:30 -04:00
Jeffrey Walton
c1f4d17e10
Cleanup BERGeneralDecoder constructors
...
For real this time...
2019-06-09 02:03:06 -04:00
Jeffrey Walton
55fe6a2191
Cleanup BERGeneralDecoder constructors
2019-06-09 02:00:53 -04:00
Jeffrey Walton
8fab1c3677
Revert changes for lgtm findings
...
This broke SunCC to the point of no repair. SunCC is using AVX2 instructions for C++ and SSE2. Man this compiler sucks...
2019-06-09 01:49:44 -04:00
Jeffrey Walton
3ce1823fd1
Fix SunCC compile
...
Sun's compiler is mostly braindead.
2019-06-09 00:00:22 -04:00
Jeffrey Walton
6a11f00768
Clear lgtm findings
2019-06-08 12:59:14 -04:00
Jeffrey Walton
43b01973b1
Clear lgtm findings
...
We did some refactoring and added sse_simd.h. Over time more SSE functions will likely move into sse_simd.h
2019-06-08 11:00:11 -04:00
Jeffrey Walton
afffba7b7b
Add -mtune=native option to makefile
...
Added for Solaris 11 .3 on SPARC64
2019-06-07 13:02:25 -04:00
Dmytro Stebaiev
fa9187ac77
Fix compilation warning
2019-06-07 18:17:15 +03:00
Jeffrey Walton
ed4996f652
Cleanup governor.sh script
2019-06-05 23:21:00 -04:00
Jeffrey Walton
29a30b74b0
Update head comments
2019-06-05 23:09:58 -04:00
Jeffrey Walton
17fa3031b3
Clear lgtm finding in ECP class
2019-06-05 10:52:45 -04:00
Jeffrey Walton
d8122cec16
Avoid ARM rev on Aarch64
...
This broke Aarch64
2019-06-04 21:17:13 -04:00
Jeffrey Walton
6c009ddf43
Remove dummy operator= in ModularArithmetic
2019-06-04 19:05:33 -04:00
Jeffrey Walton
994c98b6c0
Fix GCC compile on AIX
...
In file included from test.cpp:31:0:
validate.h:213:93: error: operator '||' has no right operand
#elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE)
2019-06-04 09:45:33 -04:00
Jeffrey Walton
3afb1f1099
Fix GCC compile on AIX
...
In file included from test.cpp:31:0:
validate.h:213:93: error: operator '||' has no right operand
#elif (_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE)
2019-06-04 09:37:28 -04:00
Jeffrey Walton
198b081df5
Add assert to RemainingLength member function
2019-06-04 09:29:01 -04:00
Jeffrey Walton
238578a808
Clear lgtm findings
...
The lgtm service asks for scoped calls to IsolatedInitialize. The code is a tad bit more readable, so we will clear the findings.
2019-06-04 05:31:46 -04:00
Jeffrey Walton
462bcc859d
Update Poly1305 nonce length check
2019-06-04 04:39:19 -04:00
Jeffrey Walton
a644008679
Cleanup ASN.1 encoders and decoders (GH #851 )
2019-06-04 02:49:16 -04:00
Jeffrey Walton
ab538471b1
Update documentation
2019-06-04 02:46:43 -04:00
Jeffrey Walton
f330c0eca8
Clear warning on missing assignment operator
2019-06-03 23:17:15 -04:00
Jeffrey Walton
c76711237a
Call base class IsolatedInitialize
2019-06-03 06:45:58 -04:00
Jeffrey Walton
3faf716d73
Call base class IsolatedInitialize
2019-06-03 06:44:58 -04:00
Jeffrey Walton
0a20141f36
Clear warning for assignment operator in HuffmanNode
2019-06-03 06:32:24 -04:00
Jeffrey Walton
54d48ac1f4
Add header guard for serpentp.h
2019-06-03 06:17:58 -04:00
Jeffrey Walton
342cdb9589
Clear lgtm warning on unsafe functions
2019-06-03 05:41:58 -04:00
Jeffrey Walton
959494871f
Guard use of volatile cast in TEA and XTEA
2019-06-02 05:29:08 -04:00
Jeffrey Walton
9538f2d715
Fix compile on iOS
2019-06-01 08:05:39 -04:00
Jeffrey Walton
f00b0427aa
Exit setenv script if not sourced
2019-06-01 07:43:32 -04:00
Jeffrey Walton
1a0d7c516d
Disable BMI2 code paths in Integer class (GH #850 )
2019-06-01 00:14:19 -04:00
Jeffrey Walton
8e27c6b3fa
Fix OS X compile with Clang later than 6.0
...
It looks like Apple Clang 6.0 does not provide _blsr_u32 and friends. Later versions of Clang defines _blsr_u32 and it causes a stream of warnings.
2019-05-31 23:33:17 -04:00
Jeffrey Walton
392ec3465e
Fix OS X compile with Clang 6.0
2019-05-31 23:03:24 -04:00
Jeffrey Walton
4952fa489d
Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friends
...
Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
2019-05-31 09:42:39 -04:00
Jeffrey Walton
fb0bef1eb6
Use BMI2 when available for MultiplyWordsLoHi, MulAcc and friends
...
Using BMI2 saves about 0.03 ms on a Core i5 6400 @ 2.7 GHz. It is small but measurable. It also gives GCC more freedom in selecting memory or register operands
2019-05-31 05:37:35 -04:00
Jeffrey Walton
aed6e935d6
Update documentation
2019-05-30 23:22:47 -04:00
Jeffrey Walton
1f2be58434
Update Doxygen comments
2019-05-30 22:30:22 -04:00
Jeffrey Walton
0dd07252d2
Update comments
2019-05-28 20:19:34 -04:00
Jeffrey Walton
e40de18538
Update comments
2019-05-28 20:18:58 -04:00
Jeffrey Walton
b61da7acfe
Update cryptest-autotools script
2019-05-28 06:36:01 -04:00
Jeffrey Walton
a2e7c26f6c
Add 16-bit rev16 and rbit
2019-05-28 02:50:58 -04:00
Jeffrey Walton
623059f28c
Use ARM rev and rbit when appropriate
...
We tried to add a ByteReverse(word64) and BitReverse(word64) overloads but GCC was producing bad code for it.
2019-05-27 14:27:12 -04:00
Jeffrey Walton
81da61fe7b
Breakout sha_block_data_order and sha_block_data_order_neon (GH #847 )
2019-05-26 22:10:26 -04:00
Jeffrey Walton
d4b533a60f
Add Thumb and Arm versions of CPU_ProbeARMv7()
2019-05-26 17:06:55 -04:00
Jeffrey Walton
7cd8d0278a
Remove VFP_ABI_PUSH and VFP_ABI_POP macros
2019-05-26 02:14:03 -04:00
Jeffrey Walton
9a3c1e351d
Clear Valgrind finding in IncrementCounterByOne
...
The single buffer IncrementCounterByOne generated a Valgrind finding on ARM. This commit uses the same pattern for both overloads in case Valgrind wants to fire on the two-buffer version.
2019-05-25 19:49:49 -04:00
Jeffrey Walton
ca11105a40
Clear sign comparison warning under GCC
2019-05-25 17:00:32 -04:00
Jeffrey Walton
f90c162b68
Fix IncrementCounterByOne
...
This was introduced earlier in the day when clearing a Valgrind finding. It tested good with the self tests. However, we double process byte[0] if there's a carry.
2019-05-25 07:02:32 -04:00
Jeffrey Walton
fc10a7f1ea
Fix SHA512 on ARM benchmarks
...
This was a mistake when porting from Cryptogams to Crypto++. The macros VFP_ABI_PUSH and VFP_ABI_POP needed to be defined because they save and restore SIMD register state. They were originally missing during the port. The benchmarks would hang because the doubles we used for benchmarking were blown away in sha512_block_data_order_neon.
2019-05-25 06:23:19 -04:00
Jeffrey Walton
92df2a685f
Clear Valgrind warnings on ARM
...
I don't believe these should have been findings. They were clear on x86, Aarch64 and PowerPC.
2019-05-25 03:41:05 -04:00
Jeffrey Walton
1400757fea
Update comments
2019-05-25 00:43:27 -04:00
Jeffrey Walton
ea96b9d375
Use CRYPTOGAMS_armcap_P for ARM (GH #846 )
...
Andy advised against removing the global caps variable. This commit reintroduces CRYPTOGAMS_armcap_P. However, due to the shared object symbol loading problem, we needed to use CRYPTOGAMS_armcap_P as a global, and not CRYPTOGAMS_armcap as a local. Using CRYPTOGAMS_armcap_P directly caused the symbol to be marked as R_ARM_ABS32 which avoids the problem with R_ARM_REL32.
2019-05-24 16:33:47 -04:00
Jeffrey Walton
1650cac3f3
Update comments
2019-05-23 19:35:05 -04:00
Jeffrey Walton
2a09376211
Remove const_cast from CryptogamsArmCaps()
2019-05-23 03:17:17 -04:00
Jeffrey Walton
c5bb85754f
Add RDRAND and RDSEED test programs
...
These are for Autotools on Solaris.
2019-05-22 21:25:31 -04:00
Jeffrey Walton
fed4a55f39
Update cryptest-autotools script
2019-05-22 21:03:19 -04:00
Jeffrey Walton
57b85fafce
Update Cryptogams SHA headers (GH #846 )
2019-05-22 19:11:16 -04:00
Jeffrey Walton
7eaa5837e0
Fix "unexpected reloc type 0x03" for ARM shared object (GH #846 )
2019-05-22 19:00:08 -04:00
Jeffrey Walton
ce5d5d5c0f
Use CRYPTOGAMS_armcap_loc for word label
2019-05-22 06:37:16 -04:00
Jeffrey Walton
0a4b370d3f
Use CRYPTOGAMS_armcaps
...
It looks like CRYPTOGAMS_armcap was used in some places, and it broke Autotools
2019-05-22 05:46:06 -04:00
Jeffrey Walton
13e3a19e94
Remove __KERNEL__ guard
...
Andy's code is used in the Linux kernel. The define is not needed here.
2019-05-22 05:12:16 -04:00
Jeffrey Walton
073c246595
Rename CRYPTOGAMS_armcap_P to CRYPTOGAMS_armcap
2019-05-22 05:01:27 -04:00
Jeffrey Walton
50dd3ad354
Spelling
2019-05-22 03:04:38 -04:00
Jeffrey Walton
7287a79669
Use config_ver.h in change-version script
2019-05-22 02:56:37 -04:00
Jeffrey Walton
1abab8050e
Clear documentation warnings
2019-05-22 02:53:26 -04:00
Jeffrey Walton
879b8c6fe9
Remove unused CLANG_INTEGRATED_ASSEMBLER from Makefile
...
This is an artifact that should have been removed at CRYPTOPP_DISABLE_MIXED_ASM.
2019-05-21 20:05:44 -04:00
Jeffrey Walton
f396ade93a
Rename XGETBV to XGETBV64
2019-05-21 19:44:48 -04:00
Jeffrey Walton
6f3be56c9d
Update comments
2019-05-21 19:40:11 -04:00
Jeffrey Walton
02cdbf61d3
Rename ExtendedControlRegister to XGETBV
2019-05-21 19:31:13 -04:00
Jeffrey Walton
cf85d768b4
Fix armv8l-unknown-linux-gnueabihf yet again
2019-05-21 18:48:13 -04:00
Jeffrey Walton
5e15b46234
Fix Aarch64 compile in CPU_ProbeARMv7
...
Previous to the Cryptogams cut-in we could be sloppy and return anything for ARMv8. Now e have real code backing ARMv7 we need to return an accurate value.
2019-05-21 08:13:52 -04:00
Jeffrey Walton
268ea61f1c
Cutover to CRYPTOPP_LLVM_CLANG_VERSION (GH #845 )
...
We were using CRYPTOPP_CLANG_VERSION in some places.
2019-05-21 07:54:47 -04:00
Jeffrey Walton
2d4a932c33
Remove -tvos_simulator_version_min from AppleTVSimulator
...
It did not clear the problem.
2019-05-21 07:08:41 -04:00
Jeffrey Walton
5b1cae0c63
Fix compile using MSVC 2013 ARM
2019-05-21 06:54:33 -04:00
Jeffrey Walton
751515901b
Limit Cryptogams AES and SHA to Linux distros
...
The Apple assembler cannot translate the source files for iOS.
2019-05-21 05:59:58 -04:00
Jeffrey Walton
ddb9249444
Fix source warning
2019-05-21 05:44:21 -04:00
Jeffrey Walton
1973674732
Add sanity check to setenv-*.sh scripts
...
Prompt user to source the script when required. Whitespace check-in
2019-05-21 05:37:40 -04:00
Jeffrey Walton
3e897eb0f6
Use CRYPTOPP_ARM_NEON_AVAILABLE in neon_simd.cpp
2019-05-21 05:11:24 -04:00
Jeffrey Walton
02baab2307
Enable Cryptogams AES on ARM using Clang
...
It looks like AES needed -mthumb for Clang. SHA must not use -mthumb under Clang due to a crash.
2019-05-21 04:23:40 -04:00
Jeffrey Walton
6acbbf1849
Fix crash in GCM mode on ARM with -mthumb
2019-05-21 04:03:22 -04:00
Jeffrey Walton
08235400b0
Add CRYPTOPP_CLANG_VERSION for ARM asm defines
...
We should be using both CRYPTOPP_APPLE_CLANG_VERSION and CRYPTOPP_LLVM_CLANG_VERSION. We'll loop back to it when we have some time.
2019-05-21 03:02:35 -04:00
Jeffrey Walton
5fb03078eb
Use void return value for Cryptogams SHA functions
2019-05-21 02:38:30 -04:00
Jeffrey Walton
e8603143dc
Whitespace check-in
...
We also simplified the CPU_ProbeNEON logic a bit to a vmov.u32 and vshl.u32.
2019-05-21 02:21:15 -04:00
Jeffrey Walton
40251d9b7f
Guard CPU_ProbeARMv7 with CRYPTOPP_BOOL_ARM32 (GH #844 )
...
We make these queries available on all platforms so folks don't need to guard code.
2019-05-20 23:33:06 -04:00
Jeffrey Walton
c456d6aa69
Guard CPU_ProbeARMv7 with CRYPTOPP_BOOL_ARM32 (GH #844 )
...
We make these queries available on all platforms so folks don't need to guard code.
2019-05-20 23:30:12 -04:00
Jeffrey Walton
cc011d2e44
Remove Aarch32 and Aarch64 from CPU_QueryARMv7
...
I believe some of the code may be generated differently. When testing CPU_ProbeARMv7 I had trouble compiling it on ARMv8.
2019-05-20 23:09:57 -04:00
Jeffrey Walton
a9be7ced86
Fix CPU_QueryARMv7 for Clang (GH #844 )
...
This fixes the query under Clang. This appears to be a trickier problem because there is no explicit define for HWCAP_ARMv7. We rely on HWCAP_NEON as a proxy, or fallback to a CPU_ProbeARMv7.
2019-05-20 23:02:36 -04:00
Jeffrey Walton
a164c1f41d
Fix CPU_ProbeARMv7 for Clang (GH #844 )
...
This fixes the probe undr Clang. However, we need to fix the CPU_QueryARMv7
2019-05-20 21:41:57 -04:00
Jeffrey Walton
c0cff24953
Update comments
2019-05-20 17:11:59 -04:00
Jeffrey Walton
b1b6ea5b78
Fold declarations for CRYPTOGAMS_armcaps
...
Also declare storage for CRYPTOGAMS_armcaps. This moves the symbol from BSS to initialized data. The Cryptogams module declares the symbol as common, so they are weak and use our declaration.
2019-05-20 17:03:57 -04:00
Jeffrey Walton
5c7c092336
Cleanup Cryptogams defines
2019-05-20 16:39:26 -04:00
Jeffrey Walton
00155d42cc
Enable Cryptogams SHA asm for Clang
...
AES is still disabled
2019-05-20 15:29:30 -04:00
Jeffrey Walton
9590481c7f
Update cryptest-autotools.sh
2019-05-20 03:48:02 -04:00
Jeffrey Walton
122529ed4a
Add test for automake in cryptest-autotools.sh
2019-05-19 21:46:36 -04:00
Jeffrey Walton
e0b60439bf
Fix Scrypt crash when blockSize is 0 (GH #842 )
...
This may change in the future. I prefer to recover, and use default block size when block size is 0. But this stops the immediate problem of a crash.
2019-05-19 21:24:32 -04:00
Jeffrey Walton
2c0455edf8
Add additional asserts in Scrypt::ValidateParameters (GH #842 )
...
We still need to figure out what to do, but we can start warning users immediately.
2019-05-19 18:52:37 -04:00
Jeffrey Walton
e3788aacc5
Display C++ for SHA512_AlgorithmProvider on ARM
2019-05-19 18:17:46 -04:00
Jeffrey Walton
6528561cb3
Update comments
2019-05-19 18:10:09 -04:00
Jeffrey Walton
e19a6152b5
Return CRYPTOGAMS_armcaps in CryptogamsArmCaps
2019-05-19 16:51:40 -04:00
Jeffrey Walton
62d53e6c44
Disable Cryptogams ASM on static Transform function
...
This needs mmore testing.
2019-05-19 16:46:01 -04:00
Jeffrey Walton
d38e5a954d
Add ARM SHA512 asm implementation from Cryptogams (GH #841 , PR #843 )
...
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.
Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1.8 GHz Cortex-A17 shows Cryptograms at 45 cpb, and C++ at 79 cpb.
The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA ) on the OpenSSL wiki.
2019-05-19 16:29:45 -04:00
Jeffrey Walton
4c9ca6b723
Add ARM SHA256 asm implementation from Cryptogams (GH #840 , PR #840 )
...
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.
Andy's implementation runs about 45% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 17 cpb, and C++ at 30 cpb.
The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA ) on the OpenSSL wiki.
2019-05-19 06:59:12 -04:00
Jeffrey Walton
8c99b1cd75
Add call to automake in cryptest-automake.sh
2019-05-19 02:26:44 -04:00
Jeffrey Walton
ffb11da13b
Add call to automake in cryptest-automake.sh
2019-05-19 02:19:47 -04:00
Jeffrey Walton
1a63112faf
Add ARM SHA1 asm implementation from Cryptogams (GH #837 , PR #838 )
...
Add ARM SHA1 asm implementation from Cryptogams.
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.
Andy's implementation runs about 30% faster than C/C++ code. Testing on a 1 GHz Cortex-A7 shows Cryptograms at 16 cpb, and C++ at 23 cpb.
The integration instructions are documented at [Cryptogams SHA](https://wiki.openssl.org/index.php/Cryptogams_SHA ) on the OpenSSL wiki.
2019-05-18 23:07:17 -04:00
Jeffrey Walton
4a21619bff
Regenerate Cryptogams AES assembly file
...
> It does not look like much has changed in the last year.
2019-05-18 06:49:51 -04:00
Jeffrey Walton
6cc9c81fa5
Use test_arm_sha1.cxx for feature tests
2019-05-17 23:45:23 -04:00
Jeffrey Walton
83ee4e1fc0
Use test_arm_sha1.cxx for feature tests
2019-05-17 23:42:15 -04:00
Jeffrey Walton
f027361369
Split test_arm_sha.cxx into SHA1 and SHA256 tests
2019-05-17 22:19:26 -04:00
Jeffrey Walton
c51f0ecbfd
Make config.h more Autoconf friendly (GH #835 , PR #836 )
2019-05-17 15:18:17 -04:00
Jeffrey Walton
b25b6f0892
Cleanup SIMON64 and SPECK64 flags in Makefile (GH #834 )
2019-05-16 18:57:57 -04:00
Jeffrey Walton
edc0952b25
Whitespace check-in
2019-05-16 02:47:44 -04:00
Jeffrey Walton
ef3968f551
Guard x86 cache line size
2019-05-08 21:20:49 -04:00
Jeffrey Walton
72a71eb230
Use fallback in detecting ARM and PowerPC cache line size
2019-05-08 19:54:05 -04:00
Jeffrey Walton
c91813c0b4
Use fallback in detecting VIA cach line size
2019-05-08 19:46:23 -04:00
Jeffrey Walton
40e5891635
Use CPU_QuerySHA256 for ARM
2019-05-08 19:31:31 -04:00
Jeffrey Walton
73bf2f29c0
Add "AMDisbetter!" cpuid detection
2019-05-08 18:51:12 -04:00
Jeffrey Walton
986fded372
Spelling
2019-05-08 18:33:55 -04:00
Jeffrey Walton
d9aed27ad3
Add code for VIA L1 data cache line size
2019-05-08 18:29:33 -04:00
Jeffrey Walton
30fc56d58c
Clear alignment warnings on ARM 32-bit platforms
2019-05-01 12:54:25 -04:00
Jeffrey Walton
337d1c88c8
Use armv7l for machine of Clang triplet armv8l-unknown-linux-gnueabihf (GH #831 )
...
Autotools uses armv7l. We should be safe using the same machine.
2019-05-01 11:00:34 -04:00
Jeffrey Walton
a5fe6fa6da
Remove unneeded perm check in cryptest-autotools.sh
2019-05-01 10:45:11 -04:00
Jeffrey Walton
4acdcc46d0
Try workaround Clang triplet on ARMv7l (GH #831 )
2019-05-01 01:48:00 -04:00
Jeffrey Walton
7ef3dacdc2
Remove C++11 constexpr code for CRYPTOPP_ALIGN_DATA (PR #830 )
...
I don't have faith in it even though it has tested good so far.
2019-04-30 23:00:56 -04:00
Jeffrey Walton
ff544c386c
Use dynamic_cast in ed25519 (GH #829 )
2019-04-30 20:29:21 -04:00
Jeffrey Walton
a379c5644a
Clear alignment warnings on ARM 32-bit platforms ( #828 )
2019-04-30 17:53:58 -04:00
Jeffrey Walton
b9fe3a3415
Clear alignment warnings on ARM 32-bit platforms
2019-04-29 22:40:07 -04:00
Jeffrey Walton
6c60e2cd1d
Add conservative governor setting
...
This governor setting is showing up on dev-board 4.19 kernels
2019-04-29 18:21:50 -04:00
Jeffrey Walton
a11ac1e879
Use ConstBytePtr in TestDataNameValuePairs (GH #827 )
2019-04-29 00:13:32 -04:00
Jeffrey Walton
38a4bb55cf
Post-release version increment
2019-04-29 00:12:18 -04:00
Jeffrey Walton
9dcc26c582
Prepare for Crypto++ 8.2 release
...
Make ConstBytePtr return non-NULL pointer
2019-04-28 19:37:23 -04:00
Jeffrey Walton
ec1aa8874c
Prepare for Crypto++ 8.2 release
...
Fix SHAKE-128 and SHAKE-256 tests
2019-04-28 19:09:45 -04:00
Jeffrey Walton
7ba4657375
Prepare for Crypto++ 8.2 release
...
Fix VS2010 compile on WIndows Vista; Add BytePtr inline function
2019-04-28 18:10:03 -04:00
Jeffrey Walton
c9703ab5ea
Prepare for Crypto++ 8.2 release
...
Fix VS2010 compile on WIndows Vista
2019-04-28 17:27:09 -04:00
Jeffrey Walton
a04014aa48
Prepare for Crypto++ 8.2 release
...
Fix Fedora 7 compile
2019-04-28 15:21:26 -04:00
Jeffrey Walton
e705fa7fad
Prepare for Crypto++ 8.2 release
2019-04-28 12:47:07 -04:00
Jeffrey Walton
4e0c3ed837
Prepare for Crypto++ 8.2 release
2019-04-28 11:48:32 -04:00
Jeffrey Walton
9e22df09a1
Prepare for Crypto++ 8.2 release
2019-04-28 11:48:04 -04:00
Jeffrey Walton
68b4fc0d8b
Prepare for Crypto++ 8.2 release
2019-04-28 11:30:32 -04:00
Jeffrey Walton
c9dc95a45c
Clear GCC multiline comment warning
2019-04-27 23:30:33 -04:00
Jeffrey Walton
fd2fd0c199
Remove unneeded permutes
...
Loading byte arrays does not suffer the endian swaps.
2019-04-27 23:09:30 -04:00
Jeffrey Walton
90f52dd9ae
Regenerate cryptest.nmake list
2019-04-27 21:37:23 -04:00
Jeffrey Walton
b16d37e347
Clear C4296 under MSVC++ (GH #821 )
2019-04-27 21:21:56 -04:00
Jeffrey Walton
255a6f2aa0
Clear UBsan warning -Wstringop-overflow
2019-04-27 21:08:02 -04:00
Jeffrey Walton
39418a8512
Use PowerPC unaligned loads and stores with Power8 (GH #825 , PR #826 )
...
Use PowerPC unaligned loads and stores with Power8. Formerly we were using Power7 as the floor because the IBM POWER Architecture manuals said unaligned loads and stores were available. However, some compilers generate bad code for unaligned loads and stores using `-march=power7`, so bump to a known good.
2019-04-27 20:35:01 -04:00
Jeffrey Walton
d451751eb2
Update SKIPJACK documentation (GH #824 )
2019-04-27 14:40:53 -04:00
Jeffrey Walton
cdaac6b844
Add SKIPJACK/CBC test vectors (GH #824 )
...
Generated using Botan 1.11.17, https://github.com/noloader/cryptopp-test/tree/master/SKIPJACK
2019-04-27 14:21:48 -04:00
Jeffrey Walton
d1b1554188
Add SKIPJACK test vectors from SP800-17, Table 6, pp. 140-42 (GH #824 )
2019-04-27 13:24:54 -04:00
Jeffrey Walton
e8107e9cb8
Update documentation
...
The library uses both PKCS #5 and PKCS #7 padding
2019-04-04 07:20:33 -04:00
Jeffrey Walton
9f8017a276
Fix missing GF2NT_233_Multiply_Reduce_CLMUL in the cursed DLL (GH #783 )
...
This should have been checked-in during GH #783 and PR #784 . I think there was one mailing list message about missing symbols GF2NT_233_Multiply_Reduce_CLMUL and GF2NT_233_Square_Reduce_CLMUL. I missed it when attempting to reproduce the issue. I can duplicate it now using VS2013. I think the addition of CRYPTOPP_DLL caused the issue to surface.
2019-03-21 08:13:14 -04:00
Jeffrey Walton
fc3b16e3a3
Fix SHAKE compile error with old GCC (GH #818 )
2019-03-18 08:06:48 -04:00
Jeffrey Walton
0d17eea82c
Add x25519 default constructor
2019-03-04 19:43:33 -05:00
Jeffrey Walton
08b9e21e5a
Use TCXXFLAGS for feature tests in GNUmakefile-cross
...
This mirrors PR #815 , where we used CXXFLAGS instead of TCXXFLAGS for feature tests
2019-02-28 06:42:16 -05:00
Nicolas Chauvet (kwizart)
7c7a12c584
Use TCXXFLAGS instead of CXXFLAGS ( #815 )
...
As done with others tests. This will avoid a miss-detection of aarch64 features
when using flags such as _FORTIFY_SOURCE that needs to be filtered for testing
This fixes https://github.com/weidai11/cryptopp/issues/812
V2: Fix all cases
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2019-02-28 06:37:18 -05:00
Jeffrey Walton
84ab1f3c66
Remove early NEON qualification tests from Makefile (GH #812 , GH #813 )
...
The makefile tries to pre-qualify NEON (for lack of a better term), and sets IS_NEON accordingly. If IS_NEON=1, then we go on to perform test compiles to see if -mfloat-abi=X -mfpu=neon (and friends) actually work. Effectively we are performing a test to see if we should perform another test.
The IS_NEON flag predates our compile time feature tests. It was kind of helpful when we were trying to sort out if a platform and compiler options supported NEON without a compile test. That was an absolute mess and we quickly learned we needed a real compile time feature test (which we now have).
Additionally, Debian and Fedora ARMEL builds are failing because we are misdetecting NEON availability. It looks like we fail to set IS_NEON properly, so we never get into the code paths that set either (1) -mfloat-abi=X -mfpu=neon or (2) -DCRYPTOPP_DISABLE_NEON or -DCRYPTOPP_DISABLE_ASM. Later, the makefile builds a *_simd.cpp and the result is an error that NEON needs to be activated (or disabled).
This commit removes IS_NEON so we immediately move to compile time feature tests.
2019-02-27 19:35:04 -05:00
Jeffrey Walton
8624a91988
Spelling
2019-02-24 17:00:20 -05:00
Jeffrey Walton
3183970300
Add missing BLAKE2 constructors
...
BLAKE2b and BLAKE2s are both missing a constructor that takes only the digest size. Also see https://groups.google.com/d/msg/cryptopp-users/QCFGYw8q3Yo/vpBCqz-vBgAJ
2019-02-24 15:45:00 -05:00
Jeffrey Walton
758939ab2e
Fix missing BlockSize() in BLAKE2 classes (GH #811 )
2019-02-23 14:13:31 -05:00
Jeffrey Walton
6138b8a127
Post-release version increment
...
Also see https://www.cryptopp.com/wiki/Release_Process#Increment_version_numbers
2019-02-23 14:03:49 -05:00
Jeffrey Walton
20e9e0cb10
Prepare for Crypto++ 8.1 release
...
This should have been checked in with 1c34979592 . Too late now, but fix it anyway.
2019-02-23 13:57:40 -05:00
Jeffrey Walton
1c34979592
Prepare for Crypto++ 8.1 release
2019-02-23 00:18:15 -05:00
Jeffrey Walton
95bc90adc4
Clear unused warnings with MSVC
2019-02-22 08:38:20 -05:00
Jeffrey Walton
3185e93fe3
Fix missing symbols in Windows DLL
2019-02-22 08:38:13 -05:00
Fabrice Fontaine
a809dbdbc4
AVX2 depends on GCC 4.9 (PR #809 )
2019-02-21 18:34:32 -05:00
Jeffrey Walton
0239393a22
Update Readme
2019-02-15 21:37:26 -05:00
Jeffrey Walton
72719766bb
Update Readme
2019-02-15 16:42:58 -05:00
Jeffrey Walton
f44d4cb5b8
Update documentation
2019-02-15 08:57:54 -05:00
Jeffrey Walton
e8bb20d84f
Fix AlgorithmName for SHA3-based classes
2019-02-13 14:22:43 -05:00
Jeffrey Walton
8dd39d03ae
Update documentation
2019-02-13 12:16:05 -05:00
Jeffrey Walton
00f9c1f0eb
Enable extended output in SHAKE-128 and SHAKE-256 (GH #805 , PR #806 )
2019-02-13 11:31:18 -05:00
Jeffrey Walton
2e440959b1
Update documentation
2019-02-13 00:01:58 -05:00
Jeffrey Walton
8db6fe16b4
Update documentation
2019-02-12 23:52:19 -05:00
Jeffrey Walton
57465b5ae3
Update documentation
2019-02-12 23:38:38 -05:00
Jeffrey Walton
9defd0afcd
Add SHAKE-128 and SHAKE-256 (GH #805 , PR #806 )
...
This should have been added during the original commit
2019-02-12 23:12:35 -05:00
Jeffrey Walton
c6e8a61b8b
Add SHAKE-128 and SHAKE-256 (GH #805 , PR #806 )
2019-02-12 19:51:37 -05:00
Jeffrey Walton
e499131ea6
Latch previous ROUNDS in Salsa and ChaCha ciphers (GH #800 , PR #804 )
2019-02-12 16:56:01 -05:00
asbai
a9eac2ce6e
Fix missing AlgorithmProvider() on PanamaHash (GH #801 , PR #803 )
2019-02-12 15:05:39 -05:00
Jeffrey Walton
6befce1851
Update documentation
2019-02-11 12:44:30 -05:00
Jeffrey Walton
d86fcf64a7
Update documentation
2019-02-11 12:29:04 -05:00
Jeffrey Walton
161d680434
Back-off ChaCha assert at the moment (GH #790 )
...
We don't know what we are supposed to do at the moment. We need the CFRG or IETF to say what is supposed to happen.
2019-02-11 11:40:05 -05:00
Jeffrey Walton
0ca4c41a97
Add ed25519 SignStream and VerifyStream functions (GH #796 , PR #797 )
2019-02-10 23:08:14 -05:00
Jeffrey Walton
1c6a96a57e
Update README
2019-02-10 04:41:51 -05:00
Jeffrey Walton
978b221909
Update README
2019-02-09 14:05:09 -05:00
Jeffrey Walton
65b10a4af8
Add additional XChaCha20/Poly1305 test vectors (GH #724 )
...
These test vectors were generated with Botan
2019-02-08 17:08:17 -05:00
Jeffrey Walton
b9eea8e842
Add additional ChaCha20/Poly1305 test vectors (GH #724 )
...
These test vectors were generated with Botan
2019-02-08 16:38:23 -05:00
Jeffrey Walton
cae5f8e0fd
Add SecretToPublicKey function for x25519
2019-02-07 17:05:23 -05:00
Jeffrey Walton
de85886ca4
Update comments
2019-02-07 15:45:38 -05:00
Jeffrey Walton
4caa5ee724
Add SecretToPublicKey function for ed25519
...
Also remove IsClamped. Clamping occurs with ed25519, but it happens inside the Donna code. It is not needed elsewhere for ed25519.
2019-02-07 15:00:00 -05:00
Jeffrey Walton
dde43de786
Use SECRET_KEYLENGTH for ed25519PrivateKey::GenerateRandom
2019-02-06 19:20:48 -05:00
Jeffrey Walton
23a32c4e3d
Add XChaCha20/Poly1305 benchmark
2019-02-06 16:57:36 -05:00
Jeffrey Walton
76b47204df
Add IETF XChaCha20Poly1305 (GH #727 , PR #795 )
2019-02-06 04:14:39 -05:00
Jeffrey Walton
0661536bd6
Fix spelling
2019-02-06 01:23:27 -05:00
Jeffrey Walton
26c83877ef
Add IETF XChaCha (GH #727 , PR #794 )
2019-02-06 01:03:28 -05:00
Jeffrey Walton
48531785b7
Use IsPowerOf2 in Integer::Divide
2019-02-05 02:05:36 -05:00
Jeffrey Walton
b09ca89a6e
Update comments
2019-02-05 01:19:35 -05:00
Jeffrey Walton
5b1e6fd28f
Fix Fedora 7 compile
...
Fedora 7 toolchain supplies upto SSE4.2
2019-02-05 01:14:35 -05:00
Jeffrey Walton
5f731c06b3
Fix NULL device
2019-02-04 11:28:28 -05:00
Jeffrey Walton
47435f7d72
Guard use of <cstddef> for Microsoft compilers (GH #781 )
2019-02-04 07:18:51 -05:00
Jeffrey Walton
5b6b86c7f1
Avoid extra call to RekeyCipherAndMac in ChaCha20/Poly1305
2019-02-04 06:04:12 -05:00
Jeffrey Walton
868ca8e2e5
Fix cryptest.nmake file list
2019-02-03 22:59:56 -05:00
Jeffrey Walton
e10736482c
Add test compile to makefile
2019-02-03 11:09:10 -05:00
Jeffrey Walton
ef1c8c2bb4
Add Hurd support for Makefile and cryptest.sh
...
IS_HURD in the makefile is to avoid complaints by some of the more eager GNU folks. We could do it using IS_LINUX
2019-02-03 10:28:48 -05:00
Jeffrey Walton
83145ffed6
Cleanup lcov recipe
2019-02-02 16:49:28 -05:00
Jeffrey Walton
a05e108a93
Fix benchmarks when CRYPTOPP_DISABLE_ASM
2019-02-02 16:49:08 -05:00
Jeffrey Walton
d0cc098af1
Cleanup Gcov recipe
...
We should have removed the source files at GH #208 , PR #703
2019-02-02 15:34:56 -05:00
Jeffrey Walton
4d24876490
Fix Linux detection for GNU Hurd
2019-02-02 15:20:59 -05:00
Jeffrey Walton
1b8c00b37c
Update comments
2019-02-02 00:47:56 -05:00
Jeffrey Walton
96eac11d3b
Update DataDir search paths (GH #760 )
2019-02-02 00:29:36 -05:00
Jeffrey Walton
2beb779286
Remove cryptestcwd binary
...
Also see https://github.com/noloader/cryptopp-autotools/issues/3
2019-02-01 09:51:37 -05:00
Jeffrey Walton
3b5de1bf15
Update documentation
2019-01-31 19:53:34 -05:00
Jeffrey Walton
cd395c7943
Update documentation
2019-01-31 19:33:13 -05:00
Jeffrey Walton
c415a64a0e
Clear Doxygen warning (GH #791 )
2019-01-31 19:12:27 -05:00
Jeffrey Walton
7fe141c004
Whitespace check-in
2019-01-31 19:04:44 -05:00
Jeffrey Walton
dbc071f083
Whitespace check-in
2019-01-31 19:01:58 -05:00
Jeffrey Walton
49daf12913
Whitespace check-in
2019-01-31 18:55:50 -05:00
Jeffrey Walton
04e5939c8d
Fix spelling
2019-01-31 18:37:41 -05:00
Jeffrey Walton
a8290bd66d
Remove SimpleKeyingInterface from ChaCha20Poly1305_Base
2019-01-31 07:24:43 -05:00
Jeffrey Walton
56db805713
Add seckey.h header dependency
2019-01-31 01:34:03 -05:00
Jeffrey Walton
416f519f50
Move NumericLimitsMin and NumericLimitsMax to CryptoPP namespace (GH #793 )
2019-01-31 00:05:00 -05:00
Jeffrey Walton
31fdfaa070
Clear unused function warning in Donna source files (GH #793 )
2019-01-30 23:06:06 -05:00
Jeffrey Walton
3d8bd4c582
Use ChaCha cipher AlgorithmProvider()
2019-01-30 23:04:37 -05:00
Jeffrey Walton
b29faeab58
Add -Wno-unused-function to misc.h (GH #793 )
...
This was added to misc.h due to the noise created by NumericLimitsMin and NumericLimitsMax. It should make it easier to remove -Wno-unused-function from config.h.
2019-01-30 20:52:21 -05:00
Jeffrey Walton
df98f8c16b
Make AuthenticatedSymmetricCipherBase::ProcessData overflow safe
2019-01-30 10:45:12 -05:00
Jeffrey Walton
97838012ee
Add test for length in memcpy
2019-01-30 10:00:09 -05:00
Jeffrey Walton
33897e944c
Clear UBsan finding with -std=c++03
...
New finding after cutting in ChaCha20/Poly1305
2019-01-30 09:56:36 -05:00
Jeffrey Walton
02f5da3511
Clear UBsan finding with -std=c++03
...
New finding after cutting in ChaCha20/Poly1305
2019-01-30 07:28:08 -05:00
Jeffrey Walton
b69bfb5bdf
Use T_IsEncryption for ChaCha20Poly1305
2019-01-30 03:31:59 -05:00
Jeffrey Walton
33eac51e92
Fix MaxHeaderLength and MaxMessageLength (GH #724 )
2019-01-30 02:51:14 -05:00
Jeffrey Walton
ebb9593a4b
Update comments
2019-01-30 02:17:58 -05:00
Jeffrey Walton
013b5a30c7
Update comments
2019-01-30 01:54:08 -05:00
Jeffrey Walton
c1ad534038
Update comments
2019-01-30 01:45:09 -05:00
Jeffrey Walton
38f694924f
Update License.txt
2019-01-30 01:35:55 -05:00
Jeffrey Walton
892103f2b0
Update License.txt
2019-01-30 01:21:29 -05:00
Jeffrey Walton
dd48a7acef
Fix ChaCha20/Poly1305 when using filters (GH #724 )
2019-01-30 00:55:27 -05:00
Jeffrey Walton
a4f6da8d30
Update documentation
2019-01-28 22:42:34 -05:00
Jeffrey Walton
281831c08a
Fix ChaCha20Poly1305 padding
2019-01-28 20:56:10 -05:00
Jeffrey Walton
cb674918b3
Add ChaCha20Poly1305 benchmarks (GH #724 )
2019-01-28 10:18:04 -05:00
Jeffrey Walton
7c3414b072
Fix ChaCha20Poly1305 IVSize() (GH #724 )
2019-01-28 10:01:19 -05:00
Jeffrey Walton
fcf637082d
Clear Doxygen warnings
2019-01-28 09:09:41 -05:00
Jeffrey Walton
30e7469f5e
Clear Doxygen warnings
2019-01-28 09:06:49 -05:00
Jeffrey Walton
315e54e63d
Add ChaCha20/Poly1305 AEAD cipher (GH #724 )
2019-01-28 08:52:56 -05:00
Jeffrey Walton
3cb86675af
Update documentation
2019-01-28 06:13:43 -05:00
Jeffrey Walton
6ef865fbcd
Update documentation
2019-01-27 12:13:09 -05:00
Jeffrey Walton
3f37cfc3a3
Update documentation
2019-01-27 11:54:35 -05:00
Jeffrey Walton
f78a5b2eb8
Avoid extra memcpy in Poly1305 Resynchronize
2019-01-27 09:08:02 -05:00
Jeffrey Walton
d2c030638d
Convert CONSTANT_TIME_CARRY to inline function
2019-01-27 08:46:05 -05:00
Jeffrey Walton
143537467f
Add Andrew Moon's Donna curve contributions
2019-01-27 07:27:43 -05:00
Jeffrey Walton
0186d31be0
Update documentation
2019-01-27 06:56:12 -05:00
Jeffrey Walton
d852c18fe8
Update comments
2019-01-27 06:46:45 -05:00
Jeffrey Walton
33e401116c
Fix Poly1305TLS on big-endian systems (GH #727 )
2019-01-27 06:37:48 -05:00
Jeffrey Walton
4d25979403
Update documentation
2019-01-27 05:48:37 -05:00
Jeffrey Walton
6770a8dad4
Update documentation
2019-01-27 05:45:05 -05:00
Jeffrey Walton
62ce6db97d
Fix missing GF2NT_233_Multiply_Reduce_ARMv8 on Aarch64
2019-01-27 02:18:19 -05:00
Jeffrey Walton
e388f2d88d
Add Poly1305TLS algorithm (GH #727 )
...
This is the IETF's rendition of Poly1305 that forgoes AES and the nonce, and uses 16-bytes of the key directly to mac the message
2019-01-27 01:41:53 -05:00
Jeffrey Walton
6cd2d0a06a
Fix Aarch64 build when CRYPTOPP_ARM_PMULL_AVAILABLE=0
2019-01-26 20:20:45 -05:00
Jeffrey Walton
6a76dc5ecf
Refactor Poly1305(AES) in preparation for IETF rendition (GH #727 )
2019-01-26 13:53:21 -05:00
Jeffrey Walton
e17f17d8fc
Add tamper comment to Poly1305(AES) tests
2019-01-26 13:12:46 -05:00
Jeffrey Walton
69286301e0
Add Poly1305(AES) test vectors
2019-01-26 12:54:47 -05:00
Jeffrey Walton
64a89bf352
Update License.txt with CRYPTOGAMS text
2019-01-26 05:12:20 -05:00
Jeffrey Walton
e719a1a0ea
Add CRYPTOGAMS copyright notice for Poly1305 scalar multiplication
2019-01-26 04:43:55 -05:00
Jeffrey Walton
83f41e0d76
Update documentation
2019-01-26 00:12:11 -05:00
Jeffrey Walton
b9d2310beb
Use ROUNDS constant for ChaChaTLS
2019-01-25 23:27:48 -05:00
Jeffrey Walton
76bdb328a6
Switch to RFC 8439 for ChaChaTLS
...
Unfortunately the block counter wrap problem is still present.
2019-01-25 21:51:43 -05:00
Jeffrey Walton
82f80124e6
Update comments
2019-01-25 19:49:17 -05:00
Jeffrey Walton
779e28a9b0
Update comments
2019-01-25 19:04:34 -05:00
Jeffrey Walton
c1f9b484b7
Use ChaChaTLS in benchmarks
2019-01-25 08:20:25 -05:00
Jeffrey Walton
6a68abea0a
Update comments
2019-01-25 08:14:23 -05:00
Jeffrey Walton
97df2b960b
Update comments
2019-01-25 07:54:00 -05:00
Jeffrey Walton
dcd9e67eeb
Refactor ChaCha and ChaChaTLS use a common core
2019-01-25 06:40:12 -05:00
Jeffrey Walton
70dcd29e0b
Refactor ChaCha and ChaChaTLS use a common core
2019-01-25 06:18:58 -05:00
Jeffrey Walton
798e4d85b3
Update comments
2019-01-25 05:06:06 -05:00
Jeffrey Walton
d7e416d403
Add additional ChaChaTLS test vectors
...
These test vectors were generated from a modified Bernstein reference implementation.
2019-01-25 05:03:27 -05:00
Jeffrey Walton
d25ba0c59a
Enable SIMD implementation for ChaChaTLS (GH #265 )
2019-01-25 02:57:11 -05:00
Jeffrey Walton
caaaaa7691
Add additional ChaChaTLS test vectors
...
These test vectors were generated from a modified Bernstein reference implementation.
2019-01-25 02:34:44 -05:00
Jeffrey Walton
acde2f8e5e
Use word64 for ChaChaTLS InitialBlock (GH #265 )
2019-01-25 02:34:07 -05:00
Jeffrey Walton
7923a97d24
Enable ChaCha-TLS tests in test vectors
2019-01-25 01:03:22 -05:00
Jeffrey Walton
f23b58b73c
Remove rounds from ChaChaTLS
...
Rounds are alwys 20 in the IETF implementation.
2019-01-24 22:26:15 -05:00
Jeffrey Walton
099f870c55
Add additional ChaChaTLS test vectors from RFC 7539
2019-01-24 21:15:48 -05:00
Jeffrey Walton
a29b734a0f
Fix AlgorithmProvider for ChaChaTLS
2019-01-24 09:46:56 -05:00
Jeffrey Walton
5603661eec
Add ChaChaTLS implementation (GH #265 )
...
We tweaked ChaCha to arrive at the IETF's implementation specified by RFC 7539. We are not sure how to handle block counter wrap. At the moment the caller is responsible for managing it. We were not able to find a reference implementation so we disable SIMD implementations like SSE, AVX, NEON and Power4. We need the wide block tests for corner cases to ensure our implementation is correct.
2019-01-24 09:36:05 -05:00
Jeffrey Walton
b47f04418c
Update documentation
2019-01-24 02:09:03 -05:00
Jeffrey Walton
0f70d0262b
Update documentation
2019-01-24 02:01:52 -05:00
Jeffrey Walton
1cd8ccbf82
Drop use of static in unnamed namespace
2019-01-23 06:15:51 -05:00
Jeffrey Walton
3d07010ac8
Fix self test failure with IBM XL C/C++ on AIX
2019-01-22 08:16:03 -05:00
Jeffrey Walton
488c1df2fe
Fix self test failure with IBM XL C/C++ on AIX
2019-01-22 06:13:14 -05:00
Jeffrey Walton
76765f1e0a
Fix self test failure with IBM XL C/C++ on AIX
2019-01-22 06:08:47 -05:00
Jeffrey Walton
6d339011a8
Remove /openmp from cryptest.nmake
...
This has cross-pollinated twice in two days
2019-01-22 05:11:50 -05:00
Jeffrey Walton
ef1b391ce6
Use #pragma omp simd for OpenMP 4.0 compilers (GH #787 )
...
Crap... It is OpenMP 4.0, not 3.0
2019-01-22 04:58:54 -05:00
Jeffrey Walton
6ada677461
Whitespace check-in
2019-01-22 03:44:34 -05:00
Jeffrey Walton
8572541841
Use #pragma omp simd for OpenMP 3.0 compilers (GH #787 )
2019-01-22 03:42:53 -05:00
Jeffrey Walton
3f38a5f7dd
Cleanup gf2n_simd.cpp
2019-01-22 02:47:12 -05:00
Jeffrey Walton
df3f104eb2
Clear type limits warning using GCC
2019-01-22 02:37:38 -05:00
Jeffrey Walton
c22f37f051
Clear unused variable warning on AIX
2019-01-22 02:35:25 -05:00
Jeffrey Walton
b8f7348c61
Whitespace check-in
2019-01-21 22:16:49 -05:00
Jeffrey Walton
c62bf2b147
Add call to DoQuickSanityCheck in HMQV and FHMQV before private key operation
2019-01-21 19:55:05 -05:00
Jeffrey Walton
76a4a5728d
Fix failed debug self test with Sun Studio 12.6
2019-01-21 19:54:26 -05:00
Jeffrey Walton
bbad4397c4
Use VectMergeLow and VecMergeHigh
2019-01-21 03:04:07 -05:00
Jeffrey Walton
767d7e2a13
Remove /openmp from cryptest.nmake
2019-01-21 02:03:22 -05:00
Jeffrey Walton
ac24f39e33
Fix compile on AIX
2019-01-21 00:56:21 -05:00
Jeffrey Walton
8b892e2020
Add dedicated F2N_Square_256 circuit
2019-01-21 00:48:53 -05:00
Jeffrey Walton
7ab75751cd
Clear unused variable warning under Visual Studio
2019-01-20 23:44:01 -05:00
Jeffrey Walton
fbf0f62f4b
Clear unused variable warning under Visual Studio
2019-01-20 23:40:20 -05:00
Jeffrey Walton
ca32b63038
Remove /openmp from cryptest.nmake
2019-01-20 22:46:45 -05:00
Jeffrey Walton
7e96a283a3
Fix compile under MSVC
2019-01-20 22:45:53 -05:00
Jeffrey Walton
672f5c7f3d
Update documentation
2019-01-20 22:43:00 -05:00
Jeffrey Walton
aa043b38a7
Use OpenMP 2.0 for MSC compilers (GH #787 )
2019-01-20 22:10:36 -05:00
Jeffrey Walton
92808945c1
Fix TestAltivecOps on AIX
2019-01-20 19:34:09 -05:00
Jeffrey Walton
0b348fe4be
Remove socket libraries
...
This should have been removed at Issue 178 and Issue 208
2019-01-20 16:43:49 -05:00
Jeffrey Walton
efddef694d
Update documentation
2019-01-20 04:50:22 -05:00
Jeffrey Walton
f510b3498c
Update documentation
2019-01-20 03:52:05 -05:00
Jeffrey Walton
f95638ef0c
Update documentation
2019-01-20 03:24:18 -05:00
Jeffrey Walton
177385393d
Update CPU_ProbePMULL test
2019-01-20 02:41:20 -05:00
Jeffrey Walton
8fd5bb31cf
Add VecPolyMultiply for Intel-equivalent F2N multiplies
2019-01-20 01:47:34 -05:00
Jeffrey Walton
c60f30f912
Add dedicated F2N_Multiply_256x256 circuit
2019-01-19 18:27:12 -05:00
Jeffrey Walton
cefcaeaa68
Update documentation
2019-01-19 16:32:13 -05:00
Jeffrey Walton
275b86a8d5
Update documentation
2019-01-19 16:21:07 -05:00
Jeffrey Walton
c39d7fdef5
Add VecMergeHi and VecMergeLo PowerPC wrappers
2019-01-19 15:20:47 -05:00
Jeffrey Walton
5909ec6186
Cleanup PowerPC vector operations
2019-01-19 05:34:02 -05:00
Jeffrey Walton
76b7390840
Switch to vec_mergeh and vec_mergel for PowerPC in binary curves
...
This saves aboout 4 instructions in VMULL
2019-01-19 04:52:36 -05:00
Jeffrey Walton
e3bc76832c
Switch to vec_mergeh and vec_mergel for PowerPC in binary curves
2019-01-19 04:22:55 -05:00
Jeffrey Walton
ac49c970bc
Switch to vec_mergeh and vec_mergel for PowerPC in binary curves
2019-01-19 03:49:20 -05:00
Jeffrey Walton
b6959d4d51
Update cryptest-symbols.sh script
2019-01-18 00:18:39 -05:00
Jeffrey Walton
bdd5f470ce
Add additional comments
2019-01-16 17:56:03 -05:00
Jeffrey Walton
f6c9a8e183
Disable CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE by default
2019-01-16 17:27:36 -05:00
Jeffrey Walton
2718731bac
Add additional comments
2019-01-16 17:26:30 -05:00
Jeffrey Walton
e86a6b32eb
Add CRYPTOPP_BUGGY_SIMD_LOAD_AND_STORE (GH #782 )
...
I also suspect this has something to do with GH #768 and several others
2019-01-16 17:06:39 -05:00
Jeffrey Walton
7969f7181f
Add additional comments to Aligned Allocator (GH #779 )
2019-01-16 17:04:55 -05:00
Jeffrey Walton
3fba3b0a1c
Avoid unknown pragma warning from GCC (GH #777 )
2019-01-16 14:43:58 -05:00
Jeffrey Walton
2113a471eb
Fix compile on MinGW32
2019-01-16 03:14:06 -05:00
Jeffrey Walton
df9fa62205
Use carryless multiplies for NIST b233 and k233 curves (GH #783 , PR #784 )
...
Use carryless multiplies for NIST b233 and k233 curves.
2019-01-16 00:02:04 -05:00
Javier Navarro
982655845a
Don't add the flag CRYPTOPP_DISABLE_ASM twice for iPhone simulator builds (GH #778 )
2019-01-11 16:40:48 -05:00
Jeffrey Walton
fdfcb2a172
Make AlignedAllocate available in simulator debug builds (GH #779 , PR #780 )
...
* Make AlignedAllocate available in simulator debug builds (GH #779 )
* Use CRYPTOPP_CONSTANT for rotate params
2019-01-11 16:37:26 -05:00
Jeffrey Walton
22a25c0e84
Clear tautological compare warning with Clang (GH #777 )
2019-01-10 13:11:43 -05:00
Jeffrey Walton
1ab72cd8fb
Update distclean rule in cryptest.nmake
2019-01-09 01:39:09 -05:00
Jeffrey Walton
dbec62cdb2
Update distclean rule in cryptest.nmake
2019-01-09 01:04:59 -05:00
Jeffrey Walton
7428fa82ab
Clear unused variable warning with GCC
2019-01-08 17:31:53 -05:00
Jeffrey Walton
6d5316812f
Fix compile when NO_OS_DEPENDENCE is defined
2019-01-08 17:03:45 -05:00
Jeffrey Walton
3a18d73cc1
Use W64LIT instead of word64 cast
2019-01-08 12:33:13 -05:00
Jeffrey Walton
734affe257
Add missing dependency to cryptest.nmake
2019-01-08 03:36:06 -05:00
Jeffrey Walton
f74d09f645
Revert cryptest.nmake cross-pollination
2019-01-08 03:05:39 -05:00
Jeffrey Walton
cc4009450a
Clear early GCC warning
2019-01-08 03:04:11 -05:00
Jeffrey Walton
800af2323c
Add distclean recipe to cryptest.nmake
2019-01-07 23:57:36 -05:00
Jeffrey Walton
01b33b8c78
Update comments
2019-01-07 22:24:01 -05:00
Jeffrey Walton
aa934f5bb5
Add dlltest.cpp to cryptest.nmake
2019-01-07 18:32:53 -05:00
Jeffrey Walton
61a060765a
Update cryptest.nmake script
2019-01-07 18:02:06 -05:00
Jeffrey Walton
6d959d0dac
Update cryptest.nmake script
2019-01-07 16:10:18 -05:00
Jeffrey Walton
2166dc903d
Add DLL testing code to cryptest.nmake
2019-01-07 14:53:41 -05:00
Jeffrey Walton
c9639c2086
Add specific error message to dump2def
2019-01-07 13:31:45 -05:00
Jeffrey Walton
1137103768
Add cl.exe compile command
2019-01-07 12:48:42 -05:00
Jeffrey Walton
c5fde84d6e
Make lib name configurable
2019-01-07 00:01:01 -05:00
Jeffrey Walton
e38bfe417d
Add /OUT option for dumpbin
2019-01-06 22:51:37 -05:00
Jeffrey Walton
1709d5dc65
Update recipes for Nmake file
2019-01-06 22:16:11 -05:00
Jeffrey Walton
72ce467f23
Add dump2def source file
2019-01-06 21:15:00 -05:00
Jeffrey Walton
c97e786cbb
Update comments
2019-01-05 12:48:39 -05:00
Jeffrey Walton
0538af5173
Update comments
2019-01-05 09:54:42 -05:00
Jeffrey Walton
6520ac2e2b
Fix unintentional check-in of nmake file
2019-01-04 20:44:56 -05:00
Jeffrey Walton
f47ffe2a4d
Fix IsDebuggerPresent guard for ARM64 (GH #776 )
2019-01-04 20:43:19 -05:00
Jeffrey Walton
f9ef238846
Whitespace check-in
2019-01-04 20:39:22 -05:00
Jeffrey Walton
1f1c90cc29
Fix _M_IX86 typo
2019-01-04 20:33:53 -05:00
Jeffrey Walton
26a9bdcd76
Clear duplicate declaration warning using MSVC
2019-01-04 18:49:14 -05:00
Jeffrey Walton
e6ceab85ff
Fix ARM64 compile with MSVC compiler (GH #776 )
2019-01-04 16:55:42 -05:00
Javier Navarro
b43f8f5976
Initialize "APPLE_SDK" for arm64, armv7, armv7s, armv6 or armv5 (GH #774 )
2019-01-04 16:41:48 -05:00
Jeffrey Walton
65012e8e75
Fix GCM ARM64 compile with MSVC compiler (GH #776 )
2019-01-04 16:12:35 -05:00
Jeffrey Walton
df4fc3faee
Cleanup headers after Microsoft ARM64 port
2019-01-04 11:43:38 -05:00
Jeffrey Walton
822ca11579
Cleanup headers after Microsoft ARM64 port
2019-01-04 11:33:28 -05:00
Jeffrey Walton
02f7fda54b
Fix <arm_neon.h> include for ARM64 with MSVC compiler (GH #776 )
2019-01-04 11:25:55 -05:00
Jeffrey Walton
9277d115a8
Fix SHA ARM64 compile with MSVC compiler (GH #776 )
2019-01-04 11:18:34 -05:00
Jeffrey Walton
5ccbd9af6a
Use Microsoft x86-beased defined for __emulu
2019-01-04 10:29:24 -05:00
Jeffrey Walton
619f9790df
Fix VMAC ARM64 compile with MSVC compiler (GH #776 )
2019-01-04 10:25:52 -05:00
Jeffrey Walton
c085c7a75b
Fix Integer ARM64 compile with MSVC compiler (GH #776 )
2019-01-03 23:19:06 -05:00
Jeffrey Walton
7ab07dde06
Use 64-bit add for AdvancedProcessBlocks128_4x1_NEON
2019-01-03 21:25:19 -05:00
Jeffrey Walton
9255740285
Fix self test NEON compile with MSVC compiler (GH #776 )
2019-01-03 21:00:22 -05:00
Jeffrey Walton
a20c56ea49
Fix SIMON128 and SPECK128 NEON compile with MSVC compiler (GH #776 )
2019-01-03 20:06:39 -05:00
Jeffrey Walton
e039efa2d3
Fix LEA NEON compile with MSVC compiler (GH #776 )
2019-01-03 19:53:01 -05:00
Jeffrey Walton
a0fa63879f
Add PACK32x4 macro guard
2019-01-03 19:52:57 -05:00
Jeffrey Walton
ed349dced1
Fix AdvancedProcessBlocks_{MxN}_NEON compile with MSVC compiler (GH #776 )
2019-01-03 19:49:00 -05:00
Jeffrey Walton
b70bc4865f
Fix ChaCha NEON compile with MSVC compiler (GH #776 )
2019-01-03 13:37:53 -05:00
Jeffrey Walton
8baa2f7a27
Update comments
2019-01-03 13:17:27 -05:00
Jeffrey Walton
a79fe3a826
Use _NSGetExecutablePath on OS X (GH #760 )
...
Also test for symlinks and reject them, if found.
2019-01-02 23:43:44 -05:00
Jeffrey Walton
7819af671b
Use _get_pgmptr on Windows (GH #760 )
...
Let's see how well this works across the versions of Visual Studio we support
2019-01-02 20:22:55 -05:00
Jeffrey Walton
86fd3ef109
Rework makefile, avoid GNU install program
...
Solaris lacks a GNU compatible install program in /usr/bin and /usr/xpg4/bin. Just use cp and chmod. Cp and chmod work everywhere
2019-01-02 19:48:20 -05:00
Jeffrey Walton
748ebe6328
Use getexecname() on Solaris (GH #)
2019-01-02 19:46:00 -05:00
Jeffrey Walton
60ffc2ec01
Fix missing ed25519 MessageAccumulator Update
2019-01-02 13:39:59 -05:00
Marcel Raad
1a4b851ac1
Fix clang warnings (GH #771 )
2019-01-02 12:05:26 -05:00
Jeffrey Walton
da2444d243
Update documentation
2019-01-02 12:02:32 -05:00
Jeffrey Walton
9484815960
Cache DataDir when C++11 dynamic init is available (GH #760 )
2019-01-02 03:30:49 -05:00
Jeffrey Walton
174f247c44
Add LSB install location to DataDir (GH #760 )
2019-01-02 01:22:23 -05:00
Jeffrey Walton
e5085684ef
Fix missing SunCC Allocator::max_size(size_type) member function (GH #770 )
2019-01-01 17:56:26 -05:00
Tanzinul Islam
148a5e917b
Avoid Clang integrated assembler on macOS PowerPC (GH #769 )
2018-12-30 00:47:02 -05:00
Jeffrey Walton
8838f78ec4
Fix ChaCha compiler crash for GCC 3.3
2018-12-29 01:08:43 -05:00
Jeffrey Walton
2d06777747
Fix GCM build when SSSE3 not available
2018-12-29 00:56:25 -05:00
Jeffrey Walton
fc2ead427c
Fix SIMECK build when SSSE3 not available
2018-12-29 00:49:43 -05:00
Jeffrey Walton
58772f3491
Fix SIMON build when SSSE3 not available
2018-12-29 00:48:12 -05:00
Jeffrey Walton
a9bd504b2f
Fix SPECK build when SSSE3 not available
2018-12-29 00:45:57 -05:00
Jeffrey Walton
d00b614e46
Fix LEA build when SSSE3 not available
2018-12-29 00:43:26 -05:00
Jeffrey Walton
df47185573
Fix CHAM build when SSSE3 not available
2018-12-29 00:39:11 -05:00
Jeffrey Walton
8edc5cf2d5
Add "cc" clobber due to GCC 3.3 compile failure
2018-12-29 00:09:59 -05:00
Jeffrey Walton
be85db4de4
Restore unnamed namespace for SHA512_HashBlock_SSE2 (GH #684 )
2018-12-28 18:05:06 -05:00
Jeffrey Walton
662db8fc87
Cleanup adv_simd.h include for arch flags
2018-12-28 14:08:54 -05:00
Jeffrey Walton
d2cf296d2a
Fix missing RDRAND and RDSEED GenerateBlock functions when CRYPTOPP_DISABLE_ASM
...
Also see https://github.com/noloader/cryptopp-cmake/issues/44
2018-12-28 12:45:34 -05:00
Jeffrey Walton
29d1c1772d
Fix missing ExtendedControlRegister when CRYPTOPP_DISABLE_ASM
...
Also see https://github.com/noloader/cryptopp-cmake/issues/44
2018-12-28 12:19:13 -05:00
Jeffrey Walton
16f9cbc82a
Add comments on potential environment misdetection
2018-12-28 11:43:55 -05:00
Jeffrey Walton
9c58ba8f2b
Avoid use of uint8_t in donna64.cpp
2018-12-28 11:16:41 -05:00
Jeffrey Walton
856e374bba
Update VS2005.zip with SIMECK simd file
2018-12-28 11:11:08 -05:00
Jeffrey Walton
b3a473878c
Post-release version increment
...
Also see https://www.cryptopp.com/wiki/Release_Process#Increment_version_numbers
2018-12-28 08:25:44 -05:00
Jeffrey Walton
5e5fb6c855
Prepare for Crypto++ 8.0 release
2018-12-27 21:56:59 -05:00
Jeffrey Walton
5e48cfd0c9
Prepare for Crypto++ 8.0 release
2018-12-27 18:30:38 -05:00
Jeffrey Walton
5ace5e478a
Spelling corrections
2018-12-27 17:47:20 -05:00
Jeffrey Walton
b877782692
Use local definition of space
2018-12-27 13:56:03 -05:00
Jeffrey Walton
e8025bf6a9
Remove unused SM4 code for ARM
2018-12-27 11:52:12 -05:00
Jeffrey Walton
9f2917bb31
Check for root in governor.sh
2018-12-27 06:54:34 -05:00
Jeffrey Walton
0c658f5a7c
PublicKey is optional for curve25519
2018-12-26 20:35:49 -05:00
Jeffrey Walton
d5338fd212
Remove unneeded buf compare
2018-12-26 19:55:12 -05:00
Jeffrey Walton
1fc26dc14c
Cleanup Validate tests
2018-12-26 19:50:51 -05:00
Jeffrey Walton
5202b6312f
Add ed25519PrivateKey::Validate body (GH #764 )
...
We also clamp the private key and recalculate the public key. Note: we already know some IETF keys fail to validate because they are not clamped as specified in Bernsteain's paper or the RFCs (derp....)
2018-12-26 19:34:41 -05:00
Jeffrey Walton
21cd665a1c
Fix TestEd25519 for Debug builds on PowerPC
2018-12-26 15:21:36 -05:00
Jeffrey Walton
d0245a4971
Fix "explicit template specialization cannot have a storage class" on Aarch64 debug builds
2018-12-26 13:32:26 -05:00
Jeffrey Walton
b9688ec5e6
Fix "explicit template specialization cannot have a storage class" on Aarch64 debug builds
2018-12-26 13:24:54 -05:00
Jeffrey Walton
83a37b8284
Fix Debug PowerPC build
2018-12-26 12:29:32 -05:00
Jeffrey Walton
5f5250296d
Fix cryptest.vcxproj.user
...
Debug changes cross-pollinated into the commit
2018-12-25 23:48:59 -05:00
Jeffrey Walton
bf10aae97d
Add additional asserts
2018-12-25 20:24:54 -05:00
Jeffrey Walton
6e09f4ee19
Update README.txt
2018-12-25 19:53:30 -05:00
Jeffrey Walton
82c0cb6b42
Whitespace check-in
2018-12-25 19:09:04 -05:00
Jeffrey Walton
f9a33173f5
Add additional self tests
2018-12-25 18:38:08 -05:00
Jeffrey Walton
2ccac19de1
Use variable length messages in TestEd25519
2018-12-25 18:16:14 -05:00
Jeffrey Walton
0311daf7e2
Update documentation
2018-12-25 16:18:01 -05:00
Jeffrey Walton
afd9c856ea
Update documentation
2018-12-25 15:42:36 -05:00
Jeffrey Walton
630361d249
Update documentation
2018-12-25 11:12:56 -05:00
Jeffrey Walton
c55e58c205
Update documentation
2018-12-25 11:08:14 -05:00
Jeffrey Walton
567eef2d4d
Update documentation
2018-12-25 11:02:02 -05:00
Jeffrey Walton
f981c86c69
Update documentation
2018-12-25 10:54:42 -05:00
Jeffrey Walton
ba0dece8d9
Update documentation
2018-12-25 10:51:56 -05:00
Jeffrey Walton
a749296504
Add additional self tests
...
And whitespace check-in
2018-12-25 10:08:49 -05:00
Jeffrey Walton
7226abd433
Add additional self tests
...
And whitespace check-in
2018-12-25 09:28:27 -05:00
Jeffrey Walton
2c3ca1c01e
Update documentation
2018-12-25 09:13:19 -05:00
Jeffrey Walton
4aa28fcf57
Update documentation
2018-12-25 09:10:11 -05:00
Jeffrey Walton
bfd3f4e3c7
Update documentation
2018-12-25 09:00:52 -05:00
Jeffrey Walton
d47f5506bb
Update documentation
2018-12-25 08:51:48 -05:00
Jeffrey Walton
f528e9a238
Update documentation
2018-12-25 08:45:34 -05:00
Jeffrey Walton
e389e2adc0
Update documentation
2018-12-25 08:38:15 -05:00
Jeffrey Walton
ae2677648b
Update documentation
2018-12-25 08:17:20 -05:00
Jeffrey Walton
0d2067ab8d
Update documentation
2018-12-25 08:12:12 -05:00
Jeffrey Walton
430a968ca8
Update documentation
2018-12-25 08:10:24 -05:00
Jeffrey Walton
d5e529d819
Update documentation
2018-12-25 07:46:59 -05:00
Jeffrey Walton
3b18e81bc1
Remove unneeded ed25519Verifier code
...
Add accessors for public and private key
2018-12-25 07:38:30 -05:00
Jeffrey Walton
c37d7c83b1
Fix compile with NO_OS_DEPENDENCE
2018-12-25 06:48:09 -05:00
Jeffrey Walton
416db72f2c
Update documentation
2018-12-25 06:41:51 -05:00
Jeffrey Walton
5cbc6710d7
Clear unused variable warning
2018-12-25 05:49:43 -05:00
Jeffrey Walton
5b95b0ab1e
Update documentation
2018-12-24 18:17:25 -05:00
Jeffrey Walton
d62674b561
Add ed25519 (GH #764 , PR #767 )
...
Add ed25519
2018-12-24 17:17:32 -05:00
Jeffrey Walton
2ba3c1fc73
Update documentation
2018-12-23 18:27:56 -05:00
Tanzinul Islam
b5142e044f
Use SSE2 intrinsics header in sse_simd.cpp only if needed ( #759 )
...
Embarcadero C++Builder v10.3 [has a bug](https://quality.embarcadero.com/browse/RSP-22883 ) where its old Intel intrinsics headers try to use retired Clang builtins and fail to compile. In devising a workaround with `-DCRYPTOPP_DISABLE_ASM`, I found that `sse_simd.cpp` includes `<emmintrin.h>` even when its code doesn't need the intrinsics.
With this patch, `-DCRYPTOPP_DISABLE_ASM` will be a sufficient workaround because `CRYPTOPP_SSE2_INTRIN_AVAILABLE` is derived from it in `config.h`.
2018-12-23 08:49:39 -05:00
Shmueli Englard
fc87f8666a
Add check for VS version and ExtendedControlRegister (PR #766 )
2018-12-21 19:54:24 -05:00
hygonsoc
6dfb428f10
Add Hygon Dhyana support to enable RDRAND/RDSEED/ADX/AVX2 Feature (PR #765 )
...
Hugh, interesting.
Thank you very much.
Ping @randombit. Botan may want or need this, too.
2018-12-20 17:33:16 -05:00
Jeffrey Walton
398964b87d
Add curve ids for x25519, ed25519, x448 and ed448
...
Also see https://tools.ietf.org/html/draft-ietf-curdle-pkix
2018-12-18 17:53:39 -05:00
Jeffrey Walton
4f7e2c984d
Make test vectors text files in VS filter file
2018-12-15 04:51:30 -05:00
Jeffrey Walton
33cb5e63ab
Add Test vectors and data to VS project files
2018-12-15 04:39:12 -05:00
Jeffrey Walton
704762ba2c
Add Test vectors and data to VS project files
2018-12-15 04:24:30 -05:00
Jeffrey Walton
9b5b3f4c13
Update vs2005.zip after x25519 cut-in (GH #761 )
2018-12-15 03:37:40 -05:00
Jeffrey Walton
67f6a1f0bd
Clear warning C4702: unreachable code
2018-12-14 15:39:54 -05:00
Jeffrey Walton
5226761662
Whitespace check-in
2018-12-14 13:44:10 -05:00
Jeffrey Walton
1b49bdc420
Enable x25519 SSE2 for MS compilers (GH #761 )
2018-12-14 13:43:01 -05:00
Jeffrey Walton
17d7a70501
Backout change to validate3.cpp
...
It was modified for local testing, and cross-pollinated into the last commit.
2018-12-14 12:25:15 -05:00
Jeffrey Walton
4f64bb8eb3
Clear warning C4163: '_umul128' : not available as an intrinsic function
2018-12-14 12:23:18 -05:00
Jeffrey Walton
91e5844625
Enable x25519 64-bit code path for Microsoft compilers
2018-12-14 12:17:50 -05:00
Jeffrey Walton
235c615a10
Make TestCurve25519 available in Release builds
2018-12-14 12:15:58 -05:00
Jeffrey Walton
00f777661d
Update comments and documentation
2018-12-14 04:35:07 -05:00
Jeffrey Walton
6f2188af79
Use byte instead of unsigned char
2018-12-14 04:19:03 -05:00
Jeffrey Walton
cac977856a
Clear alginment warning with Clang
...
The data is aligned, but Clang issues warning based on type and not the actual alignment of the variable and data.
2018-12-14 04:14:44 -05:00
Jeffrey Walton
d35124f304
Make SSE2 configurable via CRYPTOPP_SSE2_INTRIN_AVAILABLE
...
Benchmarking shows things run a little slower with SSE2 on modern Core i5's. Also update comments and links
2018-12-14 03:17:04 -05:00
Jeffrey Walton
67af746743
Update comments
2018-12-14 02:14:20 -05:00
Jeffrey Walton
c0150ed4bd
Fix placement of align attribute for 32-bit
2018-12-14 02:00:55 -05:00
Jeffrey Walton
6dc60888d9
Fix the cut-in of Moon's implementation (GH #761 )
...
The initial cut-in was missing preamble present in Moon's curve25519_donna function. It originally tested good because we only perform a pairwise consistency check in release builds. Comprehensive testing with debug builds revealed the problem. Debug builds cross-validate against Bernstein's TweetNaCl library.
2018-12-13 20:34:39 -05:00
Jeffrey Walton
8c3432473b
Update comments
2018-12-13 18:51:15 -05:00
Jeffrey Walton
27cd177209
Fix the cut-in of Moon's implementation (GH #761 )
...
The initial cut-in was missing preamble present in Moon's curve25519_donna function. It originally tested good because we only perform a pairwise consistency check in release builds. Comprehensive testing with debug builds revealed the problem. Debug builds cross-validate against Bernstein's TweetNaCl library.
2018-12-13 18:50:42 -05:00
Jeffrey Walton
eb749783da
Fix the cut-in of Moon's implementation (GH #761 )
...
The initial cut-in was missing preamble present in Moon's curve25519_donna function. It originally tested good because we only perform a pairwise consistency check in release builds. Comprehensive testing with debug builds revealed the problem. Debug builds cross-validate against Bernstein's TweetNaCl library.
2018-12-13 18:22:34 -05:00
Jeffrey Walton
83ddeadb65
Make clamped and small order tests static class members
2018-12-13 16:16:40 -05:00
Jeffrey Walton
b19abcde1f
Cleanup donna files
2018-12-13 14:17:36 -05:00
Jeffrey Walton
560c332f19
Cutover to Andrew Moon's 64-bit code (GH #761 )
...
The code is public domain without license restrictions. It is also faster than Langley's original implementation.
2018-12-13 13:25:22 -05:00
Jeffrey Walton
5f8dcbbb37
Cleanup Moon's donna_32.cpp
2018-12-13 13:24:14 -05:00
Jeffrey Walton
adf109a953
Cutover to Andrew Moon's 32-bit code (GH #761 )
...
The code is public domain without license restrictions. It is also faster than Langley's original implementation.
2018-12-13 12:03:41 -05:00
Jeffrey Walton
9156c49555
Update comments
2018-12-13 11:57:52 -05:00
Jeffrey Walton
c76f50ebbb
Add missing header guard
2018-12-13 11:33:26 -05:00
Jeffrey Walton
26fc727f8f
Increase precision on OutputResultOperations
...
Andrew Moon's x25519 SSE2 code broke reporting because it was too fast.
2018-12-13 10:48:07 -05:00
Jeffrey Walton
12e9d137b2
Fix copy/paste error
...
32-bit was copied into 64-bit, including the oversized declarations.
2018-12-13 10:27:35 -05:00
Jeffrey Walton
152ac6177c
Add Moon's curve25519 using SSE2 (GH #761 )
...
Moon's code is very fast. In fact it is so fast it broke our benchmarks. Moon's code registers 0.00 milliseconds and 0.00 megacycles/operation.
2018-12-13 10:19:54 -05:00
Jeffrey Walton
20f4d22055
Fix compile on 32-bit MIPS (GH #761 )
...
Testing on a ci20 dev-board with Debian 5 and GCC 4
2018-12-13 04:21:38 -05:00
Jeffrey Walton
0bdacf1496
Fix missing semi-colon in non-ASM path
2018-12-13 03:39:01 -05:00
Jeffrey Walton
459035fcaa
Cleanup donna_32.cpp arithmetic shift
2018-12-12 22:52:15 -05:00
Jeffrey Walton
a09d4024b7
Perform both is_clamped and is_small_order at level 2 validation
2018-12-12 10:48:53 -05:00
Jeffrey Walton
220ae9b914
Update documentation
2018-12-12 10:35:00 -05:00
Jeffrey Walton
b5cf4ff307
Remove unneeded TYPE_OF_SOCKLEN_T define.
...
This should have been removed at GH #208 , PR #703 .
2018-12-12 10:16:15 -05:00
Jeffrey Walton
131397ba5a
Documented Donna namespace for curve25519
2018-12-12 10:14:27 -05:00
Jeffrey Walton
0ad50c61ed
Switch to library integer types
...
The standard ints will cause trouble on older versions of Visual Studio. It looks like they were missed at the initial cut-in.
2018-12-12 09:48:41 -05:00
Jeffrey Walton
d481922a50
Re-enable UBsan tests on Travis
...
The Xenial image and the Xcode 10.1 toolchain are mature enough to enable the sanitizer.
2018-12-12 09:34:09 -05:00
Jeffrey Walton
3d98320b1e
Fix compile on 32-bit SunCC (GH #761 )
2018-12-12 09:05:56 -05:00
Jeffrey Walton
80c551121f
Remove duplicate test run
...
The test vector collection is run earlier in the process.
2018-12-12 05:59:20 -05:00
Jeffrey Walton
e97d6d0ff5
Fix failed self test when NO_OS_DEPENDENCE (GH #761 )
...
Add is_clamped for secret key validation.
Cleanup paramter names in Donna::curve25519 to follow function.
Overload Donna::curve25519 to implicitly use base point if not provided.
Add additional asserts to let the code debug itself.
Update documentation.
2018-12-12 03:56:09 -05:00
Jeffrey Walton
80776453f8
Fix x25519 test data (GH #761 )
2018-12-12 03:55:56 -05:00
Jeffrey Walton
34d42b6998
Cut-in x25519 weak points and validation
2018-12-11 18:26:44 -05:00
Jeffrey Walton
4afa78c0e2
Update documentation
2018-12-11 17:48:19 -05:00
Jeffrey Walton
20fce33449
Update documentation
2018-12-11 17:32:28 -05:00
Jeffrey Walton
77923a291a
Add Langley's curve25519 (GH #761 , PR# 762)
2018-12-11 16:17:56 -05:00
Jeffrey Walton
c1681148a2
Add fallback arch in case arch is not set for setenv-ios.sh
2018-12-09 13:19:27 -05:00
Jeffrey Walton
0aa217b91c
Update comments in config.h
...
Some comments in config.h were old. Time for a refresh.
Switch from CRYPTOPP_BOOL_ARM64 to CRYPTOPP_BOOL_ARMV8. Aarch32 is ARMv8, and that's the important part.
2018-12-09 10:24:55 -05:00
Jeffrey Walton
fbb9b40397
Update Travis Android SDK and NDK gear
2018-12-09 09:43:15 -05:00
Jeffrey Walton
709ca5c480
Update Travis Android SDK and NDK gear
2018-12-09 09:39:38 -05:00
Jeffrey Walton
354e7ca7c9
Update Travis Android SDK and NDK gear
2018-12-09 08:11:04 -05:00
Jeffrey Walton
e08898b215
Squash Android SDK warning
...
Also see https://stackoverflow.com/a/47028911/608639
2018-12-09 06:36:52 -05:00
Jeffrey Walton
b6acde8327
Add setenv-travis script
2018-12-09 06:04:53 -05:00
Jeffrey Walton
123b0725cf
Update Travis Android SDK and NDK gear
2018-12-09 04:52:06 -05:00
Jeffrey Walton
7a191ba42d
Update Travis Android SDK and NDK gear
2018-12-09 04:51:07 -05:00
Jeffrey Walton
435b7cabd3
Update Travis Android SDK and NDK gear
2018-12-09 04:19:00 -05:00
Jeffrey Walton
b324f18777
Increase git clone depth for Travis
2018-12-09 03:31:50 -05:00
Jeffrey Walton
872c9487e5
Rename VS2005 files with dashes to underscores (GH #736 )
2018-12-08 13:26:54 -05:00
Jeffrey Walton
99b7a73047
Add missing iOS architectures for Travis
2018-12-08 12:50:16 -05:00
Jeffrey Walton
7777704a38
Move iOS simulator builds to allowed_failures in Travis
2018-12-08 11:40:53 -05:00
Jeffrey Walton
95964fd0b3
Backout setenv-ios.sh changes
...
The changes did not help
2018-12-08 11:31:30 -05:00
Jeffrey Walton
d1156ddfc6
Try -watchos_simulator_version_min and -tvos_simulator_version_min
2018-12-08 10:37:57 -05:00
Jeffrey Walton
d48192d190
Remove -no_new_main from Apple Watch and TV simulators
...
It did not help...
2018-12-08 10:24:58 -05:00
Jeffrey Walton
1e9a487b47
Clear Clang warning about C++11 template extension
...
"warning: non-type template argument referring to function 'F' with internal linkage is a C++11 extension". Also see https://travis-ci.org/noloader/cryptopp/jobs/465328751
2018-12-08 09:51:42 -05:00
Jeffrey Walton
55b1535a18
Try to fix Watch and TV simulator link error
...
Something about a missing _start symbol. I'm not sure if -no_new_main is the solution or not. Also see https://stackoverflow.com/q/24841283/608639 .
2018-12-08 09:03:38 -05:00
Jeffrey Walton
c531c1c550
Add iOS Watch and TV simulator testing
2018-12-08 08:28:53 -05:00
Jeffrey Walton
c52e99a3c1
Fix ANDROID_HOME path
...
ANDROID_HOME is /c/Users/Jeff/.android on desktops. It is a place where user's private data goes, like Android debug signing keys. It is not the SDK directory like answered on Stack Overflow.
2018-12-08 08:24:27 -05:00
Jeffrey Walton
5124ff7b20
Use OS X 10.1 image for Travis testing
2018-12-08 08:08:08 -05:00
Jeffrey Walton
8c4f38b27d
Update comments
2018-12-08 00:01:38 -05:00
Jeffrey Walton
eee358b025
Fix DataDir for C++03 and below (GH #760 )
2018-12-07 23:42:31 -05:00
Jeffrey Walton
5b0df2592a
Handle test vectors with extensions
2018-12-07 14:25:10 -05:00
Jeffrey Walton
1c88fd6f59
Add search for test vectors and test data (GH #760 )
2018-12-07 12:25:52 -05:00
Jeffrey Walton
52035583de
Cleanup Panama cihers
2018-12-07 01:46:49 -05:00
Jeffrey Walton
08aa7724cd
Disable Panama ASM on X86 (GH #758 )
2018-12-06 18:28:56 -05:00
Jeffrey Walton
f74b8c8344
Fix -Wreorder warning using GCC
2018-12-06 08:39:19 -05:00
Jeffrey Walton
fd15d998be
Update comments
2018-12-05 19:53:14 -05:00
Jeffrey Walton
7656ff2b49
Fix Fedora and Red Hat feature tests
...
They use a hardened build and include flags like -Werror=XXX and -Wp,FORTIFY_SOURCE
2018-12-05 18:35:21 -05:00
Jeffrey Walton
a6067da355
Fix Fedora and Red Hat feature tests
...
They use a hardened build and include flags like -Werror=XXX and -Wp,FORTIFY_SOURCE
2018-12-05 18:30:25 -05:00
Jeffrey Walton
8769302a8b
Add CRYPTOPP_DISABLE_MIXED_ASM define and feature test (GH #756 , PR #757 )
2018-12-05 13:22:10 -05:00
Jeffrey Walton
4b295f1f32
Use const_cast instead of reinterpret_cast
2018-12-04 22:12:07 -05:00
Jeffrey Walton
7832ae3733
Switch to uintptr_t for IsAlignedOn
...
I thought this might be part of the problem for https://groups.google.com/d/msg/cryptopp-users/sHCHSjM7scY/PkcSbIo-DQAJ but it did not help. However, the uintptr_t is the proper cast here.
2018-12-04 21:42:23 -05:00
Jeffrey Walton
a1c89661bc
Fix -xarch for CLMUL on Solaris
2018-12-04 18:32:45 -05:00
Jeffrey Walton
cdefa5befe
Test Travis Xenial build
...
I can't test on my fork at the moment because it is tied up with some other changes. Also see https://blog.travis-ci.com/2018-11-08-xenial-release .
2018-12-04 11:05:16 -05:00
Jeffrey Walton
482151a980
Fix Aarch64 with early GCC
2018-12-04 05:49:21 -05:00
Jeffrey Walton
800dd99c60
Add init priorities for XLC compilers
2018-12-04 04:13:58 -05:00
Jeffrey Walton
71ce30f75f
Whitespace check-in
2018-12-04 03:56:47 -05:00
Jeffrey Walton
fc5019a89e
Add test_x86_avx512.cxx (GH #753 )
2018-12-04 00:11:33 -05:00
Jeffrey Walton
53bdcb2053
Add test_x86_avx512.cxx (GH #753 )
2018-12-04 00:09:56 -05:00
Jeffrey Walton
13f7bd7ffb
Make GF2_32 class member of RawIDA
2018-12-03 08:32:22 -05:00
Jeffrey Walton
0b1162aa34
Update documentation
2018-12-03 06:55:57 -05:00
Jeffrey Walton
6729b29410
Move DEFAULT_CHANNEL and AAD_CHANNEL defs into cryptlib.cpp (GH #751 )
...
The library used to provide DEFAULT_CHANNEL and AAD_CHANNEL this way. We experienced Static Initialization Order Fiasco crashes on occassion, so we moved them into cryptlib.h with internal linkage. The cost was, each translation unit got a copy of the strings which contributed to bloat. Issue 751 shows Clang compiles the global constructors for DEFAULT_CHANNEL and AAD_CHANNEL above the base ISA so we caught crashes on OS X with down-level hardware.
We are now at a "pick your poison" point. We selected Static Initialization Order Fiasco because it seems to be less prevalent.
Hat tip to the C++ Committee for allowing this problem to fester for three decades.
2018-12-03 06:33:15 -05:00
Jeffrey Walton
318d53f6f9
Avoid use of NDEBUG in source files
...
Posix NDEBUG causes our test script to fail the Posix Assert test
2018-12-03 04:18:41 -05:00
Jeffrey Walton
774454ba7c
Cleanup Disable rules for x86
2018-12-01 21:33:17 -05:00
Jeffrey Walton
62b1b7d65b
Update comments
2018-12-01 13:13:35 -05:00
Jeffrey Walton
de2c09eea5
Remove unneeded test program
2018-12-01 12:49:57 -05:00
Jeffrey Walton
92ae496c80
Update GNUmakefile-cross for feature tests (GH #741 )
2018-12-01 12:48:47 -05:00
Jeffrey Walton
07209942a4
Clear unused variable warnings on iOS
2018-12-01 11:25:36 -05:00
Jeffrey Walton
a49e2ee2e7
Clear unused variable warnings on iOS
2018-12-01 11:25:18 -05:00
Jeffrey Walton
b8bf4540ff
Fix simulator SDK
2018-12-01 10:50:32 -05:00
Jeffrey Walton
42de69d883
Update ARM recipes
2018-12-01 10:42:20 -05:00
Jeffrey Walton
d9288fa870
Add additional ARM test programs
...
The SHA512 and SHA3 programs need fixing, but they are stubbed out
2018-12-01 10:33:04 -05:00
Jeffrey Walton
8ae7e45cc1
Initialize ARM test program variables
2018-12-01 09:38:54 -05:00
Jeffrey Walton
3b6ef04973
Initialize ARM test program variables
2018-12-01 09:37:23 -05:00
Jeffrey Walton
9e5ba86d7b
Fix Macports build on old hardware
...
We needed to detect MacPorts earlier so the flags are used in TCXXFLAGS
2018-12-01 06:04:45 -05:00
Jeffrey Walton
cecd2fd66c
Remove language dependent BAD_RESULT variable from Makefile
2018-12-01 04:02:15 -05:00
Jeffrey Walton
41d4fcecbd
Fix typo
2018-12-01 03:55:39 -05:00
Jeffrey Walton
06c0c27e10
Update test programs for x86 and ARM (GH #741 )
2018-12-01 03:16:54 -05:00
Jeffrey Walton
28aa02b860
Clear SunCC warning on extra ';'
2018-12-01 02:44:21 -05:00
Jeffrey Walton
6028a6921a
Fix SIGILL in TestDARN() function
...
I thought this was due to trying to call the darn instruction even though g_hasDARN == false on Power8. However, the problem turned out to be a Power9 load was used when DARN class threw a DARN_Err.
2018-11-30 09:12:35 -05:00
Jeffrey Walton
3e909c13d4
Add IBM XLC init priority support
2018-11-30 08:23:35 -05:00
Jeffrey Walton
52613240ae
Update documentation
2018-11-30 08:22:30 -05:00
Jeffrey Walton
af7cdcdbec
Update documentation
2018-11-30 05:57:02 -05:00
Jeffrey Walton
b87ef5d5cf
Update documentation
2018-11-30 05:48:41 -05:00
Jeffrey Walton
fd5e35fcb6
Fix SIGILL on Linux when using XLC for DARN
2018-11-30 05:28:44 -05:00
Jeffrey Walton
8fba667250
Initialize Intel intrinsic variables
2018-11-28 23:44:03 -05:00
Jeffrey Walton
f07f01f415
Add Power9 Random Number Generator support (GH #747 , PR #748 )
...
This adds the missing changes to the Windows source files
2018-11-28 21:51:39 -05:00
Jeffrey Walton
603d37b28b
Fix type for XLC features ladder
2018-11-28 21:35:07 -05:00
Jeffrey Walton
5d9ecc2b2e
Align GNUmakefile with Autotools and CMake
2018-11-28 19:58:58 -05:00
Jeffrey Walton
ee5b0562b9
Make temporary buffer a SecBlock for zeroization
2018-11-27 22:59:41 -05:00
Jeffrey Walton
09bda53fc0
Fix PowerMac compile on G4's and G5's
2018-11-27 21:17:47 -05:00
Jeffrey Walton
5685b0fdc4
Guard GCC_DARN_ASM_AVAILABLE on GCC 4.0
...
The GCC inline assembler is available at GCC 3.2, but we check for 4.0 for expediency
2018-11-27 20:47:00 -05:00
Jeffrey Walton
7a9970f02e
Update comments and cpu feature test
2018-11-27 06:34:44 -05:00
Jeffrey Walton
d41085e907
Update documentation
2018-11-27 06:08:51 -05:00
Jeffrey Walton
9ddd6dc93c
Fix CPU_ProbeDARN test
...
The DARN probe used 64-bit version of the instruction. I think it would have been OK 32-bit binaries, but the 32-bit version is always safe.
2018-11-27 04:46:51 -05:00
Jeffrey Walton
3db34abf2f
Add Power9 Random Number Generator support (GH #747 , PR #748 )
2018-11-27 02:54:26 -05:00
Jeffrey Walton
1966d13617
Cleanup BLAKE2 m_keyLength and m_digestSize
2018-11-25 02:05:02 -05:00
Jeffrey Walton
cfbe382e0c
Update documentation
2018-11-24 06:04:18 -05:00
Jeffrey Walton
a00fd95032
Update documentation
2018-11-24 05:01:43 -05:00
Jeffrey Walton
b6a73cadfb
Update documentation
2018-11-24 04:57:45 -05:00
Jeffrey Walton
9a987b4867
Fix compile error with GCC on POWER7
2018-11-24 04:43:14 -05:00
Jeffrey Walton
93a9bfbac2
Update documentation
2018-11-24 03:47:16 -05:00
Jeffrey Walton
758e31d5a0
Add 64-bit element rotates for POWER7
2018-11-24 03:27:12 -05:00
Jeffrey Walton
cf3dfa2745
Drop uint64x2_p to POWER7
...
According to the OpenPOWER specs, unsigned long long vectors first appeared in ISA 2.06, which is POWER7. However some support functions, like vec_add, did not arrive until ISA 2.07, which is POWER8.
2018-11-24 02:53:59 -05:00
Jeffrey Walton
a4dc4e2237
Update documentation
2018-11-24 02:23:25 -05:00
Jeffrey Walton
ad58f0cbdc
Update comments for PowerPC
2018-11-24 02:14:28 -05:00
Jeffrey Walton
51fea1a15e
Add VecLoadAligned for PowerPC
2018-11-24 01:27:44 -05:00
Jeffrey Walton
727de927cc
Add CRYPTOPP_POWER7_ALTIVEC for XLC 12 on AIX workaround
2018-11-24 01:11:54 -05:00
Jeffrey Walton
064650d31e
Avoid IsAlignedOn in VecLoad_ALTIVEC and VecStore_ALTIVEC
2018-11-23 23:58:30 -05:00
Jeffrey Walton
a48e387ead
Add missing offset to VecStoreBE
2018-11-23 15:53:58 -05:00
Jeffrey Walton
39aaec7c59
Use vec_revb when POWER9 is available
2018-11-23 12:16:45 -05:00
Jeffrey Walton
4020ba7058
Fix PowerPC compile on Linux
2018-11-22 23:20:55 -05:00
Jeffrey Walton
ae5650d498
Fix PowerPC compile on Linux
2018-11-22 22:51:02 -05:00
Jeffrey Walton
bc63a78b69
Move Power8 SHA tests into ppc_power8.cpp
2018-11-22 22:41:56 -05:00
Jeffrey Walton
2b5bea7b12
Fix POWER8 compile when -DCRYPTOPP_DISABLE_ALTIVEC
2018-11-22 22:23:44 -05:00
Jeffrey Walton
3efc7752e4
Remove __IBM_ATTRIBUTES
...
I believe this is C++ attributes, and not GCC attributes
2018-11-22 20:47:35 -05:00
Jeffrey Walton
3ba4dc6052
Use __IBMCPP_NULLPTR from IBM compiler manual
2018-11-22 19:44:41 -05:00
Jeffrey Walton
652d0e42bf
Use __IBM_ATTRIBUTES and __IBM_ALIGNOF__ from IBM compiler manual
2018-11-22 19:18:08 -05:00
Jeffrey Walton
2fe5177d07
Update documentation
2018-11-22 16:54:28 -05:00
Jeffrey Walton
17b7ebeb39
Update documentation
2018-11-22 16:37:41 -05:00
Jeffrey Walton
f6de172367
Fix UBsan finding on PowerPC under Clang 7.0
2018-11-22 16:27:16 -05:00
Jeffrey Walton
568d9376a2
Update documentation
...
Signed-off-by: Jeffrey Walton <noloader@gmail.com>
2018-11-22 13:54:03 -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
8d4103fb0c
Fix alignment on AIX (GH #745 )
2018-11-22 00:15:37 -05:00
Jeffrey Walton
6cf8895bf1
Add additional assert to FixedSizeAllocatorWithCleanup (GH #745 )
...
This assert checks the array we return to the caller is large enough. Spoiler alert... it is not always large enough, like on 64-bit AIX. The linker on AIX appears to align smaller than 8-bytes
2018-11-21 23:04:00 -05:00
Jeffrey Walton
1e8ac49b49
Guard use of _debug_memset with __DEBUG_ALLOC__
...
This is engaged with IBM XLC's -qheapdebug option
2018-11-21 21:04:20 -05:00
Jeffrey Walton
e26b1a0b2a
Add debug heap support on AIX with IBM XLC
2018-11-21 20:19:06 -05:00
Jeffrey Walton
be437504c7
Clear "x" might be used before it is set using IBM XLC
2018-11-21 20:15:00 -05:00
Jeffrey Walton
5492101fc0
Fix XLC 13.1 debug builds on Linux
2018-11-21 17:37:19 -05:00
Jeffrey Walton
2caa62a066
Add TCXXFLAGS for compiler and cpu feature testing (GH #741 )
...
This will allow users to specify agreesive warning flags without accidentally failing a feature test. The feature tests are minimal but the system headers could be noisy under elevated warnings
2018-11-21 16:25:34 -05:00
Jeffrey Walton
4db81f2eba
Improve -fPIC and -pthread rules
2018-11-21 15:16:55 -05:00
Jeffrey Walton
322c67f373
Use previous digest size as a default value in BLAKE2
2018-11-21 13:28:21 -05:00
Jeffrey Walton
0d44176fd1
Cleanup debug information from SIMON source files
2018-11-21 13:05:59 -05:00
Jeffrey Walton
0998b40d2d
Disable Altivec for BLAKE2s on AIX 7.1 and XLC 12.01 (GH #743 )
2018-11-21 00:25:05 -05:00
Jeffrey Walton
a65d55a3fd
Rewrite BLAKE2 classes
...
The ParameterBlocks for BLAKE2 had undefined behavior. We relied on the compiler packing the bytes in the structure, then we used the first byte as the start of an array.
This rewrite does things correctly. We don't memset the structure, and we don't treat the structure as a contiguous array.
2018-11-20 23:32:35 -05:00
Jeffrey Walton
13bee44388
Update comments
2018-11-20 00:06:34 -05:00
Jeffrey Walton
3be1ae60f8
Clear warning on unitialized rounds
2018-11-19 23:41:34 -05:00
Jeffrey Walton
778f6f122d
Remove potential UB from CFB_CipherConcretePolicy
2018-11-19 23:40:51 -05:00
Jeffrey Walton
081d9110ee
Call VecStore_ALTIVEC by name
...
The old form could suffer recursion if teplate deduction fails
2018-11-19 20:59:15 -05:00
Jeffrey Walton
e6370f3ea1
Fix typo in VecStore
2018-11-19 20:31:06 -05:00
Jeffrey Walton
66b3ba5d66
Update comments
2018-11-19 20:02:51 -05:00
Jeffrey Walton
f52a141f6e
Add separate Polynomial Multiply feature test on POWER8 (GH#742)
2018-11-19 18:31:45 -05:00
Jeffrey Walton
215f9dc164
Fix POWER7 runtime detection test (GH #742 )
2018-11-19 18:31:00 -05:00
Jeffrey Walton
0de4556b39
Fix feature test programs for early POWER7 machines
2018-11-19 18:29:46 -05:00
Jeffrey Walton
0df98b049a
Improve support for early XLC compilers on POWER7 (GH #742 )
2018-11-19 18:28:50 -05:00
Jeffrey Walton
7274827f19
Add test_ppc_vmull.cxx test program
2018-11-19 15:47:04 -05:00
Jeffrey Walton
531ab7e8c5
Update comments
2018-11-19 15:23:29 -05:00
Jeffrey Walton
87565dce75
Add POWER3 test for PowerPC
...
Issue 656 talks about running on a G4 Macbook
2018-11-19 15:23:07 -05:00
Jeffrey Walton
3681d2fa1f
Update documentation
2018-11-19 13:50:53 -05:00
Jeffrey Walton
201375749b
Update documentation
2018-11-19 13:30:56 -05:00
Jeffrey Walton
4c192ecc18
Whitespace check-in
2018-11-19 04:55:45 -05:00
Jeffrey Walton
7d637ded9c
Cleanup POWER8 SHA code
2018-11-19 04:50:13 -05:00
Jeffrey Walton
2f26de7aab
Add 64-bit element loads and stores
2018-11-19 04:49:51 -05:00
Jeffrey Walton
3129ad4d70
Fix LLVM Clang compile on PowerPC
2018-11-19 02:28:29 -05:00
Jeffrey Walton
c9f1a26024
Update test programs for PowerPC (GH #741 )
2018-11-19 02:02:43 -05:00
Jeffrey Walton
b1929f78d0
Update test programs for PowerPC (GH #741 )
2018-11-19 01:36:11 -05:00
Jeffrey Walton
f8b1a997c5
Update test programs for PowerPC (GH #741 )
2018-11-18 23:41:43 -05:00
Jeffrey Walton
2bb9f49544
Add test_ppc_aes.cxx test program
2018-11-18 22:26:34 -05:00
Jeffrey Walton
1ac7207545
Use clean compile as feature test gate on PowerPC (GH #742 )
2018-11-18 20:49:55 -05:00
Jeffrey Walton
76cb99ffe8
Add unexpected to BAD_RESULT
2018-11-18 19:40:34 -05:00
Jeffrey Walton
a82e766925
Make CMake configurable in test script
2018-11-18 18:54:57 -05:00
Jeffrey Walton
b65ff5293a
Make CMake configurable in test script
2018-11-18 18:49:16 -05:00
Jeffrey Walton
3725c8411b
Move CPU_ProbePower7 and CPU_ProbePower8 into their own source files (GH #742 )
2018-11-18 16:35:02 -05:00
Jeffrey Walton
1a06aadbf0
Update comments
2018-11-18 14:54:37 -05:00
Jeffrey Walton
2e68e95a92
Add BLAKE2s and ChaCha CORE SIMD function (GH #656 )
...
The CORE function provides the implementation for ChaCha_OperateKeystream_ALTIVEC, ChaCha_OperateKeystream_POWER7, BLAKE2_Compress32_ALTIVEC and BLAKE2_Compress32_POWER7. Depending on the options used to compile the source files, either POWER7 or ALTIVEC will be used.
This is needed to support the "new toolchain, ancient hardware" use case.
2018-11-18 14:43:48 -05:00
Jeffrey Walton
e28b2e0f02
Switch between POWER7 and POWER4 (GH #656 )
...
This is kind of tricky. We automatically drop from POWER7 to POWER4 if 7 is notavailable. However, if POWER7 is available the runtime test checks for HasAltivec(), and not HasPower7(), if the drop does not occur.
All of this goodness is happening on an old Apple G4 laptop with Gentoo. It is a "new toolchain on old hardware".
2018-11-18 12:42:04 -05:00
Jeffrey Walton
70473f0cab
Whitespace check-in
2018-11-18 12:31:44 -05:00
Jeffrey Walton
59ba3b6aca
Switch between POWER7 and POWER4 (GH #656 )
...
This is kind of tricky. We automatically drop from POWER7 to POWER4 if 7 is not available. However, if POWER7 is available the runtime test checks for HasAltivec(), and not HasPower7(), if the drop does not occur.
All of this goodness is happening on an old Apple G4 laptop with Gentoo. It is a "new toolchain on old hardware".
2018-11-18 11:57:33 -05:00
Jeffrey Walton
aae108d228
Fix PowerPC-64 detection using Clang
2018-11-18 01:52:42 -05:00
Jeffrey Walton
7f5624db7c
Update Filelist
2018-11-17 15:53:52 -05:00
Jeffrey Walton
889c98b9af
Add Newlib test
2018-11-17 15:50:04 -05:00
Jeffrey Walton
0c6dc33d2b
Fix missing header
2018-11-17 15:32:53 -05:00
Jeffrey Walton
0564266151
Cleanup makefile
2018-11-17 15:28:30 -05:00
Jeffrey Walton
b0f77fe7e3
Add additional tests
2018-11-17 15:09:36 -05:00
Jeffrey Walton
147983305a
Use __ALTIVEC__ preprocessor macro for PowerPC
2018-11-17 01:49:48 -05:00
Jeffrey Walton
c4c413e3f3
Drop GCM to POWER7 if POWER8 unavailable
2018-11-17 00:47:17 -05:00
Jeffrey Walton
bbc5c63d33
Drop GCM to POWER7 on PowerPC
...
GCM can do some bulk XOR's using the SIMD unit. However, we still need loads and stores to be fast. Fast loads and stores of unaligned data requires the VSX unit
2018-11-17 00:41:49 -05:00
Jeffrey Walton
0ac7b25221
Use C++ compiler for all source files (PR #733 )
2018-11-15 19:13:28 -05:00
Blue
2d2f69c235
Fix missing cpu-features.o in shared object (PR #733 )
2018-11-15 19:11:29 -05:00
Jeffrey Walton
5ef276411c
Update documentation
2018-11-15 17:52:06 -05:00
Jeffrey Walton
4c5695c51b
Update documentation
2018-11-15 17:40:06 -05:00
Jeffrey Walton
f53405b995
Update documentation
2018-11-15 17:21:38 -05:00
Jeffrey Walton
cf52307abd
Update documentation
2018-11-15 16:59:11 -05:00
Jeffrey Walton
364017c097
Update documentation
2018-11-15 16:45:56 -05:00
Jeffrey Walton
dd111a6174
Update documentation
2018-11-15 16:23:21 -05:00
Jeffrey Walton
512fa101e8
Update documentation
2018-11-15 15:27:42 -05:00
Jeffrey Walton
f6e04e5f33
Rename PPC vector functions from VectorFunc to VecFunc
2018-11-15 15:17:49 -05:00
Jeffrey Walton
8e5cd3637e
Update documentation
2018-11-15 12:15:21 -05:00
Jeffrey Walton
98699dde05
Update documentation
2018-11-15 04:39:54 -05:00
Jeffrey Walton
8b4da4ca68
Update comments
2018-11-15 04:12:35 -05:00
Jeffrey Walton
e784c04eb0
Update documentation
2018-11-15 03:43:47 -05:00
Jeffrey Walton
89faf39228
Cleanup BLAKE2s
2018-11-15 03:35:39 -05:00
Jeffrey Walton
f69b7537f5
Update documentation
2018-11-15 03:27:23 -05:00
Jeffrey Walton
390fed72c5
Add word32 VectorStore overloads
2018-11-15 03:11:36 -05:00
Jeffrey Walton
10f85d6596
Make Altivec vector wraps friendly to downgrades
...
The way the existing ppc_simd.h is written makes it hard to to switch between the old Altivec loads and stores and the new POWER7 loads and stores. This checkin rewrites the wrappers to use _ALTIVEC_, _ARCH_PWR7 and _ARCH_PWR8. The wrappers in this file now honor -maltivec, -mcpu-power7 and -mcpu=power8. It allows users to compile a source file, like chacha_simd.cpp, with a lower ISA and things just work for them.
2018-11-15 02:11:00 -05:00
Jeffrey Walton
3c7bdf1a26
Add Octet suffix for vec_sld
...
We need to make room for packed shifts and rotates
2018-11-14 23:32:26 -05:00
Jeffrey Walton
d656545875
Remove duplicate functions
2018-11-14 23:20:03 -05:00
Jeffrey Walton
505c58acc1
Add Octet suffix for vec_sld
...
We need to make room for packed shifts and rotates
2018-11-14 23:12:39 -05:00
Jeffrey Walton
fa8e692d84
Switch to compiler macros for PPC header
2018-11-14 22:59:17 -05:00
Jeffrey Walton
4f86bcc39d
Remove -qxlcompatmacros after Commit 96d3fa208e
2018-11-14 20:18:56 -05:00
Jeffrey Walton
96d3fa208e
Fix compile when using XLC with LLVM front-end without -qxlcompatmacros
2018-11-14 20:16:38 -05:00
Jeffrey Walton
7bd02896a0
Fix XLC flags with LLVM front-end
2018-11-14 20:01:05 -05:00
Jeffrey Walton
5b9b9b8d08
Whitespace check-in
2018-11-14 08:24:52 -05:00
Jeffrey Walton
7c9858f89c
Cleanup PowerPC and XLC feature tests
2018-11-14 08:19:39 -05:00
Jeffrey Walton
225ab6cb7b
Drop ChaCha requirements to POWER7
...
This costs about 0.6 cpb (700 MB/s on GCC112), but it makes the faster algorithm available to more machines. In the future we may want to provide both POWER7 and POWER8
2018-11-14 08:19:13 -05:00
Jeffrey Walton
b3941a433d
Fix some IBM XL C/C++ issues
2018-11-13 23:39:39 -05:00
bobsayshilol
7f8d3e8882
Miscellaneos warning fixes (GH #739 )
...
* Fix -pedantic warning in GCC.
* Fix -Wunused-private-field warning.
* Fix -Wkeyword-macro warning.
2018-11-13 22:04:03 -05:00
Jeffrey Walton
fc1e98e70d
Make feature test output filename configurable (PR #737 , GH #738 )
2018-11-13 14:02:40 -05:00
Jeffrey Walton
197f751831
Use Linux EOL conventions
2018-11-13 14:01:05 -05:00
Jeffrey Walton
00fc030fb4
Add test_pthreads.cxx to Filelist
2018-11-13 13:53:15 -05:00
Jeffrey Walton
926e91008b
Use Windows EOL conventions
2018-11-13 13:48:38 -05:00
Jeffrey Walton
69a00192b9
Add return value to pthread test function
2018-11-13 13:43:20 -05:00
Jeffrey Walton
dd6af58c98
Add pthreads test
2018-11-13 12:13:16 -05:00
Jeffrey Walton
e69106f257
Add "Invalid mnemonic" to bad result on PPC
2018-11-13 01:57:12 -05:00
Jeffrey Walton
27b61d8752
Add CRYPTOPP_INLINE to SIMON and SPECk for debugging
2018-11-13 00:02:34 -05:00
Jeffrey Walton
4da4f7ea2a
Add AVX2 arch to chacha_avx.cpp
2018-11-13 00:01:55 -05:00
Jeffrey Walton
57b2bf5708
Switch to VectorLoad overload with one arg
2018-11-12 23:38:46 -05:00
Jeffrey Walton
7515b4d661
Fix SIMON64 and SPECK64 providers
2018-11-12 22:03:26 -05:00
Jeffrey Walton
9550ccc9a3
Port SIMON64 to Altivec
...
SIMON64 runs about 4x faster than C++ for POWER4 and friends. If POWER7 is available it goes back to full speed due to efficient unaligned loads
2018-11-12 21:51:11 -05:00
Jeffrey Walton
a0608a6b80
Port SPECK64 to Altivec
...
SPECK64 runs about 4x faster than C++ for POWER4 and friends. If POWER7 is available it goes back to full speed due to efficient unaligned loads
2018-11-12 20:56:15 -05:00
Jeffrey Walton
b372f7d387
Clear unused variable warning
2018-11-12 16:54:29 -05:00
Jeffrey Walton
cff351de11
Simplify Aach64 polynomial multiply tests
2018-11-12 16:50:52 -05:00
Jeffrey Walton
6291e2fbeb
Simplify Aach64 polynomial multiply tests
2018-11-12 16:36:46 -05:00
Jeffrey Walton
75c9775944
Simplify Aach64 polynomial multiply tests
2018-11-12 16:27:48 -05:00
Jeffrey Walton
1070186bc4
Update Filelist.txt
2018-11-12 15:44:05 -05:00
Jeffrey Walton
cac97f041d
Rename PPC feature tests to test_ppc_xxx.cxx (PR #737 )
2018-11-12 15:43:01 -05:00
Jeffrey Walton
ff212dae3e
Rename x86 feature tests to test_x86_xxx.cxx (PR #737 )
2018-11-12 15:37:14 -05:00
Jeffrey Walton
41639e5ec6
Fix ARM A-32 and Aarch64 feature tests (PR #737 )
2018-11-12 14:59:36 -05:00
Jeffrey Walton
886fd7903d
Remove wildcard from a.out clean recipe
2018-11-12 05:25:01 -05:00
Jeffrey Walton
a0f3744ed4
Use __cpp_lib_uncaught_exceptions for CRYPTOPP_CXX17_EXCEPTIONS
...
Also see https://bugs.llvm.org/show_bug.cgi?id=39631
2018-11-12 03:37:32 -05:00
Jeffrey Walton
499a5e289d
Remove a.out artifacts whenever feature tests run (GH #738 )
2018-11-12 01:57:09 -05:00
Jeffrey Walton
f91584a7bc
Remove a.out artifacts on OS X during clean (GH #738 )
2018-11-12 00:56:54 -05:00
Jeffrey Walton
4e404cceeb
Fix incorrect Macport compiler detection (GH #738 )
2018-11-11 13:44:39 -05:00
Jeffrey Walton
b163176f82
Fix missing 'no such instruction' in assembler messages (GH #738 )
2018-11-11 13:35:03 -05:00
Jeffrey Walton
05f053007b
Make TrimComment call TrimSpace
2018-11-11 12:41:29 -05:00
Jeffrey Walton
de75959fd7
Move HAS_NEWLIB down to _XOPEN_SOURCE test
2018-11-11 11:54:58 -05:00
Jeffrey Walton
74ee0eef7e
Update comments
2018-11-11 10:55:51 -05:00
Jeffrey Walton
959d81b236
Fix cryptest.sh are *-simd file rename
2018-11-11 10:03:31 -05:00
Jeffrey Walton
40da78e5ad
Cleanup GNUmakefile (PR #737 )
2018-11-11 09:59:55 -05:00
Jeffrey Walton
04062661bf
Fix test program header include
2018-11-11 08:43:14 -05:00
Jeffrey Walton
8e83d7a8ff
Use __GNUC__ for POWER8 AES availability test
2018-11-11 08:00:45 -05:00
Jeffrey Walton
213569a46d
Remove Darwin requirement for Port compilers
...
I seem to recall someone used one on Linux at one time
2018-11-11 07:53:49 -05:00
Jeffrey Walton
8011f023b5
Add test programs to file list (PR #737 )
2018-11-11 01:33:41 -05:00
Jeffrey Walton
6e94562c52
Move to feature-based availability testing in Makefile (PR #737 )
2018-11-11 01:14:43 -05:00
Jeffrey Walton
087f97edea
Remove patch file
2018-11-10 22:24:23 -05:00
Jeffrey Walton
1db4115add
Allow all Android tests to fail until we fix the script for NDK 16b
2018-11-10 18:57:00 -05:00
Jeffrey Walton
5e48e6560e
Whitespace check-in
2018-11-10 14:10:31 -05:00
Jeffrey Walton
b354eee1ed
Add /arch:AVX for chacha_avx.cpp to Nmake recipe
2018-11-10 11:56:56 -05:00
Jeffrey Walton
0ee1cb2ae9
Rename files with dashes to underscores
...
Also see https://github.com/weidai11/cryptopp/issues/736
2018-11-10 11:55:39 -05:00
Jeffrey Walton
06e1d0c0d9
Add call to _mm256_zeroupper to avoid state penalties
...
Also see https://stackoverflow.com/a/7841251/608639
2018-11-10 11:39:30 -05:00
Jeffrey Walton
cc7d5c1561
Rename files with dashes to underscores
...
Also see https://github.com/weidai11/cryptopp/issues/736
2018-11-10 11:19:35 -05:00
Jeffrey Walton
f3fa10a15c
Rename files with dashes to underscores
...
Also see https://github.com/weidai11/cryptopp/issues/736
2018-11-10 11:16:39 -05:00
Jeffrey Walton
896225069d
Rename files with dashes to underscores (GH #736 )
...
Also see https://groups.google.com/forum/#!topic/cryptopp-users/HBz-6gZZFOA on the mailing list
2018-11-10 08:00:14 -05:00
Jeffrey Walton
776a2195bd
Re-add static functions to eccrypto.cpp
...
I think another approach is better for CMake
2018-11-09 21:29:59 -05:00
Jeffrey Walton
9dfc010425
Fix compile with SunCC using CMake
...
This is likely another SunCC problem.
2018-11-09 21:00:37 -05:00
Jeffrey Walton
f839e5093c
Enable SSE2 intrinsics for SunCC
2018-11-09 20:35:27 -05:00
Jeffrey Walton
2106086f1f
Fix Solaris mapfile
...
The mapfile now removes all hwcaps_1 (SSE-AVX), and hwcaps_2 (AVX2, RDRAND, RDSEED). Unfortunately, it requires 2 and does not work on Solaris 9.
2018-11-09 18:59:04 -05:00
Jeffrey Walton
a592d64d1d
Update comments
2018-11-09 17:04:02 -05:00
Jeffrey Walton
656be82a8f
Cleanup ARIA SSE and NEON code
2018-11-09 11:56:47 -05:00
Jeffrey Walton
ca9d0f10f6
Use single block for ARIA key
2018-11-09 10:16:40 -05:00
Jeffrey Walton
28e7baf46b
Clear C4456 under MSVC
2018-11-09 09:26:09 -05:00
Jeffrey Walton
a75f0cd855
Fix missing comment characters
2018-11-09 08:38:29 -05:00
Jeffrey Walton
092309b266
Fix global optimization bug for ChaCha AVX2 under VS2017 (GH #735 )
...
Also see https://github.com/weidai11/cryptopp/issues/649 . The 649 issue is the one affecting AES. It appears to be the same problem.
2018-11-09 08:00:53 -05:00
Jeffrey Walton
af9fb9d21e
Add ChaCha to self tests (GH #732 )
2018-11-08 22:08:59 -05:00
Jeffrey Walton
e6112e35df
Clear C4456 under MSVC
2018-11-08 21:31:25 -05:00
Jeffrey Walton
dede7bf6b4
Whitespace check-in
2018-11-08 20:34:22 -05:00
Jeffrey Walton
aa1d0a5129
Lower Binutil version to 2.23 for AVX
2018-11-08 19:03:33 -05:00
Jeffrey Walton
d9011f07d2
Add ChaCha AVX2 implementation (GH #735 )
2018-11-08 16:20:31 -05:00
Jeffrey Walton
9b31bc189c
Fix Solaris hardware cpas to allow AVX and AVX2
2018-11-08 15:38:13 -05:00
Jeffrey Walton
cc5eb3919f
Fix compile using SunCC 5.9
2018-11-08 15:08:30 -05:00
Jeffrey Walton
4ddaa9d01d
whitespace check-in
2018-11-07 13:18:37 -05:00
Jeffrey Walton
f57df06c5e
Disable global optimizations for Rijndael using MSC compiler (GH #649 )
2018-11-05 23:45:59 -05:00
Jeffrey Walton
5a36cd54bd
Add meaningful test failure messages
2018-11-05 21:26:16 -05:00
Jeffrey Walton
8b13c2a8d0
Whitespace check-in
...
Look, we can finally use whitespace to add breaks and make these somewhat readable.
2018-11-05 20:43:11 -05:00
Jeffrey Walton
93c7518900
Improve datatest parser
...
This switches to line oriented parsing for the test files. Previously we we using streams for names, and lines for values. We can now use whitespace and make the tests a bit more readable by grouping similar tests. AlgorithmType will clear the current accumlated values.
2018-11-05 20:40:39 -05:00
Jeffrey Walton
7c0be4ea8f
Add additional Salsa test vectors
2018-11-05 09:00:32 -05:00
Jeffrey Walton
5de6545827
Add additional test vectors
2018-11-04 20:05:08 -05:00
Jeffrey Walton
4ee0b3e2f6
cryptlib.h
2018-11-04 15:46:44 -05:00
Jeffrey Walton
f5bce1ab8c
Fix missing errno on PPC64 with GCC 4.8.5
2018-11-04 15:36:13 -05:00
Jeffrey Walton
6cc763939e
Skip unneeded wrap check in SIMD book keeping (GH #732 )
2018-11-04 15:35:34 -05:00
Jeffrey Walton
29be6ed97a
Work-around potential counter increment problem in ChaCha20 (GH #732 )
...
This is only a work-around for the moment. The issue only affects SIMD code. The problem is, the algorithm we use performs a 32-bit add as an intermediate result, but we really need a 64-bit add. We are running 4 transforms in parallel, and we can't add and carry the way we need to.
The workaround is, whenever we could cross the 32-bit counter boundary we use the C version of the transform. We determine the cross-over point by 'bool safe = 0xffffffff - state.low > 4'. When not safe we skip the SIMD version of the algorithm and use the C version. Once we are safe again we use the SIMD version again.
The work-around costs us about 0.1 to 0.2 cpb. At 1.10 or 1.15 cpb that equates to about 200 MB/s on a Skylake. We'd like to get it back eventually.
2018-11-04 14:49:26 -05:00
Jeffrey Walton
d7a3562c0b
Whitespace check-in
2018-11-04 14:36:55 -05:00
Jeffrey Walton
87d679bc7e
Add additional ChaCha20 test vectors (GH #732 )
...
The additional tests ensure we cross the 32-bit boundary used by the state counters
2018-11-04 14:34:32 -05:00
Jeffrey Walton
40fa6873f9
Add ability to Seek64 in test framework (GH #732 )
...
Also see https://github.com/randombit/botan/pull/1728
2018-11-04 14:21:54 -05:00
Jeffrey Walton
f7c0fab5b2
Fix compile on early Apple platforms.
...
I think this may be related to the VectorSource check-in. The error is:
algparam.h: In constructor 'ConstByteArrayParameter::ConstByteArrayParameter(const T&, bool) [with T = std::vector<byte, std::allocator<byte> >]':
filters.h:1444: instantiated from here
algparam.h:56: error: 'const class std::vector<byte, std::allocator<byte> >' has no member named 'data'
2018-11-03 20:00:29 -04:00
Jeffrey Walton
a4d97e9bf8
Use vec_shleft_octet to avoid confusion with vec_extract
2018-11-03 19:29:08 -04:00
Jeffrey Walton
4e3d160acc
Update comments
2018-11-03 18:56:59 -04:00
Jeffrey Walton
43cf1f0d95
Use vec_sldo to avoid confusion with vec_extract
2018-11-03 17:34:36 -04:00
Jeffrey Walton
aee045912a
Whitespace check-in
2018-11-03 16:42:35 -04:00
Jeffrey Walton
6aa6393bf3
Update documentation
2018-11-03 11:17:54 -04:00
Jeffrey Walton
4b4dbdb90a
Update documentation
2018-11-03 11:09:09 -04:00
Jeffrey Walton
bdeaae3ac9
Fix disjoint t[] and f[] when using SIMD implementations
2018-11-03 10:49:22 -04:00
Jeffrey Walton
600e2a8be4
Rewrite BLAKE2 classes to remove intermediate base class
2018-11-03 10:33:35 -04:00
Jeffrey Walton
06867e5caf
Guard BLAKE2 on CRYPTOPP_ALTIVEC_AVAILABLE
2018-11-03 05:50:34 -04:00
Jeffrey Walton
dfacc9f15c
Use CRYPTOPP_ALTIVEC_AVAILABLE values over defined
...
This allows users to -DCRYPTOPP_ALTIVEC_AVAILABLE=0 on the command line. It is especially important on PPC, which varies wildly among compilers dating back to the 2000's
2018-11-03 05:25:52 -04:00
Jeffrey Walton
aa7e90903e
Remove unneeded #undef's from BLAKE2_Compress32_POWER7
2018-11-02 21:24:55 -04:00
Jeffrey Walton
d68d01066f
Cleanup return statements in PowerPC's VectorSet32
2018-11-02 21:23:41 -04:00
Jeffrey Walton
fc17f160ac
Remove unneeded BLAKE2B_IV from Blake2s source file
2018-11-02 19:21:57 -04:00
Jeffrey Walton
5dca85b819
Split Blake2 SIMD files into blake2s-simd.cpp and blake2b-simd.cpp (GH #729 , GH #731 )
...
The split was required for Blake2b and Power8; Blake2s only requires Power7
2018-11-02 19:09:36 -04:00
Jeffrey Walton
d2b64a4d63
Add BLAKE2b Power8 implementation (GH #731 )
2018-11-02 18:34:46 -04:00
Jeffrey Walton
1fd8ac8b8b
Use vec_perm on PowerPC little-endian for GCC
2018-11-01 14:05:34 -04:00
Jeffrey Walton
c6d2729954
Update comments
2018-11-01 13:32:42 -04:00
Jeffrey Walton
bcfd8444e5
Use vec_mergeh and vec_mergel for PowerPC
...
Origian benchmarks showed no material difference. However, today we are seeing up to 0.4 cpb profit on GCC112.
2018-11-01 13:07:49 -04:00
orangefour
20f82c067e
Add VectorSource (GH #730 )
2018-11-01 06:49:04 -04:00
Jeffrey Walton
7c5da3e1ca
Update comments
2018-10-31 02:42:25 -04:00
Jeffrey Walton
a19385a684
Fix mask names
...
This follows IBM convention, where the lowest memory address is "high", and the highest memory address is "low"
2018-10-30 19:35:16 -04:00
Jeffrey Walton
95d454841c
Update documentation
2018-10-30 09:42:42 -04:00
Jeffrey Walton
659c0c113c
Add BLAKE2b Power8 implementation (GH #729 )
2018-10-30 06:20:31 -04:00
Jeffrey Walton
81db4ea5e3
Switch to pch.cpp for compile tests.
...
adhoc.cpp was a bit uncomfortable because we had to copy it out from adhoc.cpp.proto. For some reason CMake could not perform the copy, so we started using pch.cpp in CMake. This commit keeps them consistent.
We may have problems with one test, and that is the Newlib tests. I seem to recall they a C++ header included to properly identify its use. We cross that bridge during MinGW testing.
2018-10-29 08:41:54 -04:00
Jeffrey Walton
ffe63caae5
Add CXX awareness to CMake test script
2018-10-29 04:58:32 -04:00
Jeffrey Walton
1ff6f39ec6
Add proper declaration for Kalyna tables; and split from definitions
2018-10-28 06:09:46 -04:00
Jeffrey Walton
1d0c6dd916
Cleanup SHA SIMD source file
...
Add proper declaration for SHA256_K and SHA512_K tables; and split from definitions
2018-10-28 04:45:26 -04:00
Jeffrey Walton
c601213ce1
Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools
...
Autotools sets up its config.h file with the '#define XXX 0' or '#define XXX 1' pattern. This check-in makes the sources Autotools aware. We need to verify CMake does the same
2018-10-28 04:24:22 -04:00
Jeffrey Walton
e185cbd803
Revert "Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools"
...
This reverts commit 04306f86ac . It broke GCC 4.8 on PowerPC.
2018-10-28 03:42:50 -04:00
Jeffrey Walton
a7615a8c7c
Add packed 32-bit Shuffle specializations for ChaCha on Power8
2018-10-28 00:48:18 -04:00
Jeffrey Walton
542140621a
Update comments
2018-10-27 14:01:25 -04:00
Jeffrey Walton
a281cd9d48
Add ChaCha recipes to GNUmakefile-cross
2018-10-27 12:59:29 -04:00
Jeffrey Walton
e9e317525e
Whitespace check-in
2018-10-27 12:49:22 -04:00
Jeffrey Walton
1cf4f98df8
Update comments
2018-10-27 12:46:01 -04:00
Jeffrey Walton
06d0072d6a
Add CRYPTOPP_DISABLE_ASM to dependency recipe
...
This stops the inclusion of SSE headers without arch options that break the recipe
2018-10-27 11:34:11 -04:00
Jeffrey Walton
d7d76fa5f7
Add ChaCha Power8 implementation
2018-10-27 08:40:07 -04:00
Jeffrey Walton
04306f86ac
Sync CRYPTOPP_{BIG|LITTLE}_ENDIAN with Autotools
2018-10-27 07:30:15 -04:00
Jeffrey Walton
8b00a9ff3f
Fix compile error on AIX
...
Apparently "hz" is an identifier somewhere in the bowels AIX standard headers
2018-10-27 06:52:59 -04:00
Jeffrey Walton
5dfa9086b7
Add VectorStore(byte*, vector) overload
2018-10-27 06:25:05 -04:00
Jeffrey Walton
5e897710e8
Update documentation
2018-10-27 06:19:59 -04:00
Jeffrey Walton
5d1de662bb
Spelling
2018-10-27 03:33:29 -04:00
Jeffrey Walton
55bb2c8b03
Update documentation
2018-10-27 02:05:49 -04:00
Jeffrey Walton
2b4911abee
Update documentation
2018-10-27 00:48:10 -04:00
Jeffrey Walton
16768df2e5
Update documentation
2018-10-26 19:29:15 -04:00
Jeffrey Walton
ca97f6fafb
Add addition helper for Aarch32 and Aarch64
...
Update comments
2018-10-26 13:42:09 -04:00
Jeffrey Walton
21d69598ab
Add CRYPTOPP_DISABLE_ASM to dependency recipe
...
This stops the inclusion of SSE headers without arch options that break the recipe
2018-10-26 11:10:07 -04:00
Jeffrey Walton
c0b273dac8
Remove xorInput parameter from ChaCha SIMD functions
...
We can use the input pointer directly after checking KeystreamOperation
2018-10-26 10:10:52 -04:00
Jeffrey Walton
61a696f710
Update comments
2018-10-26 04:26:18 -04:00
Jeffrey Walton
8da2b91cba
Add ChaCha AlgorithmName override
2018-10-26 03:13:06 -04:00
Jeffrey Walton
76ab8ffa4b
Update comments
2018-10-26 03:12:46 -04:00
Jeffrey Walton
c992fe98a9
Fix failed compile on Ubuntu with -msse2
...
Also see https://github.com/noloader/cryptopp-cmake/issues/36
2018-10-26 02:43:35 -04:00
Jeffrey Walton
99c65bdb35
Rename ARM Shuffle() to Extract()
...
Extract() is the equivalent to SSE's _mm_shuffle_epi32(), but ARM naming calls it vector extract
2018-10-26 00:44:10 -04:00
Jeffrey Walton
d3a3189ba3
Sync CRYPTOPP_ARM_ACLE_AVAILABLE with Autotools
2018-10-25 14:08:09 -04:00
Jeffrey Walton
b4b3623938
Whitespace check-in
2018-10-25 12:15:33 -04:00
Jeffrey Walton
b1050636a6
Add ChaCha NEON implementation
2018-10-25 12:08:32 -04:00
Jeffrey Walton
352083b1d0
Cleanup HC128 and HC256 OperateKeystream
2018-10-25 08:24:13 -04:00
Jeffrey Walton
ba5ca6b8cd
Add XOP aware BLAKE2b and BLAKE2s
2018-10-25 06:35:43 -04:00
Jeffrey Walton
f33b19bf00
Add XOP aware Salsa20
2018-10-25 05:24:02 -04:00
Jeffrey Walton
daa07255ec
Fix ambiguous symbol BTEA::StaticAlgorithmName (GH #726 )
2018-10-25 02:16:15 -04:00
Jeffrey Walton
ecbf791015
Remove unneeded SIMON128 functions in simon64-simd.cpp
...
This looks like artifacts from when we split simon-simd.cpp into simon64-simd.cpp and simon128-simd.cpp.
2018-10-24 19:02:20 -04:00
Jeffrey Walton
67f421174c
Add XOP aware SIMECK
2018-10-24 17:49:04 -04:00
Jeffrey Walton
babdf8b38b
Add XOP aware CHAM and LEA
2018-10-24 17:12:03 -04:00
Jeffrey Walton
210995b867
Add XOP aware SIMON and SPECK
2018-10-24 16:55:59 -04:00
Jeffrey Walton
ed4d57cecb
Add XOP aware ChaCha
...
ChaCha is about 50% faster using XOP for the rotates on AMD machines
2018-10-24 16:15:13 -04:00
Jeffrey Walton
b4c4c5aa14
Add SSSE3 rotates when available
...
This change obtains the remaining 0.1 to 0.15 cpb. It should be engaged with -march=native
2018-10-24 15:34:54 -04:00
Jeffrey Walton
c43c47e590
Fix _mm_roti_epi32 and _mm_roti_epi64 redefined on Fedora ar -O0
2018-10-24 13:32:53 -04:00
Jeffrey Walton
18dcbdf514
Move input xor to ChaCha_OperateKeystream_SSE2
...
This picks up about 0.2 cpb in ChaCha::OperateKeystream. It may not sound like much but it puts SSE2 intrinsics version on par with the ASM version of Salsa20. Salsa20 leads ChaCha by 0.1 to 0.15 cpb, which equates to about 50 MB/s.
2018-10-24 11:00:35 -04:00
Jeffrey Walton
d230999b40
Fix ChaCha compile on ARM and MIPS
2018-10-24 01:11:45 -04:00
Jeffrey Walton
6a5d2ab03d
Remove unneeded params from ChaCha_OperateKeystream_SSE2
2018-10-23 08:52:29 -04:00
Jeffrey Walton
028a9f0494
Remove old comments from chacha.cpp
...
This should have been done at 916c4484a2
2018-10-23 08:12:02 -04:00
Jeffrey Walton
4ad8fa9efe
Fix cryptest.vcxproj.user after 916c4484a2 check-in
2018-10-23 08:05:24 -04:00
Jeffrey Walton
916c4484a2
Add ChaCha SSE2 implementation
...
Thanks to Jack Lloyd and Botan for allowing us to use the implementation.
The numbers for SSE2 are very good. When compared with Salsa20 ASM the results are:
* Salsa20 2.55 cpb; ChaCha/20 2.90 cpb
* Salsa20/12 1.61 cpb; ChaCha/12 1.90 cpb
* Salsa20/8 1.34 cpb; ChaCha/8 1.5 cpb
2018-10-23 07:57:59 -04:00
Jeffrey Walton
35b874b527
Add additional ChaCha tests
2018-10-23 07:35:41 -04:00
Jeffrey Walton
dc840e49a6
Make datatest.cpp more tolerant of comments
2018-10-23 07:09:22 -04:00
Jeffrey Walton
322cda8e6e
Whitespace check-in
2018-10-23 07:08:33 -04:00
Jeffrey Walton
88af6d7230
Remove extraneous folder from PR (GH #723 )
2018-10-22 07:53:23 -04:00
orangefour
253f1ba5da
Fix unused variable warnings (GH #723 )
2018-10-22 07:50:04 -04:00
Jeffrey Walton
8790467fac
Fix constants buffers in TestPadlockRNG
2018-10-21 12:23:31 -04:00
Jeffrey Walton
e0d37b22f8
Remove unused variable from TestPadlockRNG
2018-10-21 11:48:41 -04:00
Jeffrey Walton
5e19ac7e48
Update comments in Doxygen config file
2018-10-20 22:55:21 -04:00
Jeffrey Walton
1d0c659fd7
Fix compile error when NO_OS_DEPENDENCE
2018-10-20 07:36:11 -04:00
Jeffrey Walton
1de4f39f86
Add CRYPTOPP_DISABLE_ASM for Google Native Client (GH #719 )
2018-10-20 06:31:51 -04:00
Jeffrey Walton
3063c6e1d9
Whitespace check-in
2018-10-20 06:11:46 -04:00
Jeffrey Walton
180b39facc
Disable SecureWipe specializations when CRYPTOPP_DISABLE_ASM (GH #719 )
2018-10-20 05:54:49 -04:00
Jeffrey Walton
c315c669b7
Disable server-side Doxygen search
...
This may be contributing to OOM kills in our low-memory environment
2018-10-19 22:19:49 -04:00
Jeffrey Walton
c0471236f4
Use version 7.0 rather than 6.2
...
We had to perform a major version bump due to an ABI break
2018-10-19 20:43:23 -04:00
Jeffrey Walton
9be27c86c6
Fix TestMersenne validation
2018-10-19 07:17:05 -04:00
Jeffrey Walton
cab699d7c8
Bail early from test script if initial tests fail
2018-10-19 07:16:35 -04:00
Jeffrey Walton
26fcdb55cd
Add additional RNG tests
2018-10-19 04:57:10 -04:00
Jeffrey Walton
ce4af5b85f
Add Test_RandomNumberGenerator function
...
Copy and paste gone wrong... This cleaned up a lot of tests by folding the code into one function.
2018-10-18 08:59:00 -04:00
Jeffrey Walton
6462152534
Clear MS LNK4221 and libtool warnings
2018-10-17 04:27:54 -04:00
Jeffrey Walton
ca08d63a10
Add SIMON and SPECK to validation suite
2018-10-14 10:45:46 -04:00
Jeffrey Walton
d6eaa5098e
Remove DEFAULT_BLOCKSIZE constants (GH #535 )
...
This should have been removed around January 2018 with the other functions.
2018-10-14 09:18:45 -04:00
Jeffrey Walton
23279dcd45
Update documentation
2018-10-14 08:21:56 -04:00
Jeffrey Walton
7bd9ffcaca
Remove StaticGetValidBlockSize (GH #535 )
...
This should have been removed around January 2018 with the other functions.
2018-10-14 08:01:25 -04:00
Jeffrey Walton
6660982a55
Allow Cryptogam's AES thunk to be inlined
2018-10-14 07:39:08 -04:00
Jeffrey Walton
4e78abe584
Use HertzToString for friendly CPU speed
2018-10-14 03:50:13 -04:00
Jeffrey Walton
c65cd7c365
Use Cycles/Byte for table heading
2018-10-14 02:49:22 -04:00
Jeffrey Walton
0d6c86bae6
Update comments
2018-10-14 00:30:23 -04:00
Jeffrey Walton
49d852ee8c
Enable same buffer for in and out on ARM A-32 (GH #683 )
2018-10-13 22:16:59 -04:00
Jeffrey Walton
1acbedd4f8
Fix spelling and grammar
2018-10-13 22:15:41 -04:00
Jeffrey Walton
cc5baa9c33
Fix typo in AdvancedProcessBlocks64_6x2_NEON
...
AdvancedProcessBlocks64_6x2_NEON was only used by Simon and Speck. It was causing failures in wide-block tests for CBC decryption only.
2018-10-13 19:20:08 -04:00
Jeffrey Walton
fb303f5180
Fix unset MAKE variable in test scripts
2018-09-26 16:22:19 -04:00
Jeffrey Walton
1d5eaf5268
Fix test scripts on ancient Bash
...
This showed up on Solaris 9 with Bash 2.05. Also see https://unix.stackexchange.com/q/468579/56041
2018-09-12 13:06:28 -04:00
Jeffrey Walton
590f8573c4
Fix LegacyDecryptor and LegacyDecryptorWithMAC (GH #714 )
...
The classes used the wrong hash with the MAC. The legacy gear should have used SHA1, not SHA256.
2018-09-10 21:55:08 -04:00
Jeffrey Walton
d0946abb0b
Use in cryptest-cmake.sh test
2018-09-10 09:00:25 -04:00
Jeffrey Walton
fc5a73186f
Make config.sub and config.guess +w before download
2018-09-09 14:28:52 -04:00
Jeffrey Walton
edbd57a41f
Make config.sub and config.guess +x after download
2018-09-09 12:00:54 -04:00
Jeffrey Walton
b51faab9b3
Update comments in GNU Makefile
2018-09-09 03:44:50 -04:00
Jeffrey Walton
03297cdfa6
Add -xregs=no%appl for SunCC on Sparc
2018-09-09 03:01:10 -04:00
Jeffrey Walton
9a8b4a8024
Make TestStringSink a debug test
2018-09-08 21:52:14 -04:00
Jeffrey Walton
ae34c2d2ff
Add throw to test recover plain text for DefaultDecryptorWithMAC
2018-09-08 17:08:44 -04:00
Jeffrey Walton
4ff34ee329
Add DefaultDecryptorWithMAC using binary file test
...
Also see https://groups.google.com/d/msg/cryptopp-users/QxPxSHkLM-4/pWmoBRuaBQAJ
2018-09-08 12:10:46 -04:00
Mouse
ac43bee698
Merge pull request #334 from orangefour/feature/vector_sink
...
Add VectorSink
2018-09-05 15:56:55 -04:00
orangefour
9b81a545fc
Add VectorSink
2018-09-05 09:25:09 +02:00
Jeffrey Walton
44cd7eb1ed
Fix missed conditions for XTR-DH domain parameters generation
...
Formerly we used asserts and they would fire on occassion. This commit makes the condition part of the generation process to avoid the assert.
2018-09-04 23:32:59 -04:00
Jeffrey Walton
c01606e305
Add additional assert
2018-09-03 18:53:07 -04:00
Jeffrey Walton
aa45eca561
Clear documentation warning due to specialization
...
The specialization pivoted on T_Align16 so it is not longer a template parameter
2018-08-28 21:27:48 -04:00
Jeffrey Walton
a77f529ec2
Update cryptest-autotools.sh
...
Update config.sub and config.guess per GNU recommendations
2018-08-28 15:19:28 -04:00
Jeffrey Walton
a552eff2fe
Break-up long lines in cryptest.nmake
2018-08-27 21:16:50 -04:00
Jeffrey Walton
e8bf53cd9f
Fix Android Aarch32/Aarch64 code paths in neon-simd.cpp
2018-08-26 02:02:26 -04:00
Jeffrey Walton
e8fc1b0422
Fix Android Aarch32/Aarch64 code paths in neon-simd.cpp
2018-08-26 01:54:38 -04:00
Jeffrey Walton
eba078838f
Enable server-side search for Doxygen manual
...
It is too bad it does not work...
2018-08-24 14:09:08 -04:00
Jeffrey Walton
4fb9fbf5ac
Update comments
2018-08-24 12:19:42 -04:00
Jeffrey Walton
beed647df2
Update assert
2018-08-24 09:25:19 -04: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
243673c32a
Add notes on -stdlib=libc++ for MacOS
2018-08-24 04:43:12 -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
e054d36dc8
Add partial specializations for FixedSizeAllocatorWithCleanup
...
This allocator still has some demons buried inside due to the bit fiddling. This commit should isolate the demons to aligned stack allocations when an alignment facility from the platform or OS is not available. That is, we use CRYPTOPP_ALIGN_DATA when we can because it is most reliable.
We can tell when things have gone sideways using Debug builds. The CRYPTOPP_ASSERT(m_allocated) will fire on destruction because the flag gets overwritten.
2018-08-23 07:08:34 -04:00
Jeffrey Walton
8382b49a1f
Fix compile using Nmake
...
LNK2019: unresolved external symbol CryptoPP::KeccakF1600(...)
2018-08-23 05:01:31 -04:00
Jeffrey Walton
f3238742b2
Fix compile with IBM XLC
...
-pthread was causing "xlC: 1501-210 (W) command option t contains an incorrect subargument"
2018-08-23 04:56:45 -04:00
Jeffrey Walton
099883777d
Use ANONYMOUS_NAMESPACE_END
2018-08-23 01:11:45 -04:00
Jeffrey Walton
8c450a9f7a
Avoid Singleton when possible (GH #708 )
...
Also clear several sign conversion warnings
2018-08-22 16:36:05 -04:00
Jeffrey Walton
0ba3687c39
Update comments
2018-08-22 14:46:30 -04:00
Jeffrey Walton
af17fdf91b
Add -Wno-deprecated for PPC tests due to vec_ld and vec_st
2018-08-22 10:12:24 -04:00
Jeffrey Walton
4ab06b7803
Update Visual Studio 2005 project files
2018-08-22 03:17:04 -04:00
Jeffrey Walton
40d75271ec
Add keccakc.h and keccakc.cpp to Filelist.txt
2018-08-22 00:54:19 -04:00
Jeffrey Walton
b9a6034a81
Add keccakc.h and keccakc.cpp for shared F1600
2018-08-22 00:40:30 -04:00
Jeffrey Walton
60c5146c5e
Update comments in integer.cpp
2018-08-21 15:10:22 -04:00
Jeffrey Walton
a65cf70ff8
Update comments in integer.cpp
2018-08-21 15:03:20 -04:00
Jeffrey Walton
81f8c48faf
Avoid std::call_once (GH #707 )
...
This commit also favors init priorities over C++ dynamic initialization. After the std::call_once problems on Sparc and PowerPC I'm worried about problems with Dynamic Initialization and Destruction with Concurrency.
We also do away with supressing warnings and use CRYPTOPP_UNUSED instead.
2018-08-21 12:53:10 -04:00
Jeffrey Walton
6b93c284fe
Use bitwise not 0 for last block flag
2018-08-21 11:25:39 -04:00
Jeffrey Walton
a9c5c56d21
Switch to SaturatingSubtract to guard against wrap on user parameters
2018-08-21 11:21:20 -04:00
Jeffrey Walton
4a86ad67bf
Clear initialization warning due to non-trivial destructor
2018-08-21 10:45:44 -04:00
Jeffrey Walton
899236b99c
Tweak Makefile test to compile but not link (GH #707 )
2018-08-21 06:28:28 -04:00
Jeffrey Walton
c3dd09b93e
Update messages in cryptest.sh
2018-08-20 22:53:39 -04:00
Jeffrey Walton
87493974c7
Add Power8 VMULL tests to cryptest.sh
2018-08-20 22:48:38 -04:00
Jeffrey Walton
c0b1116082
Fix compile on Visual Studio 2005 without service packs
2018-08-20 15:22:48 -04:00
Jeffrey Walton
cb5795482d
Update Visual Studio 2005 project files
2018-08-20 15:12:35 -04:00
Jeffrey Walton
8db82708e3
Clear conversion wanrings under MSVC
2018-08-20 15:05:42 -04:00
Jeffrey Walton
cb6f93c2ba
Update Visual Studio 2005 project files
2018-08-20 14:58:11 -04:00
Jeffrey Walton
3ad077ad82
Clear conversion wanrings under MSVC
2018-08-20 14:08:27 -04:00
Jeffrey Walton
2f906a031b
Clear conversion wanrings under MSVC
2018-08-20 14:01:05 -04:00
Jeffrey Walton
37828ff0ef
Clear conversion wanrings under MSVC
2018-08-20 13:58:58 -04:00
Jeffrey Walton
d47f69acf3
Fix SecBlock ELEMS_MAX in Visual Studio .Net (2002 and 2003)
2018-08-20 12:52:33 -04:00
Jeffrey Walton
d1a582e81a
Add /DEBUG to cryptest.nmake linker options
2018-08-20 11:42:57 -04:00
Jeffrey Walton
c25a1e354d
Clear conversion wanrings under MSVC
2018-08-20 10:44:36 -04:00
Jeffrey Walton
c24f17b7a2
Fix compiler crash in Visual Studio .Net (2002 and 2003)
2018-08-20 08:24:12 -04:00
Jeffrey Walton
3e9a5f17d2
Disable C4231 in Visual Studio 2005 project files
2018-08-20 07:27:07 -04:00
Jeffrey Walton
01779726db
Use consistent suffix for SSE2 ASM
2018-08-20 07:16:59 -04:00
Jeffrey Walton
8c5a558663
Update Visual Studio 2005 project files
2018-08-20 07:15:17 -04:00
Jeffrey Walton
874f79c320
Fix compile on Visual Studio 2005 without serve packs
2018-08-20 05:35:34 -04:00
Jeffrey Walton
5c3532597a
Whitespace check-in
2018-08-20 01:33:09 -04:00
Jeffrey Walton
082ad86132
Fix missing _xgetbv for Visual Studio 2008 and below
2018-08-19 10:19:29 -04:00
Jeffrey Walton
d41b3c8211
Fix linking rdrand.obj twice on Windows using cryptest.nmake
2018-08-19 10:06:20 -04:00
Jeffrey Walton
5489cfe3c6
Remove Asan workaround from VMAC
...
I was not able to duplicate it under GCC. That includes the GCC's supplied with Debian 8 and Ubuntu 14. It looks like the problem was with Asan insread of the library
2018-08-19 08:32:23 -04:00
Jeffrey Walton
5e3f38cf86
Allow previous version of shared library on Solaris
2018-08-19 07:04:19 -04:00
Jeffrey Walton
3e23c55885
Remove makefile debug print statements
2018-08-19 06:12:09 -04:00
Jeffrey Walton
9886b555d0
Add SONAME to shared object for Solaris
...
Also see https://blogs.oracle.com/solaris/how-to-name-a-solaris-shared-object-v2
2018-08-19 06:10:30 -04:00
Jeffrey Walton
964b92b614
Rework -pthread test for GCC on Solaris
...
It looks like GCC is rejecting the -pthread option but it is advertising Pthread support by defining 39 related macros. I'm not sure what to make of it, but we can't use -pthread because it breaks the compile.
2018-08-18 23:51:14 -04:00
Jeffrey Walton
3929c3594c
Add SHACAL2 cipher AlgorithmProvider()
2018-08-18 22:26:01 -04:00
Jeffrey Walton
1f5d0d85cf
Add Tiger cipher AlgorithmProvider()
2018-08-18 21:41:55 -04:00
Jeffrey Walton
92163356db
Move constant table to unnamed namespace
2018-08-18 21:41:13 -04:00
Jeffrey Walton
03d78fb783
Add Panama cipher AlgorithmProvider()
2018-08-18 14:31:00 -04:00
Jeffrey Walton
a6fadbad77
Remove Provider from public key operations
...
Everything is C++ so there's no value added by the column
2018-08-18 12:49:16 -04:00
Tanzinul Islam
ea05f2fefd
Fix build for MinGW due to deleted winpipes.cpp ( #705 )
...
On my MinGW-w64 setup, the build failed:
>mingw32-make: *** No rule to make target 'winpipes.o', needed by 'libcryptopp.a'.
>mingw32-make: Target 'default' not remade because of errors.
Looks like `winpipes.cpp` was removed in f2171cbe2 but not de-listed from the `GNUmakefile`. Remove it.
2018-08-18 11:17:50 -04:00
Jeffrey Walton
ef58e71d77
Discard extra noise from Autotools test script
2018-08-18 08:28:32 -04:00
Jeffrey Walton
31ebabeb1e
Cleanup headers in vmac.cpp
2018-08-18 07:21:42 -04:00
Jeffrey Walton
4282f94712
Disable X32 inline assembly (GH #686 , PR #704 )
...
Also use CRYPTOPP_DISABLE_XXX_ASM consistently. The pattern is needed for Clang which still can't compile Intel assembly language. Also see http://llvm.org/bugs/show_bug.cgi?id=24232 .
2018-08-18 04:44:53 -04:00
Jeffrey Walton
06cf2ede9e
Disable ASM and intrinsics for ARM big-endian
...
We don't have a test rig to test things. Based on our experience with Power8 and BE/LE, there will be trouble
2018-08-18 04:31:49 -04:00
Jeffrey Walton
48f2d95b0f
Fix ChaCha debug builds
...
This broke at https://github.com/weidai11/cryptopp/commit/e2be0cdecce7
2018-08-18 01:31:35 -04:00
Jeffrey Walton
f2171cbe2f
Remove Thread and Socket classes (GH #208 , PR #703 )
...
Also see https://groups.google.com/forum/#!topic/cryptopp-users/5btwLoxXXD4 .
2018-08-17 23:55:39 -04:00
Jeffrey Walton
522da15b13
Whitespace check-in
2018-08-17 23:44:01 -04:00
Jeffrey Walton
4fe078b4b6
Use BLAKE2B_G2 macro name
2018-08-17 20:39:28 -04:00
Jeffrey Walton
25116f5aae
Enable SSSE3 and SSE4 for SIMON and SPECK on Solaris with SunCC 5.13 and above
2018-08-17 09:02:24 -04:00
Jeffrey Walton
18bfe2a50a
Fix AlgorithmProvider for CHAM and LEA on Solaris
2018-08-17 07:55:35 -04:00
Jeffrey Walton
b2c5616ede
Fix AlgorithmProvider for SIMON and SPECK on Solaris
2018-08-17 07:49:35 -04:00
Jeffrey Walton
e2be0cdecc
Make ChaCha an Salsa use the same design pattern
2018-08-17 06:19:30 -04:00
Jeffrey Walton
3e55bfca7d
Cleanup header includes for SSE
...
Travis is failing because the system headers don't guard their functions and datatypess properly
2018-08-16 19:37:36 -04:00
Jeffrey Walton
2876371cea
Add GNUmakefile-cross flags SIMON and SPECK
2018-08-16 18:24:22 -04:00
Jeffrey Walton
a4c5bdf821
Remove unneeded comments
2018-08-15 13:30:11 -04:00
Jeffrey Walton
16cf591f3c
Cutover to BLAKE2 team impl
...
The BLAKE2 team runs a tad bit slower but we want to push maintenance onto them
2018-08-15 13:25:53 -04:00
Jeffrey Walton
f28fb0a176
Add SIMON-128 and SPECK-128 source files
2018-08-15 10:02:00 -04:00
Jeffrey Walton
7a43a04048
Split simon-simd.cpp and speck-simd.cpp into separate source files
...
SIMON-64 and SIMON-128 have different ISA requirements. The same applies to SPECK-64 and SPECK-128. GCC generated code that resulted in a SIGILL due to the ISA differences on a down level machine. The instructions was a mtfprwz from POWER8. It was prsent in a function prologue on a POWER7 machine.
2018-08-15 09:59:40 -04:00
Jeffrey Walton
eb57dc5481
Whitespace check-in
2018-08-15 05:34:05 -04:00
Jeffrey Walton
014f3d08c2
Make AdvancedProcessBlocks64_6x2_ALTIVEC inline
2018-08-15 05:18:38 -04:00
Jeffrey Walton
c26aad8a25
Use PtrSub to subtract offset from pointer
2018-08-15 03:16:08 -04:00
Jeffrey Walton
1253bccf06
Add VectorLoad(word32 arr[4]) overloads
2018-08-15 02:12:27 -04:00
Jeffrey Walton
6f1caab7c2
Move SIMON-64 and SPECK-64 to Power7 minimum
...
SIMON-64 and SPECK-64 don't use 64-bit type so they can run on Power7. We may be able to drop to Power4, but we need to test the effects of Loads and Stores without vec_vxs_ld and vec_vsx_st
2018-08-14 23:31:40 -04:00
Jeffrey Walton
62e95313af
Update comments
2018-08-14 20:49:26 -04:00
Jeffrey Walton
9d15a9ee16
Fix SIMON-64 on AIX
2018-08-14 20:44:50 -04:00
Jeffrey Walton
9a78b92429
Update comments
2018-08-14 20:04:28 -04:00
Jeffrey Walton
cf0c487c2a
Fix SPECK-64 on AIX
2018-08-14 19:14:41 -04:00
Jeffrey Walton
9b91b94b05
Add POWER8 SIMON-64 implementation
2018-08-14 07:14:39 -04:00
Jeffrey Walton
d8c28bdc2b
Make SPECK-64 more symmetrical
2018-08-14 06:19:34 -04:00
Jeffrey Walton
f1b190740c
Update comments
2018-08-14 06:07:19 -04:00
Jeffrey Walton
93149e4c25
Update comments
2018-08-14 05:15:32 -04:00
Jeffrey Walton
d221336f42
Add POWER8 SPECK-64 implementation
2018-08-14 03:36:49 -04:00
Jeffrey Walton
462851907f
Add AdvancedProcessBlocks64_6x2_ALTIVEC template
2018-08-14 03:32:45 -04:00
Jeffrey Walton
b35632e89e
Cleanup SIMON-128 code
...
The check-in provides more unification and sets the pattern used with SIMON-64
2018-08-14 01:45:23 -04:00
Jeffrey Walton
9d60081619
Cleanup SPECK-128 code
...
The check-in provides more unification and sets the pattern used with SPECK-64
2018-08-14 01:22:17 -04:00
Jeffrey Walton
7c70b39d18
Cleanup DRBGs
...
The change picks up about 10 cpb or 20 MB/s on Power8.
2018-08-13 09:54:07 -04:00
Jeffrey Walton
9143a05508
Whitespace check-in
2018-08-13 07:47:56 -04:00
Jeffrey Walton
b4c0404bce
Refactor lea-simd.cpp
...
This was part of a POWER8 LEA implementation. The numbers were awful but we still needed the code cleanup
2018-08-13 07:19:17 -04:00
Jeffrey Walton
dbe7025356
Add AdvancedProcessBlocks128_4x1_ALTIVEC template
2018-08-13 06:38:30 -04:00
Jeffrey Walton
78939cb685
Update comments
2018-08-13 01:51:01 -04:00
Jeffrey Walton
de7f4a0894
Fix carry bug in AdvancedProcessBlocks128_6x1_ALTIVEC
2018-08-13 01:44:23 -04:00
Jeffrey Walton
7dc2e6ea31
Switch to byte instead of uint8_t
...
Several places in ppc-simd.h used uint8_t rather than byte
2018-08-13 00:41:55 -04:00
Jeffrey Walton
39b1f60de5
Fix compile under XLC
2018-08-13 00:16:05 -04:00
Jeffrey Walton
e0a35cf18a
Fix compile under XLC
2018-08-13 00:15:06 -04:00
Jeffrey Walton
89476e280d
Cleanup adv-simd.h for ARM
2018-08-12 19:51:50 -04:00
Jeffrey Walton
7f374faf52
Cleanup adv-simd.h for x86
2018-08-12 19:04:14 -04:00
Jeffrey Walton
6c621f91ce
Add POWER8 SIMON-128 implementation
...
Performance went from about 30 to 40 cpb to 5.5 to 9 cpb, depending on endian-ness
2018-08-12 09:21:09 -04:00
Jeffrey Walton
aa806f3475
Add SPECK-128 provider for POWER8
2018-08-12 04:40:10 -04:00
Jeffrey Walton
3e26437249
Remove debug statement
...
Thus slipped by during commit 898dab99b8
2018-08-12 04:24:08 -04:00
Jeffrey Walton
898dab99b8
Add POWER8 SPECK-128 implementation
...
Performance went from about 14 cpb to 2-3 cpb, depending on endian-ness
2018-08-12 04:08:33 -04:00
Jeffrey Walton
dd4f87fa11
Clear IBM XLC warnings on PowerPC
2018-08-12 04:06:06 -04:00
Jeffrey Walton
afe72c50f0
Add VectorSub and VectorSwapWords
2018-08-12 04:05:14 -04:00
Jeffrey Walton
3d6c8d9589
Update comments
2018-08-12 01:12:00 -04:00
Jeffrey Walton
8d62b500cc
Add validat9.cpp to filter list
2018-08-11 23:05:58 -04:00
Jeffrey Walton
d109ce09d0
Update comments and function names
...
Someone trying to make sense of POWER8 GCM is bound to be confused even with the expanded comments and updated function names
2018-08-11 06:40:21 -04:00
Jeffrey Walton
6993d1d0bd
Update comments
2018-08-11 00:55:52 -04:00
Jeffrey Walton
78d3a279dc
Remove specializations for VectorShiftLeft and VectorShiftRight
2018-08-10 23:29:20 -04:00
Jeffrey Walton
555f4742c7
Fix buffering and unusual tag output due to ostringstream
2018-08-10 06:40:44 -04:00
Jeffrey Walton
94eff2cdd6
Remove INLINE used for debugging
...
We needed to switch inlining off manually. GDB was not stepping into code for us. No longer needed
2018-08-10 05:19:08 -04:00
Jeffrey Walton
23e0ee44a0
Cleanup GCM code
...
I always thought the SSE code in GCM_ReverseHashBufferIfNeeded_CLMUL was a wart
2018-08-10 04:42:30 -04:00
Jeffrey Walton
1c224c8798
Switch to vector shifts instead of vector merge
2018-08-10 04:27:49 -04:00
Jeffrey Walton
a2a520e5b9
Cleanup GCM mode
2018-08-10 01:57:14 -04:00
Jeffrey Walton
8c21b6af05
Use shifts for VectorGetLow
2018-08-10 01:25:59 -04:00
Jeffrey Walton
eddc357981
Use shifts for VectorGetLow
2018-08-10 01:24:32 -04:00
Jeffrey Walton
b44de10e18
Cleanup Aarch64 GCM mode
2018-08-10 01:00:26 -04:00
Jeffrey Walton
9f2d65409a
Add POWER8 GCM mode (GH #698 )
...
Commit 3ed38e42f6 added the POWER8 infrastructure for GCM mode. It also added GCM_SetKeyWithoutResync_VMULL, GCM_Multiply_VMULL and GCM_Reduce_VMULL. This commit adds the remainder, which includes GCM_AuthenticateBlocks_VMULL.
GCC is OK on Linux (ppc64-le) and AIX (ppc64-be). We may need some touchups for XLC compiler
2018-08-09 23:28:49 -04:00
Jeffrey Walton
989c3bfbf2
Update comments
2018-08-09 18:18:40 -04:00
Jeffrey Walton
99ab11d1ed
Add TestAltivecOps for Debug builds
2018-08-09 17:23:35 -04:00
Jeffrey Walton
1b5422eb49
Update documentation
2018-08-09 08:16:46 -04:00
Jeffrey Walton
3ed38e42f6
Add POWER8 GCM mode (GH #698 )
...
GCM_SetKeyWithoutResync_VMULL, GCM_Multiply_VMULL and GCM_Reduce_VMULL work as expected on Linux (ppc64-le) and AIX (ppc64-be). We are still working on GCM_AuthenticateBlocks_VMULL.
2018-08-09 08:09:13 -04:00
Jeffrey Walton
5b89e774cc
Add Altivec vector extraction tests
2018-08-09 00:06:42 -04:00
Jeffrey Walton
13b6dac31d
Remove temporary variable
2018-08-08 21:48:07 -04:00
Jeffrey Walton
ce5b6c9e23
Fix return value for Altivec VectorLoad
2018-08-08 21:31:25 -04:00
Jeffrey Walton
048c2721fb
Remove unneeded defines from cpu.cpp
2018-08-08 20:55:00 -04:00
Jeffrey Walton
bcf05a6c6b
Add additional PowerPC self tests
2018-08-08 20:52:50 -04:00
Jeffrey Walton
0464641069
Remove unneeded enum from VectorShiftLeftVectorShiftRight
2018-08-08 20:17:14 -04:00
Jeffrey Walton
00e7d02a8a
Fix Altive VectorStore on little-endian
...
Remove unneeded VectorLeftShift(a,b) and VectorRightShift(a,b)
2018-08-08 19:59:14 -04:00
Jeffrey Walton
96405e14ec
Fix VectorShiftRight on PowerPC
2018-08-08 05:06:58 -04:00
Jeffrey Walton
4c30f57d1b
Update comments
2018-08-06 23:04:10 -04:00
Jeffrey Walton
d4428d7f1c
Add VectorLoad and VectorStore test code
...
Applies to POWER4 and above only
2018-08-06 22:19:59 -04:00
Jeffrey Walton
a4ebb75538
Update comments
2018-08-06 18:37:25 -04:00
Jeffrey Walton
194307308c
Cleanup VPMSUM probes
2018-08-06 18:06:32 -04:00
Jeffrey Walton
2ec9c9963c
Update documentation
2018-08-06 06:47:57 -04:00
Jeffrey Walton
9ff731824b
Prepare for POWER8 carryless multiplies using vpmsum
2018-08-06 05:40:38 -04:00
Jeffrey Walton
6cd7f83346
Cleanup PPC vector functions
...
The Crypto++ functions follow IBM's lead and provide VectorLoad, VectorLoadBE, VectorStore, and VectorStoreBE. Additionally, VectorLoadKey was removed in favor of vanilla VectorLoad.
2018-08-06 05:15:12 -04:00
Jeffrey Walton
9c27143522
Whitespace check-in
2018-08-05 13:31:25 -04:00
Jeffrey Walton
58b7abe106
Update comments
2018-08-05 12:32:36 -04:00
Jeffrey Walton
1dd0e321a6
Rework Makefile and ppc-simd.h for XLC and LLVM front-end changes
2018-08-05 05:39:42 -04:00
Tanzinul Islam
da00422d3c
Fix build with Embarcadero C++Builder 10.2.3 ( #696 )
...
Fix two compilation errors encountered with C++Builder (Starter Edition):
- In `cpu.cpp`, 0ccdc197b introduced a dependency on `_xgetbv()` from `<immintrin.h>` that doesn't exist on C++Builder. Enlist it for the workaround, similar to SunCC in 692ed2a2b .
- In `adv-simd.h`, `<pmmintrin.h>` is being #included under the `CRYPTOPP_SSE2_INTRIN_AVAILABLE` macro. This header, [which apparently provides SSE3 intrinsics](https://stackoverflow.com/a/11228864/1433768 ), is not shipped with C++Builder. (This section of code was recently downgraded from a SSSE3 to a SSE2 block in 09c8ae28 , followed by moving away from `<immintrin.h>` in bc8da71a , followed by reintroducing the SSSE3 check in d1e646a5.) Split the SSE2 and SSSE3 cases such that `<pmmintrin.h>` is not #included for SSE2. This seems safe to do, because some `git grep` analysis shows that:
- `adv-simd.h` is not #included by any other header, but only directly #included by some `.cpp` files.
- Among those `.cpp` files, only `sm4-simd.cpp` has a `CRYPTOPP_SSE2_INTRIN_AVAILABLE` preprocessor block, and there it again includes the other two headers (`<emmintrin.h>` and `<xmmintrin.h>`).
NOTE: I was compiling via the IDE after [setting up a project file](https://github.com/tanzislam/cryptopals/wiki/Importing-into-Embarcadero-C%E2%94%BC%E2%94%BCBuilder-Starter-10.2#using-the-crypto-library ). My compilation command was effectively:
```
bcc32c.exe -DCRYPTOPP_NO_CXX11 -DCRYPTOPP_DISABLE_SSSE3 -D__SSE2__ -D__SSE__ -D__MMX__
```
2018-08-04 22:54:36 -04:00
Jeffrey Walton
e82ee1c6f0
Fix typo in SM4 recipe on PowerPC
2018-08-04 20:28:31 -04:00
Jeffrey Walton
aee00b69ad
Clean *.lst files created by XLC
2018-08-04 20:18:50 -04:00
Jeffrey Walton
9ce1648f83
Update comments
2018-08-03 16:16:08 -04:00
Jeffrey Walton
f67efe75c9
Remove POWER5 define. We don't use it
...
The 64-bit 'vector long long' is POWER8
2018-08-03 14:17:13 -04:00
Jeffrey Walton
4540ab4f10
Rework PPC probes for XLC and LLVM
2018-08-03 07:02:27 -04:00
Jeffrey Walton
8019362bd6
Clear unused variable warnings under MSVC
2018-08-03 06:17:22 -04:00
Jeffrey Walton
81a5429e56
Remove iPhoneSimulator from Travis allowed failures
2018-08-03 05:44:30 -04:00
Jeffrey Walton
eca0458d03
Update comments
2018-08-03 05:08:21 -04:00
Jeffrey Walton
1bd18dd5ba
Simplify RDRAND and RDSEED logic
...
Travis testing on GitHub showed a RDSEED failure with a "no implementation" failure. Stepping back the RDRAND and RDSEED impl logic was too complex. It offered choices when there was no need for them. For MSC we only need the MASM implementation. For U&L we only need the inline assembly that emits the byte codes (and not the instruction). The byte codes cover from GCC 3.2, Clang 2.8 and onwards
2018-08-03 04:34:20 -04:00
Jeffrey Walton
7e14cab8a3
Rework PPC probes for XLC and LLVM
2018-08-03 02:54:50 -04:00
Jeffrey Walton
c4eb38b856
Improve CPU_ProbePower8() test
2018-08-03 01:27:39 -04:00
Jeffrey Walton
c4ef77bcdb
Attempt to use glibtool if available
2018-08-02 23:21:59 -04:00
Jeffrey Walton
fdc3045e34
Copy setenv-ios.sh into TestScripts
...
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:29:25 -04:00
Jeffrey Walton
85ea200ff0
Revert "Copy setenv-ios.sh into TestScripts"
...
The copy happened the wrong way.
This reverts commit a6143862a3 .
2018-08-02 00:28:35 -04:00
Jeffrey Walton
f0fdb3bc16
Bump Travis OS X image to 9.4
2018-08-02 00:16:02 -04:00
Jeffrey Walton
a6143862a3
Copy setenv-ios.sh into TestScripts
...
This is one of the scripts we have in two places due to historical reasons. The current practice is to put them in TestScripts/
2018-08-02 00:13:13 -04:00
Jeffrey Walton
3753a4301d
Disable ASM for iOS simulators
2018-08-01 23:10:01 -04:00
Jeffrey Walton
5eec90bee5
Cleared unused variable warning
2018-08-01 22:32:26 -04:00
Jeffrey Walton
70c9fe4712
Remove calls to chmod and xattr
2018-08-01 22:01:52 -04:00
Jeffrey Walton
f9f307668b
Add false DOCUMENT_DIRECTORY for GNUmakefile-cross
2018-08-01 21:52:46 -04:00
Jeffrey Walton
a1b30685ab
Fix distclean rule in GNUmakefile-cross
2018-08-01 21:33:24 -04:00
Jeffrey Walton
89ec3c4a25
Guard for missing libtoolize
2018-08-01 13:57:35 -04:00
Jeffrey Walton
57521bd22a
Add calls to 'make clean' to ensure building artifacts
2018-07-31 19:53:40 -04:00
Jeffrey Walton
27968af8a9
Update to support IBM XLC and LLVM backend
2018-07-31 18:21:44 -04:00
Jeffrey Walton
5367d26327
Fix compile when adhoc.cpp is missing
2018-07-31 13:33:57 -04:00
Jeffrey Walton
7ff5f0dcf1
Try fix Travis testing on OS X
2018-07-31 11:48:54 -04:00
Jeffrey Walton
319698e43f
Rework GNUmakefiles for XL C/C++ changes
2018-07-31 02:17:13 -04:00
Jeffrey Walton
8c3658fce8
Rework GNUmakefiles for XL C/C++ changes
2018-07-31 02:13:17 -04:00
Jeffrey Walton
b4a041a71b
Add -qxlcompatmacros for IBM XL C/C++ when available
...
Also see https://lists.tetaneutral.net/pipermail/cfarm-users/2018-July/000331.html
2018-07-30 23:22:10 -04:00
Jeffrey Walton
4b13ccea5d
Remove automatic bitness selection on PPC64
2018-07-30 20:40:05 -04:00
Jeffrey Walton
00135f5b5b
Add CRYPTOPP_ALIGN_DATA for IBM XL C/C++
2018-07-30 20:32:45 -04:00
Jeffrey Walton
d563c5da94
Fix SHA-256 on AIX using IBM XL C/C++ and POWER8 crypto
...
We were using aligned loads of the key table SHA256_K. The key table was declared as 16-byte aligned but it appears the table was not aligned in memory.
2018-07-30 19:53:39 -04:00
Jeffrey Walton
0c8a9458cc
Fix compile for AIX using GCC and IBM XL C/C++
2018-07-30 19:14:51 -04:00
Jeffrey Walton
9396dc46ec
Update comments
2018-07-30 15:58:44 -04:00
Jeffrey Walton
f36562218f
Add call to ls upon failure of script
2018-07-30 15:40:13 -04:00
Jeffrey Walton
12bb4866dd
Add check for setenv-*.sh scripts
2018-07-30 15:32:53 -04:00
Jeffrey Walton
4fc5b8da13
Update comments
2018-07-30 15:18:59 -04:00
Jeffrey Walton
36318790a2
Whitespace check-in
2018-07-30 14:11:54 -04:00
Jeffrey Walton
2510d978a0
Try fix Travis and "cryptest-ios.sh not found"
2018-07-30 14:10:52 -04:00
Jeffrey Walton
d952cb99c2
Update comments
2018-07-30 12:42:53 -04:00
Jeffrey Walton
973fbf0e2f
Fix FixedSizeAllocatorWithCleanup assert on Solaris
2018-07-30 11:27:50 -04:00
Jeffrey Walton
f290746a36
Remove Coverity worakaround StreamState
...
Use std::ostringstream instead. Eventually I'd like to see the output stream passed into the function of interest. It will avoid problems on some mobile OSes that don't have standard inputs and outputs.
2018-07-29 22:35:36 -04:00
Jeffrey Walton
bf37ccda6d
Fix initialization of 'pass' variable
...
Copy/paste error from https://github.com/weidai11/cryptopp/commit/d51f701e0638
2018-07-29 21:25:48 -04:00
Jeffrey Walton
afd1ff651a
Add assert to RunTestDataFile
2018-07-29 21:11:36 -04:00
Jeffrey Walton
25a32d3544
Fix HMQV self tests
2018-07-29 20:53:48 -04:00
Jeffrey Walton
0210e54310
Update comments
2018-07-29 20:34:29 -04:00
Jeffrey Walton
d51f701e06
Refactor validat5.cpp and validat6.cpp
...
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
2018-07-29 20:30:19 -04:00
Jeffrey Walton
98e35d2925
Remove addition of -m32|-m64 from GNUmakefile
...
Sun recommends 32-bit binaries instead of 64-bit ones, even on amd64 and sparcv9
2018-07-29 14:37:25 -04:00
Jeffrey Walton
6f64671e4a
Update comments to make it clear the keystream is written
2018-07-29 12:18:22 -04:00
Jeffrey Walton
375b38554e
Use 64-bit multiply for Rabbit
2018-07-29 12:11:45 -04:00
Jeffrey Walton
32d2ad1ca5
Fix "error: ‘MaurerRandomnessTest’ was not declared in this scope"
2018-07-28 18:52:22 -04:00
Jeffrey Walton
138ce8f626
Cleanup Makefiles and Android and iOS scripts
2018-07-28 18:45:37 -04:00
Jeffrey Walton
86a212b85f
Add missing header to validat3.cpp
2018-07-28 16:39:21 -04:00
Jeffrey Walton
28fe1a6a4d
Split validat*.cpp source files
...
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
2018-07-28 14:57:12 -04:00
Jeffrey Walton
0ea807f2eb
Add additional artifacts to autotools-clean rule
2018-07-28 12:38:15 -04:00
Jeffrey Walton
a411ac350b
Cleanup cryptest-autotools.sh script
2018-07-28 10:58:51 -04:00
Jeffrey Walton
4066d70731
Cleanup cryptest-autotools.sh script
2018-07-28 10:57:53 -04:00
Jeffrey Walton
5cc3f72d33
Add -Wa,--noexecstack for aes-armv4.S
2018-07-28 10:36:40 -04:00
Jeffrey Walton
3657f8c235
Add cryptest-results.txt to clean rule
2018-07-28 09:31:41 -04:00
Jeffrey Walton
ef5a3d3905
Add autotools-clean and cmake-clean rules to GNUmakefile
2018-07-28 09:21:31 -04:00
Jeffrey Walton
a0ad5e815c
Remove -marm from aes-armv4.S flags
2018-07-27 22:00:28 -04:00
Jeffrey Walton
fa513df380
Cleanup head notes and includes
2018-07-27 21:18:51 -04:00
Jeffrey Walton
97e283c8fd
Cleanup head notes and includes
2018-07-27 21:04:30 -04:00
Jeffrey Walton
884851cd9a
Update failure message
2018-07-27 19:17:25 -04:00
Jeffrey Walton
5861d9342d
Split regtest2.cpp into two files
...
Rename regtest3.cpp to regtest4.cpp. Split regtest2.cpp into regtest2.cpp and regtest3.cpp
2018-07-27 18:16:25 -04:00
Jeffrey Walton
ed91b278bb
Run autoupdate and libtoolize if available
2018-07-27 16:51:32 -04:00
Jeffrey Walton
f201bc9493
Remove calls to format script
2018-07-27 16:10:43 -04:00
Jeffrey Walton
a3efa68da7
Add call to autoupdate if available
2018-07-27 16:09:27 -04:00
Jeffrey Walton
c7332c22aa
Split bench1.cpp into two files
...
Renamed bench2.cpp to bench3.cpp. Split bench1.cpp into bench1.cpp and bench2.cpp
2018-07-27 14:21:36 -04:00
Jeffrey Walton
1f914feaf9
Split bench1.cpp into two files
...
Renamed bench2.cpp to bench3.cpp. Split bench1.cpp into bench1.cpp and bench2.cpp
2018-07-27 14:13:58 -04:00
Jeffrey Walton
7afd05c336
Save/restore 64-bit registers for Padlock on x86_64
2018-07-27 11:21:54 -04:00
Jeffrey Walton
5ea410c1d3
Update comments
2018-07-27 01:57:33 -04:00
Jeffrey Walton
f165d1822d
More SunStudio/SunCC workarounds
2018-07-27 01:51:27 -04:00
Jeffrey Walton
2f83777e9b
Backout ChaCha changes to Crypto++ 7.0
...
These changes made it in by accident at Commit b74a6f4445 . We were going to try to let them ride but they broke versioning. They may be added later but we should avoid the change at this time.
2018-07-25 16:25:41 -04:00
Jeffrey Walton
e50a40ec59
Fix 'make sources' recipe
2018-07-25 00:11:09 -04:00
Jeffrey Walton
4aafb0e6a3
Cleanup SHA512::Transform code
...
The extra code paths added at GH #689 were no longer needed after GH #691
2018-07-21 10:28:48 -04:00
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
61f1456a5a
Disable X32 inline ASM for Tiger
...
See Peter Cordes comments at Issue 686
2018-07-21 06:36:15 -04:00
Jeffrey Walton
d4f86d7320
Add SunCC code path to GetAlignmentOf
...
It looks like GetAlignmentOf was returning the "UnsignedMin(4U, sizeof(T))" for SunCC. It was causing SIGBUSes on Sparc when T=word64. OpenCSW provided access to their build farm and we were able to test "__alignof__(T)" back to an early SunCC on Solaris 9.
2018-07-21 06:29:20 -04:00
Jeffrey Walton
baff390f28
Fix older Solaris and SunCC compile
...
Found during testing on OpenCSW compile farm on Solaris 9 (host unstable9s)
2018-07-21 06:15:40 -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
365e65c2eb
Whitespace check-in
2018-07-20 13:38:55 -04:00
Jeffrey Walton
ca302c952e
Fix Solaris 11/Sparc crash in SHA-384 (GH #689 , GH #403 )
...
I believe Andrew Marlow first reported it. At the time we could not get our hands on hardware to fully test things. Instead we were using -xmemalign=4i option as a band-aide to avoid running afoul of the Sparc instruction that moves 64-bits of data in one shot.
2018-07-20 13:24:04 -04:00
Jeffrey Walton
45ffb7e827
Fix crash in SHA-512 when using different compile options (GH #661 )
...
This also helps clear a crash on Sparc due to unaligned access to an uint64_t (GH #689 )
2018-07-20 13:15:29 -04:00
Jeffrey Walton
8d6b1af4cf
Update documentation
2018-07-17 11:52:34 -04:00
Jeffrey Walton
d8946df8eb
Add crypto_sign_sk2pk (PR #668 )
...
This should allow users to convert a ed25519 seret key to a public key without rolling their own code
2018-07-17 08:28:33 -04:00
Jeffrey Walton
e1433536bc
Use CRYPTOPP_DISABLE_INTEL_ASM for Clang in GCM
...
Clang 6.0 is still broke. It cannot compile a simple "neg %rcx" using Intel syntax
2018-07-16 19:40:56 -04:00
Jeffrey Walton
076d0cd604
Remove s_clmulConstants table in GCM mode
...
Local scopes and loading the constants with _mm_set_epi32 saves about 0.03 cpb. It does not sound like much but it improves GMAC by about 500 MB/s. GMAC is just shy of 8 GB/s.
2018-07-16 19:04:24 -04:00
Jeffrey Walton
e6fb540c4c
Allow iPhoneSimulator failures (GH #684 )
...
We still need to figure out what to do with this.
2018-07-16 17:12:02 -04:00
Jeffrey Walton
c9d53ad340
Fix "error C2719: formal parameter with requested alignment of 16 won't be aligned"
...
This was somewhat expected due to the Solaris knob turning.
2018-07-16 17:09:26 -04:00
Jeffrey Walton
ee8c141d3c
Fix xompile on downlevel assemblers
...
This surfaced on Solaris with an ancient Binutils
2018-07-16 15:27:25 -04:00
Jeffrey Walton
b91491da4f
Fix Solaris i386 compile of CHAM and LEA for SunStudio 12.3 and below
2018-07-16 12:21:44 -04:00
Jeffrey Walton
14dd03544e
Update cryptest-automake test script for Solaris
2018-07-16 10:53:11 -04:00
Jeffrey Walton
8197732756
Fix SunStudio 12.6 runtime crash on i386
...
This bug has been around since the Sun Studio 11/SunCC 5.8 days
2018-07-16 10:33:14 -04:00
Jeffrey Walton
28f079ba64
Fix SunStudio 12.3 compile on i386
2018-07-16 10:22:21 -04:00
Jeffrey Walton
bd9ca55c44
Cleanup gcm.cpp after Commit 9d954efcde
2018-07-16 09:48:35 -04:00
Jeffrey Walton
9d954efcde
Disable CLMUL again on SunStudio (GH# 188, GH #224 )
...
We got reports that x86_64 was producing incorrect results. Also, the problem persisted in i386 builds. I don't think we can work around this issue. Oracle must fix it.
2018-07-16 09:39:01 -04:00
Jeffrey Walton
d1e646a589
Fix SunStudio 12.6 compile on i386
2018-07-16 09:37:08 -04:00
Jeffrey Walton
a0166d9546
Fix SunStudio 12.4 compile on Solaris
2018-07-16 04:42:52 -04:00
Jeffrey Walton
eb55cc0ae5
Fix SunStudio 12.6 GCM compile on Solaris (GH #188 , GH #224 )
...
I think we have this issue somewhat sorted out. First, there is a compiler bug. Second, it seems to be triggered when function parameters mix const and non-const references. Third, to work around it, all parameters need to be non-const (as in this patch).
I'm really glad we kind of got to the bottom of things. The crash when compiling GCM has been bothering me for nearly 3 years.
2018-07-15 22:31:50 -04:00
Jeffrey Walton
017886a2ea
Fix SunStudio 12.2 compile on Solaris
2018-07-15 22:22:18 -04:00
Jeffrey Walton
339cc240a2
Fix SunStudio compile on Solaris (GH #226 )
2018-07-15 19:26:15 -04:00
Jeffrey Walton
692ed2a2bb
Fix SunStudio compile on Solaris
2018-07-15 19:24:55 -04:00
Jeffrey Walton
916fe7db26
Remove unneeded code from Blake2
2018-07-15 12:59:28 -04:00
Jeffrey Walton
f143534d99
Cleanup defines in sha.cpp
...
There's no need for extra guards with CRYPTOPP_DISABLE_SHA_ASM because relevant macros are undefined
2018-07-15 12:47:34 -04:00
Jeffrey Walton
7e7d86f6fd
Whitespace check-in
2018-07-15 11:45:48 -04:00
Jeffrey Walton
31533db421
Disable X32 for SHA (GH #686 )
...
Thanks to Peter Cordes for the feedback
2018-07-15 11:39:41 -04:00
Jeffrey Walton
7d1eb4fc8b
Fix AppVeyor Win32 build
2018-07-15 11:31:12 -04:00
Jeffrey Walton
c2a9958d9c
Make m4/ directory during testing
2018-07-15 10:13:33 -04:00
Jeffrey Walton
437b2f9b7d
Set LC_ALL=C for Darwin Autotools testing
2018-07-15 09:35:26 -04:00
Jeffrey Walton
4e3a1ea962
Add ARMv8.4 cpu feature detection support (GH #685 ) ( #687 )
...
This PR adds ARMv8.4 cpu feature detection support. Previously we only needed ARMv8.1 and things were much easier. For example, ARMv8.1 `__ARM_FEATURE_CRYPTO` meant PMULL, AES, SHA-1 and SHA-256 were available. ARMv8.4 `__ARM_FEATURE_CRYPTO` means PMULL, AES, SHA-1, SHA-256, SHA-512, SHA-3, SM3 and SM4 are available.
We still use the same pattern as before. We make something available based on compiler version and/or preprocessor macros. But this time around we had to tighten things up a bit to ensure ARMv8.4 did not cross-pollinate down into ARMv8.1.
ARMv8.4 is largely untested at the moment. There is no hardware in the field and CI lacks QEMU with the relevant patches/support. We will probably have to revisit some of this stuff in the future.
Since this update applies to ARM gadgets we took the time to expand Android and iOS testing on Travis. Travis now tests more platforms, and includes Autotools and CMake builds, too.
2018-07-15 08:35:14 -04:00
Jeffrey Walton
2600f6dcc2
Clear unused variable warning
2018-07-14 13:26:49 -04:00
Jeffrey Walton
5460f14857
Clear unused variable warning
2018-07-14 13:01:48 -04:00
Jeffrey Walton
7cc6531dd2
Clear unused variable warning
2018-07-14 12:59:42 -04:00
Jeffrey Walton
7a67e43b27
Fix Apple feature detection (GH #685 )
2018-07-14 08:40:06 -04:00
Jeffrey Walton
d11a7b3436
Add ARMv8 CPU feature queries (GH #685 )
...
CPU feature probes are still outstanding. They are going to be trickier because if CRYPTOPP_XXX_FEATURE_AVAILABLE
2018-07-14 08:20:16 -04:00
Jeffrey Walton
25abe71e69
Fix failed compile with Clang
2018-07-14 04:48:26 -04:00
Jeffrey Walton
28e20d6e5f
Fix "Error: symbol SHA512_Round is already defined" (GH #684 )
2018-07-13 17:05:14 -04:00
Jeffrey Walton
26ae1fb7e9
Fix ARM compile for sm4-simd.cpp
2018-07-13 10:39:08 -04:00
Jeffrey Walton
380829284c
Update documentation
2018-07-13 09:54:06 -04:00
Jeffrey Walton
678bdb1735
Add AES-NI accelerated SM4 encryption (GH #540 )
...
Thanks to Markku-Juhani Olavi Saarinen for the code. Also see https://github.com/mjosaarinen/sm4ni
2018-07-13 08:48:43 -04:00
Jeffrey Walton
3c21233440
Add AES-NI accelerated SM4 encryption (GH #540 )
...
Thanks to Markku-Juhani Olavi Saarinen for the code. Also see https://github.com/mjosaarinen/sm4ni
2018-07-13 08:33:13 -04:00
Jeffrey Walton
2f71e4d7d9
Fix header include
2018-07-13 05:48:03 -04:00
Jeffrey Walton
90e7b85814
Update documentation
2018-07-12 12:04:37 -04:00
Jeffrey Walton
40d70375a9
Increase use of ptrdiff_t when performing pointer math
2018-07-12 09:48:46 -04:00
Jeffrey Walton
ed143608a8
Revert "Increase use of ptrdiff_t when performing pointer math"
...
This reverts commit bbf9a109f2 . It did not fix A-32. Something got crossed in my test case.
2018-07-12 09:43:18 -04:00
Jeffrey Walton
25179e00d3
Fix PtrByteDiff cast
...
A quick testing pass that loaded the code with asserts caused a compile failure
2018-07-12 09:37:43 -04:00
Jeffrey Walton
bbf9a109f2
Increase use of ptrdiff_t when performing pointer math
...
This fixes the incorrect result with CFB mode on A-32 in CFB_CipherTemplate<BASE>::ProcessData
2018-07-12 08:29:46 -04:00
Jeffrey Walton
6434ec597d
Update comments
2018-07-12 07:59:05 -04:00
Jeffrey Walton
e580ed588a
Disable same buffer for in and out on ARM A-32 (GH #683 )
2018-07-12 07:05:18 -04:00
Jeffrey Walton
7eb0535a98
Call Deflator::IsolatedInitialize during Gzip init (GH #660 )
2018-07-11 17:10:32 -04:00
Jeffrey Walton
9b4476ef7b
Update symbol script for Crypto++ 7.x
2018-07-11 16:16:32 -04:00
Jeffrey Walton
d094bc61cd
Update comments
2018-07-11 15:12:53 -04:00
Jeffrey Walton
b3fe24b8b5
Remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support (GH #682 )
...
We were able to gut CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS for everything except Rijndael. Rijndael uses unaligned accesses on x86 to harden against timing attacks.
There's a little more to CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS and Rijndael. If we remove unaligned access then AliasedWithTable hangs in an endless loop on non-AESNI machines. So care must be taken when trying to remove the vestige from Rijndael.
2018-07-11 11:40:25 -04:00
Jeffrey Walton
1e77a72ed6
Disable Cryptogams AES under Clang
...
What a surprise... Clang pretends to be GCC with __GNUC__ but fails to consume the source file
2018-07-11 09:19:11 -04:00
Jeffrey Walton
3ff7d7f028
Add ARM AES asm implementation from Cryptogams (GH #683 )
2018-07-11 06:59:44 -04:00
Jeffrey Walton
bdac2de36e
Increase use of ptrdiff_t when performing pointer math
2018-07-10 17:41:23 -04:00
Jeffrey Walton
1836a7feb4
Cleanup datatest.cpp
...
Switch to non-blocking rngs for Linux and Windows
2018-07-10 17:34:55 -04:00
Jeffrey Walton
004d213e29
Increase use of ptrdiff_t when performing pointer math
2018-07-10 17:31:01 -04:00
Jeffrey Walton
961e9b483c
Revert "Clear conversion warning"
...
This reverts commit 9748c3cf3e . It broke Windows.
2018-07-10 17:18:11 -04:00
Jeffrey Walton
a2ca2cfc0f
Use OS rng as alternate test generator
2018-07-10 17:08:13 -04:00
Jeffrey Walton
722d3e38c1
Avoid cast in PtrDiff
...
ptrdiff_t is the return type
2018-07-10 11:55:50 -04:00
Jeffrey Walton
9748c3cf3e
Clear conversion warning
2018-07-10 11:54:13 -04:00
Jeffrey Walton
45fcd47c07
Clear conversion warning
2018-07-10 11:37:21 -04:00
Jeffrey Walton
3b6872a8cd
Avoid cast in PtrDiff
...
ptrdiff_t is the return type
2018-07-10 11:36:48 -04:00
Jeffrey Walton
9e50eae673
Clear unused variable warning
2018-07-10 11:30:32 -04:00
Jeffrey Walton
33a1baa1a5
Clear conversion warning
2018-07-10 11:30:13 -04:00
Jeffrey Walton
50f99ae802
Increase use of ptrdiff_t when performing pointer math
2018-07-10 09:21:52 -04:00
Jeffrey Walton
59d8ccd64f
Switch to PtrAdd and PtrSub in ByteQueue
2018-07-10 08:25:35 -04:00
Jeffrey Walton
8dc15f4c56
Fix ARMv7 detection after c6c44aa5d1
2018-07-10 05:08:27 -04:00
Jeffrey Walton
c6c44aa5d1
Add PtrAdd and PtrSub helper functions
...
This helps contain UB on pointer subtraction by ensuring a ptrdiff_t is used. The code is a little uglier but it is also more portable.
2018-07-10 05:00:02 -04:00
Jeffrey Walton
c186689273
Add RandomizedTransfer overload
2018-07-10 02:55:29 -04:00
Jeffrey Walton
4c5487b0e4
Increase use of ptrdiff_t when performing pointer math
...
Increase use of ptrdiff_t when performing pointer math
Reduce AlgorithmProvider overrides
Fix CPU_ProbeARMv7 on Aarch64
2018-07-09 06:31:17 -04:00
Jeffrey Walton
86773e942c
Make GNUmakefile aware of *.S files
2018-07-09 06:19:58 -04:00
Jeffrey Walton
03bceda159
Use C++ style casts and take addr of elem 0 for non-const pointers
2018-07-09 03:08:28 -04:00
Jeffrey Walton
664d67e0f6
Add additional asserts in modes.cpp
2018-07-08 22:14:17 -04:00
Jeffrey Walton
517d552a91
Add ARMv7 cpu detection
2018-07-08 02:49:21 -04:00
Jeffrey Walton
886e48d85d
Fix failed link on ARM and friends
2018-07-07 21:34:00 -04:00
Jeffrey Walton
f065f193c1
Fixed failed ChaCha tests
...
We switched to the pattern used for Salsa but did not update the name in the test vector file
2018-07-06 22:30:11 -04:00
Jeffrey Walton
71cc002fd5
Update documentation
2018-07-06 22:12:15 -04:00
Jeffrey Walton
6d1bb00b05
Update Makefile DLLSRCS to include latest files
2018-07-06 22:10:11 -04:00
Jeffrey Walton
e6f87274c1
Update Makefile DLLSRCS to include latest files
2018-07-06 21:54:55 -04:00
Jeffrey Walton
b74a6f4445
Add algorithm provider member function to Algorithm class
2018-07-06 09:23:37 -04:00
Jeffrey Walton
6d9047b444
Fix spelling
2018-07-06 09:21:13 -04:00
Jeffrey Walton
3dcceb55f5
Squash MS LNK4221 and libtool warnings
2018-07-06 03:46:25 -04:00
Jeffrey Walton
77cd5c69d0
Update documentation
2018-07-06 03:18:45 -04:00
Jeffrey Walton
9117d074ea
Update documentation
2018-07-06 03:09:22 -04:00
Jeffrey Walton
ecababa006
Update documentation
2018-07-06 02:57:48 -04:00
Jeffrey Walton
0cee6f01f0
Squash MS LNK4221 and libtool warnings
2018-07-06 01:22:38 -04:00
Jeffrey Walton
bc8da71ab3
Fix early Fedora compiles
2018-07-06 01:14:28 -04:00
Jeffrey Walton
30b304b0f1
Update comments
2018-07-06 00:35:01 -04:00
Jeffrey Walton
97a1e8cae2
Use SecBlock for keys and IVs
2018-07-06 00:11:10 -04:00
Jeffrey Walton
320c68ecbf
Add *.cxx to .gitignore
2018-07-05 23:33:44 -04:00
Jeffrey Walton
8c871b40ae
Update comments
2018-07-05 22:42:17 -04:00
Jeffrey Walton
d7a751b39a
Fix missing test vector in FileList
2018-07-05 19:40:17 -04:00
Jeffrey Walton
a1887d4824
Add missing HC-256
2018-07-05 19:20:35 -04:00
Jeffrey Walton
24d54f06e6
Remove GetOptimalBlockSize from Rabbit
...
The AdditiveCipherConcretePolicy adapter already provides it
2018-07-05 11:48:52 -04:00
Jeffrey Walton
717a81484a
Switch to size_t datatype
2018-07-05 10:42:55 -04:00
Jeffrey Walton
c9c51a5e01
Rework OperateKeystream (GH #678 )
...
This improves Rabbit performance on a Core i5 6400 from 5.5 cpb to 4.7 cpb
2018-07-05 08:41:44 -04:00
Jeffrey Walton
665e16d340
Remove unneeded input variable
2018-07-05 08:22:59 -04:00
Jeffrey Walton
fd5dc95f96
Fix spelling
2018-07-05 07:13:04 -04:00
Jeffrey Walton
23c8bfde7e
Rework OperateKeystream (GH #680 )
...
This improves performance on a Core i5 6400 from 5.4 cpb to 2.9 cpb
2018-07-05 07:11:44 -04:00
Jeffrey Walton
989bf6dc5e
Add HC-256 stream cipher (GH #680 )
2018-07-05 06:43:04 -04:00
Jeffrey Walton
069d85d3f8
Update comments
2018-07-05 06:07:47 -04:00
Jeffrey Walton
ccc1b71bc8
Move TEA and XTEA to lightweight block ciphers
2018-07-05 01:59:42 -04:00
Jeffrey Walton
4feb3731ff
Fix HC-128 benchmark
2018-07-05 01:57:30 -04:00
Jeffrey Walton
541cdf373c
Update documentation
2018-07-05 01:26:48 -04:00
Jeffrey Walton
8e430daadf
Add additional HC-128 test vectors (GH #679 )
2018-07-05 00:45:52 -04:00
Jeffrey Walton
dd31eb80c0
Add HC-128 stream cipher (GH #679 )
2018-07-05 00:29:07 -04:00
Jeffrey Walton
93f46e4302
Update comments
2018-07-04 21:53:08 -04:00
Jeffrey Walton
bfe91dc732
Add additional Rabbit test vectors (GH #678 )
2018-07-04 19:34:51 -04:00
Jeffrey Walton
07be1caeb3
Update documentation
2018-07-04 07:08:14 -04:00
Jeffrey Walton
c73b471dec
Fix CHAM compile on ARMv7
2018-07-04 06:48:54 -04:00
Jeffrey Walton
476559e763
Update documentation
2018-07-04 04:08:33 -04:00
Jeffrey Walton
5e0d31fa8b
Update documentation
2018-07-04 04:05:56 -04:00
Jeffrey Walton
0ebee8708e
Update documentation
2018-07-04 03:59:22 -04:00
Jeffrey Walton
ffc0198991
Update documentation
2018-07-04 03:55:58 -04:00
Jeffrey Walton
d00777e1d7
Add Rabbit stream cipher (GH #678 )
2018-07-04 03:47:28 -04:00
Jeffrey Walton
94e0b3c954
Update documentation
2018-07-03 23:35:36 -04:00
Jeffrey Walton
65806e5ee9
Switch back to _mm_load_sd to load subkeys
...
We performed an intermediate copy while attempting to isolate GH #677 .
2018-07-03 23:13:40 -04:00
Jeffrey Walton
78ece1b2aa
Fix temporary array size (GH #675 )
...
cryptest.sh and UBsan caught a "secblock.h:389:4: runtime error: load of value 206, which is not a valid value for type 'bool'". m_t[4] is accessed in UncheckedSetKey. The extra m_t[] element was inadvertently removed when ProcessAndXorBlock no longer used it.
2018-07-03 22:41:04 -04:00
Jeffrey Walton
f8f6afd1fa
Use IsZero()/NotZero() for 0 denominator test
2018-07-03 22:04:27 -04:00
Jeffrey Walton
ac1439de59
Update documentation
2018-07-01 22:25:07 -04:00
Jeffrey Walton
904e8ce283
Remove code to accomodate variable block size (GH #535 )
...
This should have occured when we yanked the variable block size experiment
2018-07-01 22:20:45 -04:00
Jeffrey Walton
3b92255b8b
Add recipe to trim trailing whitespace
2018-07-01 21:45:01 -04:00
Jeffrey Walton
7bfeb4f3a2
Add recipe to call dos2unix if available
2018-07-01 21:38:47 -04:00
Jeffrey Walton
aa80c7d4ac
Fix bad CHAM-64/ECB decryption with Clang at -O1 (GH #677 )
...
This changes both the encryption and decryption loops to perform 4 rounds per iteration rather than 8 rounds. Decryption was necessary for this bug. Encryption was included to keep things symmetrical in case of future maintenance
2018-07-01 11:01:34 -04:00
Jeffrey Walton
1d7358e971
Switch to _mm_loadu_si128 for SIMECK key loading
2018-07-01 08:47:09 -04:00
Jeffrey Walton
350a47f8b3
Clear unused variable warnings
2018-07-01 08:09:54 -04:00
Jeffrey Walton
9a6a0cbc9e
Used fixed rounds in encrypt and decrypt functions
2018-07-01 07:10:39 -04:00
Jeffrey Walton
7eaccfa47b
Update comments
2018-07-01 04:03:30 -04:00
Jeffrey Walton
d6cde47bbd
Update documentation
2018-07-01 03:53:45 -04:00
Jeffrey Walton
da32ed4679
Fix versioning that cross-pollinated when building docs
2018-07-01 03:46:11 -04:00
Jeffrey Walton
c58ea35e23
Update documentation
2018-07-01 03:42:17 -04:00
Jeffrey Walton
64d15aff66
Update documentation
2018-07-01 03:29:12 -04:00
Jeffrey Walton
b35df75890
Update attribution for SIMECK
2018-07-01 03:21:42 -04:00
Jeffrey Walton
01f11727ad
Fix bench1.cpp from SIMECK testing
2018-07-01 03:14:53 -04:00
Jeffrey Walton
08e6137082
Add SIMECK-64 SSSE3 implementation (GH #675 )
2018-07-01 03:11:00 -04:00
Jeffrey Walton
4a7814be7e
Remove alignment of double for 64-bit template
2018-07-01 02:00:10 -04:00
Jeffrey Walton
810f5c1859
Remove GCC_NO_UBSAN and double casts
2018-07-01 01:23:35 -04:00
Jeffrey Walton
7f86f498d6
Remove GCC_NO_UBSAN attribute
2018-07-01 01:02:33 -04:00
Jeffrey Walton
011a66d03b
Clear sign compare warning
2018-07-01 01:01:36 -04:00
Jeffrey Walton
3d29f99af7
Clear warnings at -Wall -Wextra
2018-06-30 19:40:47 -04:00
Jeffrey Walton
1be58db828
Avoid casting among datatypes in CHAM
...
Clang 5.0 and 6.0 at -O1 is producing code that fails for CHAM-64/ECB
2018-06-30 18:48:20 -04:00
Jeffrey Walton
5fd0e98a41
Add additional SIMECK tests (GH #675 )
2018-06-30 09:48:09 -04:00
Jeffrey Walton
8b3c472333
Add additional SIMECK tests (GH #675 )
2018-06-30 09:41:38 -04:00
Jeffrey Walton
61f635b837
Add additional SIMECK tests (GH #675 )
2018-06-30 08:25:32 -04:00
Jeffrey Walton
7fdb66d46e
Fix cryptest-cmake message
2018-06-30 04:30:58 -04:00
Jeffrey Walton
ac036496d3
Add Simeck lightweight block cipher (GH #675 )
...
Add Simeck lightweight block cipher (GH #675 )
2018-06-30 02:43:12 -04:00
Jeffrey Walton
e18de4d5f9
Re-engage SSE2 ASM for SHA-256 (GH# 674)
...
I'm not usre where exactly the break occured, but it was probably due to the BASE+SIMD rewrite. Thanks to tesbayda for tracking it down.
2018-06-29 21:02:53 -04:00
Jeffrey Walton
9a75d09ca4
Add cleanup function to cryptest-cmake.sh
2018-06-29 19:43:31 -04:00
Jeffrey Walton
598e371b8a
Add cryptest-cmake.sh
2018-06-29 19:28:16 -04:00
Jeffrey Walton
574097bd6f
Add cryptest-autotools.sh
2018-06-29 17:04:22 -04:00
Jeffrey Walton
b613522794
Fix copy/paste error
2018-06-25 15:38:50 -04:00
Jeffrey Walton
f5c86217c0
Use default alignment for GetBlock
2018-06-24 16:05:37 -04:00
Jeffrey Walton
afd3b5c596
Place HIGHT F0 and F1 in unnamed namespace
2018-06-24 01:39:09 -04:00
Jeffrey Walton
b53842bcdc
Fix CRYPTOPP_DISABLE_ASM build
2018-06-24 01:22:37 -04:00
Jeffrey Walton
d12229d463
Fix bench1.cpp from HIGHT testing
2018-06-24 01:01:39 -04:00
Jeffrey Walton
2f5b110b52
Add HIGHT lightweight block cipher (GH #672 )
2018-06-24 00:54:16 -04:00
Jeffrey Walton
32e2be647a
Make CHAM_Info public
2018-06-23 21:21:42 -04:00
Jeffrey Walton
404e6cfae3
Remove CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS
...
GCC 8 was producing bad decryption results for CBC mode on x86. NEON and Aarch64 was fine. We lose 0.6 cpb so LEA runs around 3.5 cpb instead of 2.9 cpb. It would be nice to pinpoint the GCC issue but it is kind of difficult at the moment.
2018-06-23 20:55:17 -04:00
Jeffrey Walton
3af3b8019b
Add additional LEA test vectors (GH #669 )
2018-06-23 17:58:12 -04:00
Jeffrey Walton
72d5d42746
Add additional LEA test vectors (GH #669 )
2018-06-23 17:38:07 -04:00
Jeffrey Walton
d9797c414a
Add CRYPTOPP_LEA_ARM_SPLAT_ROUNDKEYS for LEA
2018-06-23 14:19:18 -04:00
Jeffrey Walton
2d0d87b57a
Use pre-splatted key table for LEA NEON and Aarch64
2018-06-23 13:47:59 -04:00
Jeffrey Walton
09c8ae2835
Use inline for LEA_Encryption and LEA_Decryption
2018-06-23 12:58:55 -04:00
Jeffrey Walton
8279fab432
Fix AdvancedProcessBlocks128_6x1_NEON template name
2018-06-23 12:35:06 -04:00
Jeffrey Walton
527613df22
Update documentation
2018-06-23 12:27:25 -04:00
Jeffrey Walton
d0b5dac162
Update comments
2018-06-23 04:49:10 -04:00
Jeffrey Walton
9980d30734
Add LEA-128 NEON and ARMv8 implementation (GH #669 )
...
LEA-128(128) from 35.6 cpb to 14.11 cpb on a LeMaker HiKey dev-board. LEA-128 from 12.60 cpb to 11.89 cpb on AMD Opteron 1100.
2018-06-23 03:54:51 -04:00
Jeffrey Walton
80ae9f4f0a
Add AVX512 rotates to RotateLeft and RotateRight templates
2018-06-22 17:44:16 -04:00
Jeffrey Walton
fa7714f6cb
Add LEA-128 SSSE3 implementation (GH #669 )
...
LEA-128(128) from 6.73 cpb to 2.84 cpb on modern Core-i5 6400. LEA-128 from 10.12 cpb to 7.84 cpb antique Core2 Duo.
2018-06-22 16:26:27 -04:00
Jeffrey Walton
ea109e0f8f
Add CHAM and LEA to cryptest.nmake
2018-06-21 13:34:18 -04:00
Jeffrey Walton
68305324ef
Fix C2719 on MSVC
...
"error C2719: 'value': formal parameter with __declspec(align('16')) won't be aligned"
2018-06-21 13:32:27 -04:00
Jeffrey Walton
73513d0d04
Whitespace check-in
2018-06-21 01:29:30 -04:00
Jeffrey Walton
b00a378a8d
Add CHAM64 SSSE3 implementation (PR #670 )
...
CHAM64 from 20 cpb to 14 cpb on modern iCore. CHAM64 from 90 cpb to 18 cpb antique Core2 Duo
2018-06-21 00:37:10 -04:00
Jeffrey Walton
a80b1d35b0
Parameterize word type for subkeys in AdvancedProcessBlocks templates
...
This was needed a while ago but we mostly side-stepped the issues with casts. CHAM64 uses a word16 type for subkeys and a cast won't fix it because we favor word32 for 64-bit block sizes.
2018-06-20 19:25:52 -04:00
Jeffrey Walton
a6cdf2bfd1
Switch to _mm_loadu_pd to load round keys
...
This is profitable by 0.1 to 0.2 cpb on a modern Core-i5
2018-06-20 01:20:27 -04:00
Jeffrey Walton
1fd8d612ea
Specialize single word UnpackXMM
2018-06-19 21:35:44 -04:00
Jeffrey Walton
5e41d5d9b6
Fix SSSE3 include guard
...
Use single XMM word for subkeys
2018-06-19 20:15:30 -04:00
Jeffrey Walton
6138829572
Add CHAM128 SSSE3 implementation (PR #670 )
...
CHAM-128(128) from 10.5 cpb to 4.1 cpb. CHAM-128(256) from 12.5 cpb to 4.7 cpb.
2018-06-19 18:03:28 -04:00
Jeffrey Walton
34dcb0d4cd
Add additional CHAM test vectors (PR #670 )
...
This is in preparation for SSE and large block processing. CTR mode is used because AdvancedProcessBlocks128_4x1_SSE
2018-06-19 17:09:43 -04:00
Jeffrey Walton
55ba5de9b5
Fix typo
2018-06-18 19:00:30 -04:00
Jeffrey Walton
0ccdc197b7
Add AVX and AVX2 runtime feature detection (GH #671 )
...
There are no corresponding defines in config.h at the moment. Programs will have to use the preprocessor macros __AVX__ and __AVX2__ to determine when they are available.
2018-06-18 18:33:17 -04:00
Jeffrey Walton
207c6fcb1a
Update documentation
2018-06-18 00:14:31 -04:00
Jeffrey Walton
54d5100344
Add CHAM lightweight block cipher (PR #670 )
...
Add CHAM lightweight block cipher
2018-06-17 23:24:47 -04:00
Jeffrey Walton
30b2de26f4
Update documentation
2018-06-17 22:49:59 -04:00
Jeffrey Walton
1f06c512c4
Add LEA lightweight block cipher (GH #669 )
2018-06-17 22:36:41 -04:00
Jeffrey Walton
f320e7d92a
Fix missing constants in Threefish (GH #664 )
2018-06-03 09:10:45 -04:00
Jeffrey Walton
1543de863c
Fix Kalyna512_Info parameter (GH #662 )
2018-06-02 16:50:28 -04:00
Jeffrey Walton
d286f89b3f
Fix Threefish blocksize parameter (GH #663 )
2018-06-02 16:28:25 -04:00
Jeffrey Walton
edc7689a7f
Fix overcommit resources for Scrypt parallelization (GH #641 )
2018-05-20 08:33:21 -04:00
Mouse
a0f91aeb25
Merge pull request #640 from alanbirtles/patch-1
...
Workaround for #636
2018-05-13 12:37:18 -04:00
Jeffrey Walton
4fc0fefc6e
Add missing include to pwdbased.h (GH #657 )
2018-05-13 10:42:50 -04:00
Marcel Raad
7c1d296283
Fix clang warnings in headers ( #655 )
...
* remove superfluous semicolon
* Remove C-style casts from public headers
clang warns about them with -Wold-style-cast. It also warns about
implicitly casting away const with -Wcast-qual. Fix both by removing
unnecessary casts and converting the remaining ones to C++ casts.
2018-05-10 19:59:21 -04:00
Jeffrey Walton
a07a0e5e5f
Add recipe to install the library only (GH #653 )
...
Some distros don't want to install cryptest.exe. For folks who don't want to install the test program, they can issue 'make install-lib'.
install-lib is a non-standard target, but the GNU Coding Standard does not have a standard target for the task.
2018-05-06 00:10:38 -04:00
Jeffrey Walton
3e965ac9b3
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 23:27:55 -04:00
Jeffrey Walton
d1087291b3
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 23:17:44 -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
Jeffrey Walton
3deb24b7de
Fix Android build after renaming defines for CMake
...
This change should have occurred during commits 188e0df650 and 5422f0c13a .
2018-05-05 21:46:17 -04:00
Jeffrey Walton
188e0df650
Rename CRYPTOPP_DISABLE_SHA → CRYPTOPP_DISABLE_SHANI …
...
This aligns both config.h and Cmake. Also see Gentoo Issue 654598 (https://bugs.gentoo.org/654598 )
2018-05-04 10:10:50 -04:00
Jeffrey Walton
5422f0c13a
Rename CRYPTOPP_DISABLE_AES → CRYPTOPP_DISABLE_AESNI
...
This aligns both config.h and Cmake. Also see Gentoo Issue 654598 (https://bugs.gentoo.org/654598 )
2018-05-03 21:28:17 -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
Jeffrey Walton
91faa5d399
Add AdditionalOptions property to VCXPROJ files (GH #649 )
2018-05-01 23:42:04 -04:00
Jeffrey Walton
55071c49c1
Fix failed Android tests on Travis
...
This change should have been made at https://github.com/weidai11/cryptopp/commit/e2bc3b55caab
2018-04-26 21:35:01 -04:00
PetteriHuusko
d132639881
Fix ios build for cases where Xcode is installed in a path with spaces (PR #646 )
2018-04-26 06:56:26 -04:00
Flo
63b655d7ee
Access modifiers for SIMON and SPECK ciphers modified. ( #644 )
...
- ProcessAndXorBlock
- AdvancedProcessBlocks
now public instead of protected.
2018-04-20 20:54:02 -04:00
Jeffrey Walton
e2bc3b55ca
Rename setenv-android.sh to setenv-android-gcc.sh (GH #637 )
...
This makes room for a Clang/LLVM version of the script
2018-04-19 22:39:07 -04:00
alanbirtles
a4acbb38da
Workaround for #636
...
Temporarily switch to AT&T syntax in ASJ for clang 5.0.0+ and apple clang 9.0.0+ to workaround https://bugs.llvm.org/show_bug.cgi?id=36144
2018-04-12 14:59:15 +01:00
Jeffrey Walton
bdd0f02867
Make chenage-version.sh OS X friendly
2018-04-08 16:19:16 -04:00
Jeffrey Walton
4bb331f5d0
Post-release version increment
2018-04-08 15:58:25 -04:00
Jeffrey Walton
c8d8caf700
Prepare for Crypto++ 7.0 release
2018-04-08 04:48:59 -04:00
Jeffrey Walton
9a991ac1eb
Fix UBsan finding in HKDF
...
This was introduced when HKDF was reworked for the new KeyDerivationFunction interface
2018-04-08 03:20:14 -04:00
Jeffrey Walton
71e9fece87
Make CAST temporaries class members
2018-04-07 11:41:00 -04:00
Jeffrey Walton
11e076003a
Coverity finding CID 189203, 189204, 189205 (ARRAY_VS_SINGLETON)
...
The finding was an out-of-bounds read but Coverity does not realize the API takes a byte count, not element count. This change may produce the same finding.
2018-04-07 10:39:01 -04:00
Jeffrey Walton
cd8c03c816
Move PasswordBasedKeyDerivationFunction to cryptlib.h
2018-04-07 08:14:22 -04:00
Jeffrey Walton
4120e3a53f
Allow Travis iOS test failure for WatchOS (GH #570 )
...
Also see https://stackoverflow.com/q/45671493/608639
2018-04-06 07:21:53 -04:00
Jeffrey Walton
64a15cf51b
Order of initialization for ASN.1 decoders
2018-04-06 02:29:08 -04:00
Jeffrey Walton
62a9574f3f
Make AuthenticatedSymmetricCipher::AlgorithmName non-pure
...
Also see https://stackoverflow.com/q/49658309/608639
2018-04-05 20:34:08 -04:00
Jeffrey Walton
5aec2a4ab0
Fix compile under cryptest.nmake
2018-04-05 20:17:43 -04:00
Jeffrey Walton
29113a980d
Fix compile under Visual Studio 2008
...
We need to add something to cryptest.sh to find these breaks due to <stdint.h>
2018-04-05 20:14:07 -04:00
Jeffrey Walton
7065702ba1
Fix return codes from cryptest-ios.sh
2018-04-05 18:38:43 -04:00
Jeffrey Walton
1103819a86
Remove extra space between variable and value for setenv-ios.sh
2018-04-05 15:19:57 -04:00
Jeffrey Walton
37d723e680
Fix iPhoneSimulator build (GH #635 )
2018-04-05 08:00:25 -04:00
Jeffrey Walton
c27d3a9442
Make ASN.1 decoder m_values protected
2018-04-03 17:32:56 -04:00
Jeffrey Walton
9888d22d4b
Rename ECGDSA_ISO15946 -> ECGDSA ( #634 )
2018-04-02 23:58:23 -04:00
Jeffrey Walton
04c990e5c7
Update documentation
2018-04-02 19:33:37 -04:00
Jeffrey Walton
509c6116a8
Update documentation
2018-04-02 14:41:37 -04:00
Jeffrey Walton
e92fd0f9b2
Hoist XY and V out of parallel for loop
2018-04-02 13:40:33 -04:00
Jeffrey Walton
cdd751d27a
Don't use anonymous namespace in header file (GH #631 , PR #633 )
2018-04-02 05:24:01 -04:00
Jeffrey Walton
6faaf35195
Add Salsa20_Core transform (GH #630 ) ( #632 )
2018-04-02 03:51:51 -04:00
Jeffrey Walton
d106256a29
Update scrypt ( #629 )
...
Use pre-increment on variables
Add code comments
2018-04-01 22:30:03 -04:00
Jeffrey Walton
eb483dd3a6
Add additional asserts to Scrypt
2018-04-01 15:49:00 -04:00
Jeffrey Walton
ea9a5cf755
Add OpenMP support to Scrypt (GH #613 ) ( #628 )
...
Scrypt performance jumps as expected. For example, on a machine with 4 logical cores:
$ time OMP_NUM_THREADS=1 ./test.exe
Threads: 1
Key: DCF073537D25A10C9733...
real 0m17.959s
user 0m16.165s
sys 0m1.759s
$ time OMP_NUM_THREADS=4 ./test.exe
Threads: 4
Key: B37A0127DBE178ED604F...
real 0m4.488s
user 0m15.391s
sys 0m1.981s
2018-04-01 06:58:00 -04:00
Jeffrey Walton
d94ef9c70c
Re-enable OS X and iOS on Travis (GH #570 , PR #627 )
2018-04-01 02:37:32 -04:00
Jeffrey Walton
2e8ccc7777
Update documentation
...
Add asserts to Scrypt ValidateParameters
2018-03-31 21:26:38 -04:00
Jeffrey Walton
129d65d987
Update documentation
2018-03-31 20:25:58 -04:00
Jeffrey Walton
4a69b8581d
Fix Windows compile error using VS2008
2018-03-31 20:19:07 -04:00
Jeffrey Walton
64d02e3a18
Add scrypt key derivation function (GH #613 , PR #626 )
2018-03-31 20:09:38 -04:00
Ilja
8d81492f88
Remove extra ; from cpu.cpp (PR #614 )
2018-03-31 13:10:11 -04:00
Ilja
afaff62d8d
Remove extra ; from crc-simd.cpp (PR #615 )
2018-03-31 13:09:41 -04:00
Ilja
38253a939f
Remove extra ; from eccrypto.cpp (PR #616 )
2018-03-31 13:08:57 -04:00
Ilja
e7ee0e9bab
Remove extra ;s from rsa.h (PR #617 )
2018-03-31 13:08:29 -04:00
Ilja
6cbcd51135
Remove extra ; from neon-simd.cpp (PR #619 )
2018-03-31 13:07:30 -04:00
Ilja
f035ad7187
Remove extra ; from ppc-simd.cpp (PR #620 )
2018-03-31 13:06:44 -04:00
Ilja
f8a1f50383
Remove extra ; from gcm-simd.cpp (PR #618 )
2018-03-31 13:05:45 -04:00
Ilja
ec6c442cc6
Remove extra ; from rijndael-simd.cpp (PR #621 )
2018-03-31 13:04:42 -04:00
Ilja
8f730529b9
Remove extra ; from sha-simd.cpp (PR #622 )
2018-03-31 13:04:00 -04:00
Ilja
30b583a951
Remove extra ; from sse-simd.cpp (PR #623 )
2018-03-31 13:03:32 -04:00
Ilja
fa80880b6f
Remove extra ;s from ossig.h (PR #625 )
2018-03-31 12:59:25 -04:00
Ilja
cdae245a13
Remove extra ;s from zinflate.cpp (PR #624 )
2018-03-31 12:58:36 -04:00
Jeffrey Walton
57804328b8
Cleanup asserts in pwdbased.h
2018-03-30 23:02:40 -04:00
Jeffrey Walton
8d60521f8c
Remove unneeded ThrowIfInvalidDerivedLength in DeriveKey
2018-03-30 16:40:15 -04:00
Jeffrey Walton
05fe384d82
Cleanup HKDF salt and info
2018-03-30 00:34:12 -04:00
Jeffrey Walton
616741d4ea
Add missing function body for PKCS5_PBKDF1<T>::DeriveKey (GH #610 )
...
Not sure how I missed that entire body... Also added a default timeInSeconds to all PBKDFs
2018-03-30 00:10:26 -04:00
Jeffrey Walton
57a35a6896
Update documentation
2018-03-29 23:23:37 -04:00
Jeffrey Walton
7b33bc5e04
Cutover PBKDF to KeyDerivationFunction interface (GH #610 , PR #612 )
2018-03-29 23:13:56 -04:00
Jeffrey Walton
32abab75f2
Add KeyDerivationFunction interface (GH #610 , PR #611 )
2018-03-29 20:18:27 -04:00
Jeffrey Walton
8c5abe604a
Remove '#undef BLOCKING_RNG_AVAILABLE' from validate.cpp
...
This was for testing on low-resource ARM dev-boards. It accidentally cross-pollinated into other systems.
2018-03-28 13:06:16 -04:00
Jeffrey Walton
69915e1755
Remove double CRYPTOPP_SECTION_INIT for g_hasSSE2
...
Also change to a single declaration per line. The multiple declarations got to be messy
2018-03-27 23:19:26 -04:00
Jeffrey Walton
8fca97da54
Update documentation
2018-03-27 21:17:10 -04:00
Jeffrey Walton
e9b6e85b77
Bump version numbers
2018-03-27 21:07:53 -04:00
Jeffrey Walton
3958fad099
Add sbyte, sword16, sword32 and sword64 (GH #608 , GH #609 )
...
Visual Studio 2008 kind of forced out hand with this. VS2008 lacks <stdint.h> and <cstdint> and it caused compile problems in NaCl gear. We were being a tad bit lazy by relying on int8_t, int32_t and int64_t, but the compiler errors made us act
2018-03-27 20:47:20 -04:00
Jeffrey Walton
1c60f6480f
Fix Windows compile error using VS2008
2018-03-27 20:38:26 -04:00
Jeffrey Walton
43ff11a089
Suppress C4231 and C4505 warnings using VS2008
2018-03-27 20:37:42 -04:00
Jeffrey Walton
506f90bcc8
Fix VS2010 and "error C2065: uint32_t: undeclared identifier" (GH #608 )
...
We could fix aria.cpp by using word32. However, NaCl gear uses int64_t and we don't have a typedef setup for it. So we will need <cstdint> later for NaCl
2018-03-27 19:18:44 -04:00
Ilja
71ea29d893
Remove extra ';' from oids.h (GH #607 )
2018-03-27 14:15:42 -04:00
Jeffrey Walton
f26a07ad98
Add extraneous calls for code coverage
2018-03-27 03:29:56 -04:00
Jeffrey Walton
3b8bc690bb
Add additional self tests
2018-03-27 00:33:27 -04:00
Jeffrey Walton
36bde8eab5
Switch to <nbtheory.h> functions
2018-03-26 23:49:04 -04:00
Jeffrey Walton
9ab3f61810
Update documentation
2018-03-26 23:30:34 -04:00
Jeffrey Walton
c9fc704941
Remove double include
2018-03-26 23:16:35 -04:00
Jeffrey Walton
780a2b8c82
Update documentation
2018-03-26 17:41:06 -04:00
Jeffrey Walton
83c9d29875
Update documentation
2018-03-26 16:54:39 -04:00
Jeffrey Walton
0253fa9940
Update documentation
2018-03-26 15:41:31 -04:00
Jeffrey Walton
a665e0825f
Use '*this >= m' for InverseMod reduction
...
The previous test used '*this > m', which did not capture 'm'
2018-03-26 13:31:18 -04:00
Jeffrey Walton
302d210ceb
Add additional Integer class tests
2018-03-26 13:02:55 -04:00
Ilja
c2e4ee60b3
Remove extra ;s (GH #605 )
2018-03-26 11:36:54 -04:00
Jeffrey Walton
dd74bc93a4
Add additional Integer class tests
2018-03-25 19:53:26 -04:00
Jeffrey Walton
874c48a329
Fix a_exp_b_mod_c and divide by 0 (GH #604 )
2018-03-25 19:22:42 -04:00
Jeffrey Walton
1efa1a9fc7
Add additional Integer class tests
2018-03-25 18:28:56 -04:00
Jeffrey Walton
b096401b7c
Add additional Integer class tests
2018-03-25 16:44:51 -04:00
Jeffrey Walton
a6c9419059
Update documentation
2018-03-25 15:31:43 -04:00
Jeffrey Walton
d165544131
Update documentation
2018-03-25 15:14:18 -04:00
Jeffrey Walton
2f61c159b0
Add additional Integer class tests
2018-03-25 14:12:51 -04:00
Jeffrey Walton
932f392b2d
Fix incorrect InverseMod (GH #602 )
...
cryptest.sh revealed a corner case still producing an incorrect result. We need to check for '*this > m', not '*this > 2m-1'.
The corner case looks obscure. The failure surfaced as 1 failed self test for about every 2048 tests. It was also in a code path where 'a' was explicitly set to '2m-1', with 'm' random.
The test result can be duplicated with 'cryptest.exe v 9996 1521969687'. The value '1521969687' is a seed for the random number generator to reproduce.
2018-03-25 11:15:34 -04:00
Jeffrey Walton
34be01231c
Fix conversion warnings under MSC
2018-03-25 02:47:38 -04:00
Jeffrey Walton
a8d40ee07f
Add additional InverseMod tests
...
This commit adds tests using 'word' moduli
2018-03-25 01:57:12 -04:00
Jeffrey Walton
eb0d040786
Move some tests from TestIntegerBitops to TestIntegerOps (GH #602 )
2018-03-25 00:58:11 -04:00
Jeffrey Walton
ff82b5a886
Fix incorrect InverseMod (GH #602 ) ( #603 )
2018-03-25 00:43:21 -04:00
rocksonhead
b0f7170595
Fix calling multiple ZlibDecompressor in parallel causes adler32 checksum failure (GH #596 , #600 )
2018-03-24 20:27:03 -04:00
Jeffrey Walton
b42d728628
Update documentation
2018-03-22 22:16:42 -04:00
Jeffrey Walton
5ae74e2fd5
Update documentation
2018-03-22 22:11:35 -04:00
Jeffrey Walton
af6b96c78b
Whitespace check-in
2018-03-22 00:20:45 -04:00
Jeffrey Walton
f589de0839
Rework Glibc sysconf code
...
It looks like the 0 return value for _SC_LEVEL1_DCACHE_LINESIZE is not a 1-off problem with PPC. It appears Glibc regularly returns 0 instead of failure. Also see https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/posix/sysconf.c .
We were OK before the change. The difference now is, we expect all Glibc queries to misbehave
2018-03-21 16:19:43 -04:00
Jeffrey Walton
ddf9e70234
Fix Power7 test using PPC_FEATURE_ARCH_2_06
2018-03-21 00:35:56 -04:00
Jeffrey Walton
04e361889e
Add CPU feature queries for AIX
...
Also see the discussion at https://github.com/noloader/POWER8-crypto
2018-03-20 23:52:10 -04:00
Jeffrey Walton
e7be3a8357
Fix compile on AIX using const pointers
...
Also see the discussion at noloader/POWER8-crypto#2
2018-03-20 23:50:51 -04:00
Jeffrey Walton
9a52edcfdb
Remove non-const cast from POWER8 loads and stores
...
Also see the discussion at https://github.com/noloader/POWER8-crypto/issues/2
2018-03-20 15:02:47 -04:00
Jeffrey Walton
244abbe41c
Fix compile error on Windows due to symbol U collision (GH #599 )
...
A package called cpprest provides U as a macro
2018-03-16 09:00:50 -04:00
Jeffrey Walton
92ad65bfae
Clear unused variable warning
2018-03-11 21:45:19 -04:00
Jeffrey Walton
c51856dd20
Add Power8 code generation tests to cryptest.sh
2018-03-11 19:25:42 -04:00
Jeffrey Walton
a0cbdc7ba4
Switch to 2-mask version of vec_perm for repack
2018-03-11 13:56:02 -04:00
Jeffrey Walton
03d4508a76
Whitespace check-in
2018-03-11 12:52:03 -04:00
Jeffrey Walton
07ece016b7
Add VectorLoadMsg and comments (GH #513 )
2018-03-11 12:45:14 -04:00
Jeffrey Walton
0630d46fe8
Add PowerPC Power8 SHA hashing (GH #513 )
...
Perforance increases significantly, but there's still room for improvement. Even OpenSSL's numbers are relatively dull. We expect Power8's SHA-256 to be somewhere between 2 to 8 cpb but we are not hitting them.
SHA-256, GCC112 (ppc64-le): C++ 23.43, Power8 13.24 cpb (+ 110 MiB/s)
SHA-256, GCC119 (ppc64-be): C++ 10.16, Power8 9.74 cpb (+ 50 MiB/s)
SHA-512, GCC112 (ppc64-le): C++ 14.00, Power8 9.25 cpb (+ 150 MiB/s)
SHA-512, GCC119 (ppc64-be): C++ 21.05, Power8 6.17 cpb (+ 450 MiB/s)
2018-03-10 16:19:11 -05:00
Fabrice Fontaine
95804ce572
Fix GCC version for RDSEED intrinsic ( #598 )
...
rdseed is only available on gcc 4.8.x, not on gcc 4.7.x
Fixes:
- http://autobuild.buildroot.org/results/9ab386124e4a09b50598c6f95ad40b25a83d227e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-10 08:38:44 -05:00
Jeffrey Walton
8146eda6a3
Clear unused variable warnings under GCC
2018-03-09 06:45:32 -05:00
Jeffrey Walton
6d35beb05d
Add Linux Sparc64 support to test script (GH #597 )
2018-03-08 20:14:37 -05:00
Jeffrey Walton
80f70442df
Add comment on RK cast (GH #597 )
2018-03-08 20:04:50 -05:00
Jeffrey Walton
730eebe233
Fix SIGBUS on Sparc64 (GH #597 )
...
PutAndGetBlock did not handle an unaligned outblock properly. Ugh...
2018-03-08 17:01:00 -05:00
Fabrice Fontaine
3c01bcc352
Allow user to set -DCRYPTOPP_ARM_NEON_AVAILABLE=0 ( #595 )
...
Disable neon through -DCRYPTOPP_ARM_NEON_AVAILABLE=0,
replace "if defined(CRYPTOPP_ARM_NEON_AVAILABLE)" by
"if (CRYPTOPP_ARM_NEON_AVAILABLE)"
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-05 18:49:10 -05:00
Jeffrey Walton
626c86987b
Fix SHA feature detection on AIX
...
This one should have been fixed before the Crypto++ 6.1 release. Its no big deal, however. Power8 accelerated SHA-256 is 1.5x to 2x slower than straight C++. SHA-512 may be better, but the implementation is not ready to performance test.
2018-03-05 07:05:12 -05:00
Jeffrey Walton
f1a3da834a
Tie CRYPTOPP_CXX17 to CRYPTOPP_CXX11
2018-03-05 06:47:05 -05:00
Fabrice Fontaine
f7f13c70c8
Define AT_HWCAP/AT_HWCAP2 if getauxval unavailable ( #594 )
...
If CRYPTOPP_GETAUXV_AVAILABLE is undefined, getauxval function is
defined to return 0 however AT_HWCAP and AT_HWCAP2 are not defined so
compilation on toolchain without getauxval and these variables such as
uclibc-ng will fail.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-03-04 09:17:03 -05:00
Jeffrey Walton
53ccd310b8
Clear C4742 warning using MSVC (GH #591 )
2018-02-24 17:00:40 -05:00
Jeffrey Walton
2f1c984264
Post-release version increment
2018-02-22 12:50:29 -05:00
Jeffrey Walton
481cf06dfe
Post-release version increment
2018-02-22 12:48:33 -05:00
Jeffrey Walton
da11d90ddb
Post-release version increment
2018-02-22 12:47:18 -05:00
Jeffrey Walton
cfc6173312
Merge branch 'master' of https://github.com/weidai11/cryptopp
2018-02-22 12:44:56 -05:00
Jeffrey Walton
4909c9acfd
Update History.txt
2018-02-22 12:39:06 -05:00
Jeffrey Walton
5be140bcea
Prepare for Crypto++ 6.1 release
2018-02-22 09:26:16 -05:00
Jeffrey Walton
63d038fa18
Update documentation
...
The commit also adds an assert on memcpy_s pointers. GCC 8 claims the pointers are the same. We think it is a spurious finding. The assert never fired during test.
2018-02-22 08:01:08 -05:00
Jeffrey Walton
f83550809d
Fix __cplusplus version for C++17
...
Formerly we were using 201402L from N4594, and it caused a compile failure when using -std=c++14
2018-02-21 18:01:31 -05:00
Jeffrey Walton
143f5a3079
Handle C++17 std::uncaught_exceptions (GH #590 )
2018-02-21 09:59:52 -05:00
Jeffrey Walton
59088779d8
Update comments in test script
2018-02-21 08:06:51 -05:00
Jeffrey Walton
d556586d27
Add Reptoline option tests to test script
2018-02-21 04:23:46 -05:00
Jeffrey Walton
5c36c99d3f
Add -O2 test to test script (GH #588 )
2018-02-21 03:22:34 -05:00
Jeffrey Walton
bd8c20562c
Clear unused variable warnings
2018-02-20 17:03:32 -05:00
Jeffrey Walton
244c40ed61
Remove unneeded round parameter on Rijndael_UncheckedSetKey_SSE4_AESNI
2018-02-20 13:32:53 -05:00
Jeffrey Walton
33c10bc027
Fix ODR violation in AdvancedProcessBlocks_{ARCH} (GH #585 )
...
The ALTIVEC function required an inline declaration. Lack of inline caused the self test failure. Two NEON functions needed the same. We also cleaned up constants in unnamed namespaces
2018-02-20 13:17:05 -05:00
Nicolas Chauvet (kwizart)
b6fec08da1
Freeze ABI compatibility with LIB_MAJOR ( #589 )
...
This is a convention that binary compatibity uses one number.
Using that, it's possible to have bugfixes releases (patchlevel
incremented) and enhancement release (minor incremented with no
public interface removed).
Here is more information about convention
https://autotools.io/libtool/version.html
(libtool isn't relevant to this project, but the explanation hold)
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2018-02-20 10:05:52 -05:00
Jeffrey Walton
c80e28eec8
Remove unneeded parameter for Rijndael_UncheckedSetKey_POWER8
2018-02-20 06:42:43 -05:00
Jeffrey Walton
d30afa4d01
Whitespace check-in
2018-02-20 04:18:58 -05:00
Jeffrey Walton
2b2303bc75
Remove unneeded Rijndael_Subkey_POWER8 (GH #588 )
...
This is due to the removal of a path in Rijndael_UncheckedSetKey_POWER8
2018-02-20 02:24:09 -05:00
Jeffrey Walton
5b09d46665
Cleanup signed integer overflow on ppc64 (GH #588 )
...
The code below was flagged by undefined behavior santizier under GCC 8. The offender was the doubling at "r4 = vec_add(r4, r4)". R4 is rcon and an unsigned type. It depends on integer wrap but GCC is generating code that is being flagged for signed overflow. GCC 7 and below is OK.
for (unsigned int i=0; i<8; ++i)
{
r1 = Rijndael_Subkey_POWER8(r1, r4, r5);
r4 = vec_add(r4, r4);
skptr = IncrementPointerAndStore(r1, skptr);
}
// Final two rounds using table lookup
...
2018-02-20 02:10:17 -05:00
Jeffrey Walton
48033dac0a
Updated source comment
2018-02-20 00:01:23 -05:00
Jeffrey Walton
c6a29e8708
Add Simon and Speck test vectors to All group (GH #585 )
2018-02-19 18:03:17 -05:00
Jeffrey Walton
f8a6a9c9e0
Change case of FAILED message in datatest.cpp
...
Throughout the library the message "FAILED" (not "failed") is used to signal failures. It makes it easy to grep for them. This change makes the message consistent.
2018-02-19 16:17:03 -05:00
Jeffrey Walton
dbab746bd9
Remove previous Simon and Speck zip file (GH #585 )
...
The implementation was incorrect. The zip file was added to allow access for users who needed it.
2018-02-19 12:57:00 -05:00
Jeffrey Walton
e5a362c026
Re-add Simon and Speck, enable NEON and Aarch64 (GH #585 )
...
This commit re-adds Simon and Speck. The commit includes NEON, Aarch32 and Aarch64
2018-02-19 04:47:19 -05:00
Jeffrey Walton
5da795bf56
Whitespace check-in
2018-02-18 23:44:23 -05:00
Jeffrey Walton
e416b243d3
Re-add Simon and Speck, enable SSE (GH #585 )
...
This commit re-adds Simon and Speck. The commit includes C++, SSSE3 and SSE4. NEON, Aarch32 and Aarch64 are disabled at the moment.
2018-02-18 23:23:50 -05:00
Jeffrey Walton
e5b9fa6485
Use random IV's for Simon and Speck test vectors
2018-02-18 12:10:51 -05:00
Jeffrey Walton
8c4300a36c
Remove variable block size in datatest.cpp (GH #535 )
2018-02-18 11:57:26 -05:00
Jeffrey Walton
3efef479d1
Re-add Simon and Speck test vectors (GH #585 )
...
Of the 200+ test vectors only 10 are semi-authentic. The ten are from the Simon and Speck paper but they had permutations applied to them so they worked with the algorithms described in the paper. The remaining 200 or so were generated with Crypto++ using straight C++ code. The library generated the test vectors because we don't have a reference implementation
2018-02-18 11:19:26 -05:00
Jeffrey Walton
a0e2177996
Add define for CRYPTOPP_DISABLE_ASM
...
We probably should have documented it some time ago, after we added NEON and ARMv8
2018-02-17 10:51:55 -05:00
Jeffrey Walton
2a367627f0
Finish removing Simon and Speck (GH #585 )
2018-02-15 06:17:35 -05:00
Jeffrey Walton
a1e1af91e9
Add README to simon-speck.zip
2018-02-14 23:07:56 -05:00
Jan Beich
6e8f6630cf
Fix Clang check for C++11 lambdas (GH #558 , citra-emu/citra#3435 ) ( #587 )
...
$ CXXFLAGS=-std=gnu++17 gmake
clang++ -std=gnu++17 -fPIC -pthread -pipe -c cryptlib.cpp
In file included from cryptlib.cpp:19:
./misc.h:2542:43: error: no member named 'bind2nd' in namespace 'std'
return std::find_if(first, last, std::bind2nd(std::not_equal_to<T>(), value));
~~~~~^
1 error generated.
2018-02-14 21:35:46 -05:00
Jeffrey Walton
15b14cc618
Remove Simon and Speck ciphers (GH #585 )
...
We recently learned our Simon and Speck implementation was wrong. The removal will stop harm until we can loop back and fix the issue.
The issue is, the paper, the test vectors and the ref-impl do not align. Each produces slightly different result. We followed the test vectors but they turned out to be wrong for the ciphers.
We have one kernel test vector but we don't have a working implementation to observe it to fix our implementation. Ugh...
2018-02-14 04:06:16 -05:00
Jeffrey Walton
541caa3978
Guard use of Aarch64 tbl instruction
2018-02-13 08:48:13 -05:00
Jeffrey Walton
db7b341f95
Fix Aarch64 RotateRight32<8> typo
2018-02-13 07:26:15 -05:00
Jeffrey Walton
e8c538cae6
Updated documentation
2018-02-13 04:41:51 -05:00
Jeffrey Walton
ac4c87a1b8
Add Speck-128/CTR test vectors
2018-02-12 01:53:22 -05:00
Jeffrey Walton
939e6fa0f0
Add Simon-128/CTR test vectors
2018-02-12 01:32:51 -05:00
Jeffrey Walton
ec6f83a147
Update documentation
2018-02-08 02:52:33 -05:00
Jeffrey Walton
00f86fa50a
Add <stdcpp.h> to <seckey.h>
2018-02-08 02:52:08 -05:00
Jeffrey Walton
d5161923cb
Use INSTALL_PROGRAM for shared objects (GH #582 )
2018-02-05 09:03:21 -05:00
Jeffrey Walton
0a43341cec
Use install program for Makefile (GH #582 )
2018-02-05 08:54:13 -05:00
Jeffrey Walton
a876d82445
Move CRYPTOPP_POSIX_MEMALIGN_AVAILABLE preference down
...
This should result in fewer surprises
2018-01-30 22:03:34 -05:00
Jeffrey Walton
7141d026c1
Switch to posix_memalign when available
...
It is easier to defer to the runtime for aligned allocations. We found the preprocessor macros needed to identitify the availability. Also see https://forum.kde.org/viewtopic.php?p=66274
2018-01-30 21:14:24 -05:00
Jeffrey Walton
22e783a378
Switch to posix_memalign when available
...
It is easier to defer to the runtime for aligned allocations. We found the preprocessor macros needed to identitify the availability. Also see https://forum.kde.org/viewtopic.php?p=66274
2018-01-30 21:05:55 -05:00
Jeffrey Walton
e21f882f50
Switch to posix_memalign for FreeBSD
2018-01-29 17:39:25 -05:00
Jeffrey Walton
c4392c40e0
Fix misaligned SSE2 allocations on FreeBSD (GH #562 )
...
This may have something to do with https://github.com/monero-project/kovri/pull/788
2018-01-29 17:05:25 -05:00
Jeffrey Walton
96bc82fe12
Avoid a compiler warning in Makefile tests
2018-01-28 20:23:48 -05:00
Jeffrey Walton
d4342558d0
Remove unneeded AOSP_SYS_INC
2018-01-28 16:37:34 -05:00
Jeffrey Walton
be30fb424a
Cleanup Android defines
2018-01-28 16:17:40 -05:00
Jeffrey Walton
0de445b56a
Tie SHA availability to SSE4.2 availability
...
This cleanly sidesteps an Android compile failure without CRYPTOPP_DISABLE_SHA
2018-01-28 16:10:41 -05:00
Jeffrey Walton
1a23285576
Remove unneeded path include
...
This one is part of sysroot
2018-01-28 15:29:14 -05:00
Jeffrey Walton
51ce834cc4
Fix ARM detection (GH #573 )
2018-01-28 13:33:03 -05:00
Jeffrey Walton
89a3fba081
Fix SHA-512 crash on Debian X32 (GH #578 )
2018-01-28 11:34:57 -05:00
Jeffrey Walton
69d5400b3f
Fix MinGW misdetection (GH #573 )
...
This commit does a few things. First, it uses the compiler's triplet and the build component to determine the machine we are targeting. Second, it adds an 'X' prefix so we don't collide with someone else's variables. Third it cleans up some of the recipes. Fourth, it removes X32 detection since the system differences are handled in config.h and the source files
2018-01-27 13:05:23 -05:00
zorun
6103900be4
build: add missing flags for SIMON and SPECK in GNUMakefile-cross ( #577 )
2018-01-27 12:23:44 -05:00
Jeffrey Walton
c16eddb40e
Use /bin/sh (GH #573 )
2018-01-25 18:39:24 -05:00
Jeffrey Walton
526742d862
Update documentation
2018-01-25 16:27:44 -05:00
Jeffrey Walton
78c9a6e459
Update documentation
2018-01-25 15:59:47 -05:00
XU Cheng
0bec012333
Fix building for Linuxbrew ( #575 )
...
Linuxbrew is a fork of Homebrew on Linux.
In which, the `gcc --version` will report "homebrew".
Therefore, the current code will incorrectly set OSXPORT_COMPILER
under such environment, which results to the following compiling errors:
gcm.cpp:823: Error: too many memory references for `add'
gcm.cpp:824: Error: too many memory references for `pxor'
gcm.cpp:825: Error: ambiguous operand size for `shr'
gcm.cpp:826: Error: too many memory references for `movzx'
gcm.cpp:827: Error: too many memory references for `add'
gcm.cpp:828: Error: too many memory references for `pxor'
gcm.cpp:829: Error: too many memory references for `movzx'
gcm.cpp:830: Error: too many memory references for `add'
gcm.cpp:831: Error: too many memory references for `pxor'
gcm.cpp:832: Error: ambiguous operand size for `add'
gcm.cpp:833: Error: ambiguous operand size for `sub'
gcm.cpp:835: Error: too many memory references for `movdqa'
g++-5 -DNDEBUG -g2 -O3 -fPIC -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -pthread -pipe -c md4.cpp
make: *** [GNUmakefile:1120: gcm.o] Error 1
make: *** Waiting for unfinished jobs....
Fix this problem by checking IS_DARWIN before setting OSXPORT_COMPILER.
2018-01-25 09:17:54 -05:00
Jeffrey Walton
51db9eb436
Clear clang-tidy warnings
2018-01-24 20:04:16 -05:00
Jeffrey Walton
e546b2af85
Add cryptest-tidy.sh script
2018-01-24 18:30:21 -05:00
Jeffrey Walton
4d4c3d92a8
Clear clang-tidy warnings
2018-01-24 18:24:53 -05:00
Jeffrey Walton
30bcc7022d
Clear clang-tidy warnings
2018-01-24 15:35:45 -05:00
Jeffrey Walton
85993b2529
Add xorInput and xorOutput flags to adv-simd classes
...
Analysis tools are generating findings when the pointer xorBlocks is used as the flag. The other missing piece is, xorBlocks is never NULL when either BT_XorInput or BT_XorOuput. But we don't know how to train the analyzers with the information, so we make it explicit with the boolean flags xorInput and xorOutput.
Switching to the explicit flags costs us about 0.01 cpb on a modern Intel Core processor. In the typical case 0.01 is negligible.
2018-01-24 12:06:15 -05:00
Jeffrey Walton
e872c8dc3a
Keep CAST tests together in bench1.cpp
2018-01-24 08:53:00 -05:00
Jeffrey Walton
01136e2c7b
Clear clang-tidy warnings
2018-01-23 21:15:26 -05:00
Jeffrey Walton
675575d960
Update documentation
2018-01-23 17:47:19 -05:00
Jeffrey Walton
8175f069cd
Update documentation
2018-01-23 16:08:46 -05:00
Jeffrey Walton
4c1b303c29
Update documentation
2018-01-23 15:54:06 -05:00
Jeffrey Walton
46e4d80df6
Add Kalyna typedefs (GH# 535)
2018-01-23 13:52:39 -05:00
Jeffrey Walton
d72b516c29
Make 2048-bit modulus default for DSA (GH #571 )
2018-01-23 13:19:27 -05:00
Jeffrey Walton
dfb6f0dbc2
Whitespace check-in
2018-01-23 13:18:08 -05:00
Jeffrey Walton
7849ff393d
Update documentation
2018-01-22 22:59:19 -05:00
Jeffrey Walton
c9b00c14fd
Update documentation
2018-01-22 20:13:18 -05:00
Jeffrey Walton
e3d79bf98c
Update documentation
2018-01-22 19:50:11 -05:00
Jeffrey Walton
27cbfe03d6
Add History.txt for full record
...
Trim History section in Readme.txt to most recent items
Signed-off-by: Jeffrey Walton <noloader@gmail.com>
2018-01-22 19:27:11 -05:00
Jeffrey Walton
886abb683e
Whitespace check-in
2018-01-22 19:12:24 -05:00
Jeffrey Walton
92b03cdf62
Update Readme.txt
2018-01-22 18:34:20 -05:00
Jeffrey Walton
391cc2c141
Update version info
2018-01-22 18:25:19 -05:00
Jeffrey Walton
91a8652f9e
Update version info
2018-01-22 18:22:34 -05:00
Jeffrey Walton
19e07938fa
Post-release version increment
...
Also see https://www.cryptopp.com/wiki/Release_Versioning#Post-Release_Increment
2018-01-22 17:21:22 -05:00
Jeffrey Walton
b6c6684451
Update documentation
2018-01-22 15:54:51 -05:00
Jeffrey Walton
d429318230
Cleanup Doxygen directives
2018-01-22 09:53:49 -05:00
Jeffrey Walton
e1f2b69638
Removed vector_ptr
...
vector_ptr was added at Crypto++ 5.6.5 to manage an array acquired with new[] in C++03. We can now use a combination of SecBlock and SetMark(0) to achieve the same effect.
2018-01-22 09:37:04 -05:00
Jeffrey Walton
aee296d663
Fix AIX AlignedAllocate
...
Well, the IBM docs were not quite correct when they stated "The block is aligned so that it can be used for any type of data". The vector data types are pretty standard, even across different machines from diffent manufacturers
2018-01-21 19:48:36 -05:00
Jeffrey Walton
58f6b7695b
Cleanup Doxygen directives
2018-01-21 19:11:45 -05:00
Jeffrey Walton
8ffd165c7a
Rename nacl.h to naclite.h
...
This should avoid confusion with header files from the reference implementation and libsodium
2018-01-21 17:04:15 -05:00
Jeffrey Walton
1df1d25428
Cleanup warnings under MSC
2018-01-21 16:25:49 -05:00
Jeffrey Walton
d6cf3b5020
Simplify logic for selection of word128
2018-01-21 16:25:09 -05:00
Jeffrey Walton
c4e0942a68
Add CRYPTOPP_TABLE, remove CRYPTOPP_SECTION
2018-01-21 14:19:00 -05:00
Jeffrey Walton
5631da3697
Disable Travis iOS testing (GH #570 )
2018-01-21 12:48:50 -05:00
Jeffrey Walton
133b2411d4
Disable Travis OS X and iOS testing (GH #570 )
...
Travis is having infrastructure problems since it migrated in November 2017. Our OS X and iOS tests hang for days. When the current job hangs, new jobs that enter the queue later hang too because the original job is still waiting.
The subsequent hangs effect Android and Linux, too. Our Travis scripts test Android, Linux, OS X and iOS. A hang effects everything.
We are going to disable Travis OS X and iOS tests until things improve.
2018-01-21 11:02:42 -05:00
Felix Barz
105f78495c
Update Android build scripts to the latest NDK ( #546 )
...
Fix Environment setup for android to match the new unified headers.
Adjust the Makefile accordingly.
Updated the test scripts and travis to test these changes.
2018-01-21 09:05:34 -05:00
Jeffrey Walton
bb03ba57fb
Update documentation
2018-01-21 08:46:21 -05:00
Jeffrey Walton
9b174e84de
Remove AsymmetricAlgorithm::BERDecode (GH #569 )
2018-01-21 08:45:02 -05:00
Jeffrey Walton
565bd844fc
Clear GCC -Wcast-align warnings on ARM
...
The buffers and workspaces are aligned
2018-01-20 19:39:49 -05:00
Jeffrey Walton
2816efe188
Clear GCC -Wstrict-overflow warning
...
This is a false positive when "T=int" or "T=long". "value" is reduced by division so it converges to 0. It is never less than 0.
2018-01-20 19:37:58 -05:00
Jeffrey Walton
1b36c4e767
Clear GCC -Wc++11-compat warning
2018-01-20 19:35:50 -05:00
Jeffrey Walton
2d011dff34
Cleared GCC warning with -Wall
2018-01-20 17:09:23 -05:00
Jeffrey Walton
65963c5504
Fix Android x86 and x86-64 cross-compilesexit
2018-01-20 13:54:02 -05:00
Jeffrey Walton
5cee4a6573
Improve logic for <arm_acle.h> include (GH #568 )
2018-01-20 13:23:41 -05:00
Jeffrey Walton
5adfe4e812
Sync setenv scripts
2018-01-20 12:46:34 -05:00
Jeffrey Walton
31c6b236dc
Revert "Sync setenv scripts"
...
This reverts commit b225fbf . The new one was overwritten, not the old one.
2018-01-20 12:45:05 -05:00
Jeffrey Walton
b225fbfae7
Sync setenv scripts
2018-01-20 12:42:49 -05:00
Jeffrey Walton
600fa4d107
Clear unary minus on unsigned warning under MSVC
2018-01-19 20:09:02 -05:00
Jeffrey Walton
e4e1fbe0ed
Clear Coverity findings CID 186951, 186950, 186947
...
Coverity does not realize xorBlocks is always non-NULL when BT_XorInput is set
2018-01-19 19:42:03 -05:00
Jeffrey Walton
5c5d3e4c26
Clear Coverity finding CID 186948
...
"Logically dead code"
2018-01-19 18:35:23 -05:00
Jeffrey Walton
347c0e56c6
Clear Coverity finding CID 186949
...
The finding is "Overflowed return value", and it is rooted in the constant time code bit manipulations
2018-01-19 18:28:56 -05:00
Jeffrey Walton
befd04312d
Remove unneeded Doxygen directive
2018-01-19 14:31:20 -05:00
Jeffrey Walton
24a9466e54
Update documentation
2018-01-19 08:06:06 -05:00
Jeffrey Walton
a1deaf73c1
Revert "Update documentation"
...
This reverts commit 4050312 . The version change used to build the documentation cross-polinated into the commit.
2018-01-19 08:04:46 -05:00
Jeffrey Walton
4050312025
Update documentation
2018-01-19 08:03:40 -05:00
Jeffrey Walton
a5d15863cb
Update documentation
2018-01-19 07:58:36 -05:00
Jeffrey Walton
a5a684d929
Remove DL_PrivateKey_GFP_OldFormat (GH #567 )
2018-01-19 07:56:12 -05:00
Jeffrey Walton
4fd250c5c4
Remove commented compatibility methods
2018-01-19 05:52:45 -05:00
Jeffrey Walton
5542055327
Fix benchmarks after variable block size removal (GH #535 )
2018-01-18 21:31:19 -05:00
Jeffrey Walton
58b6999274
Convert Kalyna from variable block size (GH #535 )
2018-01-18 20:26:10 -05:00
Jeffrey Walton
1eca4fd940
Update documentation
2018-01-18 14:12:19 -05:00
Jeffrey Walton
6862298831
Update documentation
2018-01-18 13:13:22 -05:00
Jeffrey Walton
2e82caee09
Update documentation
2018-01-18 13:06:43 -05:00
Jeffrey Walton
0bb73e7035
Add _unchecked versions of crypto_box, crypto_box_open and crypto_box_beforenm
...
This check-in adds three additional functions for backwards compatibility: crypto_box_unchecked, crypto_box_open_unchecked and crypto_box_beforenm_unchecked. The functions can be used for interoperability with downlevel clients, like old versions of NaCl and libsodium. It should also help some cryptocurrencies, like Bitcoin, Ethereum, Monero and Zcash.
Also see https://eprint.iacr.org/2017/806.pdf (low order element attack) and https://github.com/jedisct1/libsodium/issues/662 (Zcash break).
2018-01-18 12:43:57 -05:00
Jeffrey Walton
efcede385f
Update documentation
2018-01-18 05:41:27 -05:00
Jeffrey Walton
d31fcd7a1a
Fix IBM XL/C/C++ compile due to uint8x16_p typedef
2018-01-18 05:18:00 -05:00
Jeffrey Walton
8aea7abb55
Update documentation
2018-01-17 22:33:27 -05:00
Jeffrey Walton
13ea8f374f
Add interface to TweetNaCl library ( #566 )
...
TweetNaCl is a compact reimplementation of the NaCl library by Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen, Tanja Lange, Peter Schwabe and Sjaak Smetsers. The library is less than 20 KB in size and provides 25 of the NaCl library functions.
The compact library uses curve25519, XSalsa20, Poly1305 and SHA-512 as default primitives, and includes both x25519 key exchange and ed25519 signatures. The complete list of functions can be found in TweetNaCl: A crypto library in 100 tweets (20140917), Table 1, page 5.
Crypto++ retained the function names and signatures but switched to data types provided by <stdint.h> to promote interoperability with Crypto++ and avoid size problems on platforms like Cygwin. For example, NaCl typdef'd u64 as an unsigned long long, but Cygwin, MinGW and MSYS are LP64 systems (not LLP64 systems). In addition, Crypto++ was missing NaCl's signed 64-bit integer i64.
Crypto++ enforces the 0-key restriction due to small points. The TweetNaCl library allowed the 0-keys to small points. Also see RFC 7748, Elliptic Curves for Security, Section 6.
TweetNaCl is well written but not well optimized. It runs 2x to 3x slower than optimized routines from libsodium. However, the library is still 2x to 4x faster than the algorithms NaCl was designed to replace.
The Crypto++ wrapper for TweetNaCl requires OS features. That is, NO_OS_DEPENDENCE cannot be defined. It is due to TweetNaCl's internal function randombytes. Crypto++ used DefaultAutoSeededRNG within randombytes, so OS integration must be enabled. You can use another generator like RDRAND to avoid the restriction.
2018-01-17 22:02:09 -05:00
Jeffrey Walton
4e86f42d78
Fix Andoid ARMv8 builds
...
This toolchain is pretty lame. It does not make CRC or Crypto intrinsics available
2018-01-17 20:34:11 -05:00
Jeffrey Walton
9683b8068e
Clear unknown pragma warning under GCC
2018-01-17 18:58:29 -05:00
Jeffrey Walton
c8389f89ea
Fix some variables for Ubuntu 16 (GH #565 )
2018-01-16 18:40:15 -05:00
Jeffrey Walton
cef4fa6683
Remove unused "USING_NAMESPACE(std)"
2018-01-14 21:38:39 -05:00
Jeffrey Walton
166d3f4363
Add C++20 elevated warnings test
2018-01-14 03:34:25 -05:00
Jeffrey Walton
23f3328948
Add additional Encoder and Decoder alphabet test (GH #562 )
2018-01-13 09:01:18 -05:00
Jeffrey Walton
aa7f6c47d1
Update documentation
2018-01-13 07:14:21 -05:00
Jeffrey Walton
73b08a82f2
Fix lookup array size in self test
2018-01-12 19:37:05 -05:00
Jeffrey Walton
29a15f6342
Add additional Encoder and Decoder alphabet test (GH #562 )
2018-01-12 19:20:32 -05:00
Jeffrey Walton
746fd6a648
add self test for custom Encoder and Decoder alphabet (GH #562 )
2018-01-12 18:59:48 -05:00
Jeffrey Walton
a9d6604ee9
Update documentation
2018-01-12 09:04:12 -05:00
Jeffrey Walton
751252b2d9
Update documentation
2018-01-12 08:54:07 -05:00
Kirit Sælensminde
59b94d2bbf
C++17 compatible lambda expressions to replace `bind2nd` ( #559 )
...
* Conditionally use a lambda rather than the older `bind2nd` style.
* Duplicate the if statements.
* Centralise the conditional compilation to an implementation of find_if_not.
* Refactoring of name and code placement after review.
* Use `FindIfNot` where appropriate.
* Remove whitespace.
2018-01-12 08:38:56 -05:00
Jeffrey Walton
c6289edd44
Try to fix MSVC C4589 warning again (GH #214 )
...
This one is a chronic problem. It appears Microsoft needs to fix it in their compiler
2018-01-12 08:24:42 -05:00
Jeffrey Walton
788cd1794d
Use x86 highest basic before calling a leaf function
...
This was a latent bug that just surfaced on a Sun Core2 workstation. RDSEED caused an illegal instruction exception on the Core2. It seems we managed to miss it because old processors had family and stepping values so low they never set CPUID.EBX.RDSEED[bit 18] = 1. Newer processors had the feature so CPUID.EBX.RDSEED[bit 18] = 1 was accurate.
2018-01-11 17:59:24 -05:00
Jeffrey Walton
591d70f1c7
Update documentation
2018-01-11 14:20:59 -05:00
Jeffrey Walton
8cc24aa9c0
Update head notes in ppc-simd.cpp
2018-01-11 13:20:29 -05:00
Jeffrey Walton
a49ff560e7
Update head notes
2018-01-11 13:16:13 -05:00
Jeffrey Walton
691e7af29a
Fix defines for PPC feature probes
...
Thanks to Bob Wilkinson for reporting at https://groups.google.com/d/msg/cryptopp-users/gPJOMOUMLhU/xHTxD8P-AgAJ
2018-01-11 13:04:59 -05:00
Jeffrey Walton
226516f590
Update documentation
2018-01-11 12:26:32 -05:00
Jeffrey Walton
6f9f9e5177
Update documentation
2018-01-11 11:27:11 -05:00
Jeffrey Walton
29029c6a33
Update documentation
2018-01-11 11:21:49 -05:00
Jeffrey Walton
7a080c32c8
Fix C++03 compile
...
Whitespace check-in
2018-01-10 20:49:07 -05:00
Linmao Song
1823b9d9c4
Fix error in bits2octets: should use the base point's bit count, instead of the hash value's. Also add test case for GetRandom, with original data from RFC6979 ( #560 )
2018-01-10 20:18:15 -05:00
Jeffrey Walton
2c295b2454
Add topic on Side Channel leakage
2018-01-08 09:13:15 -05:00
Jeffrey Walton
5ae79afd89
Add CRYPTOPP_CXX11_LAMBDA for N2927 (v1.1) (GH #558 )
2018-01-07 21:35:12 -05:00
Jeffrey Walton
0e32a7f1e6
Fix "Internal compiler error: max number of generated reload insns ..." (GH #554 )
2018-01-07 10:53:15 -05:00
Jeffrey Walton
3360e97ad9
Add C++20 testing to cryptest.sh
...
This is initial testing support for N4713, "Working Draft, Standard for Programming Language C++". We know GCC uses -std=c++20 and -std=gnu++20, so we can start testing things
2018-01-06 05:00:24 -05:00
Jeffrey Walton
4f2c605209
Add Power4 unaligned Load and Store
2018-01-05 21:27:27 -05:00
Jeffrey Walton
bfc2b5f02d
Fix double leading "0x" prefix (GH #557 )
...
Thanks to John McCabe for reporting
2018-01-05 18:59:28 -05:00
Jeffrey Walton
9624f928f8
Fix missing SM2 methods in Windows DLL
...
This was not ready to be checked in. I think it cross-pollinated duing a checkin for documentation
2018-01-05 18:47:28 -05:00
Jeffrey Walton
9c80a706c8
Fix "impossible register constraint in ASM" (GH #554 )
...
Thanks to Eduardo Miravalls for reporting the issue
2018-01-02 10:51:16 -05:00
Jeffrey Walton
eaa8185e61
Clear GCC -Wreorder warnings
2018-01-02 10:34:06 -05:00
Jeffrey Walton
d6d53f2e9d
Add Power4 Vector Load, Store, Add and Xor
2018-01-02 08:13:42 -05:00
Jeffrey Walton
fac3a44a84
Move Altivec AdvancedProcessBlocks into adv-simd.h
2018-01-02 07:08:13 -05:00
Jeffrey Walton
fb0ecfde62
Clear clang-tidy warnings
...
This commit also tweaks the way Integer parses byte arrays. The modified routines are slightly faster. On a Core-i5 6400 the self tests are 0.1 to 0.2 seconds faster
2018-01-02 04:17:22 -05:00
Jeffrey Walton
1a7f19cdde
Use 'command -v' to test for ld.gold
2018-01-02 01:13:59 -05:00
Jeffrey Walton
58726498f1
Clear clang-tidy warnings
2018-01-02 00:15:34 -05:00
Jeffrey Walton
5f083d652e
Clear signed/unsigned warnings
2017-12-31 03:54:33 -05:00
Jeffrey Walton
ba98c2bfb9
Clear signed/unsigned warning in Debug
2017-12-31 02:24:16 -05:00
Jeffrey Walton
651563e6c2
Temporary fix for IBM XLC failed SM3 self tests (GH #553 )
2017-12-30 22:18:08 -05:00
Jeffrey Walton
8b7f21b07d
Update makefiles to use one call to $(CXX) -dumpmachine
2017-12-30 18:38:40 -05:00
Jeffrey Walton
f3618f4b7f
Fix IBM xlC compile
2017-12-30 18:37:56 -05:00
Tanzinul Islam
b4df31c7f9
Change ::log() to log() to work with C++Builder ( #552 )
...
As reported in #520 , C++Builder standard libraries don't have a `log()` function at global namespace. Change the invocations to unqualified name lookup, and apply a using-declaration to `std::log()` when compiling under C++Builder.
2017-12-30 15:16:27 -05:00
Jeffrey Walton
1699562581
Remove commented code
2017-12-28 19:25:45 -05:00
Jeffrey Walton
cd35346f70
Fix Solaris failed compile due to SHA with GCC (GH #551 )
2017-12-28 19:14:20 -05:00
Jeffrey Walton
3c6eb74cd7
Clear Coverity issue CID 186341
2017-12-28 01:29:31 -05:00
Jeffrey Walton
7b14ead0f3
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan
...
This function was missed earlier. Unfortunately, it does not squash all of the unaligned load findings. I'm pretty sure it is a GCC problem
2017-12-28 01:16:17 -05:00
Jeffrey Walton
24883ca79f
Clear Coverity issue CID 186337
2017-12-27 00:43:00 -05:00
Jeffrey Walton
3b1f6827f5
Clear Coverity issue CID 186338
2017-12-27 00:40:24 -05:00
Jeffrey Walton
09f9d76631
Fix "cast from 'struct sockaddr*' to 'struct sockaddr_in*' increases required alignment" on OS X
2017-12-26 17:57:26 -05:00
Jeffrey Walton
0aa2ebbbf3
Clear signed/unsigned warnings with GCC and -Wall -Wextra
2017-12-26 16:59:32 -05:00
Jeffrey Walton
4d9c91b425
Fix missing define for MSVC
2017-12-26 15:07:28 -05:00
Jeffrey Walton
4904d0fc8d
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan
2017-12-26 14:55:10 -05:00
Jeffrey Walton
3fff9e85df
Fix unaligned load for _mm_loaddup_pd with GCC and UBsan
2017-12-26 12:41:04 -05:00
Jeffrey Walton
ae445c0b0f
Clear signed/unsigned warnings with GCC and -Wall -Wextra
2017-12-26 11:48:11 -05:00
Jeffrey Walton
66da740ad3
Use M128_CAST and CONST_M128_CAST for Clang
...
Also see http://bugs.llvm.org/show_bug.cgi?id=20670
2017-12-26 11:20:18 -05:00
Jeffrey Walton
8e916e7bac
Use M128_CAST and CONST_M128_CAST for Clang
...
Also see http://bugs.llvm.org/show_bug.cgi?id=20670
2017-12-26 11:16:52 -05:00
Jeffrey Walton
bee2598ecd
Add <emsa2.h> to dll.cpp
2017-12-26 10:53:11 -05:00
Jeffrey Walton
b7133e7b3b
Fix Clang specialization and definition warnings (GH #300 , GH #533 )
...
Clang 3.8 and above generates lots of "'PKCS_DigestDecoration<SHA1>::decoration' required here, but no definition is available" warnings
2017-12-26 00:46:50 -05:00
Jeffrey Walton
c0a8dab984
Fix failed self test under Clang (GH #533 )
...
This may cause GH #300 , "Clang 3.9 and missing member definitions for template classes" or GH #294 , "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
2017-12-25 22:29:21 -05:00
Jeffrey Walton
4232cfd40b
Fix failed self test under Clang (GH #533 )
...
This may cause GH #300 , "Clang 3.9 and missing member definitions for template classes" or GH #294 , "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
2017-12-25 22:27:53 -05:00
Jeffrey Walton
b20a91f6b2
Update documentation
2017-12-24 21:07:18 -05:00
Jeffrey Walton
41da3fa7f1
Use ptrdiff_t cast in BlockTransformation (GH #549 )
2017-12-17 09:07:12 -05:00
Jeffrey Walton
d7a2e0e10c
Removed unneeded defines from ppc-simd.cpp
...
Whitespace check-in
2017-12-16 20:26:59 -05:00
Jeffrey Walton
19deccf3ba
Fix Clang 5.0 "runtime error: addition of unsigned offset to 0xXXXX overflowed to 0xYYYY" (GH #549 )
2017-12-16 18:18:53 -05:00
Jeffrey Walton
dc21de2483
Fix UBsan overflow finding
...
We were cating UBsan findings under Clang similar to "adv-simd.h:1138:26: runtime error: addition of unsigned offset to 0x000002d41410 overflowed to 0x000002d41400". The problem was CRYPTOPP_CONSTANT, which used an enum. The compiler is allowed to pick the underlying data type, and Clang was picking a signed type
2017-12-16 14:21:08 -05:00
zorun
c3a85caf52
Build fixes ( #547 )
...
* GNUmakefile-cross: Fix install target
The install target was not working: missing mkdir before copying files,
wrong dynamic library copied, missing ldconf.
The fix is mostly taken from the install target from GNUmakefile.
* Makefile: call 'ln -sf' instead of 'ln -sf -sf'
2017-12-16 09:07:23 -05:00
Jeffrey Walton
e56caf72ec
Fix unwanted Git mode change
2017-12-15 19:13:20 -05:00
Jeffrey Walton
7aa3377bbd
Prepare for changes to support latest NDK liek r16 (GH #546 )
2017-12-15 19:10:02 -05:00
Jeffrey Walton
93f6901119
Avoid including <arm_acle.h> on Android (GH #546 )
...
It sure would be nice if everyone just followed the ACLE guidlines at http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf
2017-12-15 17:00:39 -05:00
Jeffrey Walton
43a34590a9
Add Altivec detection for PowerMac
...
We now need to detect Altivec/Power4. Formerly it did not matter so CPU_QueryAltivec simply returned false
2017-12-13 11:49:35 -05:00
Jeffrey Walton
e1c9746b70
Fix Power8 compile under GCC
2017-12-12 10:52:57 -05:00
Jeffrey Walton
57e3ae309b
Update documentation
...
Remove typedefs
Whitespace check-in
2017-12-12 09:22:03 -05:00
Jeffrey Walton
2c79be7a54
Add CRYPTOPP_POWER5_AVAILABLE
...
Power4 lacks 'vector long long'
Rename datatypes such as 'uint8x16_p8' to 'uint8x16_p'. Originally the p8 suffix indicated use with Power8 in-core crypto. We are now using Altivec/Power4 for general vector operations.
2017-12-12 08:17:17 -05:00
Jeffrey Walton
ca54d0c7da
Add CRYPTOPP_POWER5_AVAILABLE
...
Power4 lacks 'vector long long'
Rename datatypes such as 'uint8x16_p8' to 'uint8x16_p'. Originally the p8 suffix indicated use with Power8 in-core crypto. We are now using Altivec/Power4 for general vector operations.
2017-12-12 08:14:53 -05:00
Jeffrey Walton
15d637771f
Add CRYPTOPP_POWER5_AVAILABLE
...
Power4 lacks 'vector long long'
Rename datatypes such as 'uint8x16_p8' to 'uint8x16_p'. Originally the p8 suffix indicated use with Power8 in-core crypto. We are now using Altivec/Power4 for general vector operations.
2017-12-12 08:09:31 -05:00
Jeffrey Walton
b7e636ac51
Rename ppc-crypto.h to ppc-simd.h
2017-12-12 07:15:59 -05:00
Jeffrey Walton
074c889210
Add NEON flags to rijndael-simd.cpp
...
AES does not have a NEON implementation. However, because it includes "adv-simd.h", it needs the compiler options so NEON types are available. Otherwise the compile fails.
We can't guard "adv-simd.h" and NEON on just AES because Simon and Speck use the templates in their NEON implementations.
2017-12-10 12:11:53 -05:00
Jeffrey Walton
195ac2c7c9
Refactor rijndael-simd.cpp and simon.simd.cpp to use adv-simd.h
2017-12-10 11:09:50 -05:00
Jeffrey Walton
e90cc9a028
Update comments
2017-12-10 05:41:19 -05:00
Jeffrey Walton
8a5911e6eb
Refactor <cipher>_AdvancedProcessBlocks_<arch> into adv-simd.h
...
This also fixes the SPECK64 bug where CTR mode self tests fail. It was an odd failure because it only affected 64-bit SPECK. SIMON was fine and it used nearly the same code. We tracked it down through trial and error to the table based rotates.
2017-12-09 21:04:25 -05:00
Jeffrey Walton
3ff04f1bf0
Cleanup includes for CRC32 and CRC32C
2017-12-09 13:09:49 -05:00
Jeffrey Walton
65222dfe9e
Move location of CRYPTOPP_ARM_ACLE_AVAILABLE test in config.h
...
This should make it easier to detect when we need to include <arm_acle.h>
2017-12-09 13:07:50 -05:00
Jeffrey Walton
5856ab5a7e
Add Valgrind suppression file for Salsa20 and runtime's __memcmp_sse4_1
2017-12-08 17:46:44 -05:00
Jeffrey Walton
e457ca26f7
Add SSE3 <pmmintrin.h> for SImon and Speck
...
Add additional comments for WORKAROUND_GCC_OPTERON_ISSUE
2017-12-08 13:54:00 -05:00
Jeffrey Walton
148202369b
Fix Speck-64 CTR mode
...
It looks like the delay was due to some GCC 7 issue. We had to disable parallel blocks on Aarch64 with GCC 7. We may be running out of registers and that could be causing problems. It looks like GCC uses up to v30.
2017-12-07 22:30:03 -05:00
Jeffrey Walton
02037b5ce6
Fix Simon-64 CTR mode
...
This fixes CTR mode for Simon-64. We were only incrementing half the counters.
We still have Speck-64 to cleanup.
2017-12-07 19:45:32 -05:00
Jeffrey Walton
07f2a4fc3f
Fix Simon-64 and Speck-64 CTR mode
...
This fixes CTR mode for IA-32. We were only incrementing half the counters.
Added additional test vectors
2017-12-07 16:55:23 -05:00
Jeffrey Walton
fe257e92a9
Add const-ness to internal BLAKE2 functions (GH #527 )
2017-12-06 17:40:34 -05:00
Jeffrey Walton
b436411de5
Fix MSVC 2017 hang on BLAKE2 (GH #527 )
...
It looks like the macros for BLAKE2B and BLAKE2S round functions were too much for the compiler to handle
2017-12-06 14:02:28 -05:00
Jeffrey Walton
86acc8ed45
Use 6x-2x-1x for Simon and Speck on IA-32
...
For Simon-64 and Speck-64 this means we are effectively using 12x-4x-1x. We are mostly at the threshold for IA-32 and parallelization. At any time 10 to 13 XMM registers are being used.
Prefer movsd by way of _mm_load_sd and _mm_store_sd.
Fix "error C3861: _mm_cvtsi128_si64x identifier not found".
2017-12-06 06:18:46 -05:00
Jeffrey Walton
e9654192f2
Remove unneeded temp[] array
2017-12-05 20:35:57 -05:00
Jeffrey Walton
490701acca
Use 12x-4x-1x for Simon and Speck on ARM
2017-12-05 18:43:53 -05:00
Jeffrey Walton
7bc621da62
Enable NEON/ASIMD for Simon and Speck on Aarch32/Aarch64 (GH #545 )
2017-12-05 14:02:48 -05:00
Jeffrey Walton
9b61d4143d
Add big- and little-endian rotates for Aarch32 and Aarch64
2017-12-05 12:32:26 -05:00
Jeffrey Walton
9faa504a24
Fix Aarch32 and Aarch64 rotates
2017-12-05 11:15:26 -05:00
Jeffrey Walton
c18793f862
Fix SIMON-64 missing transform
2017-12-05 09:14:58 -05:00
Jeffrey Walton
4990ffe5b8
Add SIMON-64 NEON intrinsics
2017-12-05 08:53:57 -05:00
Jeffrey Walton
b208c8c1b4
Add 4 additional lanes to SPECK-64 for ARM
2017-12-05 07:16:34 -05:00
Jeffrey Walton
e09e6af1f8
Enable multi-block for SPECK-64 and SIMON-64
...
Also cleaned up SIMON-64 vector permute code. Thanks again to Peter Cordes
2017-12-05 04:19:44 -05:00
Jeffrey Walton
147ecba5df
Add temp working variable for SPECK64_AdvancedProcessBlocks_SSE41
...
Avoid potential undefined behavior by using aligned words
2017-12-04 14:52:36 -05:00
Jeffrey Walton
076937eb81
Update comments for vector permutes in SPECK-128
2017-12-04 12:31:32 -05:00
Jeffrey Walton
25709d2597
Fix SPECK64 vector permutes
...
Thanks to Peter Cordes for the suggestion on handling the case
2017-12-04 09:47:26 -05:00
Jeffrey Walton
46271660a1
Switch to uint64x2_t for SIMON-128
2017-12-04 05:47:34 -05:00
Jeffrey Walton
e9714b40d2
Switch to _mm_unpacklo_epi32 and _mm_unpackhi_epi32
...
The manual _mm_extract_epi32 and _mm_insert_epi32 are required during setup, be we can use SSE on teardown
2017-12-04 05:01:27 -05:00
Jeffrey Walton
cd31fa29dc
Switch to uint64x2_t for SPECK-128
2017-12-04 03:38:39 -05:00
Jeffrey Walton
1de143203e
Add SPECK-64 NEON intrinsics
2017-12-03 18:47:39 -05:00
Jeffrey Walton
cd55613b80
Disable NEON for SPECK-64
...
This was inadvertently checked-in
2017-12-03 11:02:15 -05:00
Jeffrey Walton
f0e49785f6
Fix incorrect SPECK-128 decrypt when blocks >= 6
...
Add defines for CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS and CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS
2017-12-03 09:00:39 -05:00
Jeffrey Walton
18ccd89965
Add SSE4 flags to makefile for Simon and Speck
2017-12-03 06:02:24 -05:00
Jeffrey Walton
081afde0fd
Add SIMON-64 SSE intrinsics
...
Performance went from about 29 cpb (C++) to about 11.1 cpb (SSE)
2017-12-03 04:10:55 -05:00
Jeffrey Walton
6bb1f1d9c4
Add SPECK-64 SSE intrinsics
...
Performance went from about 11.9 cpb (C++) to about 4.5 cpb (SSE)
2017-12-03 02:28:40 -05:00
Jeffrey Walton
77ff7aa528
Add additional Simon test vectors
2017-12-02 21:07:33 -05:00
Jeffrey Walton
ca158d56f8
Add additional Speck test vectors
2017-12-02 20:00:32 -05:00
Jeffrey Walton
25493ded49
Add AVX512VL rotate support
2017-12-01 09:39:05 -05:00
Jeffrey Walton
49a119cbf7
Add SPECK-64 and SPECK-128 large block tests
...
The tests were generated using Crypto++ and the straight C++ implementation. It should allow us to test the SSE and NEON impelmentations and multiple blocks
2017-12-01 07:33:21 -05:00
Jeffrey Walton
3c1914b020
Add SIMON-64 and SIMON-128 large block tests
...
The tests were generated using Crypto++ and the straight C++ implementation. It should allow us to test the SSE and NEON impelmentations and multiple blocks
2017-12-01 07:10:42 -05:00
Jeffrey Walton
4792578f09
Rearrange statements and avoid intermediates
...
The folding of statements helps GCC elimate some of the intermediate stores it was performing. The elimination saved about 1.0 cpb. SIMON-128 is now running around 10 cpb, but it is still off the Simon and Speck team's numbers of 3.5 cpb
2017-12-01 04:11:31 -05:00
Jeffrey Walton
b7ced67892
Update comments
2017-12-01 02:38:19 -05:00
Jeffrey Walton
a7fec9c0f6
Fix assert in Debug builds
...
This was copy/paste from the template function
2017-11-30 11:54:21 -05:00
Jeffrey Walton
14e326482c
Update comments
2017-11-30 02:07:04 -05:00
Jeffrey Walton
22257c4b6e
Remove SunCC const cast workaround
...
This code does not suffer SunCC losing const-ness
2017-11-29 12:56:19 -05:00
Jeffrey Walton
39594a53b0
Add fast rotate-by-8 for Aarch32 and Aarch64
2017-11-29 12:33:34 -05:00
Jeffrey Walton
532f13fe53
Fix compile using SunCC 12.4
2017-11-29 12:10:19 -05:00
Jeffrey Walton
61ec50dabe
Change Doxygen comment style from //! to ///
...
Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
2017-11-29 10:54:33 -05:00
Jeffrey Walton
16ebfa72bf
Cleanup comments and whitespace
2017-11-29 10:15:41 -05:00
Jeffrey Walton
6e829cebee
Use EPI8 Shuffle rather than Shifts and Or for rotate when R=8
...
Louis Wingers and Bryan Weeks from the Simon and Speck team offered the suggestion. The change save 0.7 cpb for Speck, and 5 cpb for Simon on x86_64.
Speck is now running very close to the Team's time sor SSE4. Simon is still off, but we know the root cause. For Simon, the Team used a fast bit-sliced implementation
2017-11-29 08:53:48 -05:00
Jeffrey Walton
bdb2db7ac2
Uncouple GetAlignment from CRYPTOPP_DISABLE_SOSEMANUK_ASM
...
The class declaration needs to always include the functions for the platform. The implementation can simply return a different number, and that is hidden from the user
2017-11-29 08:00:21 -05:00
Jeffrey Walton
c6c8dd3b32
Add Valgrind suppression file to file list (GH #543 )
2017-11-29 07:15:42 -05:00
Jeffrey Walton
92436b9f9b
Re-enable Salsa20 ASM (GH #543 )
...
We are fairly certain this is a false positive due to glibc's __memcmp_sse4_1.
2017-11-29 06:55:19 -05:00
Jeffrey Walton
f86c6124a8
Add Valgrind suppression file (GH #543 )
2017-11-29 06:52:43 -05:00
Jeffrey Walton
33caa1e13f
Add Valgrind --track-origins=yes to recipe
2017-11-29 05:26:21 -05:00
Jeffrey Walton
5a8e4d1545
Update documentation
2017-11-28 04:37:37 -05:00
Jeffrey Walton
8530b58edd
Add Base32 extended hex encoder and decoder (GH #534 )
...
I'm not sure if this is what the fellow in the issue wanted, but we are missing it. Also see https://stackoverflow.com/q/47325517/608639
2017-11-28 04:22:19 -05:00
Jeffrey Walton
0db1ef29e1
List Key after Comments in Simon test vectors
2017-11-28 01:34:42 -05:00
Jeffrey Walton
a6ca22f6b6
Add additional Simon-64 test vectors
2017-11-28 01:18:21 -05:00
Jeffrey Walton
a33868b98d
Add additional Simon-128 test vectors
2017-11-28 00:34:22 -05:00
Jeffrey Walton
2a4d58a208
Fix Sosemanuk when -DCRYPTOPP_DISABLE_ASM is in effect
...
It looks like a copy/paste error was introduced at Commit a074722bfa
2017-11-27 21:54:15 -05:00
Jeffrey Walton
45db15e51b
Increase precision of cpb
...
When cpb is less than 24 or so print two decimal places
2017-11-27 11:38:15 -05:00
Jeffrey Walton
a29b36c197
Whitespace check-in
2017-11-27 01:51:27 -05:00
Jeffrey Walton
07c2047cec
Add simon-simd.cpp to file list and nmake file
2017-11-27 01:20:15 -05:00
Jeffrey Walton
1211f25de5
Fix cryptest.vcxproj.user
...
The file was unintentionally checked in with the SIMON-128 commit
2017-11-27 00:50:05 -05:00
Jeffrey Walton
568e608ea6
Add NEON and ASIMD intrinsics for SPECK-128 (GH #539 )
...
Performance increased by about 200% on a 980 MHz BananaPi dev-board. Throughput went from about 176.6 cpb to about 60.3 cpb.
2017-11-27 00:36:45 -05:00
Jeffrey Walton
7576cca8d2
Switch to 'L' for blocksize in SPECK_Info
2017-11-26 23:51:05 -05:00
Jeffrey Walton
84fdcbf384
Use non-macro version of ttmac
2017-11-26 07:59:33 -05:00
Jeffrey Walton
c5303b9c2a
Fix "variable tracking size limit exceeded" with UBsan
...
threefish.cpp: In member function ‘virtual void CryptoPP::Threefish512::Enc::ProcessAndXorBlock(const byte*, const byte*, CryptoPP::byte*) const’:
threefish.cpp:316:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
void Threefish512::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
...
2017-11-26 05:27:03 -05:00
Jeffrey Walton
4c0bfe4548
Update documentation
2017-11-26 02:45:34 -05:00
Jeffrey Walton
14e631fd84
Update documentation
2017-11-26 02:26:58 -05:00
Jeffrey Walton
d19ef1c716
Update documentation
2017-11-26 01:59:06 -05:00
Jeffrey Walton
c518b31ae8
Update documentation
2017-11-26 01:43:00 -05:00
Jeffrey Walton
679c9583a0
Update oids for SM2 (GH #542 )
...
Also see https://www.cryptopp.com/wiki/SM2 . The wiki page is documenting some of this stuff
2017-11-25 10:40:17 -05:00
Jeffrey Walton
1ca704aec6
Add Identity name/value pair (GH #542 )
...
China’s SM2 uses an identity field for digital signatures. We used a ConstByteArrayParameter rather than a char* because the identifier may not be a C-string. The observation is based on experience with Thomas Wu’s Secure Remote Protocol (SRP)
2017-11-25 05:27:28 -05:00
Jeffrey Walton
3dbd762728
Update documentation
2017-11-25 05:16:15 -05:00
Jeffrey Walton
c1acc9fcfa
Add OIDs for SM2 standard (GH #542 )
2017-11-25 05:01:21 -05:00
Jeffrey Walton
e85b388234
Add thorough param to ValidateECGDSA
2017-11-25 03:27:07 -05:00
Jeffrey Walton
a074722bfa
Switch to rotlConstant and rotrConstant
...
This will help Clang and its need for a constexpr
2017-11-25 02:52:19 -05:00
Jeffrey Walton
2d4614084a
Update documentation
2017-11-24 22:35:53 -05:00
Jeffrey Walton
571cbf058c
Fix LLVM detection of SSSE3 on 32-bit cpus
2017-11-24 21:38:49 -05:00
Jeffrey Walton
c797bd9523
Add additional SM3 test vectors (GH #541 )
2017-11-24 19:41:58 -05:00
Jeffrey Walton
dcd27e8a1f
Update documentation
2017-11-24 18:58:31 -05:00
Jeffrey Walton
2ac9e61335
Switch to rotlConstant and rotrConstant
2017-11-24 18:21:27 -05:00
Jeffrey Walton
4f2d6f713f
Switch to rotlConstant and rotrConstant
...
Update comments
2017-11-24 17:54:12 -05:00
Jeffrey Walton
2abf7d7bc4
Fix compile on MIPS due to missing definition of NULL
...
Whitespace check-in
2017-11-24 17:53:25 -05:00
Jeffrey Walton
3b80ead695
Add rotlConstant and rotrConstant
...
The template functions take the rotate amount as a template parameter, which will allow the constexpr to propagate into the rotate expression. It should avoid some of the compile problems we were seeing under Clang and C++11
2017-11-24 17:37:55 -05:00
Jeffrey Walton
4382b1a559
Add additional SM3 test vectors (GH #541 )
2017-11-24 07:24:09 -05:00
Jeffrey Walton
16290b2f1c
Fix crash on VIA C7-D when using GCM
...
This was interesting... The C&-D is an early 2000's 32-bit processor with SSE2 and SSSE3. Using a destination register constraint of "xm" witnessed a crash, while a constraint of "m" does not
2017-11-24 07:08:41 -05:00
Jeffrey Walton
0dc72380a9
Add additional SM3 test vectors (GH #541 )
2017-11-24 06:52:57 -05:00
Jeffrey Walton
c3107d2519
Fix "impossible constraint in \\asm\" on i686
...
gcm.cpp:89:50: error: impossible constraint in \\asm\
: "=xm" (a[0]) : "xm"(b[0]), "xm"(c[0]));
2017-11-24 05:49:56 -05:00
Jeffrey Walton
5a577e71ac
Add additional SM3 test vectors
...
Cleanup SM3 whitespace
2017-11-24 00:40:18 -05:00
Jeffrey Walton
8c29b1a4d3
Update documentation
2017-11-24 00:06:48 -05:00
Jeffrey Walton
5267723a49
Add SM3 hash function (GH #541 )
2017-11-23 23:19:09 -05:00
Jeffrey Walton
13652cf9bf
Add additional SM4 test vectors (GH #540 )
...
The additional ECB mode vectors were generated with Botan. We still need some vectors for SM4/CBC
2017-11-23 19:03:47 -05:00
Jeffrey Walton
521e4ea5fb
Update documentation
2017-11-23 12:42:16 -05:00
Jeffrey Walton
eae5f40c19
Add missing test vectors to file list
2017-11-23 11:52:07 -05:00
Jeffrey Walton
2c8a618a03
Add SM4 block ciphers (GH #540 )
2017-11-23 11:41:40 -05:00
Jeffrey Walton
2e63e46747
Fix Speck compile error with iOS Watch
2017-11-23 09:45:53 -05:00
Jeffrey Walton
f4975461a9
Remove IS_ARM64 from makefile
...
ARM64 is kind of useless. We need A-32 (old ARM), Aarch32 (new 32-bit ARM) and Aarch64 (new 64-bit ARM). Aarch32 and Aarch64 is captured by IS_ARMV8, and A-32 is captured by IS_ARM
2017-11-23 03:42:26 -05:00
Jeffrey Walton
304809a65d
Add NEON and ASIMD intrinsics for SPECK-128 (GH #538 )
...
Performance increased by about 115% on a 980 MHz BananaPi dev-board. Throughput went from about 46.2 cpb to about 21.5 cpb.
2017-11-23 02:47:44 -05:00
Jeffrey Walton
b08596da44
Add CRYPTOPP_SLOW_ARMV8_SHIFT for Aarch32 and Aarch64
...
Both BLAKE2 and SPECK slow down when using NEON/ASIMD. When just BLAKE2 experienced the issue, it was a one-off problem. Its now wider than a one-off, so add the formal define
2017-11-23 02:22:27 -05:00
Jeffrey Walton
78ec2aa5f4
Fix NEON detection on arm-hf
2017-11-22 23:15:20 -05:00
Jeffrey Walton
aec67799a3
Add CTR to display for SIMON and SPECK
2017-11-22 18:43:08 -05:00
Jeffrey Walton
561926db34
Rename CRYPTOPP_ENABLE_ADVANCED_PROCESS_BLOCKS for Rijndael
2017-11-22 17:55:20 -05:00
Jeffrey Walton
f5784c1634
Update comments
2017-11-22 17:35:59 -05:00
Jeffrey Walton
f2bc3cd0ca
Add speck-simd.cpp to project files (GH #538 , #539 )
...
Cleaned up whitespace
2017-11-22 08:45:38 -05:00
Jeffrey Walton
e7fee716d6
Add SSSE3 intrinsics for SPECK-128 (GH #538 )
...
Performance increased by about 100% on a 3.1 GHz Core i5 Skylake. Throughput went from about 7.3 cpb to about 3.5 cpb. Not bad for a software-based implementation of a block cipher
2017-11-22 08:01:41 -05:00
Jeffrey Walton
39697d92bf
Add SSSE3 intrinsics for SPECK-128 (GH #538 )
...
Performance increased by about 100% on a 3.1 GHz Core i5 Skylake. Throughput went from about 7.3 cpb to about 3.5 cpb. Not bad for a software-based implementation of a block cipher
2017-11-22 07:57:39 -05:00
Jeffrey Walton
c447918815
Add additional test vectors (GH #538 , #539 )
...
These were generated by Crypto++ using the C/C++ implementation, which operates on 1 block at a time. They are consumed by the SSSE3 implementation, which operates on 4 blocks at a time. Its not ideal, but it will have to do.
2017-11-22 07:38:55 -05:00
Jeffrey Walton
900dc5d1a6
Rework UncheckedSetKey to rearrange words in ExpandKey (GH #539 )
2017-11-21 17:43:43 -05:00
Jeffrey Walton
b4cecfef95
Rework UncheckedSetKey to rearrange words in ExpandKey (GH #538 )
2017-11-21 17:43:28 -05:00
Jeffrey Walton
6992de66ea
Fix URL in documentation
2017-11-21 16:13:23 -05:00
Jeffrey Walton
3f7eb03eaf
Update documentation
2017-11-21 15:29:41 -05:00
Jeffrey Walton
6b7a7b1ca6
Update documentation
2017-11-21 15:16:53 -05:00
Jeffrey Walton
14e33af525
Update documentation
2017-11-21 08:32:58 -05:00
Jeffrey Walton
8cc76597c6
Fix AlgorithmName() for 128-bit block SIMON and SPECK
2017-11-21 06:48:37 -05:00
Jeffrey Walton
c14e054ed8
Fix AlgorithmName() for 128-bit block SIMON and SPECK
2017-11-21 06:40:02 -05:00
Jeffrey Walton
0fab2a188f
Update documentation
2017-11-21 05:58:11 -05:00
Jeffrey Walton
79273a0f4d
Whitespace and spelling check-in
2017-11-21 05:54:15 -05:00
Jeffrey Walton
3970a066e3
Add SIMON-64 and SIMON-128 lightweight block ciphers (GH #539 )
2017-11-21 04:58:51 -05:00
Jeffrey Walton
5007c13fbd
Switch to size_t for loop control
2017-11-21 04:55:41 -05:00
Jeffrey Walton
78922e9c85
Remove unneeded include
2017-11-21 03:01:23 -05:00
Jeffrey Walton
0dcec5a6d4
Clear unused variable warning for MSVC
2017-11-20 23:53:17 -05:00
Jeffrey Walton
c7760ac4e9
Use SPECK_ExpandKey instead of SPECK_RoundKeys
...
The reference implementation uses ExpandKey
2017-11-20 23:21:15 -05:00
Jeffrey Walton
fdd89d1bd5
Add speck.txt to Filelist
...
This should have occurred at Commit b9fc470bc7 . At least we remembered to include speck.h and speck.cpp...
2017-11-20 20:47:30 -05:00
Jeffrey Walton
6cc89a983d
Update documentation
2017-11-20 20:03:39 -05:00
Jeffrey Walton
027a1a3d8c
Fix AES detection on AIX and Power8
...
This got knocked loose when adding Autotools support
2017-11-20 19:50:07 -05:00
Jeffrey Walton
f6f5583e63
Add additional SPECK test vectors (GH #538 )
...
These were generated by modifying the reference implementation
2017-11-20 11:27:01 -05:00
Jeffrey Walton
4b3560baef
Update documentation
...
Whitespace check-in
2017-11-20 08:33:33 -05:00
Jeffrey Walton
93fb412215
Add Visual Studio filter for SPECK test vectors (GH #538 )
2017-11-20 07:07:11 -05:00
Jeffrey Walton
b9fc470bc7
Add SPECK-64 and SPECK-128 lightweight block ciphers (GH #538 )
2017-11-20 06:30:21 -05:00
Jeffrey Walton
32154a150f
Clear GCC pedantic warnings (GH #537 )
2017-11-19 21:41:13 -05:00
Jeffrey Walton
23d95e803d
Provide virtual destructor for Threefish_Base
2017-11-19 01:39:47 -05:00
Jeffrey Walton
63e53e845e
Reword Threefish inheritance hierarchy
...
Threefish_Base does not need to inherit from Threefish_Info
2017-11-18 21:27:02 -05:00
Jeffrey Walton
ce62862db8
Update documentation
2017-11-18 19:51:45 -05:00
Jeffrey Walton
5f9b2b2a85
Fix algorithm names for Threefish (GH #535 )
...
Algorithm name was returning " Threefish-32(32)" instead of "Threefish-256(256)"
2017-11-18 14:21:10 -05:00
Jeffrey Walton
7f7c848515
Update documentation
2017-11-17 19:48:40 -05:00
Jeffrey Walton
b9bd51f7a6
Remove variable block size for Threefish (GH #535 )
2017-11-17 19:15:14 -05:00
Jeffrey Walton
dbd79a1e49
Fix GCC inline asm register constraint for SSE register
...
Also see https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
2017-11-17 01:01:12 -05:00
Jeffrey Walton
3ed6ed39fa
Fix sse-simd.cpp for 32-bit MSVC compiles
2017-11-17 00:17:46 -05:00
Jeffrey Walton
7f7131dc55
Fix GCM_Xor16_SSE2 for 32-bit MSVC compiles
2017-11-16 23:07:30 -05:00
Jeffrey Walton
a5bf962681
Fix target misdetection on OS X with '-arch i386'
...
This tested OK on Linux OS X, Solaris and Windows. It may break things under IBM XL C/C++. We will cross that bridge when we get to it.
2017-11-16 19:37:29 -05:00
Jeffrey Walton
8734cfaa07
Add sse-simd.cpp to nmake file and vcxproj filters
2017-11-16 15:29:24 -05:00
Jeffrey Walton
bd41c3d5dd
Remove SSE2 from cpu.cpp, add sse-simd.cpp
...
We need to ensure SSE2 does not cross pollinate into other CPU functions since SSE2 is greater than the minimum arch. The minimum arch is i586/i686, and both lack SSE2 instructions
2017-11-16 15:11:51 -05:00
Jeffrey Walton
241ff3065e
Update documentation
2017-11-16 13:36:43 -05:00
Jeffrey Walton
3c537f3e02
Remove master-merge script
...
We don't use branches for development because they pollute the logs on Master
2017-11-16 12:55:38 -05:00
Jeffrey Walton
156fedea7f
Revert "Remove master-merge script"
...
This reverts commit d3dc091 . A version number change used to build the docs cross-pollinated into the deletion of the script.
2017-11-16 12:53:33 -05:00
Jeffrey Walton
d3dc09120b
Remove master-merge script
...
We don't use branches for development because they pollute the logs on Master
2017-11-16 12:51:33 -05:00
Jeffrey Walton
8b52a03d08
Fix SunCC 12.2 compiler crash with GCM_Xor16_SSE2
...
SunCC 12.3 through 12.5 still cannot handle CLMUL, though. It would be nice if Sun fixed the regression.
2017-11-16 02:38:53 -05:00
Jeffrey Walton
6f83a4fb7d
Switch to intrinsic operation instead of casts for GCM SSE2 XOR's
2017-11-15 23:05:30 -05:00
Jeffrey Walton
c49b6d4d71
Cleanup comments and old code artifacts
2017-11-15 21:11:42 -05:00
Jeffrey Walton
e8bed05b7d
Use SSE4.1 instead of SSE4.2 for BLAKE2
...
BLAKE2 requires SSE4.1, no SSE4.2. This change should have been made when we split SSE4 into .1 and .2, but we needed more OS X and LLVM testing
2017-11-15 20:08:06 -05:00
Jeffrey Walton
a3784a3ac5
Update Power8 support for Autotools
2017-11-14 20:54:43 -05:00
Jeffrey Walton
8fee0bb13f
Fix Valgrind detection in cryptest.sh
2017-11-14 08:24:13 -05:00
Jeffrey Walton
4ec1f89ac6
Fix minimum arch test on OS X with MacPort compiler
2017-11-14 00:47:20 -05:00
Jeffrey Walton
eb894d2d5a
Remove bold from algorithm name in benchmarks
2017-11-13 23:01:04 -05:00
Jeffrey Walton
91b8d85f4c
Fix SunCC compile with -xarch=sse2
...
Fix copy/paste messages in cryptest.sh
2017-11-13 19:10:15 -05:00
Jeffrey Walton
4990129f0f
Add summary total back
2017-11-13 17:32:26 -05:00
Jeffrey Walton
f56e4e193f
Fix summary output in cryptest.sh
2017-11-13 16:57:03 -05:00
Jeffrey Walton
50e3fd0d9a
Update comments
2017-11-13 14:28:16 -05:00
Jeffrey Walton
f1386ad894
Fix SunCC 12.5 compile with -std=c++11
2017-11-13 13:08:56 -05:00
Jeffrey Walton
660681a884
Fix SunCC 12.2 compile
2017-11-13 12:30:46 -05:00
Jeffrey Walton
51eca5dd87
Change sed strings for cryptest.sh
2017-11-13 12:11:31 -05:00
Jeffrey Walton
dd1484800c
Rename mapfile for Solaris
2017-11-12 22:48:51 -05:00
Jeffrey Walton
6fa0d8429d
Add shared object and dynamic library tests (GH #533 )
2017-11-12 20:32:41 -05:00
Jeffrey Walton
b40ca97550
Update documentation
2017-11-12 16:35:44 -05:00
Jeffrey Walton
81f0b9bd83
Fix spelling errors
2017-11-12 15:18:05 -05:00
Jeffrey Walton
f4530202c3
Add GitHub Issue template)
2017-11-12 15:14:32 -05:00
Jeffrey Walton
2623d24f5c
Update documentation
...
Removed defined-out code
2017-11-12 13:10:22 -05:00
Jeffrey Walton
f87696b7a5
Cleanup use of unnamed namespaces in encoders and decoders
2017-11-12 12:37:20 -05:00
Jeffrey Walton
bf717f47e6
Reduce C++ file scope class objects
...
Update comments and documentation
2017-11-12 11:55:57 -05:00
Jeffrey Walton
d28e813ac3
Fix extra semicolon (GH #532 )
2017-11-12 01:21:50 -05:00
Jeffrey Walton
69c8a4f9c6
Prefix IS_LITTLE_ENDIAN and IS_BIG_ENDIAN with CRYPTOPP
2017-11-10 14:15:30 -05:00
Jeffrey Walton
8e06391ad3
Update setenv-ios.sh to export tools
...
This is needed for Autotools and cross-compiles. GNUmakefile-cross does not use it
2017-11-10 09:30:47 -05:00
Jeffrey Walton
289f3caa2a
Fix GCC version for RDRAND and RDSEED intrinsics
2017-11-07 16:19:46 -05:00
Jeffrey Walton
65823c1623
Fix GCC version for RDRAND and RDSEED intrinsics
2017-11-07 16:16:35 -05:00
Jeffrey Walton
82a6dc8692
Rename mapfile. It is used for shared objects, too
2017-11-07 12:23:59 -05:00
Marcel Raad
4043164205
RFC: workarounds for original MinGW ( #531 )
...
* Set default target Windows version for MinGW to XP
The original MinGW from mingw.org targets Windows 2000 by default, but lacks
the <wspiapi.h> include needed for Windows 2000 support.
* Disable CRYPTOPP_CXX11_SYNCHRONIZATION for original MinGW
std::mutex is only available in libstdc++ if _GLIBCXX_HAS_GTHREADS is defined,
which is not the case for original MinGW. Make the existing fix for AIX more
general to fix this. Unfortunately, any C++ header has to be included to
detect the standard library and the otherwise empty <ciso646> is going to be
removed from C++20, so use <cstddef> instead.
2017-11-06 20:49:16 -05:00
Jeffrey Walton
379e97cc1c
Set _WIN32_WINNT to 0x501 for MinGW and <wspiapi.h> (GH #529 )
2017-11-06 15:02:50 -05:00
Jeffrey Walton
fdc262e884
Add tests for CRYPTOPP_NO_CXX11 to cryptest.sh (GH #529 )
2017-11-06 09:10:37 -05:00
Jeffrey Walton
e4cef84883
Add CRYPTOPP_NO_CXX11 for fake C++11 standard libraries (GH #529 )
...
This is a recurring problem, especially on MinGW and platforms that use STLport. See the bug report for some references
2017-11-06 09:09:45 -05:00
Jeffrey Walton
f40afed631
Add more Autotools artifacts to distclean recipe
2017-11-06 07:27:37 -05:00
Jeffrey Walton
5d7175bf03
Fix permissions
2017-11-05 07:22:18 -05:00
Jeffrey Walton
432881065c
Removed *.pl from clean rules
2017-11-05 07:21:09 -05:00
Jeffrey Walton
2e246b91d7
Fix missing Poly1305<AES> from Autools shared object on Solaris and Aarch64
2017-11-05 07:18:30 -05:00
Jeffrey Walton
9559517ce4
Fix broken link (GH #528 )
2017-11-05 05:25:06 -05:00
Jeffrey Walton
3b43ce53ec
Add more Autotools artifacts to distclean recipe
2017-11-05 03:42:39 -05:00
Jeffrey Walton
c50f2f23d8
Add more Autotools artifacts to distclean recipe
2017-11-05 03:38:19 -05:00
Jeffrey Walton
78a64e37d3
Remove cryptopp.mapfile from distclean rule
2017-11-01 18:30:49 -04:00
Jeffrey Walton
defa3f78d1
Add more Autotools artifacts to distclean recipe
2017-11-01 18:25:44 -04:00
Jeffrey Walton
a72225afff
Add more Autotools artifacts to distclean recipe
2017-11-01 15:51:10 -04:00
Jeffrey Walton
9e85633ff7
Add more Autotools artifacts to distclean recipe
2017-11-01 13:12:27 -04:00
Jeffrey Walton
0f2f753696
Add Autotools artifacts to distclean recipe
2017-11-01 12:11:04 -04:00
Jeffrey Walton
bbf10b1250
Remove cryptest-windows.pl
...
It was useless fodder
2017-11-01 09:44:45 -04:00
Jeffrey Walton
04520725b6
Update Install.txt
2017-10-31 20:25:02 -04:00
Jeffrey Walton
6fb90f2b0c
Add additional examples to Install.txt (GH #525 )
2017-10-31 17:14:53 -04:00
Jeffrey Walton
dcabbd2112
Fix Elevated Warnings test
...
We were using HAVE_GCC and HAVE_CLANG instead of GCC_COMPILER and CLANG_COMPIELR
2017-10-30 08:33:16 -04:00
Jeffrey Walton
5be2c777f7
Disable ShellCheck SC2181 warning in cryptest.sh
...
Add tests for Support for Control-flow Enforcement Technology (CET). This is an upcoming processor feature. We want to be out in front of breaks to our inline assembly
2017-10-30 08:19:50 -04:00
Jeffrey Walton
4e6c4e0522
Fix Solaris build using SunCC
...
This broke when we fixed xlC builds on AIX
2017-10-27 18:09:40 -04:00
Jeffrey Walton
1eb49a8db6
Fix CPU frequency of 0 in script
2017-10-27 13:20:22 -04:00
Jeffrey Walton
27aa70c240
Fix checkshell warnings
2017-10-26 12:03:20 -04:00
Jeffrey Walton
bc8edcef55
Removed OCB for the time being. The check-in did not occur.
...
Also see https://groups.google.com/d/msg/cryptopp-users/alCrCcPKv3A/alxMw3-dAgAJ
2017-10-20 21:55:01 -04:00
Jeffrey Walton
6f25cf682a
Improve 64-bit support for GCC on AIX
2017-10-18 05:55:12 -04:00
Jeffrey Walton
c2c0a1ed82
Improve 64-bit support for XL C/C++
2017-10-18 04:49:26 -04:00
Jeffrey Walton
7ba8c6bc81
Cleanup Altivec and Power7 code paths
...
This changes the dependency from Altivec to Power7. Internally we needed Power7 but it was cut-in as a pseudo Altivec dependency. Also see http://groups.google.com/forum/#!topic/cryptopp-users/fmEKOG41SG8
2017-10-17 22:50:45 -04:00
Jeffrey Walton
f8d97b83ed
Fix compile on old PowerPC
...
This cleans up the compile on old PwerMac G5's. Our Altivec and Crypto code relies on Power7 and Power8 extensions. There's no need to shoehorn Altivec and Power4 into old platforms, so we disable Altivec and Crypto unless Power7 is available. The GNUmakefile sets CRYPTOPP_DISABLE_ALTIVEC if Power7 is not available.
2017-10-17 20:47:14 -04:00
Jeffrey Walton
9df87dc7d4
Cleanup cryptest.sh a bit
2017-10-16 06:39:50 -04:00
Jeffrey Walton
5dcf3e8554
Fix GCC -Wreorder warning
2017-10-13 04:40:12 -04:00
Jeffrey Walton
1315c1fe2f
Fix unwanted inlining of factory.h classes on AIX and Power7
...
Enable aligned allocations under IBM XL C/C++. Based on the AIX malloc man pages, "... the block is aligned so that it can be used for any type of data". Previously CRYPTOPP_NO_ALIGNED_ALLOC was in effect.
Use malloc instead of calloc on OS X. Based on the OS X malloc man pages, "... the allocated memory is aligned such that it can be used for any data type, including AltiVec- and SSE-related types". Additionally, calloc zero'd the memory it allocated which slowed things down on Apple systems.
2017-10-13 04:13:39 -04:00
Jeffrey Walton
437eda09e0
Tweak "ppc-crypto.h" include on Power7
2017-10-13 02:23:39 -04:00
Jeffrey Walton
3ffff750d7
Fix feature detection on AIX with XL C/C++
2017-10-13 01:27:09 -04:00
Jeffrey Walton
642cf3aa74
Add "stdcpp.h" to bench1.cpp and bench2.cpp (GH #520 )
...
This is the first of possibly two or three for Borland compilers. We have to be careful because its very easy to break something due to math overloads with other compilers like SunCC or XL/C
2017-10-12 21:52:23 -04:00
Jeffrey Walton
f1a80e6a58
Detect XSAVE/XRESTORE OS feature support (GH #521 )
...
This avoids the probe for SSE2 in most circumstances. The SSE2 test is mostly benign nowadays since SSE2 and OS support is nearly ubiquitous. But the define CRYPTOPP_NO_CPU_FEATURE_PROBES added for Apple OSes was interacting badly on x86 machines. Also see GH #511 .
2017-10-12 20:14:21 -04:00
Jeffrey Walton
c7a7385d52
Clear missing newline warning
2017-10-12 14:02:26 -04:00
Jeffrey Walton
24a19b7a18
Cleanup use of BMI intrinsics under GCC and compatibles
2017-10-09 21:14:21 -04:00
Jeffrey Walton
55fe79e5ee
Add governor.sh to run benchmarks from a performance state on Linux
...
The script is based on code by Andy Polyakov, http://www.openssl.org/~appro/cryptogams .
2017-10-08 14:12:16 -04:00
Jeffrey Walton
6e436427fb
Use SetMark to avoid unneeded zeroization in Rijndael
2017-10-08 12:05:33 -04:00
Jeffrey Walton
ebcd91a0ac
Make UncheckedSetKey in authenc.h
...
UncheckedSetKey has traditionally been a protected member function. The public API traditionally uses SetKey (and friends) to set the key. Internally, SetKey may call UncheckedSetKey. It looks like UncheckedSetKey was made public when authenticated encryption support was added.
Its probably not a good idea to have users calling UncheckedSetKey. Most (all?) of the time it does nothing for authenc modes. The other remaining cases it may not work as expected.
2017-10-07 10:32:43 -04:00
Jeffrey Walton
01e46aa474
Move AliasedWithTable into unnamed namespace
...
Move m_aliasBlock into Rijndael::Base. m_aliasBlock is now an extra data member for Dec because the aliased table is only used for Enc when unaligned data access is in effect. However, the SecBlock is not allocated in the Dec class so there is no runtime penalty.
Moving m_aliasBlock into Base also allowed us to remove the Enc::Enc() constructor, which always appeared as a wart in my eyes. Now m_aliasBlock is sized in UncheckedSetKey, so there's no need for the ctor initialization.
Also see https://stackoverflow.com/q/46561818/608639 on Stack Overflow. The SO question had an unusual/unexpected interaction with CMake, so the removal of the Enc::Enc() ctor should help the problem.
2017-10-05 09:28:56 -04:00
Jeffrey Walton
1d0df34ae8
Add PKCS #1 SHA3-based signatures (GH #517 )
2017-10-04 23:24:18 -04:00
Jeffrey Walton
73928489f9
Removed m_authenticated member variable
...
Add m_isSpecial, m_mandatoryBlockSize and m_optimalBufferSize members. The additional members stabilize running times and avoid some unnecessary calculations. Previously we were calculating some values in each call to Put and LastPut.
2017-10-03 21:49:59 -04:00
Jeffrey Walton
04d15304f1
Updated documentation
2017-10-03 20:47:03 -04:00
Jeffrey Walton
84390ee1e1
Add MandatoryBlockSize to last block test
...
CC optimizes things best when isSpecial uses the two predicates. If the 'm_cipher.MandatoryBlockSize() > 0' is removed, then some block ciphers and modes lose up to 0.2 cpb. Apparently GCC can optimize away the second predicate easier than the first predicate.
2017-10-03 15:46:51 -04:00
Jeffrey Walton
aaeda3a57d
Update documentation
2017-10-01 09:37:36 -04:00
Jeffrey Walton
3cfbe66c82
Update documentation
2017-10-01 09:32:07 -04:00
Jeffrey Walton
bbc6ea5355
Comments, constants and whitespace
2017-09-30 06:19:28 -04:00
Jeffrey Walton
abc92b2e74
Updated documentation
2017-09-30 04:52:50 -04:00
Jeffrey Walton
e92eb31690
Update StreamTransformation and ProcessLastBlock
...
Some authenticated encryption modes have needs that are not expressed well with MandatoryBlockSize() and MinLastBlockSize(). When IsLastBlockSpecial() returns true three things happen. First, standard block cipher padding is not applied. Second, the ProcessLastBlock() is used that provides inString and outString lengths. Third, outString is larger than inString by 2*MandatoryBlockSize(). That is, there's a reserve available when processing the last block.
The return value of ProcessLastBlock() indicates how many bytes were written to outString. A filter driving data will send outString and returned length to an AttachedTransformation() for additional processing.
2017-09-29 22:34:33 -04:00
Jeffrey Walton
bebdc8b917
Add second ctor to StreamTransformationFilter for authenticated encryption modes
...
StreamTransformationFilter had a small hack to accomodate AuthenticatedEncryptionFilter and AuthenticatedDecryptionFilter. The hack was enough to support CCM, EAX and GCM modes, which looks a lot like a regular stream cipher from the filter framework point of view.
OCB is slightly different. To the filter framework it looks like a block cipher with an unusual last block size and padding scheme. OCB uses MandatoryBlockSize() == BlockSize() and MinLastBlockSize() == 1 with custom padding of the last block (see the handling of P_* and A_* in the RFC). The unusual config causes the original StreamTransformationFilter assert to fire even though OCB is in a normal configuration.
For the time being, we are trying to retain the assert becuase it is a useful diagnostic. Its possible another authenticated encryption mode, like AEZ or NORX, will cause the assert to incorrectly fire (yet again). We will cross that bridge when we come to it.
2017-09-29 17:36:04 -04:00
Jeffrey Walton
8e67eb5153
Update documentation
2017-09-29 03:22:03 -04:00
Jeffrey Walton
b2b65d6376
Update documentation
2017-09-28 05:03:55 -04:00
Jeffrey Walton
1e822b0636
Update documentation links
2017-09-28 05:00:13 -04:00
Jeffrey Walton
db641b9258
Update documentation
2017-09-28 04:42:48 -04:00
Jeffrey Walton
7ef1c47c6d
Update documentation
2017-09-28 04:06:59 -04:00
Jeffrey Walton
9099dc0625
Update documentation
2017-09-27 06:40:05 -04:00
Jeffrey Walton
69fd4a040d
Update documentation
2017-09-27 06:24:58 -04:00
Jeffrey Walton
69a40e992c
Fix GNUmakefile-cross distclean recipe (GH #514 )
2017-09-26 01:05:15 -04:00
Jeffrey Walton
ea3c80c949
Move Rijndael_AdvancedProcessBlocks_ARMV8 into anonymous namespace
2017-09-23 05:28:59 -04:00
Jeffrey Walton
26597059d9
Move to anonymous namespaces in rijndael-simd.cpp
2017-09-23 02:13:16 -04:00
Jeffrey Walton
0ebdb07705
Update documentation
2017-09-22 22:36:42 -04:00
Jeffrey Walton
12953fd0e4
Add IncrementPointerAndStore
...
This speeds up XL C/C++ by 0.1 to 0.2 cpb
2017-09-22 20:35:18 -04:00
Jeffrey Walton
bb5be2979e
Provide body for VectorStore
...
Calling VectorStoreBE inside VectorStore slowed us down by up to 0.5 cpb on LE systems.
Update documentation for VectorShiftLeft
2017-09-22 19:37:54 -04:00
Jeffrey Walton
d5c12191b3
Update documentation
2017-09-22 18:31:59 -04:00
Jeffrey Walton
fba3fd724b
Update documentation
2017-09-22 10:14:46 -04:00
Jeffrey Walton
ced7cff64f
Add Power8 SHA256 and SHA512 support (GH #513 )
2017-09-22 09:39:36 -04:00
Jeffrey Walton
3bd01f73ba
Add Power8 SHA256 and SHA512 support (GH #513 )
2017-09-22 08:58:50 -04:00
Jeffrey Walton
375d5e18b3
Clear Doxygen warnings
2017-09-22 08:09:05 -04:00
Jeffrey Walton
8b2bf5ed88
Add Power8 SHA support
...
This provides the functions needed for an implementation. It does not provide the implementation itself
Signed-off-by: Jeffrey Walton <noloader@gmail.com>
2017-09-22 07:44:18 -04:00
Jeffrey Walton
2f1b60676f
Remove static from functions
...
Static was an artifact from being in rijndael-simd.cpp
2017-09-22 06:42:05 -04:00
Jeffrey Walton
e725ebadd0
Fix Power8 compile error on AIX with XL C/C++
...
Add documentation
2017-09-22 06:20:19 -04:00
Jeffrey Walton
1057f89363
Move Power8 crypto functions into ppc-crypto.h
2017-09-22 05:23:29 -04:00
Jeffrey Walton
3e55817819
Add C++ templates for additional Vector ops
...
Removed lower-level C-like functions such as Store8x16 and Store64x2
2017-09-22 04:15:33 -04:00
Jeffrey Walton
441e944a66
Switch to vec_vsx_ld, remove unaligned loads
...
Partially unroll loop Rijndael_UncheckedSetKey_POWER8 loop. It saves about another 60 cycles
2017-09-22 02:53:08 -04:00
Jeffrey Walton
d9592a303c
Updated comments
2017-09-21 21:45:23 -04:00
Jeffrey Walton
dabad4b409
Cleanup asserts and casts
2017-09-21 20:55:35 -04:00
Jeffrey Walton
1edea5a80f
Vectorize tail of Rijndael_UncheckedSetKey_POWER8
2017-09-21 20:02:40 -04:00
Jeffrey Walton
e43c0eee74
Fold ConditionalByteReverse for non-Power8 paths
2017-09-21 19:17:42 -04:00
Jeffrey Walton
f763bf3da6
Updated comments
2017-09-21 12:08:54 -04:00
Jeffrey Walton
e78464a1af
Enable little endian Rijndael_UncheckedSetKey_POWER8 using built-ins
...
The problem was vec_sld is endian sensitive. The built-in required more than us setting up arguments to ensure the vsx load resulted in a big endian value. Thanks to Paul R on Stack Overflow for sharing the information that IBM did not provide. Also see http://stackoverflow.com/q/46341923/608639
2017-09-21 09:56:37 -04:00
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
Jeffrey Walton
4c6a866a8d
Remove debug info statement from makefile
2017-09-13 18:51:45 -04:00
Jeffrey Walton
8d98417306
Add Aarch64 specific defines to Android cross-compile
...
Move <arm_acle.h> logic into "sonfig.h". Detecting when we can/should include <arm_acle.h> is proving to be troublesome
2017-09-13 17:16:57 -04:00
Jeffrey Walton
40859a80da
Improve detection of ANDROID_NDK_ROOT
...
We were searching for R10 NDK's, but Android is at R15 in 2017
2017-09-13 17:00:52 -04:00
Jeffrey Walton
fca8adc549
Fix CMAC 256-bit polynomial
...
Also see GH #423
2017-09-13 08:41:39 -04:00
Jeffrey Walton
172ab40874
Fix missing closing paren for Android Aarch64 (GH #491 )
2017-09-13 07:32:08 -04:00
Jeffrey Walton
6e1a07025c
Build Android cpu-features from sources (GH #491 )
...
Thanks to Deadpikle for suggesting the strategy
2017-09-13 07:16:41 -04:00
Jeffrey Walton
fcee76594c
Make armv7a-neon the default in 2017 with NDK R15
2017-09-13 05:22:19 -04:00
Jeffrey Walton
b255bf26ec
Fix missing cpu-features.h for Android
2017-09-13 04:18:04 -04:00
Jeffrey Walton
2375e87a5c
Fix unterminated close paren
2017-09-13 04:09:44 -04:00
Jeffrey Walton
397ccd7e49
remove commented code for Power8
2017-09-13 03:59:25 -04:00
Jeffrey Walton
6d459afa15
Revert "Bump Visual Studio version number for checked iterators (GH #496 )"
...
This reverts commit 3b6e17b1 . The version in Master was correct. The version the OP was using was incorrect.
2017-09-13 02:03:35 -04:00
Jeffrey Walton
3b6e17b1b4
Bump Visual Studio version number for checked iterators (GH #496 )
2017-09-13 00:30:57 -04:00
Jeffrey Walton
502fdc61c9
Add -msse2 to i586 build (Issue 494)
2017-09-12 21:23:23 -04:00
Jeffrey Walton
2b24f5b9fe
VectorLoadAligned → VectorLoadKey
...
Add comments for the Load and Store functions
2017-09-12 20:38:58 -04:00
Jeffrey Walton
5659acb704
Cleanup vector casts
2017-09-12 19:44:34 -04:00
Jeffrey Walton
6899d3f8bb
Add AdvancedProcessBlocks for Power8
...
This increases performance to about 1.6 cpb. We are about 0.5 cpb behind Botan, and about 1.0 cpb behind OpenSSL. However, it beats the snot out of C/C++, which runs at 20 to 30 cpb
2017-09-12 18:15:55 -04:00
Jeffrey Walton
2ebd30d43c
Remove -mvsx option from Linux Power8 builds
...
This option is not needed
2017-09-12 18:10:07 -04:00
Jeffrey Walton
b090e5f69f
Add Power8 AES decryption
2017-09-12 05:53:17 -04:00
Jeffrey Walton
cfb63decec
Guard probe functions
...
This broke Aarch64
2017-09-12 05:49:38 -04:00
Jeffrey Walton
d748d4cfbe
Update header guards for x86
2017-09-12 05:39:33 -04:00
Jeffrey Walton
17bf824790
Guard <arm_acle.h> include for GCC 4.8
...
Use system includes for <arm_neon.h> and <arm_acle.h>
2017-09-12 05:29:51 -04:00
Jeffrey Walton
81a272b046
Update comments
2017-09-12 00:30:48 -04:00
Jeffrey Walton
7fb34e9b08
Add Power8 AES encryption
...
This is the forward direction on encryption only. Crypto++ uses the "Equivalent Inverse Cipher" (FIPS-197, Section 5.3.5, p.23), and it is not compatible with IBM hardware. The library library will need to re-work the decryption key scheduling routines. (We may be able to work around it another way, but I have not investigated it).
2017-09-11 22:52:22 -04:00
Jeffrey Walton
9c9d5ebe87
Undef vector, bool and pixel
2017-09-11 22:39:59 -04:00
Jeffrey Walton
120b415e27
Clear compile error on AIX
...
Truncation due to -1
2017-09-11 04:10:02 -04:00
Jeffrey Walton
e2072ae635
Update documentation
2017-09-11 03:43:37 -04:00
Jeffrey Walton
fb78afba29
Add PowerPC support to cpu.h and validate.cpp
2017-09-11 03:05:04 -04:00
Jeffrey Walton
9276b95221
Add Power8 support to Makefile
2017-09-09 20:33:06 -04:00
Jeffrey Walton
66c84a9af4
Fix failed feature detections under IBM XL C/C++ compiler
2017-09-09 18:44:08 -04:00
Jeffrey Walton
ba569b55ca
Reduce IBM XL C/C++ compiler to -O2
...
Early versions of IBM XL C/C++ for AIX, V13.1 fail some self tests, like TEA and XTEA
2017-09-09 17:22:42 -04:00
Jeffrey Walton
e6f19111e0
Fix IBM XL C/C++ compiler version output in test script
2017-09-09 16:26:16 -04:00
Jeffrey Walton
263c38d681
Avoid pthread gear for IBM XL C/C++ compiler on AIX
2017-09-09 16:25:15 -04:00
Jeffrey Walton
38de6b0436
Fix RTTI and PIC under IBM XL C/C++ on AIX
2017-09-09 16:24:01 -04:00
Jeffrey Walton
b974c7f98e
Avoid -pipe for IBM XL C/C++ compiler
2017-09-09 15:10:32 -04:00
Jeffrey Walton
2118ce8fea
Add Power8 support to cryptest.sh
2017-09-09 14:56:47 -04:00
Deadpikle
3771bc1305
Check for old vs new LLVM include dir ( #492 )
2017-09-08 21:28:24 -04:00
Deadpikle
b14d65850d
Fix missing header for Android cpu features ( #489 )
...
Thank you very much.
2017-09-08 15:43:06 -04:00
Jeffrey Walton
b6f79af343
Clear GCC warnings with -Wall -Wextra
2017-09-05 18:03:46 -04:00
Jeffrey Walton
f19b23d5b5
Clear GCC warnings with -Wall -Wextra
2017-09-05 16:50:23 -04:00
Jeffrey Walton
09023bf45e
Align buffers for Poly1305 and VMAC
2017-09-05 16:43:29 -04:00
Jeffrey Walton
37e02f9e0e
Revert AltiVec and Power8 commits
...
The strategy of "cleanup under-aligned buffers" is not scaling well. Corner cases are still turing up. The library has some corner-case breaks, like old 32-bit Intels. And it still has not solved the AltiVec and Power8 alignment problems.
For now we are backing out the changes and investigating other strategies
2017-09-05 16:28:00 -04:00
Jeffrey Walton
23b939c62b
Clear warnings under GCC with -Wall -Wextra
2017-09-05 12:23:12 -04:00
Jeffrey Walton
b0f3b8ce17
Aligned buffers in AuthenticatedSymmetricCipherBase
2017-09-04 20:36:43 -04:00
Jeffrey Walton
b18f74130b
Aligned buffers in CTR mode
2017-09-04 20:36:08 -04:00
Jeffrey Walton
e2933070b6
Removed alignment asserts
...
Rijndael class will assert when it detects a problem.
2017-09-04 20:35:15 -04:00
Jeffrey Walton
efe88c043b
Use aligned buffer for datatest.cpp
2017-09-04 20:07:47 -04:00
Jeffrey Walton
a2223356b0
Use aligned buffer for CMAC
2017-09-04 19:49:45 -04:00
Jeffrey Walton
d0eefdf32a
Use aligned buffer for Poly1305 nonce
2017-09-04 19:28:19 -04:00
Jeffrey Walton
fe0a5ee8e8
Warn of under-aligned buffers when using AES in debug mode
...
This commit supports the upcoming AltiVec and Power8 processor. This commit affects a number of classes due to the ubiquitous use of AES. The commit adds debug asserts to warn of under-aligned and misaligned buffers in debug builds.
2017-09-04 12:01:44 -04:00
Jeffrey Walton
75aef9bded
Fixup under-aligned buffers when using AES on AltiVec and Power8
...
This commit supports the upcoming AltiVec and Power8 processor. This commit affects a number of classes due to the ubiquitous use of AES. The commit provides the data alignment requirements.
2017-09-04 11:21:47 -04:00
Jeffrey Walton
32cc92e048
Fixup under-aligned buffers for stream ciphers on AltiVec and Power8
...
This commit supports the upcoming AltiVec and Power8 processor support for stream ciphers. This commit affects GlobalRNG() most because its an AES-based generator. The commit favors AlignedSecByteBlock over SecByteBlock in places where messages are handled on the AltiVec and Power8 processor data paths. The data paths include all block cipher modes of operation, and some filters like FilterWithBufferedInput.
Intel and ARM processors are tolerant of under-aligned buffers when using crypto instructions. AltiVec and Power8 are less tolerant, and they simply ignore the three low-order bits to ensure an address is aligned. The AltiVec and Power8 have caused a fair number of wild writes on the stack and in the heap.
Testing on a 64-bit Intel Skylake show a marked improvement in performance. We suspect GCC is generating better code since it knows the alignment of the pointers, and does not have to emit fixup code for under-aligned and mis-aligned data. Testing on an mid-2000s 32-bit VIA C7-D with SSE2+SSSE3 showed no improvement, and no performance was lost.
2017-09-04 11:03:10 -04:00
Jeffrey Walton
6b1a56cf72
Fixup under-aligned buffers for DefaultEncryptors and DefaultDecryptors on AltiVec and Power8
...
This commit supports the upcoming AltiVec and Power8 processor support for DefaultEncryptors and DefaultDecryptors. The commit favors AlignedSecByteBlock over SecByteBlock in places where messages are handled on the AltiVec and Power8 processor data paths. The data paths include all block cipher modes of operation, and some filters like FilterWithBufferedInput.
Intel and ARM processors are tolerant of under-aligned buffers when using crypto intstructions. AltiVec and Power8 are less tolerant, and they simply ignore the three low-order bits to ensure an address is aligned. The AltiVec and Power8 have caused a fair number of wild writes on the stack and in the heap.
Testing on a 64-bit Intel Skylake show a marked improvement in performance. We suspect GCC is generating better code since it knows the alignment of the pointers, and does not have to emit fixup code for under-aligned and mis-aligned data. Testing on an mid-2000's 32-bit VIA C7-D with SSE2+SSSE3 showed no improvement, and no performance was lost.
2017-09-04 10:47:55 -04:00
Jeffrey Walton
9c2a1c74fe
Fixup under-aligned buffers for AltiVec and Power8
...
This commit supports the upcoming AltiVec and Power8 processor support. The commit favors AlignedSecByteBlock over SecByteBlock in places where messages are handled on the AltiVec and Power8 processor data paths. The data paths include all block cipher modes of operation, and some filters like
Intel and ARM processors are tolerant of under-aligned buffers when using crypto intstructions. AltiVec and Power8 are less tolerant, and they simply ignore the three low-order bits to ensure an address is aligned. The AltiVec and Power8 have caused a fair number of wild writes on the stack and in the heap.
Testing on a 64-bit Intel Skylake show a marked improvement in performance. We suspect GCC is generating better code since it knows the alignment of the pointers, and does not have to emit fixup code for under-aligned and mis-aligned data. Here are some data points:
SecByteBlock
- Poly1305: 3.4 cpb
- Blake2s: 6.7 cpb
- Blake2b: 4.5 cpb
- SipHash-2-4: 3.1 cpb
- SipHash-4-8: 3.5 cpb
- ChaCha20: 7.4 cpb
- ChaCha12: 4.6 cpb
- ChaCha8: 3.5 cpb
AlignedSecByteBlock
- Poly1305: 2.9 cpb
- Blake2s: 5.5. cpb
- Blake2b: 3.9 cpb
- SipHash-2-4: 1.9 cpb
- SipHash-4-8: 3.3 cpb
- ChaCha20: 6.0 cpb
- ChaCha12: 4.0 cpb
- ChaCha8: 2.9 cpb
Testing on an mid-2000's 32-bit VIA C7-D with SSE2+SSSE3 showed no improvement, and no performance was lost.
2017-09-04 10:24:24 -04:00
Jeffrey Walton
8578383e2c
Switch to static_cast
2017-09-03 20:33:01 -04:00
Jeffrey Walton
e7974c7915
Fix unaligned data in self test
...
AltiVec and Power8 are brutal. The SIMD units just mask-off the lower 3 address bits. They make the buffer aligned whethere it is aligned or not
2017-09-03 11:17:57 -04:00
Jeffrey Walton
b9e871d1e8
Add PPC, PPC64, AltiVec and Power8 awareness
...
We are going to try AltiVec/Powe8 crypto. It appears to be a lot like ARMv8-a crypto
2017-09-02 19:25:37 -04:00
Jeffrey Walton
4a28391495
Back-off assert in SecBlock
...
Since removing the allocator overloards that handled the wipe mark, we have to route deallocate into the standard one. The standard one fires an assert for [now] normal operation
2017-09-02 19:22:53 -04:00
Jeffrey Walton
a57cd5e193
Update test script
2017-09-02 06:18:08 -04:00
Jeffrey Walton
5b12be29e6
Update test script
2017-09-01 20:38:57 -04:00
Jeffrey Walton
3525fd48da
Remove MOVBE intrinsics
...
GCC never defines __MOVBE__
2017-09-01 20:38:32 -04:00
Jeffrey Walton
d2ad6751d5
Clear uninitialized variable warnings under xlC
2017-09-01 20:37:23 -04:00
Jeffrey Walton
602fa05825
Cleared unused variable warning under MSC
2017-09-01 14:19:48 -04:00
Jeffrey Walton
6544f75769
Clear strict aliasing rule violation in BLAKE2
...
There was no aliasing violation in practice. We used a to assign the right pointer. If the compiler would have removed the unneeded assignment based on T_64bit, then we would not have been flagged.
2017-09-01 11:36:22 -04:00
Jeffrey Walton
069ae2a179
Fix missing object factory of xlC on AIX
2017-09-01 03:58:45 -04:00
Jeffrey Walton
29cf783458
Clear xLC "1540-1102 (W) "e" might be used before it is set"
2017-09-01 03:19:43 -04:00
Jeffrey Walton
14a5221d82
Remove unneeded Debug tests
...
These tests are effectively performed in MDC, SEAL and OldRandomPool
2017-09-01 02:37:41 -04:00
Jeffrey Walton
b47de6150f
Remove unneeded deallocate (GH #485 )
...
This should have been yanked when we removed the same for allocate
2017-08-31 22:50:09 -04:00
Jeffrey Walton
55a5dd8b85
Add core to clean rule
2017-08-31 12:15:39 -04:00
Jeffrey Walton
d8b30e1bd4
Remove deallocate() overload in SecBlock for AIX (GH #485 )
2017-08-31 11:23:37 -04:00
Jeffrey Walton
ea07825127
Add -pthread for Linux and GCC compatibles
...
Fix AIX dtection
Guard use of -m32 and -m64
2017-08-31 10:08:18 -04:00
Jeffrey Walton
6c35eaf737
Update test script for AIX
2017-08-31 08:05:48 -04:00
Jeffrey Walton
0d6f349749
Fold CXX11 feature block
2017-08-31 06:41:44 -04:00
Jeffrey Walton
67bcdaed9a
Fix compile under AIX 7.1
2017-08-31 06:29:35 -04:00
Jeffrey Walton
5cd854b2d3
Update comments
2017-08-30 21:47:05 -04:00
Jeffrey Walton
de8478af2a
Add ARMv7-a NEON tests (GH #481 )
...
The tests were already present; they just needed some tuning
2017-08-30 19:31:11 -04:00
Wyatt O'Day
ffbedcefc5
Fix build on FreeBSD 10.3 x86 with clang++ 3.4.1. ( #483 )
...
* 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.
2017-08-30 16:42:36 -04:00
Wyatt O'Day
23809a3576
Actually fix the VS2010 compilation bug. I somehow missed this in the first pull request. ( #482 )
...
Thank you very much.
2017-08-30 13:46:14 -04:00
Jeffrey Walton
c079abdbc0
Fix missing DetectArmFeatures for ARMv7 (GH #480 )
2017-08-30 11:12:39 -04:00
Jeffrey Walton
b2693c4327
Fix IS_ARMV8 in GNUmakefile
...
Fix guard for HasPMULL()
2017-08-30 10:00:46 -04:00
Jeffrey Walton
1aecb3d4ad
Use optimization level -O3 for release testing (GH #454 )
...
This change should have been made with Commit 18a05659f3
2017-08-30 08:32:20 -04:00
Jeffrey Walton
796a5c1a02
Remove PLATFORM_CXXFLAGS tests (GH #481 )
...
cryptest.sh still needs some tweaking from the recent changes
2017-08-30 07:58:34 -04:00
Wyatt O'Day
5149237a5d
Fix compilation of secblock.h under Visual Studio 2010 (which only has partial C++ 2011 support). ( #477 )
2017-08-29 14:55:01 -04:00
Jeffrey Walton
8624587943
Remove WORKAROUND_MS_BUG_Q258000 from the config and osrng
2017-08-29 14:48:08 -04:00
Jeffrey Walton
c06995a71b
Consistent use of grep and sed (GH #476 )
...
MinGW is really messing things up for us.
2017-08-29 08:57:04 -04:00
Jeffrey Walton
ef28f46691
Fix CMakeList.txt under Solaris
...
We needed to add GREP_CMD back and use grep from /usr/bin/xpg4 for Posix xompliant grep.
2017-08-29 07:33:25 -04:00
Jeffrey Walton
7e7de550e9
Fix broken CMakeList.txt under MinGW (again) (Issue 476)
...
Sorry about that Anonimal (x2)
2017-08-28 18:51:41 -04:00
Jeffrey Walton
238154966c
Fix broken CMakeList.txt under MinGW (again) (Issue 476)
...
Sorry about that Anonimal
2017-08-28 18:15:32 -04:00
Jeffrey Walton
76c4d6e9fa
Add -xarch options to linker flags (Issue 472)
...
Also see https://docs.oracle.com/cd/E19205-01/819-5267/bkabt/index.html
2017-08-28 17:51:59 -04:00
Jeffrey Walton
a3b035b6a8
Add CRYPTOPP_CXX11_ENUM (Issue 475)
2017-08-28 17:37:59 -04:00
Jeffrey Walton
97317914d5
Since moving to split sources (base+simd) we found SecBlocks declared in headers may not be 16-byte aligned because the architecture switch is present on the simd file, and not the base file.
...
16-byte aligned is the default for most systems nowadays, so we side stepped alignment problems on all platforms except 32-bit Solaris. We need the 16-byte alignment for all Intel compatibles since the late 1990s, which is nearly all processors in the class.
The worst case is, if a processor lacks SSE2, then it gets an aligned SecBlock anyways. The last time we saw processors without the features was 486 and early Pentiums, and that was 1996 or so. Even low-end processors like Intel Atoms and VIA have SSE2+SSSE3.
Also see "Enable 16-byte alignment full-time for i386 and x86_64?" (https://groups.google.com/forum/#!topic/cryptopp-users/ubp-gFC1BJI ) for a discussion.
2017-08-28 05:40:23 -04:00
Jeffrey Walton
d4ac135f93
Test align 16 for i386 and x86_64
...
Take 2
2017-08-27 19:53:12 -04:00
Jeffrey Walton
f488221992
Test align 16 for i386 and x86_64
2017-08-27 19:01:00 -04:00
Jeffrey Walton
7c667bc71e
Fix SunCC crash when compiling GCM
2017-08-27 06:16:04 -04:00
Jeffrey Walton
2d5ed51ca9
Add Mapfile for CMake on Solaris (Issue 380)
2017-08-27 05:47:38 -04:00
Jeffrey Walton
67a24ec75a
Fix output artifact name under Cygwin (GH #466 )
2017-08-26 22:34:10 -04:00
Jeffrey Walton
33d20af445
Fix CMake compiler feature misdetection on under SunCC (GH #472 )
...
Take 2
2017-08-26 20:53:35 -04:00
Jeffrey Walton
052c06b2ea
Revert "Fix CMake compiler feature misdetection on under SunCC (GH #472 )"
...
This reverts commit 64def346cd . It broke AppVeyor and Travis builds (it tested good locally on Intel, Aarch and Solaris i86). CMake is so fucked up. I regret the day we added it to the project.
2017-08-26 18:47:04 -04:00
Jeffrey Walton
64def346cd
Fix CMake compiler feature misdetection on under SunCC (GH #472 )
2017-08-26 17:18:26 -04:00
Jeffrey Walton
62c2ef2073
Fix if statement (GH# 380, Commit efcf7fa59c)
2017-08-26 09:59:45 -04:00
Jeffrey Walton
efcf7fa59c
Add SunCC and Solaris to CMakeFile.txt (GH# 380)
2017-08-26 09:55:06 -04:00
Jeffrey Walton
19cabcf15d
Fold arguments to DumpMachine and use egrep (GH #466 )
2017-08-26 05:16:22 -04:00
0x914409F1
a6f24d663e
CMake: create DumpMachine function for machine targeting ( #471 )
...
Also fixes/resolves MinGW build (Issue 466)
2017-08-26 05:07:21 -04:00
Jeffrey Walton
a403c32cf2
Remove DISABLE_NATIVE_ARCH from test script (GH #380 )
2017-08-25 19:59:34 -04:00
Jeffrey Walton
a6ddb5ec40
Remove Platform CXXFLAGS test
...
Add CMake build tests
Add Sun Studio 12.6 tests
2017-08-25 13:58:34 -04:00
Jeffrey Walton
77e9d8c2db
Try fix CMake on MinGW (Issue 466)
...
We don't know if this is going to fix the issue because we don't have a MinGW platofrm for testing. However, from VRE's answer on Stack Overflow (and the chronic CMake problems with execute_process), we believe this may be the fix.
The fix tested OK on WIndows, Linux, OS X and Cygwin. At worse, it won't do any harm
2017-08-25 10:33:48 -04:00
Jeffrey Walton
952ec1c5c8
Update comments
2017-08-25 06:41:24 -04:00
Jeffrey Walton
b3278a3cd2
Remove ospstore.cpp from cryptest.nmake
2017-08-25 06:20:57 -04:00
Jeffrey Walton
2651de246b
Support Base Implementation + SIMD implementation in cryptest.nmake (PR #461 )
2017-08-25 06:12:46 -04:00
Jeffrey Walton
e9a0553b5d
Fix typo
2017-08-24 20:24:32 -04:00
Jeffrey Walton
5c6a32ba0f
Support Base Implementation + SIMD implementation on Solaris (PR #461 )
2017-08-24 19:17:21 -04:00
Jeffrey Walton
b57f7f0ae0
Rollup CMake fixes for OpenBSD, MinGW (Issues 380, 466-468, PR #469 )
...
Rollup CMake fixes for OpenBSD (Issues 467-468)
Rollup CMake fixes for MinGW (Issues 466)
Add CRYPTOPP_ENABLE_ARCH (Issue 380)
2017-08-24 07:26:14 -04:00
Jeffrey Walton
b3cacd8287
Fix 32-bit ARM NEON detection
...
BeagleBone's, RPI-3's, etc
2017-08-23 19:35:45 -04:00
Jeffrey Walton
9c9e69119f
Remove -march=native as default in Makefile and CMake (PR #465 )
...
Remove -march=native as default in Makefile and CMake (PR #465 )
2017-08-23 16:13:20 -04:00
Jeffrey Walton
559fc3bd89
Fix benchmark selection code (GH #464 )
2017-08-22 05:10:25 -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
bac3c1cc40
Fix Asan 64-bit build
...
The Padlock SDK sample code leaves a lot to be desired. Regariding the 64-bit samples and instr_linux64.asm... it looks like the sample sill uses 32-bit constants, but most anything related to extended registers, like rdi, is commented out
2017-08-20 11:19:32 -04:00
Jeffrey Walton
3db6f361d2
Fix compile under MSVC
...
(ClCompile target) ->
validat1.cpp(1081): warning C4800: 'CryptoPP::word32' : forcing value to bool
'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
validat1.cpp(1090): warning C4800: 'CryptoPP::word32' : forcing value to bool
'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
validat1.cpp(1099): warning C4800: 'CryptoPP::word32' : forcing value to bool
'true' or 'false' (performance warning) [c:\Users\cryptopp\cryptest.vcxproj]
2017-08-20 07:15:02 -04:00
Jeffrey Walton
40d0710d43
Fix compile under Clang
...
padlkrng.cpp:45:34: error: no matching function for call to 'STDMIN'
const size_t rem = STDMIN(ret, STDMIN(size, 16U));
^~~~~~
./misc.h:516:36: note: candidate template ignored: deduced conflicting types for parameter 'T' ('unsigned long' vs. 'unsigned int')
template <class T> inline const T& STDMIN(const T& a, const T& b)
^
1 error generated.
2017-08-20 07:09:10 -04:00
Jeffrey Walton
88f08afcb0
Add additional VIA RNG tests
...
The are configurations tests as recommended by Cryptography Research, Inc in their 2003 audit report
2017-08-20 07:01:59 -04:00
Jeffrey Walton
855922b2ca
Updated documentation
2017-08-20 04:59:41 -04:00
Jeffrey Walton
ce74eac58d
Updated documentation
2017-08-20 04:40:57 -04:00
Jeffrey Walton
8c47095a57
FIX GCC ASM template
...
is the constant 2. %2 is the second positional argument, which is the XSTORE divisor. We want the later.
2017-08-20 04:21:24 -04:00
Jeffrey Walton
61c8b74951
Add Divisor and MSR member variables
...
Guard ASM based on CRYPTOPP_X86_ASM_AVAILABLE
Increased depth of internal buffer
Update documentation for using the generator
Whitespace check-in
2017-08-20 04:09:19 -04:00
Jeffrey Walton
bc4bb9a952
Fix 0-size FixedSizeAlignedSecBlockwith GetUserKey
2017-08-19 17:35:56 -04:00
Jeffrey Walton
7fb5953055
Add VIA Padlock RNG
2017-08-19 15:41:45 -04:00
Jeffrey Walton
65a96fe983
Update Readme with FIPS 1402-2 info
2017-08-19 10:08:31 -04:00
Jeffrey Walton
2daa991427
Update comments
2017-08-19 09:48:24 -04:00
Jeffrey Walton
fe64547a26
Update Readme
2017-08-19 09:09:41 -04:00
Jeffrey Walton
29f404ba5c
Update comments (Issue 414)
...
After more investigation it appears the issue was either Undefined Behavior or a Strict Aliasing violation in GCC; and it was in the test program and not the library. We're not sure which at the moment, but we were able to identify the problematic code. See the comments with Issue 414 (https://github.com/weidai11/cryptopp/issues/414 )
2017-08-19 09:09:21 -04:00
Jeffrey Walton
f47022b4dd
Update documentation
2017-08-19 02:53:45 -04:00
Jeffrey Walton
682ab78b01
Update documentation
2017-08-19 02:32:44 -04:00
Jeffrey Walton
a19f0c663b
Update asserts
...
Change 'rounds' to size_t in Rijndael_AdvancedProcessBlocks_ARMV8
2017-08-19 01:55:20 -04:00
Jeffrey Walton
a1b3102eab
Update comments
2017-08-19 01:35:36 -04:00
Jeffrey Walton
a9cd6755c7
Fix MSC C4100 warning for size
...
Also see commit 42b7c4ea56 .
2017-08-18 10:07:47 -04:00
Jeffrey Walton
42b7c4ea56
Clear Coverity finding CONSTANT_EXPRESSION_RESULT (CID 182772)
...
This may create a MSC warning about a conditional expression being constant
2017-08-18 07:59:21 -04:00
Jeffrey Walton
b61953a7a7
Clear Coverity finding UNINIT_CTOR (CID 182771)
2017-08-18 05:02:06 -04:00
Jeffrey Walton
5ef2b814bc
Clear Coverity finding UNINIT_CTOR (CID 148126)
2017-08-18 04:59:30 -04:00
Jeffrey Walton
0b31a12534
Fix missing backslash
2017-08-18 04:53:22 -04:00
Jeffrey Walton
2a7ccd6fd3
Clear Coverity finding CONSTANT_EXPRESSION_RESULT (CID 182768)
2017-08-18 04:52:20 -04:00
Jeffrey Walton
adfb30a579
Clear Coverity finding CHECKED_RETURN (CID 182769)
2017-08-18 04:51:50 -04:00
Jeffrey Walton
4039b21b39
Add ARMv8 machine strings for Apple
2017-08-18 03:03:42 -04:00
Jeffrey Walton
a9534a7cf3
Use CRYPTOPP_SSE2_INTRIN_AVAILABLE for consistent naming
2017-08-18 02:11:41 -04:00
Jeffrey Walton
2a2f6cb7b3
Fix SSSE3 issues under GCC 4.4.5 on Debian 6
2017-08-17 19:04:00 -04:00
Jeffrey Walton
1267c75369
Fix constexpr issues under GCC 4.1.2 found on CentOS 5
2017-08-17 18:35:06 -04:00
Jeffrey Walton
51fe8a7776
Guard use of SIGILL probes on Apple platforms
2017-08-17 18:06:57 -04:00
Jeffrey Walton
82456515c5
Update documentation
2017-08-17 16:56:35 -04:00
Jeffrey Walton
e3c8e69ba3
Rework makefile cpu feature detection code for the BSDs
2017-08-17 16:35:56 -04:00
Jeffrey Walton
9d1f7f7539
Avoid use of SecBlock::m_ptr in Salsa
2017-08-17 16:27:56 -04:00
Jeffrey Walton
ae84826d4b
Update documentation
2017-08-17 16:24:54 -04:00
Jeffrey Walton
803c1a78e7
Update documentation
2017-08-17 14:24:51 -04:00
Jeffrey Walton
2c44518fcb
Fix iOS ARM build
...
cpu.cpp:451:17: error: variable has incomplete type 'struct utsname'
struct utsname systemInfo;
^
cpu.cpp:451:9: note: forward declaration of 'utsname'
struct utsname systemInfo;
^
1 error generated.
2017-08-17 13:52:26 -04:00
Jeffrey Walton
e2c377effd
Split source files to support Base Implementation + SIMD implementation (GH #461 )
...
Split source files to support Base Implementation + SIMD implementation
2017-08-17 12:33:43 -04:00
Jeffrey Walton
74d21068a1
Fix more Clang problems
...
I wish this god damn compiler would stop pretending to be other compilers when it can't consume the same program. Even the GCC devs have told the LLVM devs to stop ding that crap
2017-08-17 10:45:43 -04:00
Jeffrey Walton
7779fa3e7a
Fix NEON detection on Aarch32 and Aarch64
...
I wish GCC would get its head out of its ass and define the apprpriate defines. NEON/ASIMD cannot be disgorged from Aarch32/Aarch64 just like SSE2 cannot be disgorged from x86_64. They are core instruction sets
2017-08-17 02:15:42 -04:00
Jeffrey Walton
6e35e7387a
Add debug configuration to Travis
2017-08-17 01:47:08 -04:00
Jeffrey Walton
f099d2df91
Remove ios-tv from allow_failures
2017-08-16 23:15:23 -04:00
Jeffrey Walton
3887c919c3
Clear unused variable warnings under MSVC
2017-08-16 22:56:36 -04:00
Jeffrey Walton
df280a509a
Disable Carryless Multiplies for Clang
...
Clang causes too many problems. Early versions of the compiler simply crashes. Later versions of the compiler still have trouble with Intel ASM and still produce incorrect results on occassion. Additionally, we have to special case the integrated assemvler. Its making a mess of the code and causing self test failures
2017-08-16 22:10:53 -04:00
Jeffrey Walton
1450847e40
Update comments
2017-08-16 21:43:31 -04:00
Jeffrey Walton
5a32fbbeba
Fix "warning: binding dereferenced null pointer to reference has undefined behavior"
...
This shows up under debug builds when testing instantiations.
warning: binding dereferenced null pointer to reference has
undefined behavior [-Wnull-dereference]
DH2 dh(*(SimpleKeyAgreementDomain*)NULLPTR);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-08-16 20:49:03 -04:00
Jeffrey Walton
b8e794cc6d
Add SHACAL2 optimizations
...
Thanks to Botan for providing these
2017-08-16 14:33:31 -04:00
Jeffrey Walton
c40a4dc9f7
Fix Clang warning on missing template definitions
2017-08-16 12:21:07 -04:00
Jeffrey Walton
8f4b0dc081
Suppress C4251 and C4275 warnings in project files (Issue 412)
2017-08-16 11:24:48 -04:00
Jeffrey Walton
b0b749f392
Fold shuffles after loads for SHACAL2
2017-08-16 10:40:00 -04:00
Jeffrey Walton
1ab1e08ac5
Add Intel SHA implementation for SHACAL2 encryption
...
The implementation came from Jack Lloyd and the Botan team. Jack and the Botan was gracious and allowed us to use Botan's x86_encrypt_blocks function. They also allowed us to release it under the Crypto++ licensing terms. Also see https://github.com/randombit/botan/pull/1151/files
2017-08-16 06:13:06 -04:00
Jeffrey Walton
b311aabc31
Update documentation
2017-08-16 05:42:58 -04:00
Jeffrey Walton
e19fad007f
Fix library version number in script
2017-08-16 05:36:11 -04:00
Jeffrey Walton
c5c6a6af5c
Fix Doxygen constant documentation
2017-08-16 05:11:37 -04:00
Jeffrey Walton
08c37e5887
Update comments in Rijndael head comments
2017-08-15 14:26:30 -04:00
Jeffrey Walton
6f36c7deae
Cleared UBsan finding in Default's GenerateKeyIV
...
passed: 128 deflates and inflates
passed: 128 zlib decompress and compress
default.cpp:69:2: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/x86_64-linux-gnu/bits/string3.h:53:71: runtime error: null pointer passed as argument 2, which is declared to never be null
Information Dispersal and Secret Sharing...
2017-08-15 08:51:03 -04:00
Jeffrey Walton
092b3cb467
Backed off assert.
...
Its too noisy
2017-08-15 04:42:12 -04:00
Jeffrey Walton
659b47108a
Fix Address Sanitizer findings on GCC117
...
GCC117 is a Aarch64/ARM64 server with AMD's ARM chip and GCC 7.10. It looks like GCC is performing some std::string optimizations that generates a finding. We did not witness the finding on other platforms, like other Aarch64 devices and x86_64.
We will need to check if taking the address of element-0 is still approved way to get the non-const pointer to the elements
2017-08-15 03:11:03 -04:00
Jeffrey Walton
0110f8397f
Add ELEMS_MAX for SecBlock (Issue 346)
...
Reset the mark on additional class methods
2017-08-15 03:07:30 -04:00
Jeffrey Walton
876142b1b6
Update with latest sources and reproducible build
2017-08-15 03:05:45 -04:00
Jeffrey Walton
cebeedfefd
Fix Address Sanitizer findings on GCC117
...
GCC117 is a Aarch64/ARM64 server powered by AMD's ARM chip. It runs GCC 7.10. It looks like GCC is performing some std::string optimizations that generates a finding. We have not witnessed the finding on other platforms
2017-08-15 01:15:08 -04:00
Jeffrey Walton
93f085c44c
Fix test script when running on machine with RO mount of /
2017-08-14 19:31:36 -04:00
Jeffrey Walton
f8e77e0fe6
Add Apple Watch and TV to Travis testing
2017-08-14 07:54:10 -04:00
Jeffrey Walton
effa446a61
Fix test script when running on machine with RO mount of /
2017-08-14 01:48:11 -04:00
Jeffrey Walton
6a29d8c56f
Use -O1 for Asan and UBsan
2017-08-14 01:05:03 -04:00
Jeffrey Walton
2ee8e3b26d
Move free standing function into anonymous namespace
...
Update comments and use class constants when available
2017-08-14 00:08:55 -04:00
Jeffrey Walton
2aff92ddb6
Fix bad SHA::Transform calculation (Issue 455)
...
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.
2017-08-13 16:05:39 -04:00
Jeffrey Walton
863bf9133c
Cleanup casts due to Clang
2017-08-13 06:32:09 -04:00
Jeffrey Walton
f02bf91ee5
Revert 95ee8975b4 and 7d21cdd54e (Issue 408)
...
This broke some OS X builds. We need more testing. Ugh...
2017-08-13 04:31:17 -04:00
Jeffrey Walton
95ee8975b4
Use blockSize in error message thrown
2017-08-12 20:29:33 -04:00
Jeffrey Walton
7d21cdd54e
Convert GCM to use runtime blocksize checking (Issue 408)
...
GCM is still only defined for 16-byte ciphers, but this is where we need to be when we add the larger polynomials
2017-08-12 16:14:29 -04:00
Jeffrey Walton
f5aa6f1f06
Cast enums to int for comparison
2017-08-11 17:15:13 -04:00
Jeffrey Walton
953252e44d
Move from 'static' to 'enum' for class constants
...
Enums don't take up space in class objects. Its should result in smaller objects and faster code
2017-08-11 17:13:15 -04:00
Jeffrey Walton
173dd0b530
Add AES for ARMv8 (Issue 458)
2017-08-11 07:31:09 -04:00
Jeffrey Walton
e5b1be035e
Add iOS testing to Travis
2017-08-10 22:59:00 -04:00
Jeffrey Walton
24bc2b8567
Add HMAC(SHA256) benchmark
2017-08-07 19:04:14 -04:00
Jeffrey Walton
58b731c645
Fix "Integer constant is too large for 'long' type"
...
kalyna.cpp:432: error: integer constant is too large for 'long' type
kalyna.cpp:509: error: integer constant is too large for 'long' type
kalyna.cpp:608: error: integer constant is too large for 'long' type
kalyna.cpp:713: error: integer constant is too large for 'long' type
kalyna.cpp:833: error: integer constant is too large for 'long' type
...
2017-08-07 09:46:33 -04:00
Jeffrey Walton
086ad70feb
Update documentation
2017-08-05 07:53:52 -04:00
Jeffrey Walton
0357e508e4
Make nonce a class member rather than temporary
...
Effectively this creates a workspace for encrypting the nonce. The zeroizer will run when the class is destroyed, rather than each invocation of UncheckedSetKey.
Performance went from 3.6 cpb as a temporary to 2.9 cpb as a class member
2017-08-05 06:05:57 -04:00
Jeffrey Walton
bf35d58ad7
Cleanup selft tests
2017-08-05 05:32:43 -04:00
Jeffrey Walton
326700f6ec
Fix library version numbers
...
They were inadvertently checked-in with the SHA doc updates
2017-08-05 01:08:25 -04:00
Jeffrey Walton
d779462a38
Update documentation
2017-08-05 01:05:58 -04:00
Jeffrey Walton
8db50f25ad
Update documentation
2017-08-05 01:02:12 -04:00
Jeffrey Walton
20def29d33
Use MOVDQU for SSE2 in static transform (Issue 455)
...
Updated documentation
2017-08-05 00:24:02 -04:00
Jeffrey Walton
a2cab93117
Add hash static transform test (Issue 455)
2017-08-04 23:35:38 -04:00
Jeffrey Walton
662cccce3b
Switch to reinterpret_cast in MDC
2017-08-04 19:11:53 -04:00
Jeffrey Walton
3fe6709ae7
Cleanup comments in AppVeyor config file
2017-08-04 19:11:16 -04:00
Jeffrey Walton
18a05659f3
Switch from -O2 to -O3 in the makefile (Issue 454)
...
Also see https://groups.google.com/d/msg/cryptopp-users/AEiGyjq15tw/GBAyDA6fBgAJ
2017-08-04 18:31:52 -04:00
Jeffrey Walton
860a9f4266
Use non-0 seed OldRandomPool test
...
This should tickle endianness issues
2017-08-04 16:57:45 -04:00
Jeffrey Walton
24db613a81
Switch to ConditionalByteReverse. Removed mutuable hash member
2017-08-04 16:02:32 -04:00
Jeffrey Walton
e52be9ae84
Clear declaration hides previous local declaration
2017-08-04 07:28:35 -04:00
Jeffrey Walton
9a3f45cee6
Update VCXPROJ files for AppVeyor testing
2017-08-04 00:10:11 -04:00
Jeffrey Walton
64c098fbae
Revert "Reinstate commit ac513c06f8c80"
...
This broke MSbuild, which can no longer build a static library. Attempting to build with 'msbuild /t:Build cryptlib.vcxproj' results in:
...
X64\cryptlib\Debug\zinflate.obj
X64\cryptlib\Debug\zlib.obj
LINK : fatal error LNK1561: entry point must be defined [c:\Users\cryptopp\cryptlib.vcxproj]
Done Building Project "c:\Users\Jeff\Desktop\cryptopp\cryptlib.vcxproj" (Build target(s)) -- FAILED.
Microsoft tools are so fucked up. It should be illegal to sell them.
2017-08-03 05:22:03 -04:00
Jeffrey Walton
1702c93b30
Reinstate commit ac513c06f8
...
Even though it breaks AppVeyor worse, its needed that way. Also see https://stackoverflow.com/a/45458443/608639 .
2017-08-03 04:34:56 -04:00
Jeffrey Walton
08b68c2718
Fix "Error parsing appveyor.yml: "exclude" value must be a sequence of mappings."
2017-08-03 03:58:17 -04:00
Jeffrey Walton
4310388148
Remove VS2017 from exclude: recipe. Remove unneeded comments
2017-08-03 03:48:16 -04:00
Jeffrey Walton
a8084ae440
Add script to change library version numbers
2017-08-03 02:00:09 -04:00
Jeffrey Walton
ab989a6ddf
Sync with Upstream master
2017-08-02 23:26:33 -04:00
Jeffrey Walton
fe9eb75dd2
Suppress warnings C4231, C4355 and C4505 (Issue 412)
...
This should not cross-pollinate like when they were present in config.h
2017-08-02 23:25:54 -04:00
Jeffrey Walton
8afd01d18d
Fix AppVeyor *.vcxproj file copy
2017-08-02 22:31:14 -04:00
Jeffrey Walton
e162a67231
Copy converted *.vcxproj files from TestScripts before testing
2017-08-02 22:07:41 -04:00
Jeffrey Walton
77d2e4eaf5
Add AppVeyor rule to makefile
...
This should sidestep some problems we are experiencing with AppVeyor during x64 builds. Specifically, the missing VCUpgrade.exe and the poor job it does when upgrading our project for the platform\'s tools.
This recipe takes cryptlib.vcxproj and cryptest.vcxproj, and copies it into TestScripts. This ensures TestScripts always has the latest Visual Studio project files. Then, the recipe changes PlatformToolset to the undocumented $\(DefaultPlatformToolset\). Finally, our AppVeyor test script will copy TestScripts/*.vcxproj into PWD before executing MSbuild.
Also see http://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor , http://stackoverflow.com/questions/45452145/how-to-set-platformtoolset-property-from-msbuild and http://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build
2017-08-02 22:01:16 -04:00
Jeffrey Walton
76ff3fc03b
Remove pre-Crypto++ 5.5 interface
...
Users of OldRandomPool must use the new interface. All that means is they must call IncorporateEntropy instead of Put, and GenerateBlock instead of Get
2017-08-02 19:43:56 -04:00
Jeffrey Walton
4da4ece5a5
Cut-in RandomNumberGenerator interface to OldRandPool
...
The existing interface still exists. The new interface is routed into the old methods. Without the new interface, using OldRandPool could result in:
$ ./cryptest.exe v
terminate called after throwing an instance of CryptoPP::NotImplemented
what(): RandomNumberGenerator: IncorporateEntropy not implemented
Aborted (core dumped)
2017-08-02 18:55:10 -04:00
Jeffrey Walton
2578bccf08
Reconfigure AppVeyor email notifications
...
Hopefully they will get through, soon
2017-08-02 05:42:24 -04:00
Jeffrey Walton
49515c3a73
Whitespace check-in
2017-08-02 04:59:42 -04:00
Jeffrey Walton
820d62f978
Partially fix AppVeyor build
...
AppVeyor still has problems, like not being able to run a x64 test
2017-08-02 04:32:18 -04:00
Jeffrey Walton
6b200c80cf
Fix x64 builds
...
Take 3
2017-08-02 04:02:32 -04:00
Jeffrey Walton
b9e5cd2f90
Enable 64-bit builds under AppVeyor
...
Take 2
2017-08-02 00:19:59 -04:00
Jeffrey Walton
9b9b9994c2
Increase minimum size for DefaultEncryptor test. Decrease minimum size fir Inflator tests
2017-08-01 23:23:51 -04:00
Jeffrey Walton
6ab1a729ef
Cleared unused variable warnings
2017-08-01 20:42:55 -04:00
Jeffrey Walton
05bf4fd54b
Whitespace check-in
2017-08-01 19:58:08 -04:00
Jeffrey Walton
5fbbc5311c
Add self tests for OldRandomPool
...
We still need to get the test result cross-validated
2017-08-01 18:57:23 -04:00
Jeffrey Walton
02e3a79444
Add OldRandomPool class (Issue 452)
...
RandomPool used to be a PGP-style deterministic generator and folks used it as a key generation function. At Crypto++ 5.5 the design changed to harden it agianst rollback attacks. The design change resulted in an upgrade barrier. That is, some folks are stuck at Crypto++ 4.2 or Crypto++ 5.2 because they must interoperate with existing software.
Below is the test program we used for the test vector. It was run against Crypto++ 5.4.
RandomPool prng;
SecByteBlock seed(0x00, 384), result(64);
prng.Put(seed, seed.size());
prng.GenerateBlock(result, result.size());
HexEncoder encoder(new FileSink(std::cout));
std::cout << "RandomPool: ";
encoder.Put(result, sizeof(result));
std::cout << std::endl;
2017-08-01 18:53:31 -04:00
Jeffrey Walton
2171a3a379
Update DLL_SRCS list
...
Also see http://groups.google.com/forum/#!topic/cryptopp-users/Q8_6mSS5ZSw on the mailing list
2017-07-31 19:04:48 -04:00
Marcel Raad
b5191dde6f
sockets: fix Windows 2000 build ( #450 )
...
Commit 4630a5dab6 broke compilation for
Windows 2000 and earlier as getaddrinfo was introduced in Windows XP.
Fix this by including <wspiapi.h> when targeting Windows 2000 and
earlier, which falls back to an inline implementation of getaddrinfo
when necessary.
Some MinGW flavors still target Windows 2000 by default.
Ref:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520.aspx ,
section "Support for getaddrinfo on Windows 2000 and older versions"
2017-07-28 15:14:59 -04:00
Marcel Raad
d44a81f91c
Enforce LF line endings for shell scripts ( #451 )
...
This tells git to check out *.sh files with LF line endings. Otherwise,
Cygwin and Windows 10's Bash cannot run them.
2017-07-28 15:14:29 -04:00
Jeffrey Walton
3fc7b104e6
Update documentation
2017-07-28 12:35:25 -04:00
Jeffrey Walton
46993f10f4
Update documentation
2017-07-28 11:50:11 -04:00
Jeffrey Walton
ade3b319a9
Assign t and v together in Sosemanuk (Issue 449)
...
This saved about 0.1 cpb, and increased throughput to 1536 MiB/s
2017-07-28 01:34:53 -04:00
Jeffrey Walton
ed4c345ce8
Clear Clang -Wsequence-point warning (Issue 449)
2017-07-28 00:33:45 -04:00
Jeffrey Walton
d0cd32f405
Make SecBlock<T,A> data members protected
...
Also see http://github.com/weidai11/cryptopp/issues/448
2017-07-27 20:28:23 -04:00
Jeffrey Walton
2c9a3039e8
Update documentation
...
This cleanup was performed using Clang and -Wdocumentation -Wno-documentation-deprecated-sync
2017-07-27 19:15:21 -04:00
Jeffrey Walton
fec712491e
Add /dev/random usage note on Linux
2017-07-26 22:33:37 -04:00
Jeffrey Walton
9242b7c918
Add UnkeyedRNG, UnkeyedHash and UnkeyedOther
...
Some RNGs are keyed, like AES/OFB. However, for classification, we treat them as unkeyed.
2017-07-23 23:52:34 -04:00
Jeffrey Walton
030de2e457
Fix multiple output of shared key benchmarks
...
Benchmark2 is used to benchmark shared key algorithms. At the moment Benchmark2 is all or nothing. It does not understand SharedKeyMAC, SharedKeyStream, SharedKeyBlock. It will be fixed in the future.
2017-07-23 23:25:39 -04:00
Jeffrey Walton
34c4c9f1bd
Move 'main' into CryptoPP::Test, proxy an empty main into Test::main (Issue 447)
...
This seems to be a little cleaner than the triage at 00e1337456 commit.
2017-07-23 16:20:52 -04:00
Jeffrey Walton
00e1337456
Fix "C2872: 'byte': ambiguous symbol" with Windows Kit (Issue 442, 447)
...
AppVeyor detected the break but we did not receive the email about it. It looks like we have an AppVeyor configuration problem
2017-07-23 11:22:42 -04:00
Jeffrey Walton
5103f6dd41
Remove gyrations around CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
...
CRYPTOPP_NO_UNALIGNED_DATA_ACCESS was required in Crypto++ 5.6 and earlier because unaligned data access was the norm. It caused problems at -O3 and on ARM NEON.
At Crypto++ 6.0 no unaligned data access became a first class citizen. Folks who want to allow it must now define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
2017-07-23 11:14:02 -04:00
Jeffrey Walton
00f9818b5d
Move byte to Crypto++ namespace (Issue 442)
...
Also see http://www.cryptopp.com/wiki/std::byte and http://github.com/weidai11/cryptopp/issues/442
2017-07-20 09:55:29 -04:00
Marcel Raad
3485d2180d
Fix Visual Studio project file issues ( #446 )
...
- don't enable SSE2 explicitly for x64, it's always enabled and causes
warnings (issue #445 )
- remove newlines in project files that Visual Studio doesn't like and
removes on every change to project options
2017-07-19 07:17:55 -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
50d1ea8314
Cleared fall through warnings under GCC 7 (Issue 441)
2017-07-17 04:48:28 -04:00
Jeffrey Walton
fe63795638
Add byte typedef in Kalyna's anonymous namespace to avoid issues with globally scoped byte
...
This check-in supports Romain Geissler's work on cleaning up our use of ::byte when it collides with std::byte. Regardless of what happens, such as removing ::byte and adding CryptoPP::byte, providing the typedef here makes Kalyna immune to the outside changes. Also see Pull Request 437 and 438.
2017-07-16 11:11:41 -04:00
Marcel Raad
32f715f1d7
Fix Windows XP support on Visual Studio 2015+ ( #439 )
...
When compiling with Visual Studio 2015+, Crypto++ uses CryptoNG by
default. CryptoNG is only available on Windows Vista and later and
Crypto++ currently ignores if the user explicitly wants to target
Windows XP. Unlike with other Windows SDK features, everything
compiles, but the application doesn't start on Windows XP because
bcrypt.dll is missing. That is an issue when updating Visual Studio
because the root cause is hard to find.
Making use of CryptoNG when targeting Windows 8+ instead by default,
regardless of the Visual Studio version, to fix this.
2017-06-24 17:41:20 -04:00
Romain Geissler @ Amadeus
aaf62695fc
Fix C++17 build (PR 437)
2017-06-18 15:22:32 -04:00
Jeffrey Walton
1565020bfd
Guard use of X86 ASM for ARM, MIPS and other platforms
...
In the bigger picture, the code to use inline ASM when intrinsics are not available still needs to be checked-in. Its a big change since we moved into SSE4, AVX and SHA. Design changes are still being evaluated, and its still being tested.
2017-06-06 09:39:46 -04:00
Jeffrey Walton
429047a8e9
Clear Visual Studio warnings (Issue 412)
2017-06-02 07:13:43 -04:00
Jeffrey Walton
7ac77ca9ac
Revert "Revert "Clear Visual Studio warnings (Issue 412)""
...
This reverts commit c3871aec94 .
2017-06-02 05:18:52 -04:00
Jeffrey Walton
c3871aec94
Revert "Clear Visual Studio warnings (Issue 412)"
...
This reverts commit eb3b27a6a5 . The change broke GCC 4.8 and unknown version of Clang on OS X. UB reported the OS X break, and JW found duplicated the break on a ARM CubieTruck with GCC 4.8.
2017-06-02 05:06:56 -04:00
Jeffrey Walton
dd42fa3ef6
Add notification address of cryptopp-build@googlegroups.com (Take 2)
2017-05-31 07:22:04 -04:00
Jeffrey Walton
a33504c8f8
Add notification address of cryptopp-build@googlegroups.com
...
Its a new Google Group created at https://groups.google.com/forum/#!forum/cryptopp-build . The list should allow us to run services on unprivileged forks and other unrelated accounts while making it easy to find results.
2017-05-31 04:36:31 -04:00
Jeffrey Walton
8988e36a48
Re-add CRYPTOPP_DLL to AssignIntToInteger
...
It looks like it was accidentally blown out at commit eb3b27a6a5
2017-05-30 16:59:29 -04:00
Jeffrey Walton
eb3b27a6a5
Clear Visual Studio warnings (Issue 412)
2017-05-30 16:37:41 -04:00
Jeffrey Walton
23448050c0
Export AssignIntToInteger for FIPS DLL builds (Issue 389)
2017-05-30 05:50:57 -04:00
Jeffrey Walton
52b4cceda5
Remove extraneous return
2017-05-29 21:53:59 -04:00
Jeffrey Walton
ce5ac01193
Use consistent names like MinEntropyLength()
...
Avoid member function names like GetMinEntropy()
2017-05-29 02:44:55 -04:00
Jeffrey Walton
ae3922dda0
Remove calls to cout.flush() for AppVeyor
...
They seemed to produce a hang when running self tests in AppVeyor.
Also use IsDebuggerPresent() to determine when we should call DebugBreak(). The OS killed our debug build when fuzzing caused an assert to fail
2017-05-29 00:43:20 -04:00
Jeffrey Walton
0df38c3506
Fix build timeout due to tracking vars under UBsan
...
Also see https://stackoverflow.com/q/2954473/608639 and https://stackoverflow.com/q/708807/608639
2017-05-28 17:00:09 -04:00
Jeffrey Walton
81c751314b
Add reset-fork script to testing
2017-05-28 16:11:28 -04:00
Jeffrey Walton
567e4f31b4
Update travis.yml for Clang, GCC and OS X
...
Thanks to Hiro Asari on the Travis GitHub for helping with the last of the issues
2017-05-28 02:42:40 -04:00
Hiro Asari
b120276f3e
Define matrix exclusion ( #432 )
2017-05-28 01:17:28 -04:00
Jeffrey Walton
814de0f0c7
Use "relative" option for gcov recipe
2017-05-27 07:18:48 -04:00
Jeffrey Walton
a139d6a846
Cleanup gcov artifacts in clean rule
2017-05-27 07:02:44 -04:00
Jeffrey Walton
0885ce2bcc
Attempt to add Code Coverage report (Take 5)
...
This should be interesting...
2017-05-27 06:41:02 -04:00
Jeffrey Walton
ea3ea9deb5
Add missing semi-colon
2017-05-27 05:50:01 -04:00
Jeffrey Walton
cab2b5a181
Reduce optimizations for code coverage recipes
2017-05-27 05:16:09 -04:00
Jeffrey Walton
b5240463f1
Attempt to add Code Coverage report (Take 4)
...
This should be interesting...
2017-05-27 04:21:51 -04:00
Jeffrey Walton
40395c0150
Attempt to add Code Coverage report (Take 3)
...
This should be interesting...
2017-05-27 03:47:50 -04:00
Jeffrey Walton
345b4e49e2
Attempt to add Code Coverage report (Take 2)
...
This should be interesting...
2017-05-27 03:42:50 -04:00
Jeffrey Walton
3c504b3401
Attempt to add Code Coverage report
...
This should be interesting...
2017-05-27 03:08:07 -04:00
Jeffrey Walton
37cd5bcf7b
Remove VS2010 and VS2012 configurations
...
Apparently Appveyor does not support them. Also see https://stackoverflow.com/q/43441273/608639
2017-05-27 01:19:48 -04:00
Jeffrey Walton
b02ab0a0ba
Tune Travis configuration
...
Now that the jobs are running we can start fixing the little issues
2017-05-27 00:41:58 -04:00
Jeffrey Walton
ea12b5af0b
Use IS_IOS instead of IS_DARWIN
2017-05-26 22:23:35 -04:00
Jeffrey Walton
0af3a2525c
Update makefile rules and recipes
2017-05-26 22:20:38 -04:00
Jeffrey Walton
84e6961457
Updated makefile trim and convert rules
...
Whitespace check-in
2017-05-26 10:08:44 -04:00
Jeffrey Walton
4f5dd74286
Update Travis config file
2017-05-26 09:41:15 -04:00
Jeffrey Walton
3bb801101f
Updated test script
2017-05-26 09:29:05 -04:00
Jeffrey Walton
b770b21dc4
Fix Travis hang
2017-05-26 06:30:46 -04:00
Jeffrey Walton
554ce2c577
Updated test script
2017-05-26 05:28:51 -04:00
Jeffrey Walton
6055aac84f
Updated test script
2017-05-26 04:36:38 -04:00
Jeffrey Walton
167d4ae1a5
Updated test script
2017-05-26 04:27:45 -04:00
Jeffrey Walton
5115ca8d8c
Merge branch 'master' of https://github.com/weidai11/cryptopp
2017-05-26 04:13:00 -04:00
Jeffrey Walton
aeb7f9bac9
Updated test script
2017-05-26 04:12:21 -04:00
Jeffrey Walton
306c88c857
Updated test script
2017-05-26 04:03:38 -04:00
Marcel Raad
77bea3f630
hrtimer.cpp: fix Win32 DLL-Import build ( #425 )
...
PerformanceCounterFrequency is used independently of CRYPTOPP_IMPORTS.
2017-05-26 03:13:18 -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
b65ec291ea
Updated test script
2017-05-25 00:04:45 -04:00
Jeffrey Walton
830c06e922
Fixed copy/paste typo
2017-05-23 23:05:31 -04:00
Jeffrey Walton
34ac34c0b4
Cleared C4459 under MSVC (Issue 412)
2017-05-23 23:03:47 -04:00
Jeffrey Walton
ff7f40cabe
Cleared C4505 under MSVC (Issue 412)
2017-05-23 23:00:58 -04:00
Jeffrey Walton
bc40d36075
Fixed ARIA self test failures under SunCC
2017-05-22 04:34:57 -04:00
Jeffrey Walton
f40c55810d
Add method for sanitizer suppression
2017-05-21 21:51:31 -04:00
Jeffrey Walton
0c4b80c995
Remove unaligned access safety with Asan and UBsan
...
NO_UNALIGNED_DATA_ACCESS is now the norm. Those who allow unaligned data accesses are the special case.
2017-05-21 20:45:08 -04:00
Jeffrey Walton
1be7d29af9
Update test script to exercise -DDISABLE_NATIVE_ARCH=1
2017-05-21 14:52:20 -04:00
Jeffrey Walton
2f58912fdd
Enable RDSEED and SHA for AMD processors
...
AMD donated a AMD Ryzen 7 1700X to the GCC Compile Farm. We were able to verify compatibility and correctness. Many thanks to AMD for the donation
2017-05-21 11:38:56 -04:00
Jeffrey Walton
5fd202077c
Add additional compilers for inline ASM (Issue 428)
2017-05-20 18:32:48 -04:00
Jeffrey Walton
9d2455a699
Add inline ASM for missing CRC intrinsics (Issue 428)
2017-05-20 18:03:53 -04:00
Jeffrey Walton
bc0f943c6b
Add defines for GCC_INLINE and GCC_INLINE_ATTRIB (Issues 427 and 428)
2017-05-20 17:59:21 -04:00
Jeffrey Walton
8c02c60584
Add missing <sstream> header
...
This failed under C++03 builds. C++11 was OK, so it slipped past the initial smoke tests
2017-05-20 04:09:17 -04:00
Jeffrey Walton
1427f5ecf9
Clear coverity finding FORWARD_NULL (CID 147865)
2017-05-20 02:37:51 -04:00
Jeffrey Walton
1abb5c36bd
Revert "Clear coverity finding FORWARD_NULL (CID 147865)"
...
This broke some self tests.
2017-05-20 02:20:25 -04:00
Jeffrey Walton
0bdbde2c21
Clear coverity finding FORWARD_NULL (CID 147865)
2017-05-20 02:12:43 -04:00
Jeffrey Walton
25fcb7bef8
Clear coverity finding CHECKED_RETURN (CID 147833)
2017-05-20 01:42:20 -04:00
Jeffrey Walton
555617d456
Clear coverity finding CONSTANT_EXPRESSION_RESULT (CID 147833)
2017-05-20 01:35:39 -04:00
Jeffrey Walton
e0d856d0ca
Clear coverity finding CONSTANT_EXPRESSION_RESULT (CID 179384)
2017-05-20 01:27:23 -04:00
Jeffrey Walton
4fef9b8837
Rework benchmark code
...
This change moves test selections from test.cpp into bench.cpp. It also allows us finer control over test classes and algorithms
2017-05-19 23:29:59 -04:00
Jeffrey Walton
82accdc13b
Sort source list (Pull Request 426)
2017-05-19 20:12:29 -04:00
Bernhard M. Wiedemann
033fed8c92
have constant link order ( #426 )
...
Make builds reproducible
See https://reproducible-builds.org/ for why this is good.
Without this patch g++ would order functions in libcryptopp.so.5.6.5
depending on random order of files in the build system's filesystem.
2017-05-19 18:34:08 -04:00
Jeffrey Walton
9dcb72f9e5
Fix "error LNK2019: unresolved external symbol TestAutoSeededX917()" under Windows Phone
2017-05-18 09:35:09 -04:00
Jeffrey Walton
a090aad8d2
Fix "warning C4702: unreachable code" under Windows Phone
2017-05-18 08:45:07 -04:00
Jeffrey Walton
ddcd70b152
Fix "error C2065: prng undeclared identifier" under Windows Phone
2017-05-18 08:36:00 -04:00
Jeffrey Walton
3fe188ba89
Updated README with additional algorithms
2017-05-18 00:59:11 -04:00
Jeffrey Walton
1b1c32d7cf
Build RDRAND for all platofrms (Issue 419, PR 424)
...
We have not been able to determine a reliable way to detect cpu's and platforms with Cmake. We are side stepping the Cmake problem by building rdrand.cpp all the time. If its not avilable for a cpu or platform, then RDRAND or RDSEED throw an exception.
2017-05-17 16:21:20 -04:00
Jeffrey Walton
03a6a8fb73
Add separate Enc and Dec classes to Threefish
...
The change speeds up benchmarks for Threefish-256 and Threefish-512 by about 10 MiB/s on a 6th gen Skylake
2017-05-17 14:38:37 -04:00
Jeffrey Walton
5b81b5c66c
Updated test scripts for ARM NEON
2017-05-17 10:59:22 -04:00
Jeffrey Walton
a59e32be73
Add missing Threefish test vectors to Filelist (Isse 422)
2017-05-16 04:49:33 -04:00
Jeffrey Walton
c9d4ebb3d4
Cleared C4250 under MSVC (Issue 412)
2017-05-16 04:21:27 -04:00
Jeffrey Walton
5f0cbde980
Removed MSVC warning suppression for many warnings (Issue 412)
...
Most of these appear to have been cleared over the last couple of years.
C4127 is too prevelant. We are probably going to have to live with it.
We may be able to clear C4250 with a using statement. For example 'using ASN1CryptoMaterial::Load'.
MSVC resisted clearing C4661 by pushing/poping in iterhash.h and osrng.h. It was like MSVC simply ignored it.
2017-05-16 03:52:03 -04:00
Jeffrey Walton
b083390d4f
Added some intelligence to truncated Gzip stream test
2017-05-16 01:59:09 -04:00
Jeffrey Walton
5bf43f4ef3
Add additional Threefish test vectors
...
The test vectors came from NIST submission archive (NIST_CD_102610), skein_golden_kat_short_internals.txt
2017-05-15 22:55:33 -04:00
Jeffrey Walton
ae09662f43
Update Makefile to trim data files
2017-05-15 22:53:44 -04:00
Jeffrey Walton
30ac53ff41
Add support for word32 and word64 parsing
2017-05-15 21:55:39 -04:00
Jeffrey Walton
4da06919eb
Switch conversion switch from 'ce' to 'cvt'
...
There were some collisions in the RSA test vectors
2017-05-15 21:02:47 -04:00
Jeffrey Walton
30ac06dd0d
Fix substring length
2017-05-15 20:41:32 -04:00
Jeffrey Walton
7fd5c13e06
Fix PutDecodedDatumInto on OS X
2017-05-15 20:14:22 -04:00
Jeffrey Walton
a61c97f7ee
Re-enable the Tweak on Threefish
...
We also add a helper to PutDecodedDatumInto which reverses the little-endian values from the Threefish test vectors. Test vectors will follow at next check-in.
2017-05-15 18:42:20 -04:00
Jeffrey Walton
f60f212687
Remove Tweak handling.
...
We are arriving at incorrect result for G2 after the first Key Injection, and its not readily apparent why.
2017-05-15 14:38:24 -04:00
Jeffrey Walton
b3399b4f86
Remove SSE2 intrinsics from Threefish
...
The benchmarks showed things ran slower with GCC and MSVC
2017-05-14 16:59:04 -04:00
Jeffrey Walton
54ca8b3a16
Whitespace check-in
2017-05-14 15:30:59 -04:00
Jeffrey Walton
32ab4af5ff
Add Threefish to project files
...
Whitespace check-in
2017-05-14 15:27:50 -04:00
Jeffrey Walton
8c34a5f7f5
Add Threefish block cipher (Issue 422)
2017-05-14 13:51:41 -04:00
Jeffrey Walton
7ee87af86b
Don't latch BlockSize or BlockPaddingScheme across tests
2017-05-14 05:26:33 -04:00
Jeffrey Walton
017f7f61b4
Rearrange characters in whitespace string
...
The arrangement saves about 1.3 seconds when running the test vectors. It looks like the tab character is dominant, so we profit by listing it first.
2017-05-14 04:09:26 -04:00
Jeffrey Walton
2c570e27a0
Explicitly add space on line continuation
...
Formatting of data for a failed self test was still off a bit. It was due to retaining a whitespace character from the test vector file. The problem was, the whitespace was a tab on occasion.
2017-05-14 02:41:22 -04:00
Jeffrey Walton
bc2678478c
Add polynomial for 1024-bit block cipher.
...
This will support Threefish and its 1024-bit block size. I believe this is correct, but it may be wrong. According to "Table of Low-Weight Binary Irreducible Polynomials" (http://www.hpl.hp.com/techreports/98/HPL-98-135.pdf ), the polynomial is x^1024 + x^19 + x^6 + x + 1.
2017-05-13 19:23:24 -04:00
Jeffrey Walton
cea45eb024
Revert "Add polynomial for 1024-bit block cipher."
...
This reverts commit d654c893ef . The polinomial for 1024-bit block sizes had a typo.
2017-05-13 19:18:24 -04:00
Jeffrey Walton
d654c893ef
Add polynomial for 1024-bit block cipher.
...
This will support Threefish and its 1024-bit block size. I believe this is correct, but it may be wrong. According to "Table of Low-Weight Binary Irreducible Polynomials" (http://www.hpl.hp.com/techreports/98/HPL-98-135.pdf ), the polynomial is x^1024 + x^19 + x^6 + x + 1.
2017-05-13 19:15:46 -04:00
Jeffrey Walton
7697857481
Add polynomial for 512-bit block ciphers
...
I believe this is correct, but it may be wrong. According to the Kalyna team, the polynomial for GCM mode is x^512 + x^8 + x^5 + x^2 + 1. It appears the polinomial applies to other block cipher modes of operations, like CMAC.Dropping the first term and evaluating the remaining terms at X=2 results in 293 (0x125)
2017-05-13 17:36:29 -04:00
Jeffrey Walton
e226523b05
Call cipher.SetKey() before cipher.BlockSize() (Issue 408)
...
Variable block size ciphers need the key set before they can return an accurate size for BlockSize(). This issue surfaced during Kalyna testing with authenticated encryption modes. In particular, EAX mode, which effectively uses CMAC:
AlgorithmParameters params = MakeParameters(Name::BlockSize(), 64)
(Name::IV(), ConstByteArrayParameter((const byte *)iv, 64));
EAX<Kalyna>::Encryption kalyna;
kalyna.SetKey(key, 64, params);
2017-05-13 16:28:05 -04:00
Jeffrey Walton
0611e11507
Disable word128 for PPC64 and GCC 4.8 (Issue 421)
2017-05-12 23:51:27 -04:00
Jeffrey Walton
78db20d939
Add FileName, FileTime and Comment to argnames.h
...
Add self tests to verify handling of filenames, filetimes and comments
2017-05-12 19:52:42 -04:00
Jeffrey Walton
e3ae7000ea
Whitespace check-in
2017-05-12 16:53:07 -04:00
Jeffrey Walton
cfa339535b
Revert "Write MTIME in big-endian order"
...
This reverts commit 591b139343 . RFC 1952 states the bytes are written in little-endian order, not big-endian. That includes MTIME.
2017-05-12 16:51:03 -04:00
Jeffrey Walton
591b139343
Write MTIME in big-endian order
...
Whitespace
2017-05-12 15:29:03 -04:00
c0ff
d901ecd9a4
Gunzip: added GetFilename() and GetComment() methods ( #418 )
...
Add Filename, Filtetime and Comment support to Gzip classes
2017-05-12 15:09:21 -04:00
Jeffrey Walton
973de7712a
Fix GetField for stray CR or LF
...
The test vector rsa_pkcs1_1_5.txt is the torture test. We calculated an incorrect index when a line continuation was part of a comment
2017-05-12 14:25:25 -04:00
Jeffrey Walton
3f9667f3cd
Remove VC++ 6.0 workaround in datatest.cpp
2017-05-12 03:50:37 -04:00
Jeffrey Walton
b160cb40e1
Add comment concerning empty value
2017-05-12 03:09:06 -04:00
Jeffrey Walton
d3986223a6
Add early continuation for parsing a continued line
2017-05-12 03:05:24 -04:00
Jeffrey Walton
ac6db2fa91
Fix parser break on OS X
...
This was introduced at Commit e456cd2275 , and affected Uri during his rounds of testing.
We also took the opportunity to write it in modern C++ (and remove the VC++ 6.0 bug workaround)
2017-05-12 02:20:44 -04:00
Jeffrey Walton
9850576d0b
Improve compressor error messages
2017-05-11 17:59:20 -04:00
Jeffrey Walton
35451f3ab6
Additional self tests for Decompressors
2017-05-11 13:00:17 -04:00
Jeffrey Walton
537ee61ade
Switch to _MSC_FULL_VER for SP1 releases
2017-05-11 12:05:57 -04:00
Jeffrey Walton
aa287d6112
Fix compile under GCC 6.3 on Fedora
2017-05-11 11:55:00 -04:00
Jeffrey Walton
308336c4e1
Switch to COUNTOF in validat3.cpp
2017-05-11 11:18:52 -04:00
Jeffrey Walton
34edf7e12f
Fix subscript out of range in test
2017-05-11 04:14:13 -04:00
Jeffrey Walton
ea5d003a9a
Move TestPolynomialMod2 to validat0.cpp
2017-05-11 03:56:19 -04:00
Jeffrey Walton
c87b0d1485
Fix subscript out of range in test
2017-05-11 02:57:48 -04:00
Jeffrey Walton
598f838e0a
Reduce random string size.
...
Tests run faster without diminishing returns
2017-05-11 02:13:27 -04:00
Jeffrey Walton
b40d4d9180
Add CRYPTOPP_COVERAGE for Asan and UBsan builds
2017-05-11 01:35:32 -04:00
Jeffrey Walton
b3f5bae3b9
Merge pull request #417 from c0ff/master
...
NULLPTR fix for blake2 tests
2017-05-11 00:46:56 -04:00
Dmitry S. Baikov
a9b06b40e7
fixed type casts in blake2 tests
2017-05-11 07:39:51 +03:00
Dmitry S. Baikov
39abbbb070
NULLPTR fix for blake2 tests
2017-05-11 07:14:37 +03:00
Jeffrey Walton
e1b9582a4a
Merge pull request #416 from c0ff/master
...
Fixed non-keyed blake2x hashes when using non-standard digest sizes
2017-05-11 00:10:14 -04:00
Dmitry S. Baikov
369fa3bc52
NULLPTR fix for blake2
2017-05-11 07:04:51 +03:00
Dmitry S. Baikov
e8e0b1c3f2
blake2: Fixed initialization when using non-keyed constructor with non-standard digest size. Added test vectors.
...
https://github.com/weidai11/cryptopp/issues/415
Test vectors generated with pyblake2 which uses 'BLAKE2 reference source code package' by Samuel Neves
2017-05-11 06:46:56 +03:00
Jeffrey Walton
702dae7db9
Fix Mersenne output on big-endian machines
2017-05-10 21:00:53 -04:00
Jeffrey Walton
2a20d09dc6
Additional self tests for Decompressors
2017-05-10 20:32:50 -04:00
Jeffrey Walton
07dbcc3d96
Add Inflator::BadDistanceErr exception (Issue 414)
...
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
2017-05-10 18:17:12 -04:00
Jeffrey Walton
e456cd2275
Modify datatest parse to eat whitespace when line continuation is in effect
...
Previously the parsed string would look as follows. You would get this on a failed self test.
Key: 0000000000000000
0000000000000000
0000000000000000
0000000000000000
The new behavior eats the leading whitespace, so the key is reported as:
Key: 0000000000000000000000000000000000000000000000000000000000000000
2017-05-10 16:20:12 -04:00
Jeffrey Walton
d236cf1277
Add Kalyna CBC test vectors
2017-05-10 15:27:57 -04:00
Jeffrey Walton
b2a6ba460f
Make datatest.cpp aware of padding schemes
...
This change was needed for Kalyna and its CBC test vectors. One test uses OneAndZeros padding
2017-05-10 15:26:36 -04:00
Jeffrey Walton
0de44edde1
Remove EncryptBlockCipher
...
The test mode EncryptBlockCipher is not needed. datatest.cpp is versatile enough to handle variable block sizes under test mode Encrypt
2017-05-10 13:50:36 -04:00
Jeffrey Walton
3bee1f57cf
XOR block in specialized ProcessBlock
...
Use Put and Get blocks consistently
2017-05-10 06:34:22 -04:00
Jeffrey Walton
20c3d556c3
Revert "XOR block in specialized ProcessBlock"
...
This reverts commit 76bb4ead40 . The Visual Studio project files and other test files were not supposed to be checked-in.
2017-05-10 06:30:08 -04:00
Jeffrey Walton
76bb4ead40
XOR block in specialized ProcessBlock
...
Use Put and Get blocks consistently
2017-05-10 06:26:29 -04:00
Jeffrey Walton
9b383e8a07
Clear out-of-bounds read when fuzzing
...
zinflate.cpp:553:41: runtime error: index 30 out of bounds for type 'unsigned int [30]'
zinflate.cpp:553:11: runtime error: load of address 0x0000011806b8 with insufficient space for an object of type 'const unsigned int'
zinflate.cpp:32:32: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int'
2017-05-10 04:15:42 -04:00
Jeffrey Walton
093499260e
Fix compile error with NO_OS_DEPENDENCE
2017-05-10 03:50:32 -04:00
Jeffrey Walton
151ec518e8
Add additional tests
2017-05-10 01:28:52 -04:00
Jeffrey Walton
4904a951ce
Fix bad code generation with GCC, -Os and rdseed
2017-05-10 01:28:25 -04:00
Jeffrey Walton
5c42ec96f2
Fix bad GCC code generation with -Os
...
It appears GCC was doing something wonky with the call to RDSEED. The test script was experiencing a hang
2017-05-09 22:47:14 -04:00
Jeffrey Walton
0cbaea0428
Add tests for Information Dispersal and Secret Sharing
2017-05-09 18:44:45 -04:00
Jeffrey Walton
35ec7b105e
Enable MD4 testing under extended validations
2017-05-09 16:40:02 -04:00
Jeffrey Walton
33235f88db
Removed unneeded guard
...
Whitespace check-in
2017-05-09 16:23:30 -04:00
Jeffrey Walton
3b4a9e2ccf
Update padding check logic
2017-05-09 15:48:52 -04:00
Jeffrey Walton
f817fc7c2e
Clear C4100 warning (Issue 412)
2017-05-09 15:40:49 -04:00
Jeffrey Walton
a0832a63be
Whitespace check-in
2017-05-09 15:28:42 -04:00
Jeffrey Walton
bc29f1b5b8
Updated documentation
2017-05-09 15:13:11 -04:00
Jeffrey Walton
4f7fee38d6
Mkaake RDRAND and RDSEED throw if not available
...
Fix Carmichael pseudo-prime tests
2017-05-09 13:20:53 -04:00
Jeffrey Walton
8a177c58e6
Add validation for W3C_PADDING InitializeDerivedAndReturnNewSizes
...
This should have occurred with PR 368 or Commit 8e088b4865
2017-05-09 00:58:42 -04:00
Jeffrey Walton
6ca68e714b
Updated documentation
2017-05-08 23:25:39 -04:00
Jeffrey Walton
ffa92b09e6
Add test for Carmichael pseudo-primes
2017-05-08 22:36:58 -04:00
Jeffrey Walton
ba8882db39
Use [31398, 31468] for prime gap test
2017-05-08 17:03:06 -04:00
Jeffrey Walton
7421bd2055
Fix "Load of address X with insufficient space for an object of type const word32"
2017-05-08 16:17:17 -04:00
Jeffrey Walton
fe2d5752cd
Switch to library's GetUserKey
2017-05-08 14:32:30 -04:00
Jeffrey Walton
7ba33868e0
Add zLib compressor and decompressor tests
2017-05-08 06:08:27 -04:00
Jeffrey Walton
798f1c9ed8
Clear warnings under Visual Studio
2017-05-08 05:13:55 -04:00
Jeffrey Walton
238b5e6188
Whitespace check-in
2017-05-08 03:20:23 -04:00
Jeffrey Walton
1d7dfc6927
Port Kalyna to big-endian (Issue 411)
...
Tested on GCC110 from the GCC compile farm. Performance is comparable to AES on GCC110.
2017-05-08 01:59:37 -04:00
Jeffrey Walton
c35e616cbf
Make make_odd_key_NNN a template function
2017-05-06 23:59:17 -04:00
Jeffrey Walton
c62e1ade6e
Add Makefile recipe for Valgrind builds
2017-05-06 22:54:49 -04:00
Jeffrey Walton
9cf9f4235d
Add timing attack countermeasures to Kalyna (Issue 411)
...
The code at check-in a5c67cfdd6 did not include it. Unlike Threefish, it looks like Kalyna could benefit from the cache hardening given how similar Kalyna is to AES. The hardening costs less than 0.1 cpb, which equates to about 199 MB/s vs 201 MB/s on a 6th gen Skylake
2017-05-06 20:14:26 -04:00
Jeffrey Walton
14236ce94b
Fold compressor and default encryptor tests
2017-05-06 19:20:57 -04:00
Jeffrey Walton
bdd82d781e
Added additional tests
2017-05-06 18:51:55 -04:00
Jeffrey Walton
c04b98072c
Fix compile error with -DNO_OS_DEPENDENCE
...
Whitespace check-in
2017-05-06 18:00:57 -04:00
Jeffrey Walton
374b8a419f
Added additional tests
2017-05-06 11:37:22 -04:00
Jeffrey Walton
3ea8e0655f
Add constants to default encryptor classes
2017-05-06 09:07:24 -04:00
Jeffrey Walton
6ad999ef2f
Updated documentation
2017-05-06 08:18:54 -04:00
Jeffrey Walton
a5c67cfdd6
Add Kalyna block cipher (Issue 411)
...
Thanks to Roman Oliynykov and Oleksandr Kazymyrov for their assistance. Thanks to Keru Kuro for the reference implementation.
2017-05-06 00:24:35 -04:00
Jeffrey Walton
06092259c2
Make UncheckedKeySet and ProcessXorBlocks protected
2017-05-06 00:21:24 -04:00
Jeffrey Walton
02df6ea847
Add additional self tests under debug builds
2017-05-05 23:16:28 -04:00
Jeffrey Walton
ac930b084d
Add additional tests
...
Whitespace check-in
2017-05-05 20:34:43 -04:00
Jeffrey Walton
9225ca09cb
Updated MersenneTwister tests
...
The tests now include the first 10 elements of the sequence to ensure a properly implemented algorithm and endianess correctness.
2017-05-05 19:00:17 -04:00
Jeffrey Walton
c1377b2955
Add additional self tests under debug builds
2017-05-05 17:21:08 -04:00
Jeffrey Walton
5c1de7b5a5
Add variable block size support to test and benchmarks
...
CRYPTOPP_COVERAGE was added at 9614307ab7 to increase code coverage support. This commit enables additional validation routines when CRYPTOPP_COVERAGE is in effect.
2017-05-04 19:11:24 -04:00
Jeffrey Walton
9614307ab7
Add CRYPTOPP_COVERAGE define for 'make coverage' recipe
2017-05-04 03:01:07 -04:00
Jeffrey Walton
7131a0fbb8
Add VariableBlockSize constants to FixedBlockSize
...
This also follows the pattern set forth by FxiedKeyLength and VariableKeyLength
2017-05-03 22:34:37 -04:00
Jeffrey Walton
2d9678fa6d
Remove BLOCKSIZE from VariableBlockSize (Issue 408)
...
VariableBlockSize and VariableBlockCipherImpl were added at Commit bd8edfa87b . Reflecting on FixedKeyLength and VariableKeyLength, the const KEYLENGTH is only provided by FixedKeyLength. VariableKeyLength provides DEFAULT_KEYLENGTH. This check-in makes VariableBlockSize follow VariableKeyLength.
This check-in also splits block size and iv length. Its conceivable we will encounter a cipher with a block size of 128-bits with an iv of 256-bits. The bd8edfa87b check-in could not handle the difference, so we fix it now.
2017-05-03 21:06:49 -04:00
Jeffrey Walton
ca9e788fbf
Add const GetStream() member function
2017-05-02 18:25:58 -04:00
Jeffrey Walton
554b7a2747
Fix "error: inlining failed ... target specific option mismatch (Issue 407)
2017-05-01 17:54:05 -04:00
Jeffrey Walton
f8c1348667
Fix "There are no arguments to ‘GetAlgorithm’ that depend on a template parameter"
2017-05-01 16:56:21 -04:00
Jeffrey Walton
a33a3435f4
Remove HashFunction typedef (Issue 369)
...
This should have happened when we removed most of MAINTAIN_BACKWARDS_COMPATIBILITY artifacts.
2017-05-01 16:41:43 -04:00
Jeffrey Walton
9db82ed793
Use symbolic defines StaticGetDefaultBlockSize
2017-05-01 16:40:32 -04:00
Jeffrey Walton
bd8edfa87b
Add variable block size support for block ciphers
...
This should lead the way for more modern block ciphers like Threefish and Kalyna. It tested well with both regular cipher modes (the mode has an instance of the cipher) and external cipher modes (the cipher and mode are distinct objects, and the mode holds a reference to the cipher).
We still have to work out the details of naming a cipher. For example, Kalyna with a 128-bit key can use a 128-bit or 256-bit block size. Kalyna-128 is not enough to describe the algorithm and locate it in the object registry. Kalyna-128-128 looks kind of weird; maybe Kalyna-128(128) or Kalyna-128(256) would be better.
Here are the initial test cases to verify functionality:
byte key[64] = {}, iv[32] = {};
ECB_Mode<Kalyna>::Encryption enc1;
enc1.SetKey(key, 16);
CBC_Mode<Kalyna>::Encryption enc2;
enc2.SetKeyWithIV(key, 16, iv);
AlgorithmParameters params = MakeParameters
(Name::BlockSize(), 32)
(Name::IV(), ConstByteArrayParameter(iv, 32));
CTR_Mode<Kalyna>::Encryption enc3;
enc3.SetKey(key, 16, params);
CBC_Mode<Kalyna>::Encryption enc4;
enc4.SetKey(key, 32, params);
Kalyna::Encryption enc5;
ECB_Mode_ExternalCipher::Encryption ecb(enc5);
ecb.SetKey(key, 16, params);
Kalyna::Encryption enc6;
ECB_Mode_ExternalCipher::Encryption cbc(enc6);
cbc.SetKey(key, 32, params);
2017-05-01 16:23:57 -04:00
Jeffrey Walton
1543649ead
Cleanup ARIA typedefs
2017-04-28 21:35:55 -04:00
Jeffrey Walton
ff9b46e513
Merge pull request #405 from kvirund/alignment.issues
...
Added -xmemalign=4i for Sparc
2017-04-27 15:52:39 -04:00
Anton Gorev
7eeab3d0bf
Added -xmemalign=4i compiler option for Sparc's.
2017-04-27 14:15:12 -05:00
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
2297dd000a
Removed "typedef SHA1 SHA" (Issue 369)
...
This should have happened when we removed most of MAINTAIN_BACKWARDS_COMPATIBILITY artifacts. Its not practical move SHA1 into Weak:: namespace or "typedef SHA256 SHA" because SHA1 is too intertwined at the moment.
In the interim, maybe we can place SHA1 in both CryptoPP:: and Weak:: namespaces. This will allow us to transition into Weak::SHA1 over time, and signal to users SHA1 should be avoided.
2017-04-24 05:05:14 -04:00
Jeffrey Walton
64f1b50b7f
Add pclmulqdq for OS X disassembly tests
2017-04-24 03:05:37 -04:00
Jeffrey Walton
e2f5da337e
Add mapfile to allow additional capability bits
...
Also see http://www.oracle.com/technetwork/server-storage/solaris/hwcap-modification-139536.html
2017-04-23 12:11:08 -04:00
Jeffrey Walton
422600c5b8
Update scripts for testing
2017-04-23 07:38:25 -04:00
Jeffrey Walton
89176e51cd
Add safety for SSSE4.1 and SSE4.2 intructions
...
They are giving ARIA and BLAKE2 trouble. It looks like SSE4 support appeared in the GCC compiler around 4.1 or 4.2. It looks like SHA support appeared in the GNU assembler around 2.18
2017-04-23 06:37:03 -04:00
Jeffrey Walton
96cc3522ce
Add test for '-march=native'
2017-04-22 23:37:13 -04:00
Jeffrey Walton
4478e4cf39
Removed Unified ASM and Modern Compiler tests
...
Unified adds no value, and modern compilers are already tested
2017-04-22 21:22:32 -04:00
Jeffrey Walton
7562e38ad6
Add safety for SHA intructions
...
It looks like SHA support appeared in the GCC compiler around 4.8 or 4.9. It looks like SHA support appeared in the GNU assembler around 2.23
2017-04-22 19:46:13 -04:00
Jeffrey Walton
f818d4e50f
Updated code generation tests
2017-04-22 16:27:37 -04: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
Jeffrey Walton
cd65ce873a
Add -xmemalign=4i for Sun SPARC (Issue 403)
2017-04-22 01:15:17 -04:00
Jeffrey Walton
12b5074c72
Fix SunCC and "_mm_set_epi8 must have prototype"
2017-04-22 00:17:45 -04:00
Jeffrey Walton
c25edcaff3
Add potential workaround for Solaris SIGBUS
2017-04-22 00:05:55 -04:00
Jeffrey Walton
8ded8bc38d
Clear SunCC anachronism warning "Attempt to redefine IS_BIG_ENDIAN without using #undef"
2017-04-21 23:52:43 -04:00
Jeffrey Walton
1249ac16eb
Merge pull request #402 from kvirund/alignment.issues
...
Some fixes related to SunCC compiler bugs.
2017-04-21 22:25:06 -04:00
Anton Gorev
63cc633be7
Reverted change in config.h as it does not fix anything.
2017-04-21 21:23:08 -05: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
cede0f3fb1
Whitespace
2017-04-18 02:57:38 -04:00
Jeffrey Walton
ceecf3faf5
Fix table whitespace
2017-04-17 04:23:50 -04:00
Jeffrey Walton
ba904cc9da
Update algorithm list in cryptlib.h
2017-04-17 02:39:22 -04:00
Jeffrey Walton
f69504f6b4
Cleanup travis.yml file
2017-04-17 01:15:55 -04:00
Jeffrey Walton
cfa98a32c0
Add Win64 to exclude until the issues are sorted out
2017-04-17 01:06:27 -04:00
Jeffrey Walton
3d9ac8f66f
Add Travis configuration file
2017-04-17 00:25:57 -04:00
Jeffrey Walton
b784852998
Add no-asm target to ease testing of -DCRYPTOPP_DISABLE_ASM
...
This is intended to be used on Travis CI
2017-04-17 00:20:22 -04:00
Jeffrey Walton
7df4418258
Add allow_failures to appveyor.yml until we sort out some of the issues
2017-04-16 15:57:46 -04:00
Jeffrey Walton
3504f1da25
Add VS2010 - VS2017 images to appveyor.yml
2017-04-16 15:10:20 -04:00
Jeffrey Walton
dad532cb4b
Remove stdio.h header
2017-04-16 13:23:27 -04:00
Jeffrey Walton
1d1a150737
Avoid extra loads of workspace variables
2017-04-16 13:00:45 -04:00
Jeffrey Walton
ddc0f3a899
Switch to Put and Get blocks. Remove unneeded macros
2017-04-16 08:06:20 -04:00
Jeffrey Walton
83a87cb4df
Group DSA-RFC6979 tests together by hash value
...
Previously, all 1024-bit tests were run, and then 2048-bit tests were run. Splitting them meant there were two entries for DSA-RFC6979/SHA-1, two entries for DSA-RFC6979/SHA-256 and so on. Now there will be one entry output during testing.
2017-04-15 09:03:22 -04:00
Jeffrey Walton
106106813a
Add missing sha2 and sha3 test file names
...
sha2.txt and sha3.txt are just collections of other files, so they don't take up much space.
This commit stens from and exception when running 'cryptest.exe tv sha2' and 'cryptest.exe tv sha3'. Its not obvious the name of the file to be run sha2_224_fips_180.txt. Users should not have to hunt for the reason sha2 and sha3 do not work.
2017-04-15 08:50:03 -04:00
Jeffrey Walton
5e27404a15
Add missing sha2 and sha3 test file names
...
sha2.txt and sha3.txt are just collections of other files, so they don't take up much space.
This commit stens from and exception when running 'cryptest.exe tv sha2' and 'cryptest.exe tv sha3'. Its not obvious the name of the file to be run sha2_224_fips_180.txt. Users should not have to hunt for the reason sha2 and sha3 do not work.
2017-04-15 08:49:00 -04:00
Jeffrey Walton
922568864e
Convert tab to space for .appveyor.yml
...
The configuration validated but the test build died
2017-04-15 04:26:19 -04:00
Jeffrey Walton
2fba69fb16
Add whitespace to test_script cmd
...
Without the additional CRLF, Appveyor dies with on the command . The odd thing is, YAML validated OK.
2017-04-15 04:22:26 -04:00
Jeffrey Walton
424bd710ac
Add Configuration and Platform information
2017-04-15 04:15:06 -04:00
Jeffrey Walton
1ace49049a
Add clone depth to Appveyor
2017-04-15 03:12:08 -04:00
Jeffrey Walton
c0d6f3882b
Add Appveyor configuration file
2017-04-15 02:54:35 -04:00
Jeffrey Walton
556e3610e8
Add CopyCryptestToRoot target
...
Also see https://www.cryptopp.com/wiki/MSBuild_(Command_Line)#CopyCryptestToRoot
2017-04-15 02:36:03 -04:00
Jeffrey Walton
163f8febe6
Fix comment
2017-04-14 07:19:04 -04:00
Jeffrey Walton
0f7aba8b4c
Merge pull request #398 from anonimal/cmake
...
Build: apply patch for GNU assembler errors to CMake
2017-04-14 06:27:56 -04:00
Jeffrey Walton
b081f7c634
Use full S1 table for timing attack counter measures
...
Change stride to cache line size divided by word size based on Yun's 32-bit word implementation
2017-04-14 06:24:54 -04:00
Jeffrey Walton
cf160e91c4
Added comments on using InformationDisperseFile and SecretShareFile
...
This is based on feedback from https://groups.google.com/forum/#\!topic/cryptopp-users/XEKKLCEFH3Y
2017-04-13 23:13:07 -04:00
Jeffrey Walton
bf92cb0039
Split regtest.cpp into regtest{1|2|3}.cpp
...
regtest.cpp is where ciphers register by name. The library has added a number of ciphers over the last couple of years and the source file has experienced bloat. Most of the ARM and MIPS test borads were suffering Out of Memory (OOM) kills as the compiler processed the source fille and the included header files.
This won't stop the OOM kills, but it will help the situation. An early BeagleBoard with 512 MB of RAM is still going to have trouble, but it can be worked around by building with 1 make job as opposed to 2 or 4.
2017-04-13 21:45:21 -04:00
Jeffrey Walton
bae30d6767
Add ARIA to nmake makefile for Windows
2017-04-13 18:44:20 -04:00
Jeffrey Walton
70cf88f230
Apply S-box timing attack counter measures to ARIA
...
The ARIA S-boxes could leak timining information. This commit applies the counter measures present in Rijndael and Camellia to ARIA. We take a penalty of about 0.05 to 0.1 cpb. It equates to about 0 MiB/s on an ARM device, and about 2 MiB/s on a modern Skylake.
We recently gained some performance though use of SSE and NEON in ProcessAndXorBlock, so the net result is an improvement.
2017-04-13 17:46:51 -04:00
Jeffrey Walton
65c3c63b52
Breakout and cleanup macros. Add CRYPTOPP_ENABLE_ARIA_SSE2_INTRINSICS, CRYPTOPP_ENABLE_ARIA_SSSE3_INTRINSICS and CRYPTOPP_ENABLE_ARIA_NEON_INTRINSICS.
...
Tune CRYPTOPP_ENABLE_ARIA_SSE2_INTRINSICS and CRYPTOPP_ENABLE_ARIA_SSSE3_INTRINSICS macro for older GCC and Clang. Clang needs some more tuning on Aarch64 becuase performance is off by about 15%.
Add additional NEON code paths.
Remove keyBits from Aarch64 code paths.
2017-04-13 17:45:58 -04:00
Jeffrey Walton
471e2f0d91
Remove unneeded assert from Camellia
2017-04-13 16:53:53 -04:00
Jeffrey Walton
2bb36c790e
Add ARIA test vectors from RFC 5794
2017-04-13 16:00:59 -04:00
Jeffrey Walton
04908cca48
Improve x86 and x64 ARIA performance
...
The changes were meant to improve Windows, but GCC benefited more. Windows gained 0.3 cpb, while GCC gained 1.2 cpb
2017-04-13 06:52:56 -04:00
Jeffrey Walton
35f95fb739
Fix unaligned pointer crash on Win32 due to _mm_load_si128
...
The SSSE3 intrinsics were performing aligned loads using _mm_load_si128 using user supplied pointers. The pointers are only a byte pointer, so its alignment can drop to 1 or 2. Switching to _mm_loadu_si128 will sidestep potential problems. The crash surfaced under Win32 testing.
Switch to memcpy's when performing bulk assignment x[0]=y[0] ... x[3]=y[3]. I believe Yun used the pattern to promote vectorization. Some compilers appear to be braindead and issue integer move's one word at a time. Non-braindead compiler will still take the optimization when advantageous, and slower compilers will benefit from the bulk move. We also cherry picked vectorization opportunities, like in ARIA_GSRK_NEON.
Remove keyBits variable. We now use UncheckedSetKey's keylen throughout.
Also fix a typo in CRYPTOPP_BOOL_SSSE3_INTRINSICS_AVAILABLE. __SSSE3__ was listed twice.
2017-04-13 04:28:02 -04:00
Jeffrey Walton
59767be52e
Add Intel and ARM intrinsics
...
Win32 and Win64 benefited from the Intel intrinsics. A32 and Aarch64 benefited from the ARM intrinsics. The intrinsics shaved 150 to 350 cycles from key setup.
The intrinsics slowed modern GCC down a small bit, and did not appear to affect old GCC. As such, Intel intrinsics were only enabled for Microsoft compilers.
We were not able to improve encryption and decryption. In fact, some of the attempted macro conversions and intrinsics attempts slowed things down considerably. For example, GCC 5.4 on x86_64 went from 120 MB/s to about 70 MB/s when we tried to improve code around the Key XOR Layer (ARIA_KXL).
2017-04-12 23:28:41 -04:00
Jeffrey Walton
f44e705c16
Add NEON intrinsics for ARIA_GSRK_NEON
...
Update documentation
2017-04-12 12:15:32 -04:00
Jeffrey Walton
af561758df
Rework ARIA_GSRK to have MSVC generate "rotate imm" rather than "rot reg"
...
The immediate version of rotate can be 4 to 6 times faster than the register version
2017-04-11 20:47:54 -04:00
Jeffrey Walton
d6b295203b
Additional library integration for ARIA
2017-04-11 16:19:36 -04:00
Jeffrey Walton
0d742591e0
Switch to code based on 32-bit implementation
...
The 32-bit code is based on Aaram Yun's code. Yun's code combined with a few library specific tweaks improves performance to roughly Camellia.
2017-04-11 11:39:45 -04:00
Jeffrey Walton
7990da2c02
Reformat aria.txt test vectors
2017-04-11 06:53:44 -04:00
Jeffrey Walton
8ca0f47939
Add ARIA block cipher
...
This is the reference implementation, test data and test vectors from the ARIA.zip package on the KISA website. The website is located at http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002 .
We have optimized routines that improve Key Setup and Bulk Encryption performance, but they are not being checked-in at the moment. The ARIA team is updating its implementation for contemporary hardware and we would like to use it as a starting point before we wander too far away from the KISA implementation.
2017-04-10 10:52:40 -04:00
Jeffrey Walton
8c7408bcd5
Fix typo
2017-04-03 20:27:49 -04:00
anonimal
a9f2518a2c
Build: apply patch for GNU assembler errors to CMake
...
References weidai11/cryptopp#395
2017-03-29 07:01:04 +00:00
Jeffrey Walton
c21023e2dc
Removed 'aligned' makefile target. It was made default in 5.6.5
2017-03-28 23:49:58 -04:00
Jeffrey Walton
c305e88127
Fix runtime crash when CRYPTOPP_INIT_PRIORITY=0
...
Couple use of initialization priorities to no NO_OS_DEPENDENCE
Add comments explaining what integer does, how it does it, and why we want to inprove on the Singleton pattern as a resource manager.
Update documentation.
2017-03-27 06:06:12 -04:00
Jeffrey Walton
0e55f5ac7d
Remove g_pAssignIntToInteger pointer, add CRYPTOPP_NO_ASSIGN_TO_INTEGER (Issue 389)
...
This effectively decouples Integer and Public Key from the rest of the library. The change means a compile time define is used rather than a runtime pointer. It avoids the race with Issue 389.
The Public Key algorithms will fail if you use them. For example, running the self tests with CRYPTOPP_NO_ASSIGN_TO_INTEGER in effect results in "CryptoPP::Exception caught: NameValuePairs: type mismatch for 'EquivalentTo', stored 'i', trying to retrieve 'N8CryptoPP7IntegerE'". The exception is expected, and the same happend when g_pAssignIntToInteger was present.
2017-03-25 16:38:42 -04:00
Jeffrey Walton
6c50a99254
Fix GNUmakefile to keep *.s files
...
The distclean recipe deleted ASM files (*.s) rather than preprocessed ASM files (*.S). Leave them both now.
2017-03-25 01:42:23 -04:00
Jeffrey Walton
661ddad1f2
Fix Solaris compile due to StreamState
...
"validate.h", line 155: Error: Overloading ambiguity between "std::ios::basic_ios(std::streambuf *)" and "std::ios::basic_ios(int)".
2017-03-24 23:24:46 -04:00
Jeffrey Walton
effe103641
Merge pull request #392 from janblome/issue391
...
Remove unnecessary static from reference to singleton
2017-03-23 16:45:18 -04:00
Jeffrey Walton
6381faf277
Rename rdrand.S to rdrand.s
2017-03-23 16:05:30 -04:00
Jeffrey Walton
30263ee497
Rename rdrand.S to rdrand.s
...
The file is not preprocessed
2017-03-23 15:39:43 -04:00
Jeffrey Walton
d865cf9e62
Fix OpenBSD 6.0 compile with GCC 4.9 (Issue 395)
...
This check-in also enables the 64-bit RDRAND routines for X32. The changes were with held until they could be tested. The testing occurred with Issue 395
2017-03-22 17:26:25 -04:00
Jeffrey Walton
2ea91ba1b9
Fix ARM compile under VS2013
2017-03-20 15:11:27 -04:00
Jeffrey Walton
f502ee9218
Simplify C++ dynamic object initialization
...
Wrap DetectArmFeatures and DetectX86Features in InitializeCpu class
Use init_priority for InitializeCpu
Remove HAVE_GCC_CONSTRUCTOR1 and HAVE_GCC_CONSTRUCTOR0
Use init_seg(<name>) on Windows and explicitly insert at XCU segment
Simplify logic for HAVE_GAS
Remove special recipies for MACPORTS_GCC_COMPILER
Move C++ static initializers into anonymous namespace when possible
Add default NullNameValuePairs ctor for Clang
2017-03-20 08:51:10 -04:00
Jeffrey Walton
0c6510b0a5
Guard string assignment
...
Visual Studio 2005 fired an assert on the negative self tests because the SecByteBlock was 0-sized and returned a null pointer.
2017-03-19 22:13:12 -04:00
Jeffrey Walton
e7fa88083c
Add DRBG, Poly1305 and SipHash to VS2005 project files
2017-03-19 21:49:43 -04:00
Jeffrey Walton
b0a151a8c0
Fix VS2015/MSVC 19.00 compiler crash
2017-03-19 10:10:56 -04:00
Jeffrey Walton
a3d0da2e0e
Fix VS2008/MSVC 14.00 compiler crash
2017-03-19 06:57:51 -04:00
Jeffrey Walton
7fb6b3df74
Fix compile under Visual Studio 2005/MSC 14.00
...
Previous testing occurred with Visual Studio 2005 SP 1, and it lacks some of the Safe C++/security enhanced functions.
2017-03-18 16:56:14 -04:00
Jeffrey Walton
71afcadadb
Clear Coverity STREAM_FORMAT_STATE (CID 177736, 177737, 177732)
...
Yet another attempt to clear the stream state finding.
2017-03-18 09:48:54 -04:00
Jeffrey Walton
6c6391bfda
Clear Coverity CHECKED_RETURN (CID 177729)
...
This was by design, but we cleared it because we want a dark and silent cockpit.
2017-03-18 08:52:32 -04:00
Jeffrey Walton
13bcfbe249
Add width field to StreamState
2017-03-18 08:18:05 -04:00
Jeffrey Walton
ad47231dc0
Switch to std::ostream::char_type for StreamState
2017-03-18 08:11:44 -04:00
Jeffrey Walton
342b4505fb
Clear Coverity IDENTICAL_BRANCHES (CID 177731)
...
This was by design, but we cleared it because we want a dark and silent cockpit.
2017-03-18 07:18:30 -04:00
Jeffrey Walton
bc6d48df59
Cleared C4456 "declaration hides previous local declaration" for MSVC
2017-03-18 07:06:59 -04:00
Jeffrey Walton
1bfb6be934
Clear Coverity STREAM_FORMAT_STATE (CID 177735)
...
This was a valid finding in the Test suite. The stream state findings are annoying.
2017-03-18 05:08:04 -04:00
Jeffrey Walton
e6817b73e5
Cleared -Wunused-but-set-variable for GCC when using word128
2017-03-18 04:51:43 -04:00
Jeffrey Walton
8ad6782bec
Clear Coverity UNINIT_CTOR (CID 177743, 177744)
...
This was a valid finding, but the only way to get into the codepath was leaving the drbg unkeyed.
2017-03-17 21:53:38 -04:00
Jeffrey Walton
08f9b3ff9e
Clear Coverity UNINIT_CTOR (CID 177741)
...
This was a valid finding, but the only way to get into the codepath leaving the hash unkeyed.
2017-03-17 21:48:52 -04:00
Jeffrey Walton
690baaae97
Clear Coverity UNINIT_CTOR (CID 177739)
...
This was a valid finding, but the only way to get into the codepath leaving the hash unkeyed.
2017-03-17 21:45:35 -04:00
Jeffrey Walton
80bbc834fe
Clear Coverity UNINIT (CID 171239)
...
It was a false positive, but dark and silent cockpits trump the uneeded initialization. The optimizer can remove it.
2017-03-17 21:29:15 -04:00
Jeffrey Walton
301437e693
Updated static initializers
...
When MSVC init_seg or GCC init_priority is available, we don't need to use the Singleton. We only need to create a file scope class variable and place it in the segment for MSVC or provide the attribute for GCC.
An additional upside is we cleared all the memory leaks that used to be reported by MSVC for debug builds.
2017-03-17 20:47:32 -04:00
Jeffrey Walton
bed31de2f6
Whitespace check-in
2017-03-17 18:31:40 -04:00
Jeffrey Walton
c90a63196a
Add StringWiden function
...
StringWiden converts a narrow C-style string to a wide string. It serves the opposite role of StringNarrow function. The function is useful on Windows platforms where the OS favors wide functions with the UTF-16 character set. For example, the Data Proction API (DPAPI) allows a description, but its a wide character C-string. There is no narrwo version of the API.
2017-03-17 04:57:38 -04:00
Jeffrey Walton
e55560e1a2
Update Coverity modeling file
2017-03-15 15:46:23 -04:00
Jeffrey Walton
01cea29692
Remove MSVC C4297 warning suppression (Issue 19)
2017-03-15 08:08:43 -04:00
jan-dominik.blome
fcdf293356
Remove unnecessary static from reference to singleton
2017-03-15 12:29:36 +01:00
Jeffrey Walton
46c9cc725c
Use C++03 Singleton on select Microsoft platforms (Issues 372, 373, 389, 391)
...
We are back to the "... one object may end up being memory leaked" if faced with concurrent initialization
2017-03-15 06:20:45 -04:00
Jeffrey Walton
354502d59d
Change HAS_NASM to USE_NASM. The makefile does not etect it automatically
2017-03-14 18:38:37 -04:00
Jeffrey Walton
d8570a3435
Avoid inlining LibraryVersion (Issue 371)
2017-03-14 10:26:51 -04:00
Jeffrey Walton
f9773d2961
Updated RDRAND and RDSEED under NASM
...
Port rdrand.S to Solaris
Port rdrand.S to X32
The X32 port is responsible for the loop unwinding. The unwind generates a 32-byte block (X64 and X32) or 16-byte block (X86). On X32, it increases throughut by 100% (doubles it). On X86 and X64, throughput increases by about 6%. Anything over 4 machine words slows things down.
2017-03-14 06:07:37 -04:00
Jeffrey Walton
4bcaabbe26
Updated RDRAND and RDSEED under NASM
...
Port rdrand.S to Cygwin and OS X
Add DISABLE_NATIVE_ARCH to CmakefileList and GNUmakefile. It supresses the addition of -march=native. DISABLE_NATIVE_ARCH replaces DISABLE_CXXFLAGS_OPTIMIZATIONS in CmakefileList (the latter is now deprecated).
2017-03-13 15:57:47 -04:00
Jeffrey Walton
2b4ec92dbe
Remove style from TABLE tag for benchmarks
2017-03-12 09:30:16 -04:00
Jeffrey Walton
c2efbae80a
Add AES/OFB RNG benchmark
2017-03-11 15:56:55 -05:00
Jeffrey Walton
76377f8219
Whitespace checkin
2017-03-11 15:55:44 -05:00
Jeffrey Walton
ef7a6a2f4e
Speedup Hash_DRBG and HMAC_DRBG
...
Add benchmarks for SHA1 and SHA256 variants
Hash_DRBG sped-up by about 2 MiB/s by using word128 and word64 in the initial update loop. It did not benefit other loops
HMAC_DRBG sped-up by about 5 MiB/s by reworking variables, access and loop control
2017-03-11 08:10:32 -05:00
Jeffrey Walton
006ca5f860
Updated documentation
2017-03-11 01:42:06 -05:00
Jeffrey Walton
75a379593d
Updated documentation
2017-03-10 03:14:43 -05:00
Jeffrey Walton
a0bb490056
Define _XOPEN_SOURCE for Cygwin/Newlib (Issue 315)
2017-03-10 01:53:51 -05:00
Jeffrey Walton
86a45fd1ca
Suppress unneeded output in Makefiles
2017-03-09 04:01:36 -05:00
Jeffrey Walton
804feccfd9
Add TimeToString function (Issue 386)
...
This was supposed to be checked-in with ce38a411fc
2017-03-08 17:15:16 -05:00
Jeffrey Walton
ce38a411fc
Add Random Number Generator benchmarks (Issue 386)
...
Move HTML header and footer into benchmark functions
Switch to <cmath> and standard math routines
Switch to <ctime> and standard clock and time routines
Move static variable^Cinto anonymous namespace
Add TimeToString function for printing start and end times
2017-03-08 16:59:24 -05:00
Jeffrey Walton
2416c0eaf5
Switch to <cmath> and standard math routines
2017-03-08 15:55:53 -05:00
Jeffrey Walton
a72fdedfa7
Remove unneeded alloca header
2017-03-08 15:47:59 -05:00
Jeffrey Walton
448282331b
Remove HTML echo's from 'make benchmark' recipe
2017-03-08 15:45:38 -05:00
Jeffrey Walton
3f528fef1f
Add guard for RDSEED64 on 32-bit platforms (Issue 387)
...
Cleanup comments in rdrand.cpp and rdrand.asm
2017-03-08 14:09:58 -05:00
Jeffrey Walton
5b98a255f7
Add pch.obj to clean recipe
2017-03-08 12:25:21 -05:00
denisbider
111db9cf9d
WSAStringToAddress => WSAStringToAddressA
...
Issue #385
2017-03-07 20:51:00 -06:00
Jeffrey Walton
d3bcbc71da
Cutover to fastcall for MASM and X86 (Issue 387)
...
Fix "target specific option mismatch" under GCC 4.6
2017-03-07 12:57:47 -05:00
Jeffrey Walton
19df272d90
Fix output buffer cast in rdrand.cpp (Issue 388)
...
Update comments in rdrand.h
Fix compile on CentOS 5 with GCC 4.1
2017-03-07 10:01:26 -05:00
Jeffrey Walton
78823bfd0c
Add StaticAlgorithmName to select RNGs for object registry (Issue 386)
2017-03-07 04:52:37 -05:00
Jeffrey Walton
585b23d7b1
Removed test define from rdrand.cpp
...
The library should use the intrinsics if they are available. This change should have been included with Commit 14d92f9eba .
2017-03-07 04:39:08 -05:00
Jeffrey Walton
14d92f9eba
Improve performance of RDRAND and RDSEED (Issue 387)
2017-03-07 03:57:23 -05:00
Jeffrey Walton
1e5d6ee8d4
Add ASM and S files to trim recipe
2017-03-07 02:48:58 -05:00
Jeffrey Walton
7f0c0fb0c0
Add ValidateBaseCode to DEBUG tests by default
2017-03-02 00:24:52 -05:00
Jeffrey Walton
ab1477c7a5
Add GCC 7 warning checks (Issue 383)
2017-03-01 23:40:47 -05:00
Jeffrey Walton
b791234b53
Remove VC++ 6.0 guard and code (Issue 342)
2017-03-01 09:11:41 -05:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383)
2017-03-01 06:10:06 -05:00
Jeffrey Walton
5fb2f5d45b
Remove NULL_CHANNEL and CW8 workaround (Issue 382)
2017-03-01 03:54:02 -05:00
Jeffrey Walton
0dc97f1d3a
Unroll decoder initialization (Issue 376)
2017-03-01 02:19:12 -05:00
Jeffrey Walton
62f92dd592
Change next version from 5.7 to 6.0
...
Crypto++ 5.7 was the increment after the 5.6.5 release. Crypto++ 6.0 accurately reflects compatibility
2017-02-21 12:59:20 -05:00
Jeffrey Walton
8c20630c2d
Remove extra preamble for copyright.
...
Similar text may be added in the future
2017-02-21 02:54:09 -05:00
Jeffrey Walton
73836e58a5
Add Test namespace within CryptoPP namespace (Issue 379)
2017-02-21 02:03:29 -05:00
Jeffrey Walton
11f0186fd0
Add DragonFly support to cryptest.sh
2017-02-19 22:30:02 -05:00
Jeffrey Walton
752a74404d
Merge pull request #378 from anonimal/master
...
config.h: add DragonFly BSD support
2017-02-19 03:16:46 -05:00
anonimal
8558bc519c
config.h: add DragonFly BSD support
2017-02-19 07:04:38 +00:00
Jeffrey Walton
c22f3228fb
Use NO_OS_DEPENDENCE in osrng class files (Issue 377)
...
Thanks to Mattias Linnap for raising the issue
2017-02-18 17:38:40 -05:00
Jeffrey Walton
26e2e12b6a
Fix typo
2017-02-16 20:57:31 -05:00
Jeffrey Walton
5bbdcaf243
Fix compile under MFC project
2017-02-16 20:55:02 -05:00
Jeffrey Walton
9d7c5fce55
Remove old VerifierFilter, switch to SignatureVerificationFilter
...
VerifierFilter was a typedef for SignatureVerificationFilter. The name changed at Crypto++ 5.0
Updated documentation
2017-02-07 18:51:44 -05:00
Jeffrey Walton
48b0d8ade5
Updated documentation
2017-02-07 17:13:27 -05:00
Jeffrey Walton
6511868bc8
Guard use of LibraryVersion() under MSVC (Issue 371)
2017-02-07 15:03:13 -05:00
Jeffrey Walton
a25fa00a3f
Updated documentation
2017-02-07 13:23:36 -05:00
Jeffrey Walton
2868452193
Add NIST SP800-90A HMAC_DRBG generator
...
Move bodies out-of-line
Whitespace
2017-02-07 08:51:58 -05:00
Jeffrey Walton
8e088b4865
Add W3C_PADDING to encryption path
2017-02-06 08:09:09 -05:00
Jeffrey Walton
061f272da3
Merge pull request #368 from edrlab/aes256cbc-w3c-padding-scheme
...
Support for AES-256-CBC with W3C padding scheme ( http://www.w3.org/2001/04/xmlenc#aes256-cbc )
2017-02-06 03:53:25 -05:00
Jeffrey Walton
b8adc91ce8
Add asserts to validation routines
2017-01-29 04:58:56 -05:00
Jeffrey Walton
7c7e8aa804
Fix headers and data types for cpu.cpp (Issue 362)
...
This is trickier than expected due to sporadic support for PMULL and PMULL2 among compilers
2017-01-29 03:08:19 -05:00
Jeffrey Walton
6d86e546f9
Backed off ASSERT. PKCS12_PBKDF and other classes use truncated buffers
2017-01-29 00:19:28 -05:00
Jeffrey Walton
de688a66d9
Validate Integer::Decode inputLen (Issue 346)
2017-01-28 23:17:33 -05:00
Jeffrey Walton
a49cb0861b
Add SecBlock member to track number of elements to zeroize (Issue 346)
...
By default the member, named m_mark, is set to the maximum number of elements. If SetMark() is called, then m_mark is adjusted. Upon deallocation and zeroization, STDMIN(m_size, m_mark) elements are zeroized.
We wanted to use a high water mark, but we could not track the writes to the allocation. operator[] would have been OK, but ::memcpy would have been problematic
2017-01-28 13:23:50 -05:00
Jeffrey Walton
42af35fd2b
Change to more intuitive names LibraryVersion and HeaderVersion (Issue 371)
2017-01-28 07:09:27 -05:00
Jeffrey Walton
6f7339c81b
Add BuildVersion and RuntimeVersion functions (Issue 371)
...
These function are intended to catch mining and matching of library versions. BuildVersion provides CRYPTOPP_VERSION when the shared object was built. RuntimeVersion provides CRYPTOPP_VERSION the app compiled against, which could be different than the shared object's version
2017-01-28 05:43:24 -05:00
Jeffrey Walton
e757fad5ba
Add MOVBE test. Add guard for use of C++11
2017-01-27 13:48:01 -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
aaf43e3f1d
Updated variable names
2017-01-27 06:31:55 -05:00
Jeffrey Walton
79f3ab89f1
Removed remaining CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY (Issue 369)
2017-01-27 06:02:58 -05:00
danielweck
46a9323d19
patched CryptoPP Crypto++ to add support for AES-256-CBC with W3C padding scheme (based on https://github.com/readium/readium-lcp-client/pull/26 )
2017-01-24 16:43:10 +00:00
Jeffrey Walton
d4c247a1fd
Add MOVBE support
...
MOVBE is a modest gain over BSWAP. Though its guarded by CRYPTOPP_MOVBE_AVAILABLE, we cannot detect availability with a preprocessor macro. That is, GCC does not provide __MOVBE__ or similar. It has to be enabled manually
2017-01-24 04:26:00 -05:00
Jeffrey Walton
3dbf6e785c
Removed debug instrumentation
2017-01-23 21:33:23 -05:00
Jeffrey Walton
81669590d5
Update documentation
...
Added additional asserts
2017-01-23 19:25:06 -05:00
Jeffrey Walton
a6105c5417
Clear MSVC warning "warning C4189: 'params': local variable is initialized but not referenced"
2017-01-23 04:35:30 -05:00
Jeffrey Walton
23fbba488d
Add BLAKE2B_ and BLAKE2S_ prefix to macros, remive \#undef's
2017-01-22 22:44:35 -05:00
Jeffrey Walton
12978bc6ea
Use ASCII character for comment
2017-01-22 20:53:50 -05:00
Jeffrey Walton
14f5305c92
VEXT_8 -> VEXT_U8
2017-01-22 20:53:19 -05:00
Jeffrey Walton
6e1a021511
Comments and whitespace (Issue 367)
2017-01-22 13:34:50 -05:00
Jeffrey Walton
9dd2744419
Disable NEON for Cortex-A53 and A57 processors (Issue 367)
2017-01-22 13:18:35 -05:00
Jeffrey Walton
0f83589852
Comments and whitespace checkin
2017-01-20 21:33:27 -05:00
Jeffrey Walton
f2132a81c1
Comments and whitespace checkin
2017-01-20 19:41:20 -05:00
Jeffrey Walton
74328f93a8
Fix "error: impossible constraint in asm" under Aarch64 (Issue 366)
2017-01-20 18:48:11 -05:00
Jeffrey Walton
08c0e26020
Add CRYPTOPP_ASSERT to Validate routines
...
Since we switched to CRYPTOPP_ASSERT we don't have to worry about an accidental assert in production. We can now assert ValidateElement and ValidateGroup and let the code warn of potential problems during development.
This came about because ECGDSA inadvertently used GetGroupOrder() rather than GetSubgroupOrder(). The assert alerted to the problem area without the need for debugging
2017-01-20 06:10:14 -05:00
Jeffrey Walton
5522e93133
Use AES/GCM for PMULL benchmarking
2017-01-19 13:44:03 -05:00
Jeffrey Walton
4f725eddc1
Call vrev64q_u8 after vld1q_u8
2017-01-19 07:37:54 -05:00
Jeffrey Walton
bbf13b77e7
Switch to vext and remove unnecessary casts
2017-01-19 06:22:38 -05:00
Jeffrey Walton
b129818c35
Add GCC inline ASM for PMULL and PMULL2
...
The macros that invoke GCC inline ASM have better code generation and speedup GCM ops by about 70 MiB/s on an Opteron 1100. The intrinsics are still available for Windows platforms and Visual Studio 2017 and above
2017-01-19 02:38:00 -05:00
Jeffrey Walton
ecc818f341
Pickup "$(PLATFORM)" == "amd64" for VS2017
2017-01-18 03:52:21 -05:00
Jeffrey Walton
3e82a3102a
Pickup "$(PLATFORM)" == "arm" for VS2017
2017-01-18 03:41:59 -05:00
Jeffrey Walton
d9df0961e0
Fix SHA512_SSE2_Transform after whitespace checkin (Issue 365)
2017-01-17 00:49:10 -05:00
Jeffrey Walton
4f2bb7664f
Avoid C-style casts for NEON vectors
...
Switch to ARM vector casts like vreinterpretq_u8_u64
2017-01-16 17:12:44 -05:00
Jeffrey Walton
8eb1b6cb6b
Update CRYPTOPP_BOOL_ARM_PMULL_INTRINSICS_AVAILABLE availability (Issue 362)
...
PMULL and PMULL2 are available on Aarch64 only, and not Aarch32 or A-32
2017-01-16 05:35:53 -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
1d391c190d
Make NumericLimitsMin and NumericLimitsMax available to MSVC (Issue 364)
2017-01-15 19:36:36 -05:00
Jeffrey Walton
b274f06202
Fix RoundUpToMultipleOf for Apple Clang 6.0 (Issue 364)
...
Also see Issue 360 and http://stackoverflow.com/q/41666815
2017-01-15 19:14:42 -05:00
Jeffrey Walton
c80502102a
Breakout __ARM_FEATURE_CRYPTO into PMULL, AES and SHA for Apple Clang (Issue 362)
...
It appears Apple Clang disgorges carryless multiply (PMULL) from Crypto (AES and SHA). The breakout added CRYPTOPP_BOOL_ARM_PMULL_INTRINSICS_AVAILABLE for PMULL, and retained CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE for AES and SHA only
2017-01-15 00:22:14 -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
732601e8b6
Microsoft still does not suport ARMv8 and the ARM intrinscs
...
Remove the define for now. Maybe Microsoft will support it in 2019 or 2020
2017-01-13 23:57:11 -05:00
Jeffrey Walton
58554cae36
Merge pull request #363 from MarcelRaad/patch-1
...
Suppress warning also for VS2017
2017-01-13 08:39:04 -05:00
Marcel Raad
f1d2d15604
Suppress warning also for VS2017
...
The warning suppression for Visual Studio 2015 is also needed for Visual Studio 2017 (_MSC_VER = 1910).
2017-01-13 13:58:03 +01:00
Jeffrey Walton
3584c4025a
Begin fix of cpu.h under Apple and LLVM Clang (Issue 362)
2017-01-13 06:47:53 -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
52f13eca9b
Add armv8 and aarch64 options in addition to arm64
2017-01-13 05:39:04 -05:00
Jeffrey Walton
fc306b6474
Whitespace checkin
2017-01-13 04:23:57 -05:00
Jeffrey Walton
89facf5599
Merge pull request #357 from HeinrichJanzing/cmake_optional_objects_target
...
CMake: allow disabling the intermediate objects target (cryptopp-object).
2017-01-11 21:07:43 -05:00
Jeffrey Walton
1778432013
Add self tests for RoundUpToMultipleOf (Issue 360)
...
Thanks to Boldizsár Lipka
2017-01-10 22:09:38 -05:00
Jeffrey Walton
781e63ba7c
Fix RoundUpToMultipleOf (Issue 360)
...
Thanks to Boldizsár Lipka
2017-01-10 22:05:53 -05:00
Heinrich Janzing
3c77873b0e
CMake: allow disabling the intermediate objects target (cryptopp-object).
...
Targets with only object inputs do not work correctly with some
generators (like Xcode, see issue #355 ). Defining these directly in
terms of the source code files (rather than a reused set of object
files) allows correct builds in such cases. This can now be controlled
through a new option USE_INTERMEDIATE_OBJECTS_TARGET which defaults to
ON.
2017-01-05 09:19:19 +01:00
Jeffrey Walton
bccc6443c4
Merge pull request #356 from chfast/patch-1
...
Replace assert with void instruction
2017-01-04 22:28:59 -05:00
Paweł Bylica
903b8feaa7
Replace assert with void instruction
...
In release builds replace assert with void instruction `(void)0`. Otherwise in some places you will end up with statements like `if (...) ;` and some compiler will complain about it.
2017-01-04 18:47:04 +01:00
Jeffrey Walton
9cc01defde
Add test for CRYPTOPP_INIT_PRIORITY=0
...
Once we made config.recommend the default, we needed to start testing the disabling of init_priority
2017-01-01 17:47:33 -05:00
Jeffrey Walton
61a2b285f1
Removed deprecated declaration workarounds
...
Commit bfbcfeec7c and Issue 345 was cleared some time ago. The warning suppression is no longer needed
2017-01-01 17:20:57 -05:00
Jeffrey Walton
84a4e25d07
Fix illegal character in comments
...
It looks like Gedit's Find/Replace did not work as expected when converting left-quote and right-quote to 8-bit clean ASCII
2017-01-01 07:17:42 -05:00
Jeffrey Walton
c0c2851352
Chnage to INT_MAX for NIST DRBGs. Updated documentation
2017-01-01 06:57:27 -05:00
Jeffrey Walton
841c37e347
Add NIST_DRBG::Err class. Add additional checking per SP 800-90A. Update documentation
2017-01-01 05:53:55 -05:00
Jeffrey Walton
ef185fa013
Add documentation for NIST_DRBG base class and Hash_DRBG generator
2016-12-31 12:28:41 -05:00
Jeffrey Walton
5c932fcc3b
Add NIST SP800-90A Hash_DRBG generator
2016-12-30 21:46:03 -05:00
Jeffrey Walton
1fe0cc869b
Cleared conversion warning under MSVC
2016-12-30 15:58:01 -05:00
Jeffrey Walton
0774818052
Merge pull request #351 from ka7/spelling_fixes
...
Spelling fixes in comments
2016-12-28 07:38:13 -05:00
klemens
5a5c633073
spelling fixes
2016-12-27 18:34:57 +01:00
Jeffrey Walton
06f79d904d
Remove vectorization test. This one test needs to be in its own script
2016-12-24 07:25:12 -05:00
Jeffrey Walton
7031fc7f6f
Add test cases for ASN.1 parsing (Issue 346)
2016-12-24 04:56:34 -05:00
Jeffrey Walton
b19332a69f
Add additional validations based on X.690 rules
...
The library was a tad bit fast and loose with respect to parsing some of the ASN.1 presented to it. It was kind of like we used Alternate Encoding Rules (AER), which was more relaxed than BER, CER or DER. This commit closes most of the gaps.
The changes are distantly related to Issue 346. Issue 346 caught a CVE bcause of the transient DoS. These fixes did not surface with negative effcts. Rather, the library was a bit too accomodating to the point it was not conforming
2016-12-24 04:55:21 -05:00
Jeffrey Walton
3475a235bf
Cleared 'warning: field 'm_attachment' will be initialized after field'
2016-12-22 23:45:33 -05:00
Jeffrey Walton
d0a6d43e16
Merge pull request #347 from tresorit/fix-asn1-decoder-dos
...
Fix possible DoS in ASN.1 decoders (CVE-2016-9939)
2016-12-22 21:25:12 -05:00
Jeffrey Walton
182f87eeac
Add info on creating versioned shared object
...
Also see http://stackoverflow.com/q/41255199
2016-12-22 05:24:16 -05:00
Jeffrey Walton
d40b0cdda0
Fix 'grep: repetition-operator operand invalid'
2016-12-22 04:49:24 -05:00
Jeffrey Walton
ba585dee4d
Removed 'set -eu'. Its difficult to debug the script when source'ing
2016-12-22 04:39:45 -05:00
denisbider
f3474ba157
Updated default Socket::Listen backlog parameter
...
Default backlog value was 5, which appears to stem back to the maximum supported by Windows Sockets 1. This was bound to cause problems for applications receiving many connections at the same time. Changed to SOMAXCONN, which is the standard way on Windows and POSIX to use a maximum reasonable backlog value.
2016-12-19 11:17:35 -06:00
Jeffrey Walton
fa99ece0c5
Add call to ThrowIfInvalidTruncatedSize in SipHash Final
2016-12-18 23:01:33 -05:00
Jeffrey Walton
ba00b9e46b
Add debug/release options to cryptest.nmake. Update to make PHONE_APP default for ARM builds
2016-12-18 03:42:34 -05:00
Jeffrey Walton
86b89cd18b
Removed remaining dummy parameters for VC6.0 workarounds (Issue 342)
2016-12-17 22:44:22 -05:00
Jeffrey Walton
7c73f25f12
Updated documentation
2016-12-17 10:46:59 -05:00
Jeffrey Walton
cc6702a434
Remove use of temporary t[] for digest calculation. Remove unneeded header. Whitespace
2016-12-17 10:14:37 -05:00
Jeffrey Walton
716cd1fed9
Fix HAVE_CXX14/HAVE_CXX17 typo
...
This looks like a copy/paste error that has mostly gone unnoticed because many compilers lack support for C++17
2016-12-17 07:56:37 -05:00
Jeffrey Walton
9739ba8afe
Add Aumasson and Bernstein's SipHash (Issue 348)
2016-12-17 03:58:36 -05:00
Jeffrey Walton
05153d9740
Add test for vectorization opportunities
2016-12-14 15:24:29 -05:00
Gergely Nagy
3d9181d7bd
Fix possible DoS in ASN.1 decoders (CVE-2016-9939)
2016-12-14 13:19:01 +01:00
Jeffrey Walton
20c5824807
Cleared "Warning: extra ";" ignored" under SunCC
2016-12-14 00:01:53 -05:00
Jeffrey Walton
e8dda804de
Switch ECGDSA equation to slightly speed-up signing
2016-12-13 20:31:28 -05:00
Jeffrey Walton
2f1187c799
Fix copy/paste typo in ECGDSA benchmarks
2016-12-13 19:20:38 -05:00
Jeffrey Walton
379e76d27d
Add ECGDSA benchmarks using secp256k1 and sect233r1
...
Also add missing validation functions to test.cpp. The test and functions were present, but only accessible with 'cryptest.ex v', where all the tests were run
2016-12-13 19:16:21 -05:00
Jeffrey Walton
cecf719fcd
Add German digital signature algorithm (ECGDSA) (Issue 113)
...
Also see ISO/IEC 15946 and http://www.teletrust.de/fileadmin/files/oid/ecgdsa_final.pdf
2016-12-13 16:20:41 -05:00
Jeffrey Walton
1a17ade299
Fixed version numbers
...
Version numbers are rolled back to update the docs. The rolled back versions got committed with the updated docs
2016-12-11 07:06:38 -05:00
Jeffrey Walton
99ae937d8b
Updated documentation (Issue 121)
2016-12-11 06:56:52 -05:00
Jeffrey Walton
7ece03d762
Updated documentation (Issue 345)
2016-12-11 06:44:18 -05:00
Jeffrey Walton
bfbcfeec7c
Update DefaultEncryptor, DefaultEncryptorWithMAC and friends (Issue 345)
2016-12-11 05:09:42 -05:00
Jeffrey Walton
c6b529ffd5
Removed unused ecdsa_rfc6979.txt references (Issue 121)
2016-12-11 01:32:58 -05:00
Jeffrey Walton
7e42780517
Add Deterministic DSA and ECDSA Signatures (Issue 121)
...
Based on Douglas Roark PR 131
2016-12-11 01:02:00 -05:00
Jeffrey Walton
26db40567d
Add Integer Bitops tests (Issue 344)
2016-12-06 20:56:57 -05:00
Jeffrey Walton
f197549662
Remove temporary array for SHA1. Whitespace and comments
2016-12-06 11:09:31 -05:00
Jeffrey Walton
bfc4bf9697
Updated documentation
2016-12-04 16:48:27 -05:00
Jeffrey Walton
d01467b754
Use 'static const int' for constants in Doxygen documentation (Issue 343)
2016-12-04 16:07:10 -05:00
Jeffrey Walton
acf15c21c0
Update comments
2016-12-04 13:04:12 -05:00
Jeffrey Walton
b4b1b530c1
Updated documentation (Issue 328)
2016-12-04 02:22:52 -05:00
Jeffrey Walton
dc572604e0
Updated documentation (Issue 328)
2016-12-04 01:05:59 -05:00
Jeffrey Walton
e6f6db5fdf
Updated documentation (Issue 328)
2016-12-04 00:36:03 -05:00
Jeffrey Walton
56a91ca197
Remove last of macros targtting _MSC_VER 1200 (Issue 342)
2016-12-03 21:31:22 -05:00
Jeffrey Walton
a274a64058
Fix compile under Visual Studio .Net (Issue 342)
2016-12-03 18:44:48 -05:00
Jeffrey Walton
5ec9763485
Updated documentation
2016-12-03 18:17:10 -05:00
Jeffrey Walton
1b16a75352
Updated documentation (Issue 328)
2016-12-03 17:07:43 -05:00
Jeffrey Walton
7cc8ad1a1d
Updated documentation (Issue 328)
2016-12-03 14:46:52 -05:00
Jeffrey Walton
d45763a7ae
Removed CRYPTOPP_DISABLE_X86ASM macro (Issue 70)
2016-12-03 05:16:23 -05:00
Jeffrey Walton
ba75834ae9
Removed VC++ 5.0 and 6.0 workarounds (Issue 342)
2016-12-03 05:05:56 -05:00
Jeffrey Walton
bded4d385f
Commented typedef guarded by CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
...
The typedefs were only commented so folks could search for a missing symbol, like Crypto++ 4.0 PK_FixedLengthEncryptor or PK_FixedLengthDecryptor
This is a distinct change from CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
2016-12-03 00:58:54 -05:00
Jeffrey Walton
f06c968b62
Fix member function already defined under Win32 (Issue 70)
2016-12-03 00:44:44 -05:00
Jeffrey Walton
40230dd3bf
Removed MAINTAIN_BACKWARDS_COMPATIBILITY_562 (Issue 70)
2016-12-03 00:32:07 -05:00
Jeffrey Walton
6eb2792bc2
Silence select conversion warnings (Issue 340)
2016-12-02 14:47:31 -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
406bec8fc7
Backed-off assert for poly1305.cpp in Debug builds
2016-12-01 21:52:01 -05:00
Jeffrey Walton
d91244a657
Sync'd cryptest.sh. Cleared shadow variable warning in poly1305.cpp
2016-12-01 21:11:48 -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
82009ecf41
Increment version to 5.7 due to ABI break *Issue 337)
...
We still need to supply a patch for those maintaining 5.6.x
2016-12-01 18:10:56 -05:00
Jeffrey Walton
1491b48691
Add Intel SHA extension specialized tests
2016-12-01 16:51:39 -05:00
Jeffrey Walton
cce56d3f79
Add Intel SHA1 extension support (Issue 139)
2016-12-01 15:05:41 -05:00
Jeffrey Walton
315b4b0b3e
Add Intel SHA256 code generation tests (Issue 139)
2016-12-01 15:04:50 -05:00
Jeffrey Walton
764ae95e45
Add full NIST SHA test vector suite for use with 'cryptest.exe tv'
2016-12-01 12:57:15 -05:00
Jeffrey Walton
70d7297559
Merge pull request #339 from ralphtandetzky/master
...
Fix: GCC warning "type qualifiers ignored on function return type".
2016-12-01 09:56:39 -05:00
Ralph Tandetzky
35a2ef10a2
Fix: GCC warning "type qualifiers ignored on function return type".
...
This pedantic message appeared all over the code. Also removed one warning about an unused variable in release build.
2016-12-01 15:37:04 +01:00
Jeffrey Walton
7ab9b00f90
Add Intel SHA1 extension support
2016-12-01 00:49:59 -05:00
Jeffrey Walton
6970ef702d
Add Intel SHA1 code generation tests
2016-11-30 21:13:45 -05:00
Jeffrey Walton
8af3937728
Updated documentation
2016-11-28 10:37:28 -05:00
Jeffrey Walton
4ee9fe3acc
Renamed ProcessBlocks → HashBlocks. Updated comments and documentation
2016-11-28 09:51:54 -05:00
Jeffrey Walton
6c9deef853
Updated documentation. Whitespace
2016-11-27 20:09:55 -05:00
Jeffrey Walton
7b36f81dc5
Updated documentation. Whitespace
2016-11-27 18:54:09 -05:00
Jeffrey Walton
484da03c7b
Add Poly1305 class to project files (Issue 338)
2016-11-27 16:56:57 -05:00
Jeffrey Walton
390b87507d
Updated documentation
2016-11-27 16:17:06 -05:00
Jeffrey Walton
62e99837e8
Add Poly1305 class (Issue 338)
2016-11-27 15:31:50 -05:00
Jeffrey Walton
ccef9149af
Switch from WordCount() to reg.size() for bitops
...
This avoids a potential problem when OR'ing with 0 that results in a WordCount() of 1. Integer's minimum reg[] size is 2 due to RoundupSize(), and there could be implicit assumptions for the minimum that did not surface under testing
2016-11-26 00:56:02 -05:00
Jeffrey Walton
beb9df9d9e
Switch from WordCount() to reg.size() for bitops
...
This avoids a potential problem when OR'ing with 0 that results in a WordCount() of 1. Integer's minimum reg[] size is 2 due to RoundupSize(), and there could be implicit assumptions for the minimum that did not surface under testing
2016-11-26 00:51:27 -05:00
Jeffrey Walton
16ffe513a4
Add Integer bitwise AND, OR and XOR (Issue 336)
2016-11-23 21:55:30 -05:00
Jeffrey Walton
6d898321e4
Fix cryptest-symbols.sh to account for bench.cpp rename (Issue 337)
2016-11-23 15:17:46 -05:00
Jeffrey Walton
3fc97d2bff
Updated documentation
2016-11-19 04:40:07 -05:00
Jeffrey Walton
cb7dbd32ec
Updated documentation
2016-11-17 09:16:09 -05:00
Jeffrey Walton
1694193101
Make StaticGetValidKeyLength constexpr in seckey.h
2016-11-15 04:15:17 -05:00
Jeffrey Walton
2b736bc6f1
Fix "deprecated conversion from string constant to ‘char*’"
2016-11-14 19:45:08 -05:00
Jeffrey Walton
7223bbc119
Add /MACHINE option for linker
2016-11-14 05:32:58 -05:00
Jeffrey Walton
1ba8142195
Guard XOR of optional xorBlock. Updated documentation
2016-11-14 03:48:21 -05:00
Jeffrey Walton
f7df2de284
Switch to PutWord for rdrand.cpp
2016-11-14 02:21:02 -05:00
Jeffrey Walton
ea1157d8f5
Macro cleanup under Visual Studio .Net
2016-11-14 01:23:12 -05:00
Jeffrey Walton
ef47a5c148
Selectively add <sdkddkver.h> and <winapifamily.h> to cryptest.nmake
2016-11-13 16:18:41 -05:00
Jeffrey Walton
76b11b010c
Add CRYPTOPP_STATIC_CONSTEXPR macro
2016-11-13 11:50:34 -05:00
Jeffrey Walton
5be05bce07
Add CC clobber to cpuid call
...
This should not be needed, but it does not hurt. According to Ian Lance Taylor (http://gcc.gnu.org/ml/gcc-help/2014-02/msg00023.html ), the CC clobber causes GCC to forget its internal representation of flag state. It should not be needed for cpuid. However, Clang has some odd behave in a couple of versions of its compiler when using cpuid. Both JW and UB experienced it on separate occassions.
2016-11-13 11:14:03 -05:00
Jeffrey Walton
61aa62bd8f
Add CRYPTOPP_STATIC_CONSTEXPR
2016-11-12 09:34:34 -05:00
Jeffrey Walton
9993ffe200
Updated documentation
2016-11-12 09:05:39 -05:00
Jeffrey Walton
10c96e5a95
Updated documentation
2016-11-12 08:45:13 -05:00
Jeffrey Walton
2a8670c0c1
Updated documentation
2016-11-12 08:38:50 -05:00
Jeffrey Walton
8e4942bbfc
Add untracked files that git was not able to track when asked to perform a 'git mv'
2016-11-12 04:42:53 -05:00
Jeffrey Walton
7c7cb15f36
Remove unneeded include
2016-11-12 04:23:36 -05:00
Jeffrey Walton
fe9c168ca8
Re-add bds10.zip
...
It went missing after cleaning up the local fileystem, and was subsequently deleted with a 'git commit -S -am...'. An explict 'git rm' was not used, so I am not sure why it got whacked
2016-11-12 01:35:14 -05:00
Jeffrey Walton
5f17b4e6d3
Add checks for unbound variables
2016-11-10 02:41:23 -05:00
Jeffrey Walton
aa8260df2c
Use enum for Doxygen processing
2016-11-10 02:04:46 -05:00
Jeffrey Walton
a87092f123
Updated messages
2016-11-07 21:01:34 -05:00
Jeffrey Walton
4a4b9b14e4
Add additional error chcking
2016-11-07 09:56:24 -05:00
Jeffrey Walton
0d753f8014
Add additional error chcking
2016-11-07 09:28:55 -05:00
Jeffrey Walton
9866a7d148
Fix script on Solaris
2016-11-07 07:35:06 -05:00
Jeffrey Walton
795e47add6
Updated messages
2016-11-07 07:20:14 -05:00
Jeffrey Walton
b38edd49d8
Switch test params to 5.6.5 and Master
2016-11-07 06:20:24 -05:00
Jeffrey Walton
e4ddc44957
Add prompt to guard resetting local repo
2016-11-07 05:55:48 -05:00
Jeffrey Walton
4c67ae7168
Improve feedback messages
2016-11-07 05:44:18 -05:00
Jeffrey Walton
9ffd34a1c7
Sync cryptest.sh with TestScripts/cryptest.sh
2016-11-07 05:30:38 -05:00
Jeffrey Walton
c52ad8905f
Use latest makefile for building lastest library. Whitespace cleanup
2016-11-07 03:13:56 -05:00
Jeffrey Walton
385a3914d6
Add cryptest-symbols.sh to test for symbol changes in shared object across version
2016-11-07 02:52:34 -05:00
Jeffrey Walton
7e9a60da47
Add adhoc.cpp to test sources (Issue 332)
...
This should have been included in Commit 8de854cae6
2016-11-04 21:20:45 -04:00
Jeffrey Walton
7363c49a67
Add ecpoint.h header file. Add EncodedPoint interface. Add documntation
2016-11-04 11:13:07 -04:00
Jeffrey Walton
456bd2b1b7
Add architecture option delimiters so distros can easily remove it
...
The sed command to delete the lines are:
sed '/# BEGIN MARCH_CXXFLAGS/,/# END MARCH_CXXFLAGS/d' GNUmakefile
2016-11-02 18:26:17 -04:00
Jeffrey Walton
d55d3d53d1
Updated documentation
2016-11-01 21:06:52 -04:00
Jeffrey Walton
8de854cae6
Add adhoc.cpp to test sources (Issue 332)
2016-11-01 05:07:57 -04:00
Jeffrey Walton
856c7c56ad
Fix potential zeroizer removal (Issue 331)
2016-10-31 22:34:59 -04:00
Jeffrey Walton
84b602cc7d
Fix compile under Debian Hurd (i386)
...
Debian Hurd defines __MACH__, and it was picking up "#define CRYPTOPP_SECTION_INIT __attribute__((section (__DATA,__data)))" intended for Apple linkers
2016-10-28 00:33:43 -04:00
Jeffrey Walton
69de0d591b
Fix "operator '>=' has no left operand" (Issue 329)
2016-10-27 14:20:51 -04:00
Jeffrey Walton
903bbe37d3
Reduce 32-bit minimum arch from i686 to i586
2016-10-27 02:29:11 -04:00
Jeffrey Walton
733a073d65
Fix mismatched arch capabilities (Issue 283)
2016-10-27 01:01:01 -04:00
Jeffrey Walton
ac01277d93
Add X86 SHA cpu feature detection
2016-10-26 22:35:24 -04:00
Jeffrey Walton
83d0332766
Removed extraneous '#include <emmintrin.h>'
2016-10-26 21:08:06 -04:00
Jeffrey Walton
b20e498fc5
Additional use of $(strip $(CXXFLAGS)) cleanup
2016-10-26 18:26:07 -04:00
Jeffrey Walton
1e7890bed9
Additional use of $(strip $(CXXFLAGS)) cleanup
2016-10-26 18:24:32 -04:00
Jeffrey Walton
3a3c051013
Removed -DCRYPTOPP_NO_UNALIGNED_DATA_ACCESS
2016-10-26 05:32:29 -04:00
Jeffrey Walton
8cbb7a9500
$X86_OPTS → ${X86_OPTS[@]}
2016-10-26 04:24:41 -04:00
Jeffrey Walton
2cd0fc993a
Add GNUmake $strip to cleanup CXXFLAGS. Fols cryptest.sh tests
2016-10-26 03:53:28 -04:00
Jeffrey Walton
270a8d1cbb
Added SSE2/AESNI/RDRAND/RDSEED test
2016-10-26 03:10:52 -04:00
Jeffrey Walton
c77029f142
Updated documentation for Crypto++ 1.0 algorithms
2016-10-26 00:38:51 -04:00
Jeffrey Walton
374105198d
Updated 5.6.5 release date
2016-10-25 23:45:10 -04:00
Jeffrey Walton
efd4bc6b08
Updated documentation
2016-10-25 23:43:40 -04:00
Jeffrey Walton
29dae707fd
Guard use of MacPorts GCC and -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER
2016-10-25 22:42:04 -04:00
Jeffrey Walton
de6f4d56ec
Guard addition of '-march=native' in case a user specifies it in CXXFLAGS
...
This allows a user to 'CXXFLAGS="-DNDEBUG -g2 -O3 -march=x86-64" make -j 8' without the makefile adding -march=native
2016-10-25 19:42:54 -04:00
Jeffrey Walton
2e3f359626
Merge pull request #326 from alonbl/build
...
Add DISABLE_CXXFLAGS_OPTIMIZATIONS option
2016-10-25 15:38:52 -04:00
Alon Bar-Lev
db50b93766
build: add DISABLE_CXXFLAGS_OPTIMIZATIONS option
...
handy when packaging should control optimization without build system
masking. Especially handy when building to common architecture.
no change of behavior if DISABLE_CXXFLAGS_OPTIMIZATIONS is unset.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2016-10-21 23:49:06 +03:00
Jeffrey Walton
b49343398b
Updated documentation
2016-10-18 20:21:47 -04:00
Jeffrey Walton
1f054924b4
Updated documentation
2016-10-18 19:39:33 -04:00
Jeffrey Walton
c3e2e0fb25
Align with BouncyCastle and Botan for DLIES and ECIES. Updated documentation
2016-10-18 17:01:28 -04:00
Jeffrey Walton
b5f04e5ed5
Updated documentation
2016-10-18 14:42:48 -04:00
Jeffrey Walton
e794d53806
Cleanup comments
2016-10-18 02:23:07 -04:00
Jeffrey Walton
51d3cc945f
Switch to std::copy due to MinGW issues with memcpy_s
...
Also see http://github.com/weidai11/cryptopp/issues/28 and http://groups.google.com/d/msg/cryptopp-users/PRTVKTh0gRk/euPM_TzdBAAJ
2016-10-18 02:02:49 -04:00
Jeffrey Walton
54d17c7361
Updated CRYPTOPP_ASSERT based on comments
...
Also see 399a1546de (commitcomment-19448453)
2016-10-17 22:00:31 -04:00
Jeffrey Walton
b7423a3bf7
Updated documentation
2016-10-16 23:03:44 -04:00
Jeffrey Walton
255d285ef2
Change curve25519 and curve448 to friendlier names
2016-10-16 03:33:48 -04:00
Jeffrey Walton
2d42b71cb0
Removed NO_UNALIGNED_DATA_ACCESS tests
2016-10-15 22:58:26 -04:00
Jeffrey Walton
afcd051a14
Removed NO_BACKWARDS_COMPATIBILITY_562 tests
2016-10-15 22:42:41 -04:00
Jeffrey Walton
112f720de5
Add Output for clean rule
2016-10-15 21:11:34 -04:00
Jeffrey Walton
dc035c6bc0
Add Output for clean rule
2016-10-15 21:09:26 -04:00
Jeffrey Walton
4625ca5e5c
Add DWORD PTR for consistency in rdrand.asm
2016-10-15 04:39:55 -04:00
Jeffrey Walton
540485f3cf
Updated documentation
2016-10-15 03:59:21 -04:00
Jeffrey Walton
9c9d81ba6c
Switch to OPT_PIC for cryptest.sh
2016-10-14 15:29:17 -04:00
Jeffrey Walton
5596f73371
Fix Cygwin Newlib signal handler (Issue 315)
2016-10-14 15:00:49 -04:00
Jeffrey Walton
7ce3922b97
Add PIC_FLAG for minimum platform tests
2016-10-14 05:04:04 -04:00
Jeffrey Walton
b5f5c4951d
Fix use of -fPIC in test script under Cygwin
2016-10-14 04:46:48 -04:00
Jeffrey Walton
11d36e9cf9
Simplify -fPIC tests
2016-10-14 04:42:22 -04:00
Jeffrey Walton
4b73230e36
Fix use of -fPIC in test script under Cygwin
2016-10-14 04:16:04 -04:00
Jeffrey Walton
0e82232d1d
Fix "WSAStringToAddress was not declared in this scope" on Cygwin (Issue 322)
2016-10-14 03:48:51 -04:00
Jeffrey Walton
93a6758fd9
Updated documentation
2016-10-12 02:57:28 -04:00
Jeffrey Walton
bd2b022d30
Fix X86 MASM assembly under Visual Studio 2013 (Issue 321)
2016-10-12 00:54:34 -04:00
Jeffrey Walton
4bee0519f5
Updated documentation
2016-10-11 19:51:15 -04:00
Jeffrey Walton
22400b2ad1
Updated documentation
2016-10-11 19:13:36 -04:00
Jeffrey Walton
c87d7bf2cd
Add "Source Code and Contributing" section to Readme.txt (Issue 317)
2016-10-11 17:06:04 -04:00
Jeffrey Walton
4d562aaac7
Post-release version increment
2016-10-11 14:37:03 -04:00