Commit Graph

73 Commits

Author SHA1 Message Date
natalie a6886e4a3f
Release v0.4.0 (#378)
* Update crate version to v0.4.0 (#377)

* Update changelog (#377)

* Update frost-core version in ciphersuites (#377)
2023-06-05 14:44:32 +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
dependabot[bot] 334447df1b
Update criterion requirement from 0.4 to 0.5 (#360)
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-25 15:43:43 +00:00
natalie 635cebcd60
Update CHANGELOG.md for release v0.3.0 (#358)
Co-authored-by: conrado <conrado@zfnd.org>
2023-05-23 20:18:05 +00:00
Conrado Gouvea 6bca7a3918
add split_key; additional refactorings (#314)
* add split_key; additional refactorings

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

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

* refactor reconstruct_key(); add tests for error cases

* rename keys functions

* leftover renames after sync with main

---------

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-05-19 09:54:52 +00:00
Deirdre Connolly c0dc69900c
Add terminology page to FROST book; flesh out module-level rustdoc fo… (#330)
* Add terminology page to FROST book; flesh out module-level rustdoc for core dkg

* Link to Feldman's VSS, clarify

* Add tss and vss definitions

* Missing word

* Clarify slightly

* Update book/src/terminology.md

* Update book/src/terminology.md
2023-05-17 15:48:36 +00:00
Deirdre Connolly 07aea68b03
First stab at multiscalar speedup for computing group commitments (#345)
* First stab at vartime multiscalar speedup for computing group commitments

* Update frost-core/src/frost.rs

---------

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2023-05-17 00:06:22 +00:00
Deirdre Connolly 53a30278b9
Make multiscalar multiplication generic for any scalar field size (#347)
* Make multiscalar multiplication generic for any scalar field size, within some limits

* Passes ed448 tests

* remove extreme comparison

* Typo

* Typo

* small optimizations

---------

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2023-05-16 23:48:51 +00:00
David Craven 4055cb9439
Errors caused by protocol violations should contain the misbehaving p… (#341)
Errors caused by protocol violations should contain the misbehaving party.
2023-05-09 01:51:29 +00:00
David Craven dad04f46ee
Add from_scalar. (#331) 2023-04-27 17:40:55 +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
Conrado Gouvea 5c19c643f5
bump version to 0.2.0, update changelog (#308) 2023-04-20 00:37:46 +00:00
Conrado Gouvea ec263b120f bump version and update changelog for frost-core 0.1.1 2023-04-18 15:55:53 -04:00
dependabot[bot] 034024047a
Update curve25519-dalek requirement from =4.0.0-rc.1 to =4.0.0-rc.2 (#292)
Updates the requirements on [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) to permit the latest version.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/compare/4.0.0-rc.1...4.0.0-rc.2)

---
updated-dependencies:
- dependency-name: curve25519-dalek
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-14 01:04:24 +00:00
Conrado Gouvea 850381fe24
implement Zeroize where needed or skip where not needed (#301) 2023-04-13 15:26:35 +00:00
natalie c6f2d6b5fb
Update keygen_with_dealer to return a hashmap (#288)
* Change keygen_with_dealer to return a HashMap (#282)

Update docs

* Add vscode folder to gitignore
2023-03-23 22:24:33 +00:00
Deirdre Connolly 3e3a708d85
Rename clippy lint derive_hash_xor_eq (#274)
* Rename clippy lint derive_hash_xor_eq

* try to force clippy to use stable

---------

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2023-03-10 16:12:11 +00:00
Deirdre Connolly d764fec4e5
Remove extra crate keyword (#267) 2023-03-09 15:08:01 +00:00
Conrado Gouvea c80e812fb9
Update curve25519-dalek to 4.0.0-rc.1 (#261)
* Update curve25519-dalek requirement from =4.0.0-pre.1 to =4.0.0-rc.1

Updates the requirements on [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) to permit the latest version.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Changelog](https://github.com/dalek-cryptography/curve25519-dalek/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/curve25519-dalek/commits)

---
updated-dependencies:
- dependency-name: curve25519-dalek
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix breaking curve25519-dalek changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 16:03:33 +00:00
Conrado Gouvea dc3544e5d9
rename DKG types (#256) 2023-03-01 23:12:31 +00:00
Natalie Eskinazi 984f421d47
Rename derive_lagrange_coefficient to derive_interpolating_value (#224)
* Rename rename_derive_lagrange_coefficient_to_derive_interpolating_value

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

* Fix formatting

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

* Fix lint errors

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

* Update README with pre commit check info

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

---------

Co-authored-by: Natalie Eskinazi <nat@trees.local>
Co-authored-by: conrado <conrado@zfnd.org>
2023-02-06 15:51:16 +00:00
Conrado Gouvea 956d8d3c7f
add benchmarks (#205)
* add benchmarks

* Apply suggestions from code review

Co-authored-by: Marek <mail@marek.onl>

* cargo fmt

---------

Co-authored-by: Marek <mail@marek.onl>
2023-01-30 18:48:13 +00:00
Conrado Gouvea 084ed95f46
add ed25519 interoperability test (#208)
* add ed25519 interoperability test

* add multiple iterations to check_sign_with_dkg in ed25519
2023-01-25 20:29:51 +00:00
Conrado Gouvea cd172371ab
improve aggregate performance by verifying the aggregate signature first (#207)
* improve aggregate performance by verifying the aggregate signature first

* fix after syncing with main

* fix k256 git reference

* Update frost-core/src/frost.rs

* Update frost-core/src/frost.rs

Co-authored-by: Marek <mail@marek.onl>

* Update aggregate comment

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2023-01-12 00:16:06 +00:00
Conrado Gouvea b5e6da8820
clippy fixes (#212) 2023-01-09 21:23:59 +00:00
Conrado Gouvea ffe5c57a17
Expose internals to support randomization (simplified) (#152)
* changes required for randomization

* simplified version

* simplify compute_signature_share return

* add frost-rerandomized crate

* move rerandomized tests to frost-rerandomized from reddsa; remove unused deps

* Update frost-core/src/frost.rs

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-01-06 04:26:13 +00:00
Conrado Gouvea 0fffd6517d
fix Identifier ordering; add big identifier test vectors (#197) 2023-01-02 22:43:27 +00:00
Conrado Gouvea 665ab512e2
move dkg module to its own file; update and refactor gendoc (#196)
* move dkg module to its own file; update and refactor gendoc

* pin curve25519-dalek for now due to breaking changes
2022-12-15 09:38:48 +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 359434b14f
docs cleanups (#194) 2022-12-08 17:42:47 +00:00
Conrado Gouvea 1d06341f5c
Remove unused dependencies (#191)
remove unused dependencies
2022-12-07 15:40:17 +00:00
Deirdre Connolly 1c6f0b1694
release: prepping Cargo.toml's for crates.io release (#188) 2022-12-06 15:30:37 +00:00
Conrado Gouvea f79648dfa9
add Ed448 support (#187)
* add Ed448 support

* use zero() instead of one() when encoding a signature

* point to ed448-goldilocks main branch
2022-12-02 19:47:20 +00:00
Conrado Gouvea 1815280576
Improve DKG API; add DKG example (#173)
* improve DKG API

* add DKG example; add ciphersuite-specific DKG functions
2022-11-18 12:54:06 +00:00
Conrado Gouvea e97257a6ca
remove random_nonzero from Field trait (#176) 2022-11-02 17:52:38 +00:00
Conrado Gouvea 7b83737137
Improve examples (#160)
* add trusted dealer example

* add example for each ciphersuite-specific crate

* simplify example

* improve example; use ? instead of unwrap
2022-11-01 15:54:04 +00:00
Conrado Gouvea 6df6e32221
use Error everywhere and add enums as needed (#172)
* use Error everywhere and add enums as needed

* Apply suggestions from code review

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

* Update frost-core/src/error.rs

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

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-28 20:01:03 +00:00
Conrado Gouvea ac5f44ade8
add Ed25519 ciphersuite (#164)
* add Ed25519 ciphersuite

* clippy fixes

* fixes after rebase

* update share generation test name

* use max/min_signers

* expand authors

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-27 18:33:32 +00:00
Conrado Gouvea 201d6adc4d
use max_signers and min_signers instead of num_signers and threshold to better follow spec (#157) 2022-10-27 04:35:16 +00:00
Conrado Gouvea 3b497100c0
Fix batching for P-256 (#154)
fix batch for P-256: use little endian encoding; increase NAF size
2022-10-27 04:34:57 +00:00
Marek 0bbce1059a
Remove unnecessary casts to `Ciphersuite` (#170) 2022-10-26 14:56:29 -03:00
Conrado Gouvea c323cb6861
use BTreeMap for BindingFactorList (#155) 2022-10-26 14:41:19 +00:00
Conrado Gouvea eca2101cf8
use u16 for number of signers (#156)
* use Identifier instead of index

* remove pub(crate) from the Identifier index

* Refreshed Identifier newtype of Scalar with traits

* Remove commented out lines

* add test vectors with indices larger than 1 byte

* add little_endian_serialize to implement Ord for Identifier

* use u16 for number of signers

* fix variable use

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-26 14:41:13 +00:00
Conrado Gouvea 33b01a7d6f
Remove `as` keyword when not needed, use `Scalar`/`Element` shortcuts (#159)
* use Identifier instead of index

* remove pub(crate) from the Identifier index

* Refreshed Identifier newtype of Scalar with traits

* Remove commented out lines

* add test vectors with indices larger than 1 byte

* add little_endian_serialize to implement Ord for Identifier

* remove 'as' keyword when not needed

* use Scalar shortcut

* use Element shortcut

* remove more instances of 'as' keyword when not needed

* rustfmt

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-26 05:08:06 +00:00
Conrado Gouvea 278630e183
Rename rho to binding factor (#153)
* use Identifier instead of index

* remove pub(crate) from the Identifier index

* Refreshed Identifier newtype of Scalar with traits

* Remove commented out lines

* add test vectors with indices larger than 1 byte

* add little_endian_serialize to implement Ord for Identifier

* rename rho to binding factor

* s/Rho/BindingFactor/

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-26 04:21:04 +00:00
Deirdre Connolly 255d79042a
Refreshed Identifier newtype of Scalar with traits (#114)
* use Identifier instead of index

* remove pub(crate) from the Identifier index

* Refreshed Identifier newtype of Scalar with traits

* Remove commented out lines

* add test vectors with indices larger than 1 byte

* add little_endian_serialize to implement Ord for Identifier

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2022-10-25 23:50:25 -04:00
Conrado Gouvea fcd526f529
cleanup imports of tests.rs (#158) 2022-10-25 19:47:50 +00:00
Conrado Gouvea 5e25bf52eb
Add nonce_generate test with test vectors (#149)
* add TestVectors struct

* add nonce_generate test
2022-10-25 17:24:45 +00:00
Conrado Gouvea d50cb30d23
Update test vectors and links to v11 (#151)
update test vectors and links to v11
2022-10-24 23:25:40 +00:00