Commit Graph

14 Commits

Author SHA1 Message Date
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
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
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 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 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
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 cee212b85f Reorg for FROST 2021-12-13 07:26:52 -05:00