Commit Graph

19 Commits

Author SHA1 Message Date
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 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 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 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 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 c323cb6861
use BTreeMap for BindingFactorList (#155) 2022-10-26 14:41:19 +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 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 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
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
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 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 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