Commit Graph

29 Commits

Author SHA1 Message Date
Conrado Gouvea 9921b1218e
support serializing SigningNonces (#595) 2024-01-16 20:48:17 +00:00
natalie 1e29230827
Create DKG vector tests (#587)
* Add DKG vector test for ed25519 (#567)

* Add DKG test vectors for all ciphersuites (#567)

* Add description for DKG vector test (#567)

* Update imports for DKG vector tests (#567)
2023-12-04 19:15:25 +00:00
natalie ba3ef7dbb8
Convert all HashMaps to BTreeMaps (#547)
Convert HashMaps to BTreeMaps (#476)
2023-09-22 14:08:32 +00:00
Conrado Gouvea 4ba88c0210
add version field to serialization at the beginning; move ciphersuite after it (#540)
* add version field into a Header field along with the ciphersuite ID

* Change Ciphersuite ID to be the contextString from the spec

* Apply suggestions from code review

Co-authored-by: natalie <n.l.eskinazi@gmail.com>

---------

Co-authored-by: natalie <n.l.eskinazi@gmail.com>
2023-09-20 15:40:01 +00:00
natalie eee505a49e
Rename fields to match types (#539)
* Rename signer_pubkeys to verifying_shares (#495)

* Rename group_public to verifying_key (#495)

Some naming needed to be updated in DKG as well as there was already a verifying_key which was actually a verifying_share

* Update KeyPackage field from secret_share to signing_share (#495)

* Update Package field from secret_share to signing_share (#495)

* Update KeyPackage field from public to verifying_share (#495)

* Update SecretShare field vrom value to signing_share (#495)

* Remove secret function from SecretShare (#495)

This is because we now can use the getter to get signing_share() without the need for an additional function

* Update serde_tests with updated field names (#495)
2023-09-15 14:53:43 +00:00
Conrado Gouvea d4b03ea7bf
add default serialization format (#511)
* add default serialization format

* remove SHORT_ID from Ciphersuite trait
2023-09-13 12:58:26 +00:00
Conrado Gouvea 4ee0d32867
check number of commitments in sign() (#480)
* check number of commitments in sign()

* make comment clearer
2023-09-06 09:48:30 +00:00
Conrado Gouvea d439fdc93d
improve book per audit report (#491)
* improve book per audit report

* remove stale sentence

* fix a typo

* Update book/src/tutorial/signing.md

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

* Update book/src/tutorial/signing.md

---------

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-09-05 00:08:16 +00:00
Conrado Gouvea 5cd3f8fc79
return error when creating a zero SigningKey (#496)
* return error when creating a zero SigningKey

* Update frost-core/src/signing_key.rs

* Update frost-core/src/signing_key.rs

---------

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-09-02 04:59:57 +00:00
Conrado Gouvea 877e7c3830
fix clippy issues (#503) 2023-08-28 19:25:43 +00:00
natalie bb94a34362
Add minimum participant constraints (#453)
* Add validation for missing identifier in signing package (#442)

* Add error handling for identifier having an invalid commitment (#442)

* Fixed comment (#442)

* Add validation for participant numbers (#443)

Add to split() and generate_secret_polynomial()

* Add participant validation for dkg and repairable (#443)
2023-08-16 18:38:29 +00:00
Conrado Gouvea ba8086db5c
Simplify rerandomized FROST (#437)
* refactor Lagrange coefficient computation

* simplified rerandomized FROST

* switch to a Randomize trait, remove unaccurate comment

* remove manual rerandomization test

* improve comments

* removed unneeded alpha_share

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

* frost-rerandomized: add serde feature

* add Randomizer type

* revert DuplicatedIdentifiers back to DuplicatedIdentifier

---------

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-08-14 16:15:22 +00:00
Conrado Gouvea 9413b49c05
Update test vectors (#438)
update test vectors to final version (v1) and update spec links
2023-08-14 10:39:15 +00:00
natalie b3a7927d7f
Add validation for missing identifier in signing package (#452)
* Add validation for missing identifier in signing package (#442)

* Add error handling for identifier having an invalid commitment (#442)

* Fixed comment (#442)

* Improve comment for number of signers validation

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

---------

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2023-07-26 22:24:11 -03:00
Deirdre Connolly 404cc361fd
Include the group public key in computing the binding factor (#410)
* Prelim implementation of including the group public key in computing the binding factor

Needs updated test vectors from the spec PoC and updated tests

* update test vectors

* add integration_test.rs to gencode which we forgot to do before

---------

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2023-07-05 13:19:19 +00:00
Conrado Gouvea b2c605aac1
remove identifiers from structs that are communicated (#397)
* WIP of removing the identifier in structs that are communicated. Working for SigningCommitments for ristretto255

* removed identifier from SignatureShare

* remove identifiers from DKG packages

* replicate to other ciphersuites; simplify SignatureShare

* update changelog

* fix SignatureShare encoding
2023-07-05 10:39:25 +00:00
Conrado Gouvea 17c98d4412
convert all usages of from/to_bytes() to (de)serialize() (#426)
* convert all usages of from/to_bytes() to (de)serialize()

* changelog entry
2023-07-03 08:18:19 +00:00
Conrado Gouvea 8531855bd7
implement common traits for public types (#422) 2023-06-30 19:15:56 +00:00
Conrado Gouvea 4e134f50d6
allow specifying identifiers in generate_with_dealer (#419) 2023-06-30 18:29:26 +00:00
Conrado Gouvea 7358b667ca
expand serde tests (#409)
using samples in serde tests
2023-06-23 14:22:33 +00:00
Conrado Gouvea c851bbb8fa
Remove pub from fields, add getters (#401)
* derive getters; remove any existing ones; use BTreeMap for signing commitments

* add recreation tests

* make tests ciphersuite-specific
2023-06-23 14:07:34 +00:00
natalie 2668555f38
Refactor test folders (#366)
* move test functions that differ from other ciphersuites to make gencode simpler to use (#364)

* Refactored folder structure for ristretto255 (#364)

* Add batch and signing tests folders to ristretto255 (#364)

* Refactor test folders for ed25519 (#364)

* Refactor test folders for ed448 (#364)

* Refactor test folders for ed448 (#364)

* Refactor test folders for secp256k1 (#364)

* Refactor test folders for frost-core (#364)

Update ciphersuites due to refactoring in core

* Update coverage tool to exclude new test files (#364)

* Rename signing_tests to ciphersuite_generic_tests to match frost-core (#364)

* Set default branch as main in codecov (#364)

* Fix incorrect file name in gencode (#364)

* Remove test file targets in gencode and replace with only md files (#364)

* Rename helper_functions to helpers (#364)

Remove unecessary test traits

* Rename ciphersuite tests (#364)

* Rename test_helpers to helpers (#364)

* move tests to integration_tests (#364)

* Re-add dkg.rs and repairable.rs to gendoc (#364)

* Refactored rest of ciphersuite integration tests (#364)

* Fix fmt in gencode (#364)
2023-05-31 21:23:29 +00:00
natalie 8f216f3c81
Make CoefficientCommitment and VerifiableSecretSharingCommitment accessible (#361)
* Add funvtion to create new CoefficientCommitment (#323)

* Update function to create new Coefficient Commitment and add error case (#323)

* Add function for CoefficientCommitment to return associated Element (#323)

* Add serialize function for VerifiableSecretSharingCommitment (#323)

* Rename test for the serialize function of vss_commitment (#323)

* Add deserialize function for VerifiableSecretSharingCommitment (#323)

* Rename new to deserialize for CoefficientCommitment (#323)

* Refactor CoefficientCommitment::deserialize (#323)

Update README with developer information

* Improve deserialize function for vss_commitment (#323)

* Handle errors for deserialization function for vss_commitment (#323)

* Update changelog (#323)

Add v0.4.0 to changelog
Remove deprecated changelog file

* Refactor error in deserialize function for CoefficientCommitment

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Update vss commitment serialization and deserialization functions (#323)

* Refactor tests for serialization and deserialization of commitments (#323)

* Refactor test to remove PartialEq trait from Group Serialization (#323)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Add serialize function for CoefficientCommitment (#323)

* Fix formatting (#323)

* Add back in error test for vss commitment deserialize (#323)

* Clean up commitment tests (#323)

---------

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2023-05-30 13:17:21 +00:00
natalie 0b981618cd
Add repair share functionality (#281)
* Add compute random value function for repair share functionality (#41)

This is step 1 of 3

* Add compute random value function for repair share functionality for each ciphersuite (#41)

* Add compute_sum_of_random_values function for repair share functionality (#41)

This is step 2 of 3

* Add recover_share function for repair share functionality (#41)

This is step 3 of 3

* Add communication rounds functions for repair share functionality for each ciphersuite (#41)

Add compute_sum_of_random_variables function
Add recover_share function

* Fix recover_share tests so they test the right thing

Fix secp256 recover share test values
Fix ristretto255 recover share test values
Fix ristretto255 compute sum of random values test values

* Rewrite compute_random_values to generate_random_values for repair share functionality (#41)

Test generate_random_values directly
End to end test to be added in another commit
Updated gendoc to use original file values to fix clippy complaints

* Rename functions and update documentation for repair (#41)

* Add end to end test for repair share (#41)

Fix lagrange coefficient calculation

Co-authored-by: conrado <conradoplg@gmail.com>

* Fix formatting (#41)

* Remove comment (#41)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Update documentation for step 1 of RTS (#41)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Update documentation for method of computing step 1 of RTS (#41)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Rename repair share functions (#41)

* Improve documentation for Repairable Threshold Scheme (#41)

* Remove unecessary code from repairable tests (#41)

* Update repairable documentation

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Rename steps in repairable to be more consistent with DKG pattern (#41)

* Update gitignore (#41)

* Update repairable to use new keygen_with_dealer signature (#41)

* Update frost-core/src/frost/keys/repairable.rs

---------

Co-authored-by: conrado <conradoplg@gmail.com>
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2023-04-24 15:27:14 +00:00
Deirdre Connolly cf7ebcb34e
Re-export the frost-core traits and rand-core as part of top-level impls API (#297)
* Re-export the frost-core traits and rand-core as part of top-level impls API

* Don't export frost_core::frost

---------

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2023-04-14 01:04:17 +00:00
Conrado Gouvea b5e6da8820
clippy fixes (#212) 2023-01-09 21:23:59 +00:00
Conrado Gouvea 9514e7688e
add check for canonical point encodings where needed, and tests (#193)
* add check for canonical point encodings where needed, and tests

* remove unneeded 'as' keywords

* fix after syncing with main

* pin curve25519-dalek for now due to breaking changes

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-12-15 09:38:53 +00:00
Conrado Gouvea e8dc692ca0
add Identifier to InvalidSignatureShare and split Error type (#183)
* add Identifier to InvalidSignatureShare

* rustdoc

* also update secp256k1

* add Identifier::deserialize; make serialize public

* make it work with Ed448

* Some space

* Fixing spacing for rustfmt

* Revert  🤦‍♂️

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-12-12 22:04:10 +00:00
Conrado Gouvea 3e1fe25dbd
add secp256k1 ciphersuite (#175)
* add secp256k1 ciphersuite

* use workaround for hash2field

* fix secp256k1 docs caused by gendoc bug

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>

* removed random_nonzero which is no longer needed

* typo

* cargo fmt

* rustdoc url

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-11-22 21:09:21 +00:00