Commit Graph

80 Commits

Author SHA1 Message Date
Jeffrey Walton
f47ffe2a4d
Fix IsDebuggerPresent guard for ARM64 (GH #776) 2019-01-04 20:43:19 -05:00
Jeffrey Walton
16f9cbc82a
Add comments on potential environment misdetection 2018-12-28 11:43:55 -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
77923a291a
Add Langley's curve25519 (GH #761, PR# 762) 2018-12-11 16:17:56 -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
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
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
d9011f07d2
Add ChaCha AVX2 implementation (GH #735) 2018-11-08 16:20:31 -05: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
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
a552eff2fe
Break-up long lines in cryptest.nmake 2018-08-27 21:16:50 -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
d1a582e81a
Add /DEBUG to cryptest.nmake linker options 2018-08-20 11:42:57 -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
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
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
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
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
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
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
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
989bf6dc5e
Add HC-256 stream cipher (GH #680) 2018-07-05 06:43:04 -04:00
Jeffrey Walton
dd31eb80c0
Add HC-128 stream cipher (GH #679) 2018-07-05 00:29:07 -04:00
Jeffrey Walton
d00777e1d7
Add Rabbit stream cipher (GH #678) 2018-07-04 03:47:28 -04:00
Jeffrey Walton
08e6137082
Add SIMECK-64 SSSE3 implementation (GH #675) 2018-07-01 03:11:00 -04:00
Jeffrey Walton
61f635b837
Add additional SIMECK tests (GH #675) 2018-06-30 08:25:32 -04:00
Jeffrey Walton
2f5b110b52
Add HIGHT lightweight block cipher (GH #672) 2018-06-24 00:54: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
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
43ff11a089
Suppress C4231 and C4505 warnings using VS2008 2018-03-27 20:37:42 -04: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
2a367627f0
Finish removing Simon and Speck (GH #585) 2018-02-15 06:17:35 -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
07c2047cec
Add simon-simd.cpp to file list and nmake file 2017-11-27 01:20:15 -05:00
Jeffrey Walton
5267723a49
Add SM3 hash function (GH #541) 2017-11-23 23:19:09 -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
3970a066e3
Add SIMON-64 and SIMON-128 lightweight block ciphers (GH #539) 2017-11-21 04:58:51 -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
8734cfaa07
Add sse-simd.cpp to nmake file and vcxproj filters 2017-11-16 15:29:24 -05: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
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
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
876142b1b6
Update with latest sources and reproducible build 2017-08-15 03:05:45 -04:00
Jeffrey Walton
32ab4af5ff
Add Threefish to project files
Whitespace check-in
2017-05-14 15:27:50 -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
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