Commit Graph

3641 Commits (1543de863c57877a900b6536c84e4438bc7d3507)

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