Commit Graph

3509 Commits (5be140bcea453a00f7f2fec09fb9e37849d65d98)

Author SHA1 Message Date
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