Commit Graph

479 Commits

Author SHA1 Message Date
Conrado Gouvea 2e8509837c
Fix clippy lints (#88)
fix clippy lints
2022-08-02 01:46:11 +00:00
dependabot[bot] e8bb1c2d64 Update digest requirement from 0.9 to 0.10
Updates the requirements on [digest](https://github.com/RustCrypto/traits) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/digest-v0.9.0...digest-v0.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-26 20:27:06 -04:00
Deirdre Connolly 4cb11ec393
V5 (#89)
* add commit(), use it instead of preprocess()

* use a single scalarmul in compute_group_commitment per v5 spec

* add nonce_generate() from the spec and use it

* remove Order() from Group trait since it's not used

* style: carriage return

* use Secret instead of KeyPackage in some methods

* change commit to take explicit params and not return vectors

* removed unused import

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2022-07-19 20:17:20 +00:00
Conrado Gouvea af2839f6dc
Add P-256 support (#77)
* add support for P-256 curve

* use a fixed-size array for P_256 point encoding (instead of )

* Apply suggestions from code review

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

* frost-p256: remove direct elliptic_curve dependency; use the one from p256

* fix comment in invert()

* frost-p256: rename shorthand alias

* Apply suggestions from code review

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

* improve imports, docs, use expect instead of unwrap

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2022-07-01 14:16:22 +00:00
Conrado Gouvea e1f466902c
Fix for P-256 support due to identity encoding; other improvements (#76)
* Remove AsMut bound which is not needed

* Use the generator point to get the encoded point size, since the identity in P-256 is just a single byte

* Remove FromHex bound

* Remove Default bound from Group
2022-06-27 21:47:27 +00:00
Deirdre Connolly a0bf3c57f2
Port frost-ristretto255 to frost-core (#57)
* Start port to frost-core

* Fix Signature from_bytes, frost-ristretto255 README / src/lib.rs doc test

* Move frost-ristretto255 test vector tests to that crate

* Uncomment proptest checks to exercise signature and verifying key (de)serialization

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-17 14:54:54 -04:00
Deirdre Connolly 1d5740f8ec ci(Mergify): configuration update
Signed-off-by: Deirdre Connolly <null>
2022-06-15 20:13:45 -04:00
Deirdre Connolly e6d5afdfb2
Merge pull request #50 from ZcashFoundation/frost-core
* frost-core Cargo.toml

* Ciphersuite trait

* Signature trait

* Copy stub ristretto impl for now

* First stab at making signing and verifying generic over frost-core::Ciphersuite

* Update signing

* Nice const generics and stuff for frost-core::Ciphersuite

* Have to implement traits for the pre-parameterized types inside the module

* Ciphersuite::Group::Field

* Make frost/keys generic over Ciphersuite

* frost-core genericization mostly done, modulo batch

* Move tests around

* Remove internal test module

* Lots of tidies, including type refinement of Scalar, Challenge

* More genericization and tidy'ing

* Test vectors working against Ristretto impl in the frost-core integration tests

* clippy fix

* Fix generic params for full frost example integration test using ristretto

* Genericize proptests

* clippy --fix

* Doc comment identifier module

* In-flight batch and multiscalar mul

* Stop using Scalar::from_hash() as it expects impl Digest which sha2 0.10+ isn't doing anymore

* run cargo udeps

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

* Update frost-core/src/frost.rs

* Update frost-core/src/frost/keys.rs
2022-05-16 16:53:17 -04:00
dependabot[bot] 2c86646e80 Bump codecov/codecov-action from 2.1.0 to 3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.
- [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/v2.1.0...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 17:21:43 -04:00
Deirdre Connolly 4677f353dc
Add README.md for frost-core and update for root of repo (#52)
* Add README.md for frost-core and update for root of repo

* More FROST context adapted from the spec intro
2022-04-08 09:02:49 -06:00
Deirdre Connolly f5773819da
V04 compat (#49)
* Enforce nonces cannot be generated or represented if zero

* rustdoc

* rustdoc

* Remove the unused and deprecated Commitment type
2022-04-05 11:10:59 -06:00
Deirdre Connolly c5ad38ff9d Update test vectors 2022-03-28 15:46:48 -04:00
Deirdre Connolly 7aff3b763f Make sure threshold, num signer mins are checked 2022-03-28 15:46:48 -04:00
Deirdre Connolly 506edbbe7b Do not generate commitment share as part of signing
Generate the group commitment from all round one signing commitments as part
of aggregate(). Only re-derive a commitment share from the signing share
as part of signing share verification, just before aggregate.
2022-03-28 15:46:48 -04:00
Deirdre Connolly fcd4599ec5 Some docs 2022-03-28 15:46:48 -04:00
Deirdre Connolly f757b761c6 Rename generate_ to derive_lagrange_coeff 2022-03-28 15:46:48 -04:00
Deirdre Connolly f15657b516 Reject signer or signing commitment indices that == 0 2022-03-28 15:46:48 -04:00
Deirdre Connolly f9e5f5a110 Run coverage on main to diff against base 2022-03-28 15:14:48 -04:00
Deirdre Connolly 11973761b6
Refactor frost into round1, round2 submodules (#38)
* Refactor frost into round1, round2 submodules

* Move around some stuff into frost.rs
2022-03-22 16:33:59 -04:00
Deirdre Connolly c88b5ffe1b Rename ShareCommitment VerifiableSecretSharingCommitment 2022-03-08 14:11:41 -05:00
Deirdre Connolly 0b1b7eecd5 Move keygen, key types, into frost::keys 2022-03-08 14:11:41 -05:00
Deirdre Connolly ac79d00c76 Ignore .DS_Store 2022-03-08 14:11:41 -05:00
dependabot[bot] 4d2baf07ac Bump actions/checkout from 2.4.0 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
- [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/v2.4.0...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-03 15:52:45 -05:00
Deirdre Connolly b7b6aa7907 Ensure we compute each signature share's R_share from signers' round 1 nonce commitments 2022-03-03 12:55:45 -05:00
Deirdre Connolly 48f084816b Remove commented out FromHex impl for SignatureResponse 2022-03-03 12:55:45 -05:00
Deirdre Connolly a41c02581d We no longer H3(msg) to create the challange, only to create the binding_factor 2022-03-03 12:55:45 -05:00
Deirdre Connolly bf8b138595 Small fixes, trying to get test vector sig share verification working 2022-03-03 12:55:45 -05:00
Deirdre Connolly 15706f0b48 Remove comments 2022-03-03 12:55:45 -05:00
Deirdre Connolly 77bb412c7a A bunch of fixes 2022-03-03 12:55:45 -05:00
Deirdre Connolly 5f35150088 Almost all parse, being partially checked in test 2022-03-03 12:55:45 -05:00
Deirdre Connolly c59d36d508 Turn several functions into type methods, impl FromHex for some for test vectors 2022-03-03 12:55:45 -05:00
Deirdre Connolly a05286498e Uncomment test vector test 2022-03-03 12:55:45 -05:00
Deirdre Connolly cd1e786359 Lots of little changes 2022-03-03 12:55:45 -05:00
Deirdre Connolly 9181dd0dce Add serde_json-parsed test vectors 2022-03-03 12:55:45 -05:00
Deirdre Connolly cf63f236ec Always sort signing_commitments 2022-03-03 12:55:45 -05:00
Deirdre Connolly 8ce992541a
Make Ristretto implementation up to date with spec (#25)
* WIP

* Using H1/H2/H3 per spec, the verification still fails with Verificationkey

* Use FROST spec hashes, update all challenge generations to be DRY

Make clippy happy, etc

* DRY up generate_challenge

Also rename all methods to be generate_ instead of gen_
2022-02-09 15:18:21 -07:00
Dimitris Apostolou fba11278b3 Fix typos 2022-02-08 18:52:02 -05:00
dependabot[bot] 0a271c1748 Update blake2b_simd requirement from 0.5 to 1.0
Updates the requirements on [blake2b_simd](https://github.com/oconnor663/blake2_simd) to permit the latest version.
- [Release notes](https://github.com/oconnor663/blake2_simd/releases)
- [Commits](https://github.com/oconnor663/blake2_simd/compare/0.5.0...1.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 22:26:33 -05:00
Deirdre Connolly c3c9bfcb74
Pin nightly jan 14 to fix coverage (#24)
* Pin nightly jan 14 to fix coverage

* Update coverage workflow to use cargo-llvm-cov

* Nightly is fixed
2022-01-31 17:30:23 -05:00
Deirdre Connolly a66d2041cf Clean up names and commits, run clippy fix 2022-01-13 00:06:43 -05:00
Deirdre Connolly f10a159c70 Add a note about these being works in progress 2021-12-13 17:44:14 -05:00
Deirdre Connolly 40af4d9f0d Tests working 2021-12-13 17:11:07 -05:00
Deirdre Connolly 48eceee4f4 Re-add redjubjub readme 2021-12-13 07:29:40 -05:00
Deirdre Connolly cee212b85f Reorg for FROST 2021-12-13 07:26:52 -05:00
str4d a32ae3fc87
Don't reject small-order verification keys (#137)
* Don't reject small-order verification keys

Fixes ZcashFoundation/redjubjub#127.

* Added missing changelog entries
2021-11-18 15:53:35 -03:00
dependabot[bot] 2f240d885d
Update jubjub requirement from 0.7 to 0.8 (#131)
* Update jubjub requirement from 0.7 to 0.8

Updates the requirements on [jubjub](https://github.com/zkcrypto/jubjub) to permit the latest version.
- [Release notes](https://github.com/zkcrypto/jubjub/releases)
- [Changelog](https://github.com/zkcrypto/jubjub/blob/main/RELEASES.md)
- [Commits](https://github.com/zkcrypto/jubjub/commits/0.8.0)

---
updated-dependencies:
- dependency-name: jubjub
  dependency-type: direct:production
...
2021-11-18 15:24:11 -03:00
Deirdre Connolly 3db05e29f7 Remove extra module-level doc to allow doc = include_str to work 2021-06-22 16:37:36 -04:00
Alfredo Garcia 751af8a76b remove external_docs 2021-06-22 16:37:36 -04:00
Alfredo Garcia ced2819690 another try 2021-06-22 16:37:36 -04:00
Alfredo Garcia 79b8b52baa try to fix the docs build 2021-06-22 16:37:36 -04:00