Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Catch exceptions by reference not value | Jack Lloyd | 2018-03-16 | 1 | -1/+1 |
| | | | | Fixes a new warning in GCC 8 | ||||
* | 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 a facility for debug-mode assertions | Jack Lloyd | 2018-03-14 | 3 | -2/+9 |
| | | | | | 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 | 5 | -63/+83 |
| | |||||
* | Tweaks to force_all_affine | Jack Lloyd | 2018-03-12 | 1 | -7/+5 |
| | |||||
* | Merge GH #1483 Use uncompressed points for ECC by default | Jack Lloyd | 2018-03-10 | 7 | -44/+72 |
|\ | |||||
| * | Rename point_format to point_encoding | Jack Lloyd | 2018-03-10 | 2 | -2/+2 |
| | | | | | | | | Matches setter | ||||
| * | Add PointGFp::encode as replacement for EC2OSP | Jack Lloyd | 2018-03-10 | 6 | -45/+48 |
| | | | | | | | | | | | | Literally every single call to EC2OSP is converting the returned secure_vector to a std::vector. Which makes sense since private points are not really a thing in any protocol I know of. | ||||
| * | Default to encoding ECC public keys as uncompressed. GH #1480 | Jack Lloyd | 2018-03-10 | 2 | -1/+26 |
| | | |||||
* | | Revert "Use move to avoid needless some needless copies" | Jack Lloyd | 2018-03-10 | 1 | -16/+16 |
|/ | | | | | | | | This reverts commit 5185c2aaa8bf9556556e4507869042a71eaba6c0. Clang says warning: moving a temporary object prevents copy elision [-Wpessimizing-move] | ||||
* | Use move to avoid needless some needless copies | Jack Lloyd | 2018-03-09 | 1 | -16/+16 |
| | |||||
* | Cleanup comments | Jack Lloyd | 2018-03-09 | 1 | -10/+7 |
| | |||||
* | Use blinded_base_point_multiply_x in the various signature schemes | Jack Lloyd | 2018-03-08 | 5 | -14/+17 |
| | |||||
* | Avoid creating too-large values during ECDSA signing | Jack Lloyd | 2018-03-08 | 1 | -3/+5 |
| | | | | | It would cause the Barrett reduction to fallback to schoolbook division. Small but noticable speedup (2-3%) | ||||
* | Add blinded_base_point_multiply_x | Jack Lloyd | 2018-03-08 | 2 | -0/+20 |
| | | | | Often useful when the point is not needed | ||||
* | Mul into temps to avoid allocations | Jack Lloyd | 2018-03-08 | 1 | -7/+8 |
| | |||||
* | Add PointGFp::force_all_affine using Montgomery's trick | Jack Lloyd | 2018-03-08 | 3 | -9/+68 |
| | | | | Also be somewhat smarter in force_affine avoids several muls | ||||
* | Require explicit calls to add_affine | Jack Lloyd | 2018-03-08 | 2 | -5/+2 |
| | | | | Skipping the checks saves 3-7% for ECDSA | ||||
* | Add destructor for unique_ptr | Jack Lloyd | 2018-03-08 | 2 | -0/+7 |
| | |||||
* | Add mixed (J+A) point addition, new scalar mul for base points | Jack Lloyd | 2018-03-08 | 12 | -136/+403 |
| | | | | | | | | | Adds PointGFp::force_affine(), ::add_affine(), and ::is_affine() Use a (very simple) technique for base point precomputations. Stick with fixed window for variable point inputs. Scalar blinding is now always enabled | ||||
* | Support decoding of ECC groups with seed parameter | Jack Lloyd | 2018-03-04 | 1 | -0/+2 |
| | | | | Closes GH #874 | ||||
* | Use Barrett instead of repeated divisions by p here | Jack Lloyd | 2018-03-04 | 1 | -3/+6 |
| | | | | Doesn't matter much since its a one time setup cost but can't hurt. | ||||
* | Reduce temp usage in PointGFp addition and doubling | Jack Lloyd | 2018-03-04 | 4 | -104/+95 |
| | | | | No noticable change in performance | ||||
* | Avoid confusing error if invalid EC_Group is used | Jack Lloyd | 2018-03-02 | 1 | -3/+9 |
| | | | | | If an unknown group name was passed it would give a PEM error, instead of saying unknown group. | ||||
* | Remove BigInt using functions from mp layer | Jack Lloyd | 2018-03-01 | 1 | -6/+19 |
| | |||||
* | Fix overflow in monty_redc | Jack Lloyd | 2018-02-27 | 1 | -4/+4 |
| | | | | | | | | | OSS-Fuzz caught a bug introduced in 5fcc1c70d7a. bigint_monty_redc assumes z is 2*p_words+2 words long. Previously the implicit rounding up in grow_to ensured a resize would result in a sufficiently large value. OSS-Fuzz 6581 6588 6593 | ||||
* | Avoid unnecessary calls to BigInt::grow_to | Jack Lloyd | 2018-02-26 | 1 | -4/+9 |
| | |||||
* | Avoid using monty workspace for reduce_below | Jack Lloyd | 2018-02-26 | 1 | -6/+6 |
| | | | | | | | | | If the workspace is swapped, then it is too small for the Montgomery operation and will be reallocate on the next sqr/multiply operation. Also use ws[9] consistently for the Montgomery workspace, otherwise if add needs to pass off the mult2, the workspaces are not the expected size and again a reallocation occurs. | ||||
* | Avoid some needless allocations | Jack Lloyd | 2018-02-26 | 1 | -2/+4 |
| | |||||
* | Add functions to EC_Group for getting base point coordinates | Jack Lloyd | 2018-02-25 | 4 | -16/+68 |
| | |||||
* | Merge GH #1461 Add Montgomery_Int type | Jack Lloyd | 2018-02-25 | 1 | -1/+4 |
|\ | |||||
| * | Add Montgomery_Int type | Jack Lloyd | 2018-02-25 | 1 | -1/+4 |
| | | |||||
* | | Merge ec_gfp and ec_group modules | Jack Lloyd | 2018-02-25 | 6 | -2/+1525 |
|/ | | | | | They were already somewhat entangled and future work will increase that (eg by having PointGFp hold a pointer to EC_Group) | ||||
* | Add DL_Group::estimated_strength | Jack Lloyd | 2018-02-23 | 3 | -4/+20 |
| | |||||
* | Add EC_Group::verify_public_element | Jack Lloyd | 2018-02-23 | 3 | -28/+33 |
| | |||||
* | Add DL_Group functions to verify elements | Jack Lloyd | 2018-02-23 | 3 | -31/+48 |
| | |||||
* | Merge GH #1457 Use faster algorithm for ECC multiplication | Jack Lloyd | 2018-02-22 | 10 | -49/+112 |
|\ | |||||
| * | Small cleanup | Jack Lloyd | 2018-02-21 | 1 | -3/+8 |
| | | |||||
| * | Minimize header dependencies | Jack Lloyd | 2018-02-21 | 1 | -1/+2 |
| | | |||||
| * | Expose EC_Group::a_is_minus_3 | Jack Lloyd | 2018-02-21 | 2 | -1/+15 |
| | | |||||
| * | New API for blinded ECC point multiplication | Jack Lloyd | 2018-02-21 | 10 | -44/+87 |
| | | | | | | | | No shared state | ||||
* | | Fix incorrect check in DL key check | Jack Lloyd | 2018-02-22 | 1 | -6/+3 |
| | | | | | | | | get_q returns zero instead of throwing if q is not set | ||||
* | | Remove unused include [ci skip] | Jack Lloyd | 2018-02-22 | 1 | -1/+0 |
|/ | |||||
* | Add some additional error checking to DL_Group | Jack Lloyd | 2018-02-20 | 1 | -0/+6 |
| | |||||
* | Fix validation of SRP groups | Jack Lloyd | 2018-02-19 | 2 | -12/+24 |
| | | | | | For whatever reason in the SRP groups g generates the group mod p rather than the subgroup of size q. | ||||
* | Remove PK_Ops::Decryption_with_EME::max_raw_input_bits | Jack Lloyd | 2018-02-19 | 3 | -5/+0 |
| | | | | | Unused and not exposed to higher levels. RSA and ElGamal both check their inputs vs the system parameters (n, p) after decoding. | ||||
* | Merge GH #1454 Used shared_ptr repr for DL_Group | Jack Lloyd | 2018-02-19 | 10 | -788/+617 |
|\ |