Commit Graph

133 Commits

Author SHA1 Message Date
Jeffrey Walton
1070186bc4
Update Filelist.txt 2018-11-12 15:44:05 -05:00
Jeffrey Walton
8011f023b5
Add test programs to file list (PR #737) 2018-11-11 01:33:41 -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
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
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
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
Jeffrey Walton
40d75271ec
Add keccakc.h and keccakc.cpp to Filelist.txt 2018-08-22 00:54:19 -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
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
3ff7d7f028
Add ARM AES asm implementation from Cryptogams (GH #683) 2018-07-11 06:59:44 -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
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
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
2f5b110b52
Add HIGHT lightweight block cipher (GH #672) 2018-06-24 00:54:16 -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
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
54d5100344
Add CHAM lightweight block cipher (PR #670)
Add CHAM lightweight block cipher
2018-06-17 23:24:47 -04:00
Jeffrey Walton
1f06c512c4
Add LEA lightweight block cipher (GH #669) 2018-06-17 22:36:41 -04:00
Jeffrey Walton
64d02e3a18
Add scrypt key derivation function (GH #613, PR #626) 2018-03-31 20:09:38 -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
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
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
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
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
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
b7e636ac51
Rename ppc-crypto.h to ppc-simd.h 2017-12-12 07:15:59 -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
c6c8dd3b32
Add Valgrind suppression file to file list (GH #543) 2017-11-29 07:15:42 -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
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
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
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
b9fc470bc7
Add SPECK-64 and SPECK-128 lightweight block ciphers (GH #538) 2017-11-20 06:30:21 -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
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
1057f89363
Move Power8 crypto functions into ppc-crypto.h 2017-09-22 05:23:29 -04:00
Jeffrey Walton
fb78afba29
Add PowerPC support to cpu.h and validate.cpp 2017-09-11 03:05:04 -04:00
Jeffrey Walton
2d5ed51ca9
Add Mapfile for CMake on Solaris (Issue 380) 2017-08-27 05:47:38 -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
7fb5953055
Add VIA Padlock RNG 2017-08-19 15:41:45 -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
a59e32be73
Add missing Threefish test vectors to Filelist (Isse 422) 2017-05-16 04:49:33 -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
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
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
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
6381faf277
Rename rdrand.S to rdrand.s 2017-03-23 16:05:30 -04:00
Jeffrey Walton
5c932fcc3b
Add NIST SP800-90A Hash_DRBG generator 2016-12-30 21:46:03 -05:00
Jeffrey Walton
9739ba8afe
Add Aumasson and Bernstein's SipHash (Issue 348) 2016-12-17 03:58:36 -05:00
Jeffrey Walton
26db40567d
Add Integer Bitops tests (Issue 344) 2016-12-06 20:56:57 -05:00
Jeffrey Walton
40230dd3bf
Removed MAINTAIN_BACKWARDS_COMPATIBILITY_562 (Issue 70) 2016-12-03 00:32:07 -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
484da03c7b
Add Poly1305 class to project files (Issue 338) 2016-11-27 16:56:57 -05:00
Jeffrey Walton
7363c49a67
Add ecpoint.h header file. Add EncodedPoint interface. Add documntation 2016-11-04 11:13:07 -04:00
Jeffrey Walton
43313e6c0f
Add missing ossig.h to file list for ZIP file[A 2016-10-01 05:39:26 -04:00
Jeffrey Walton
f57c4dced5 Moved config.h → config.compat; moved config.recommend → config.h
Also see http://groups.google.com/forum/#\!topic/cryptopp-users/bWcRw1XgJ_Q
2016-09-18 12:36:50 -04:00
Jeffrey Walton
399a1546de Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
2016-09-16 11:27:15 -04:00
Jeffrey Walton
e1fa9b26a8 Remove CMake related files from ZIP 2016-09-15 10:54:32 -04:00
Jeffrey Walton
4414b864cf Make VS2010 default. Archive VS2005 project files. Archive Borland project files
VS2005 project files are available in vs2005.zip
Borland 10 project files are available in bds10.zip
2016-09-10 04:32:04 -04:00
Jeffrey Walton
677c09584c Removed workspace and project files from FileList.txt. Cleared 'make convert' error for makefile recipe 2016-09-09 03:33:06 -04:00
Jeffrey Walton
7f958575ea Squashed commit of the following:
commit 47c75c6e9397e240919207e50e5a611d3e2a2428
Merge: d7685c2 42085ee
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 20:20:39 2016 -0400

    Attempting to fix binary file merge conflict

commit d7685c2d946beecc419ddb6901c24e972c7cf3ee
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 16:39:23 2016 -0400

    Add vsClean.cmd to vs2010.zip

commit 4b96fdf1c551260da60eb021f324bcc3fcfec626
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 16:15:38 2016 -0400

    Add Keccak to vs2010.zip

commit 3962db73b7113ee805b46a5bb4da64e204fe6bb0
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 15:40:35 2016 -0400

    Fold hmqv.cpp and fhmqv.cpp into mqv.cpp. There's no need for three empty source files

commit 44401448cbb6c8125b0f1ab4419c5b174408ffd7
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 15:39:23 2016 -0400

    Fold hmqv.cpp and fhmqv.cpp into mqv.cpp. There's no need for three empty source files

commit 847bfccb8d5c388e67745dc8c69768fa503c5135
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 14:48:02 2016 -0400

    Whitespace cleanup

commit 46a37be6fef361704dcf852bc9a099ce0a1da4c8
Merge: aefb8f8 3697867
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 14:43:01 2016 -0400

    Merge 'master' into 'keccak'

commit aefb8f8ff2b81b967089c53b457a92fc6f7544d6
Merge: 51a828b 3c91d93
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 12:39:51 2016 -0400

    Merge 'master' into 'keccak'

commit 51a828b88e37a4d18abb00300cd5522bd0e110c5
Merge: 4152870 e7c7722
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:41:36 2016 -0400

    Merge 'master' into 'keccak'

commit 415287041e69ddadf5ca1f6fc794b87e145fc2db
Merge: 357a0c5 83ac849
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:34:45 2016 -0400

    Merge 'master' into 'keccak'

commit 357a0c510f75e4e58078b500dd469462e90f7650
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 10:13:32 2016 -0400

    Removed deprecated warning from SHA3 classes

commit 5cf9ec10d53b895b5a583e265e4e1298ed402195
Merge: 10ce0ed c2d60cc
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 09:43:15 2016 -0400

    Merge 'master' into 'keccak'

commit 10ce0ed4c5b8a1ea230062fd2dfdec0d87ec5b42
Author: Jeffrey Walton <noloader@gmail.com>
Date:   Thu Sep 8 09:37:40 2016 -0400

    Add Keccak implementation based on early SHA3. Change SHA3 to NIST FIPS 202 conforming implementation
2016-09-08 20:24:25 -04:00
Mouse
5bdabb7a68 Add HMQV and merge untracked FHMQV 2016-07-04 13:05:38 -04:00
Jeffrey Walton
e69738e80b Add Windows NMAKE-based makefile for testing 2016-04-25 17:45:23 -04:00
Jeffrey Walton
02c20bbaec Add test vectors to filelist 2016-04-24 00:32:11 -04:00
Jeffrey Walton
f8ad685c3d Rename bench.cpp to bench1.cpp 2016-04-22 14:15:09 -04:00
Jeffrey Walton
53b51331a4 Add ChaCha family of stream ciphers 2016-04-21 12:05:25 -04:00
Jeffrey Walton
30c1af2858 Added BLAKE2 Cryptographic Hash and Message Authentication Code 2016-04-17 03:06:28 -04:00
Jeffrey Walton
4adcb0a35a Updated Filelist.txt to follow Commit a2c1e49a01 from Pull Request 77 2015-12-25 12:37:33 -05:00
Jeffrey Walton
d2fda9bd42 Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup) 2015-11-18 15:19:02 -05:00