aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
Commit message (Collapse)AuthorAgeFilesLines
* Support decoding of ECC groups with seed parameterJack Lloyd2018-03-041-0/+2
| | | | Closes GH #874
* Use Barrett instead of repeated divisions by p hereJack Lloyd2018-03-041-3/+6
| | | | Doesn't matter much since its a one time setup cost but can't hurt.
* Reduce temp usage in PointGFp addition and doublingJack Lloyd2018-03-044-104/+95
| | | | No noticable change in performance
* Avoid confusing error if invalid EC_Group is usedJack Lloyd2018-03-021-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 layerJack Lloyd2018-03-011-6/+19
|
* Fix overflow in monty_redcJack Lloyd2018-02-271-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_toJack Lloyd2018-02-261-4/+9
|
* Avoid using monty workspace for reduce_belowJack Lloyd2018-02-261-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 allocationsJack Lloyd2018-02-261-2/+4
|
* Add functions to EC_Group for getting base point coordinatesJack Lloyd2018-02-254-16/+68
|
* Merge GH #1461 Add Montgomery_Int typeJack Lloyd2018-02-251-1/+4
|\
| * Add Montgomery_Int typeJack Lloyd2018-02-251-1/+4
| |
* | Merge ec_gfp and ec_group modulesJack Lloyd2018-02-256-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_strengthJack Lloyd2018-02-233-4/+20
|
* Add EC_Group::verify_public_elementJack Lloyd2018-02-233-28/+33
|
* Add DL_Group functions to verify elementsJack Lloyd2018-02-233-31/+48
|
* Merge GH #1457 Use faster algorithm for ECC multiplicationJack Lloyd2018-02-2210-49/+112
|\
| * Small cleanupJack Lloyd2018-02-211-3/+8
| |
| * Minimize header dependenciesJack Lloyd2018-02-211-1/+2
| |
| * Expose EC_Group::a_is_minus_3Jack Lloyd2018-02-212-1/+15
| |
| * New API for blinded ECC point multiplicationJack Lloyd2018-02-2110-44/+87
| | | | | | | | No shared state
* | Fix incorrect check in DL key checkJack Lloyd2018-02-221-6/+3
| | | | | | | | get_q returns zero instead of throwing if q is not set
* | Remove unused include [ci skip]Jack Lloyd2018-02-221-1/+0
|/
* Add some additional error checking to DL_GroupJack Lloyd2018-02-201-0/+6
|
* Fix validation of SRP groupsJack Lloyd2018-02-192-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_bitsJack Lloyd2018-02-193-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_GroupJack Lloyd2018-02-1910-788/+617
|\
| * Small fixesJack Lloyd2018-02-195-21/+29
| |
| * Use new DL_Group functionsJack Lloyd2018-02-195-78/+85
| |
| * Add shared_ptr for DL_Group stateJack Lloyd2018-02-193-691/+510
| | | | | | | | Add precomputations for mod-p math and g^x%p calcualations.
| * Move allocator initializer RAII class to mem_ops.hJack Lloyd2018-02-191-5/+0
| | | | | | | | May be needed elsewhere
* | Merge GH #1448 Support custom curves in TLS handshakeJack Lloyd2018-02-191-3/+0
|\ \ | |/ |/|
| * Remove house curve supportJack Lloyd2018-02-131-3/+0
| |
* | Further simplifications in SM2 codeJack Lloyd2018-02-182-14/+14
| |
* | Add point_multiply operation to EC_GroupJack Lloyd2018-02-187-6/+19
| | | | | | | | Allows precomputations in the future.
* | Add functions to reduce integers mod the order to EC_GroupJack Lloyd2018-02-187-162/+196
| | | | | | | | | | | | This allows calculating the Barett reduction params just once, when the group is initialized, then sharing them across all operations which use that group.
* | Tighten up RSA key validity testsJack Lloyd2018-02-131-3/+7
| | | | | | | | They allowed even e, another leftover from Rabin-Williams
* | Remove handling of even e in RSA keygenJack Lloyd2018-02-131-5/+2
|/ | | | | This is a holdover from Rabin-Williams support and just confusing in RSA-specific code.
* Alternate method of forcing allocator initializationJack Lloyd2018-02-041-1/+6
| | | | That doesn't require a malloc/free every time we call ec_group_data()
* Add hack to deal with initialization fiascoJack Lloyd2018-02-041-0/+6
|
* Create a persistent registry for ECC group dataJack Lloyd2018-02-043-380/+480
| | | | Now a single copy is maintained of each EC group info
* Fix deprecation warningsJack Lloyd2018-02-012-11/+20
|
* Avoid CurveGFp in EC_Group interfaceJack Lloyd2018-01-313-21/+105
|
* Use shared representation of EC_GroupJack Lloyd2018-01-318-113/+294
| | | | Hide CurveGFp with an eye for eventual removal
* Merge GH #1420 Changes to (eventually) allow making BER_Object members privateJack Lloyd2018-01-181-3/+3
|\
| * Prepare for making BER_Object members privateJack Lloyd2018-01-181-3/+3
| | | | | | | | | | Now there are usable accessors that allow the library to avoid using BER_Object members directly.
* | Make PBES2 optionalJack Lloyd2018-01-182-9/+35
|/ | | | See #1416 for reasoning
* Fix return value of PK_Encryptor::maximum_input_sizeJack Lloyd2018-01-131-1/+1
| | | | Fixes GH #1410
* Expose SM2_compute_zaJack Lloyd2018-01-121-6/+7
| | | | | Was already supposed to be public, which is why it's declared in a public header - just missed the export annotation.
* Add contortion to appease SonarJack Lloyd2018-01-091-1/+1
|