Commit Graph

300 Commits

Author SHA1 Message Date
Conrado Gouvea 148616bd53 WIP 2023-02-16 13:59:51 -03:00
Conrado Gouvea 09f3f36aab
frost-rerandomized: add aggregate optimization (#214)
* frost-rerandomized: add aggregate optimization

* Update frost-rerandomized/src/lib.rs

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

* Updated docs around aggregate()

* rustfmt

---------

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-02-06 23:49:37 +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
dependabot[bot] 9be13c4bfa
Bump reviewdog/action-actionlint from 1.35.0 to 1.36.0 (#219)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.35.0...v1.36.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-23 21:37:20 +00:00
Conrado Gouvea 82b029aaa6 simplify gendoc 2023-01-12 17:25:55 -05: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
dependabot[bot] 453cbab4c7
Bump actions/checkout from 3.2.0 to 3.3.0 (#211)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 20:14:28 +00:00
dependabot[bot] a695b178bc
Bump reviewdog/action-actionlint from 1.34.2 to 1.35.0 (#200)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.34.2 to 1.35.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.34.2...v1.35.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 21:59:23 +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 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 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 2967cae5e4 refactor hash implementations with hash_to_array/scalar functions 2022-12-14 00:49:20 -05:00
dependabot[bot] 8a391caab8
Bump actions/checkout from 3.1.0 to 3.2.0 (#199)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 05:47:28 +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
dependabot[bot] 20d6d2a9b0
Bump reviewdog/action-actionlint from 1.34.1 to 1.34.2 (#186)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.34.1 to 1.34.2.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.34.1...v1.34.2)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-29 19:04:04 +00:00
Conrado Gouvea d8700fed06
add gendoc --check, use in CI (#184)
* add gendoc --check, use in CI

* ran gendoc
2022-11-25 00:36:34 +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
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
dependabot[bot] 41eda1fa80
Bump Swatinem/rust-cache from 1 to 2 (#179)
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1 to 2.
- [Release notes](https://github.com/Swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Swatinem/rust-cache/compare/v1...v2)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 12:30:13 +00:00
dependabot[bot] 0e935126a6
Bump reviewdog/action-actionlint from 1.34.0 to 1.34.1 (#178)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.34.0 to 1.34.1.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.34.0...v1.34.1)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-18 12:30:07 +00:00
dependabot[bot] 7d0a7794bf Bump reviewdog/action-actionlint from 1.33.1 to 1.34.0
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.33.1 to 1.34.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.33.1...v1.34.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-04 00:20:15 -04: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
dependabot[bot] 68ee645652
Bump reviewdog/action-actionlint from 1.33.0 to 1.33.1 (#162)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.33.0 to 1.33.1.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.33.0...v1.33.1)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-27 04:35:01 +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
Conrado Gouvea bceafae2e6
Add DKG support (#129)
* add DKG support

* refactor: call SecretShare::verify() in keygen_part3

* refactor: add generate_secret_polynomial and evaluate_polynomial

* refactor: factor out `evaluate_vss`

* refactor: factor out `compute_verifying_keys`

* fix full vector of coefficients not being returned

* simplify evaluate_polynomial to not receive constant term separately

* delete accidentally comitted .orig file

* Apply suggestions from code review

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

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

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

* fix doc warnings

Co-authored-by: Marek <mail@marek.onl>
2022-10-18 19:11:05 -03:00
dependabot[bot] 2b3b2344e8
Bump reviewdog/action-actionlint from 1.32.0 to 1.33.0 (#148)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.32.0 to 1.33.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.32.0...v1.33.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-11 20:03:47 +00:00
Conrado Gouvea b82ea8a8d2
Add documentation generator; add frost-p256 documentation using it (#130)
* add gendoc.py

* add frost_p256 docs with gendoc.py

* convert Python script to Rust

* A word

* replace 'symbol' to the more appropriate 'item'

* Apply suggestions from code review

* Remove rustdoc ref to removed SharePackage

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-06 15:16:42 -04:00
Conrado Gouvea 28be955e38 merge SharePackage into SecretShare 2022-10-06 11:27:49 -04:00
dependabot[bot] 0b2328cc94 Bump actions/checkout from 3.0.2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-05 16:29:47 -04:00