Commit Graph

42 Commits

Author SHA1 Message Date
Conrado Gouvea e5ecb2d3f4
renamed gendoc to gencode; make it unpublishable (#260) 2023-03-02 21:19:53 +00:00
Pili Guerra a0eead7f13
Remove `frost-redjubjub` (#246)
Remove frost-redjubjub
2023-02-16 22:44:12 +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 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
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 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
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
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
Deirdre Connolly cee212b85f Reorg for FROST 2021-12-13 07:26:52 -05: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
Jack Grigg f772176560 jubjub 0.7 2021-06-18 14:05:08 -04:00
Alfredo Garcia fa3c602698
Implement the messages spec (#114)
* start messages and validation

* add missing docs to constants

* change validation to matches, fix constant doc

Co-authored-by: teor <teor@riseup.net>

* fix the build

* validate share_commitment

* add new constants and validations

* fix validation

* derive serde Serialize and Deserialize in all messages structs

* update created structs

Co-authored-by: teor <teor@riseup.net>

* fix build

* define and use a new MAX_SIGNERS constant

* change group_public type

* add some test cases

* add validation and serialization tests for SigningCommitments

* add validation and serialization test to SigningPackage

* change some fields order matching the spec

* fix field order in tests according to last updates to the spec

* implement serialize and deserialize for ParticipantId

* move serde-json to dev-dependencies section

* change to pub(crate)

* fix serialize of VerificationKey

* add assert to serialize

* add note, fix typo

* improve some code in tests

* test serialization of individual fields

* start messages and validation

* add missing docs to constants

* change validation to matches, fix constant doc

Co-authored-by: teor <teor@riseup.net>

* fix the build

* validate share_commitment

* add new constants and validations

* fix validation

* define and use a new MAX_SIGNERS constant

* change group_public type

* change some fields order matching the spec

* change message fields to new spec

* remove some non needed conversions

* use a BTreeMap to guarantee the order

* remove some calls to `clone()` by implementing `Copy`

* change message type in frost and add validate_signatureshare test

* change `share_commitment` to BTreeMap

* add `serialize_signatureshare` test

* add aggregatesignature tests

* add some test header messages utility functions

* add a setup utility

* move the general serialization checks into an utility function

* fi some typos

* add and use a `generate_share_commitment` utility

* add create_signing_commitments utility function

* improve the serialization tests

* make room for prop tests

* add arbitrary tests for serialization

* remove allow dead code from messages

* fix some imports

* make signature module public only to the crate

* simplify a bit the frost tests

* improve the generated docs

* add a `prop_filter` to Header arbitrary

* (ab)use proptest_derive

* improve validation for Message

* improve some utility functions

* change frost to serialization id conversion

* add a quick btreemap test

* change the `MsgType` to `u32`

* add no leftover bytes checks

* add a full_setup utility

* add map len checks

Co-authored-by: teor <teor@riseup.net>
2021-06-16 16:13:23 -03:00
Alfredo Garcia 11ccf5de37 update byteorder 2021-05-20 16:21:38 -04:00
Deirdre Connolly 4ef6d3306d
Bump to 0.4.0 (#75) 2021-04-03 10:18:33 -04:00
Deirdre Connolly 2949f9a3f9 Upgrade rand, rand_core, and rand_chacha together 2021-04-03 10:16:21 -04:00
Jack Grigg 3571be2184 Migrate to jubjub 0.6 2021-04-03 09:48:53 -04:00
Deirdre Connolly 2f3f5068aa
Prepare 0.3.0 release (#72) 2021-03-31 17:03:08 -04:00
dependabot[bot] e40313263c Update proptest requirement from 0.10 to 1.0
Updates the requirements on [proptest](https://github.com/altsysrq/proptest) to permit the latest version.
- [Release notes](https://github.com/altsysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/altsysrq/proptest/compare/0.10.0...1.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-03 17:54:04 -05:00
Deirdre Connolly 2ebc08f910
Frost keygen with dealer (#47)
Implements FROST (Flexible Round Optimized Schnorr Threshold Signatures, https://eprint.iacr.org/2020/852) where key generation is performed by a trusted dealer. 

Future work will include implementing distributed key generation and re-randomizability. 

Co-authored-by: Chelsea Komlo <me@chelseakomlo.com>
Co-authored-by: Isis Lovecruft <isis@patternsinthevoid.net>
2021-02-25 09:06:54 -07:00
Henry de Valence 233294d701 Bump version to 0.2.2 2020-07-15 12:42:14 -07:00
Henry de Valence 3c4e72d241 crypto is not a category 2020-07-09 11:54:58 -07:00
Henry de Valence cc50b23713 Bump version to 0.2.1 2020-07-09 11:52:30 -07:00
Henry de Valence 00007d0332 Update Cargo.toml metadata 2020-07-09 11:50:53 -07:00
Henry de Valence eb5714779c release: update CHANGELOG and version. 2020-07-09 10:30:01 -07:00
Deirdre Connolly ba256655dd
Optimized batch verification (#36)
* Pulls in some traits and methods from curve25519-dalek around the
vartime multiscalar multiplication.

* Move scalar mul things we want to upstream to jubjub to their own crate

* Make Verify agnostic to the SigType

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-07-03 18:23:28 -04:00
dependabot-preview[bot] 1179d50fa8 Update proptest requirement from 0.9 to 0.10
Updates the requirements on [proptest](https://github.com/altsysrq/proptest) to permit the latest version.
- [Release notes](https://github.com/altsysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/altsysrq/proptest/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 16:25:28 -04:00
Henry de Valence aa023b428e Bump version and update changelog. 2020-01-17 10:28:12 -08:00
Henry de Valence 68deca90bf crates.io only allows 5 keywords 2019-12-09 13:58:42 -08:00
Henry de Valence c20139bbf7 Rename to just `redjubjub`. 2019-12-09 13:54:10 -08:00
Henry de Valence 570cca07b5 Update Cargo.toml metadata 2019-12-09 13:20:56 -08:00
Henry de Valence e58376fc47 Add Serialize, Deserialize for byte wrapper types. 2019-12-09 11:55:53 -08:00
Henry de Valence 76eb4c5928 Update README, fill missing impls. 2019-12-04 17:36:01 -08:00
Henry de Valence 8aeb2f14f8 Add test vectors from librustzcash.
The `SpendAuth` test vectors were generated using
`FixedGenerators::SpendingKeyGenerator`, and the `Binding` test vectors
were generated using `FixedGenerators::ValueCommitmentRandomness`.
2019-12-04 16:14:44 -08:00
Henry de Valence 7b979ddd65 Add property tests for signatures. 2019-12-04 16:14:44 -08:00
Henry de Valence f169ef06ed Use published Jubjub. 2019-12-04 12:00:26 -08:00
Henry de Valence 8bcfeae920 Add a basic test.
This ran into problems with Clone/Copy bounds -- it seems like the
derived impls require that the phantom type T also be Clone / Copy /
Debug for the type to be.  This commit does a hacky fix that makes it
work for now, but it should be cleaned up later.
2019-12-04 11:45:44 -08:00
Henry de Valence 52951f7236 Add keygen. 2019-12-03 15:39:55 -08:00
Henry de Valence 8bdb8580ff Add error stub 2019-12-02 21:36:47 -08:00
Henry de Valence c3fe237fe9 Add readme, module layout 2019-12-02 21:32:38 -08:00
Henry de Valence fd5800065a Add blake2b_simd dependency 2019-12-02 21:19:07 -08:00
Henry de Valence 47ce9add3e Add jubjub dependency 2019-12-02 21:16:23 -08:00
Henry de Valence ecac1f8205 cargo new --lib 2019-12-02 14:12:06 -08:00