Commit Graph

3408 Commits (b225fbfae79afdce6cc42c094a65a8c167cf5c4e)

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