Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add back mul/sqr to CurveGFp [ci skip] | Jack Lloyd | 2018-03-22 | 1 | -0/+10 |
| | | | | | These were available in 2.4 and while users "shouldn't" be using CurveGFp, it is an exposed API. | ||||
* | Revamp GOST-34.10 tests | Jack Lloyd | 2018-03-21 | 1 | -6/+1 |
| | | | | | Use an official vector (from RFC 5832), support arbitrary curves since GOST likes those for testing. | ||||
* | Add EC_Group::random_scalar | Jack Lloyd | 2018-03-21 | 8 | -6/+16 |
| | |||||
* | Remove bogus -1 from DSA key generation | Jack Lloyd | 2018-03-21 | 1 | -1/+1 |
| | | | | GH #222 | ||||
* | Merge GH #1504 Store DN entries in a vector | Jack Lloyd | 2018-03-21 | 5 | -72/+78 |
|\ | |||||
| * | Avoid creating a map from a DN when not required | Jack Lloyd | 2018-03-21 | 5 | -14/+20 |
| | | |||||
| * | Store elements of a DN as a vector | Jack Lloyd | 2018-03-21 | 2 | -59/+59 |
| | | | | | | | | | | | | | | This allows retreiving the original ordering which is required for DN string encoding as defined in RFC 4514 Fixes #336 | ||||
* | | Throw Lookup_Error here for benefit of tests | Jack Lloyd | 2018-03-21 | 1 | -2/+2 |
| | | |||||
* | | Support "mixed" OAEP hashes | Jack Lloyd | 2018-03-21 | 1 | -2/+17 |
| | | | | | | | | | | | | Test vectors from pyca/cryptography Fixes GH #109 | ||||
* | | Mixed mode OAEP | Jack Lloyd | 2018-03-21 | 3 | -10/+27 |
|/ | |||||
* | Change DSA behavior similarly | Jack Lloyd | 2018-03-21 | 1 | -2/+2 |
| | |||||
* | Shift ECDSA inputs to match OpenSSL behavior | Jack Lloyd | 2018-03-21 | 4 | -4/+25 |
| | | | | See also GH #986 | ||||
* | Remove unused variables [ci skip] | Jack Lloyd | 2018-03-21 | 2 | -4/+0 |
| | |||||
* | Simplify a common case BigInt constructor | Jack Lloyd | 2018-03-21 | 2 | -1/+13 |
| | |||||
* | Add another Ed25519 helper to save a few hundred redundant lines | Jack Lloyd | 2018-03-20 | 3 | -301/+106 |
| | | | | No impact on performance. | ||||
* | Add some helpers for handling carries in Ed25519 | Jack Lloyd | 2018-03-20 | 4 | -893/+491 |
| | |||||
* | Support Ed25519 certificate format | Jack Lloyd | 2018-03-20 | 3 | -39/+74 |
| | | | | Able to create certificate chain and verify it with OpenSSL 1.1.1 | ||||
* | Store base point multiplies in a single std::vector | Jack Lloyd | 2018-03-20 | 8 | -30/+175 |
| | | | | | | | | | | | Since the point is public all the values are also, so this reduces pressure on the mlock allocator and may (slightly) help perf through cache read-ahead. Downside is cache based side channels are slightly easier (vs the data being stored in discontigious vectors). But we shouldn't rely on that in any case. And having it be in an array makes a masked table lookup easier to arrange. | ||||
* | Nudge users to EC_Group::OS2ECP | Jack Lloyd | 2018-03-20 | 1 | -4/+10 |
| | |||||
* | Support multiple DNS names through the command line interface | Jack Lloyd | 2018-03-19 | 2 | -0/+5 |
| | |||||
* | Remove use of ;; to end lines | Jack Lloyd | 2018-03-19 | 5 | -5/+5 |
| | |||||
* | Add EC_Group::clear_registered_curve_data | Jack Lloyd | 2018-03-19 | 2 | -0/+16 |
| | | | | | | Needed for OSS-Fuzz (OOMing a lot) and maybe very occasionally useful in some weird application that has to deal with 100s of different curves. | ||||
* | Cache additional values for PointGFp multi-exponentiation | Jack Lloyd | 2018-03-19 | 5 | -64/+103 |
| | | | | Improves ECDSA verification by ~10% | ||||
* | Avoid needless computation in base point multiply | Jack Lloyd | 2018-03-19 | 3 | -33/+6 |
| | | | | We computed twice as many values as were used. | ||||
* | Use a better algorithm for base point multiplies | Jack Lloyd | 2018-03-19 | 2 | -10/+24 |
| | | | | | | | Nothing very clever, just store P^i,2*P^i,3*P^i in a table so we can do two bits of the scalar at a time. Improves ECDSA sign by 20-30% | ||||
* | Avoid code that triggers problems under GCC 8 | Jack Lloyd | 2018-03-18 | 1 | -1/+1 |
| | | | | GH #1498 | ||||
* | Fix CPUID::has_cpuid_bit | Jack Lloyd | 2018-03-17 | 1 | -1/+3 |
| | | | | | | It would return true if any bits were set instead of if all the bits were set. It is only currently called with a single bit but that might change in the future. | ||||
* | Avoid creating stringstream unless needed in version check | Jack Lloyd | 2018-03-17 | 1 | -3/+3 |
| | |||||
* | Avoid unused arg warning in PowerPC CPUID code | Jack Lloyd | 2018-03-17 | 1 | -0/+2 |
| | |||||
* | Avoid a problematic construct for AltiVec byteswap | Jack Lloyd | 2018-03-16 | 1 | -3/+8 |
| | | | | Seems to cause problems with GCC 8 on ppc64le. GH #1498 | ||||
* | Catch exceptions by reference not value | Jack Lloyd | 2018-03-16 | 4 | -20/+14 |
| | | | | Fixes a new warning in GCC 8 | ||||
* | Add basecase_sqr function | Jack Lloyd | 2018-03-16 | 1 | -3/+29 |
| | | | | | | Just a simple adaption of the n^2 multiply algorithm, so no performance impact. However makes the difference between squaring and multiply easier to see when profiling. | ||||
* | Avoid using threads in DSA operations | Jack Lloyd | 2018-03-15 | 1 | -25/+3 |
| | | | | | | | | | For DSA signing using a thread turned out to be purely a pessimization. The single threaded code is faster even on a 4-core machine running Linux (which has very fast thread creation). It would likely be much worse on a single core machine or an OS with slower thread primitives. For DSA verification, use Montgomery multi-exponentiation instead. | ||||
* | Add multiexponentation interface to DL_Group | Jack Lloyd | 2018-03-15 | 2 | -3/+17 |
| | |||||
* | Add Montgomery multiexponentiation | Jack Lloyd | 2018-03-15 | 4 | -0/+95 |
| | |||||
* | Merge GH #1494 Use RtlGenRandom instead of CryptoAPI/CryptoNG | Jack Lloyd | 2018-03-14 | 3 | -80/+24 |
|\ | |||||
| * | Use RtlGenRandom instead of CryptoAPI | Jack Lloyd | 2018-03-14 | 3 | -80/+24 |
| | | |||||
* | | Some additional operations on Montgomery_Int | Jack Lloyd | 2018-03-14 | 2 | -0/+45 |
|/ | | | | Needed for #1432 | ||||
* | Merge GH #1492 Support custom DN entries | Jack Lloyd | 2018-03-14 | 3 | -67/+61 |
|\ | |||||
| * | Address review comments | Jack Lloyd | 2018-03-14 | 1 | -2/+2 |
| | | |||||
| * | Support custom DN entries | Jack Lloyd | 2018-03-14 | 3 | -67/+61 |
| | | | | | | | | GH #1490 | ||||
* | | Allow the caller to specify the serial number of a generated cert | Jack Lloyd | 2018-03-14 | 2 | -12/+96 |
|/ | | | | GH #1489 | ||||
* | Add a facility for debug-mode assertions | Jack Lloyd | 2018-03-14 | 5 | -11/+33 |
| | | | | | When we want to check something but it is to expensive to do so in normal builds. | ||||
* | Assume CurveGFp inputs are at most p words long | Jack Lloyd | 2018-03-14 | 1 | -13/+27 |
| | | | | Lets us avoid calling sig_words much of the time. Improves ECDSA 5-7% | ||||
* | Avoid creating a temp here | Jack Lloyd | 2018-03-14 | 1 | -4/+4 |
| | |||||
* | Improve memory handling for PointGFp | Jack Lloyd | 2018-03-14 | 8 | -69/+86 |
| | |||||
* | Allow passing workspace to Montgomery_Int | Jack Lloyd | 2018-03-13 | 3 | -34/+140 |
| | | | | | | | Improves DH and RSA by 5-15% depending on param sizes. At larger sizes (3072+) doesn't make much difference since the cost of allocation is relatively small compared to the work. | ||||
* | Tweaks to force_all_affine | Jack Lloyd | 2018-03-12 | 1 | -7/+5 |
| | |||||
* | Remove bogus comment | Jack Lloyd | 2018-03-11 | 1 | -3/+0 |
| | | | | GH #500 | ||||
* | Fix error in FPE_FE1 | Jack Lloyd | 2018-03-10 | 2 | -18/+52 |
| | | | | | | | | | An implementation mistake led to choosing a >= b when the original paper assumes a <= b. Add a boolean to control which version is used. Increase the default FE1 rounds to 5 for a safety factor. GH #500 |