Commit Graph

479 Commits

Author SHA1 Message Date
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
Conrado Gouvea bea4ef0687
reject identity in Group::deserialize (#145) 2022-10-04 19:05:58 +00:00
Conrado Gouvea be43c4a082 make batch testing generic; remove duplicated Ristretto255 implementation 2022-10-03 15:17:57 -04:00
Conrado Gouvea 828279d847
Hash serialized scalars entirely; update test vectors to V10 (#139)
* v9

* update to v10 vectors

* update spec links

* Make Rustdoc happy

* Make Rustdoc happy

* refactor coefficient generation into a function

* rustdoc

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-03 18:41:02 +00:00
Conrado Gouvea 45d16cb801
add H5; update to V8 (#137)
* add H5; update to V8

* Link H4

* Link H5

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-03 04:31:58 -04:00
dependabot[bot] 897b8bd8c9 Bump reviewdog/action-actionlint from 1.31.0 to 1.32.0
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.31.0...v1.32.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-10-03 04:14:09 -04:00
Conrado Gouvea 57bf58a24e
use per-signer Rho per V7 spec (#112)
* use per-signer Rho per V7 spec

* Update frost-core/src/frost.rs

* Update frost-core/src/frost.rs

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-10-03 04:13:25 -04:00
dependabot[bot] 50f9524d4c
Bump reviewdog/action-actionlint from 1.30.0 to 1.31.0 (#135)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.30.0...v1.31.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-09-26 21:07:12 +00:00
dependabot[bot] 76e8cb7a2e
Bump codecov/codecov-action from 3.1.0 to 3.1.1 (#128)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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-09-26 20:51:08 +00:00
Conrado Gouvea 66914e6f92
add ristretto255 docs (#110)
* add ristretto255 docs

* mention FROST(ristretto255, SHA-512) explicitly

* Update frost-ristretto255/src/lib.rs

* Update frost-ristretto255/src/lib.rs

* Update frost-ristretto255/src/lib.rs

* Update frost-ristretto255/src/lib.rs

* "# Security'

* rustfmt

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-09-19 19:59:14 +00:00
Conrado Gouvea 8f2af1987c derive verification share and group public key from commitments 2022-09-19 15:24:21 -04:00
dependabot[bot] 0f18d63f5a Bump reviewdog/action-actionlint from 1.29.0 to 1.30.0
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.29.0...v1.30.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-09-19 15:11:44 -04:00
Conrado Gouvea d0c969d40a
rename keys::{Secret, Public} (#106)
* rename keys::{Secret, Public} to SecretShareValue, PublicVerificationShare

* Add SharedSecret; rename types to SigningShare, VerifyingShare

* Tidy rustdoc

* round2 rustdoc

* Happy rustdoc

* Remove commented out random() associated function for SigningShare

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-09-15 16:15:53 +00:00
dependabot[bot] 6de0e09b87 Update criterion requirement from 0.3 to 0.4
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Release notes](https://github.com/bheisler/criterion.rs/releases)
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.3.0...0.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 17:25:48 -04:00
dependabot[bot] 66ad23278b
Bump reviewdog/action-actionlint from 1.27.0 to 1.29.0 (#122)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.27.0 to 1.29.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.27.0...v1.29.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-09-05 22:15:47 +00:00
Conrado Gouvea 1ccee574ce
Remove PartialEq bounds (#107)
* make tests generic

* restore serialization test; remove Debug bound by using debugless-unwrap

* fix spacings in Cargo.toml

* Add PartialEq bound to Ciphersuite and Group; remove it from functions

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-09-05 16:54:58 -04:00
Conrado Gouvea 298da8f5fd
Make tests generic (#105)
* make tests generic

* restore serialization test; remove Debug bound by using debugless-unwrap

* fix spacings in Cargo.toml
2022-09-05 16:34:28 -04:00
Conrado Gouvea d1ddf72136
Make verification per-ciphersuite (#103)
* add VerifySignature method to Ciphersuite with default implementation

* VerifySignature -> verify_signature; fix comment

* add comment to verify_signature about batch verification

* fix batch support after rebase

* derive Eq when possible and disable clippy::derive_partial_eq_without_eq which is emitting false positives

* Make verify_prehashed() an associated method of the generic VerifyingKey

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-09-02 22:26:41 -04:00
Conrado Gouvea 86e1218fa9
use Identifier instead of index (#96)
* use Identifier instead of index

* remove pub(crate) from the Identifier index

* A comment

* Whitespace for readability

* check for zero in Identifier::to_scalar()

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-09-01 17:07:50 -03:00
dependabot[bot] 789551186a Bump reviewdog/action-actionlint from 1.26.0 to 1.27.0
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.26.0...v1.27.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-08-04 18:58:50 -04:00
Deirdre Connolly 866fdefb20
CI: Clippy, linting, check rustdoc, etc (#104)
* Clippy, linting, check rustdoc, etc

* Ignore frost-redjubjub in the workspace for now

* Make rustfmt happy

* Clippy

* Appease Clippy

* Comment out bench for now
2022-08-03 23:04:37 -04:00
Deirdre Connolly c551cd56eb
Support naive batch verification (#73)
* Support naive batch verification

* Generic batch verification compiles, but the batch verify test in core fails 😭

* The 'z' in old impl is now 'blind', as we call the response 'z' in our signatures

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

* Do the last scalar mul by the Ciphersuite::Group::cofactor() with the check

* Make VerifyingKey::verify_prehashed() pub(crate)

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2022-08-02 10:50:13 -03:00