From 393ff2cc7a45278950adec989a51f0f37a949cd9 Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 21 Jul 2023 13:55:08 -0300 Subject: [PATCH 1/8] expose dkg module --- src/frost/redjubjub.rs | 2 ++ src/frost/redpallas.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/frost/redjubjub.rs b/src/frost/redjubjub.rs index 3dfe994..51a10cd 100644 --- a/src/frost/redjubjub.rs +++ b/src/frost/redjubjub.rs @@ -220,6 +220,8 @@ pub mod keys { /// /// Used for verification purposes before publishing a signature. pub type PublicKeyPackage = frost::keys::PublicKeyPackage; + + pub mod dkg; } /// FROST(Jubjub, BLAKE2b-512) Round 1 functionality and types. diff --git a/src/frost/redpallas.rs b/src/frost/redpallas.rs index 7daff77..3dcb46e 100644 --- a/src/frost/redpallas.rs +++ b/src/frost/redpallas.rs @@ -222,6 +222,8 @@ pub mod keys { /// /// Used for verification purposes before publishing a signature. pub type PublicKeyPackage = frost::keys::PublicKeyPackage

; + + pub mod dkg; } /// FROST(Pallas, BLAKE2b-512) Round 1 functionality and types. From a9c910a579bbfabc5a132e4c7e9c5eeb75c6890d Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 21 Jul 2023 13:59:41 -0300 Subject: [PATCH 2/8] fix dkg compiling issues --- src/frost/redjubjub/dkg.md | 57 ++++++++++++++++++++------------- src/frost/redjubjub/keys/dkg.rs | 8 ++--- src/frost/redpallas/dkg.md | 57 ++++++++++++++++++++------------- src/frost/redpallas/keys/dkg.rs | 8 ++--- src/orchard/tests.rs | 42 ++++++++++++++++++++++++ 5 files changed, 118 insertions(+), 54 deletions(-) diff --git a/src/frost/redjubjub/dkg.md b/src/frost/redjubjub/dkg.md index b077d68..93cd0c8 100644 --- a/src/frost/redjubjub/dkg.md +++ b/src/frost/redjubjub/dkg.md @@ -3,7 +3,7 @@ The DKG module supports generating FROST key shares in a distributed manner, without a trusted dealer. -Before starting, each participant needs a unique identifier, which can be built from +Before starting, each participant needs an unique identifier, which can be built from a `u16`. The process in which these identifiers are allocated is up to the application. The distributed key generation process has 3 parts, with 2 communication rounds @@ -25,6 +25,7 @@ they can proceed to sign messages with FROST. ## Example ```rust +# // ANCHOR: dkg_import use rand::thread_rng; use std::collections::HashMap; @@ -32,13 +33,14 @@ use reddsa::frost::redjubjub as frost; let mut rng = thread_rng(); +let max_signers = 5; +let min_signers = 3; +# // ANCHOR_END: dkg_import + //////////////////////////////////////////////////////////////////////////// // Key generation, Round 1 //////////////////////////////////////////////////////////////////////////// -let max_signers = 5; -let min_signers = 3; - // Keep track of each participant's round 1 secret package. // In practice each participant will keep its copy; no one // will have all the participant's packages. @@ -53,16 +55,18 @@ let mut received_round1_packages = HashMap::new(); // In practice, each participant will perform this on their own environments. for participant_index in 1..=max_signers { let participant_identifier = participant_index.try_into().expect("should be nonzero"); - let (secret_package, round1_package) = frost::keys::dkg::part1( + # // ANCHOR: dkg_part1 + let (round1_secret_package, round1_package) = frost::keys::dkg::part1( participant_identifier, max_signers, min_signers, &mut rng, )?; + # // ANCHOR_END: dkg_part1 // Store the participant's secret package for later use. // In practice each participant will store it in their own environment. - round1_secret_packages.insert(participant_identifier, secret_package); + round1_secret_packages.insert(participant_identifier, round1_secret_package); // "Send" the round 1 package to all other participants. In this // test this is simulated using a HashMap; in practice this will be @@ -76,8 +80,8 @@ for participant_index in 1..=max_signers { .expect("should be nonzero"); received_round1_packages .entry(receiver_participant_identifier) - .or_insert_with(Vec::new) - .push(round1_package.clone()); + .or_insert_with(HashMap::new) + .insert(participant_identifier, round1_package.clone()); } } @@ -99,12 +103,14 @@ let mut received_round2_packages = HashMap::new(); // In practice, each participant will perform this on their own environments. for participant_index in 1..=max_signers { let participant_identifier = participant_index.try_into().expect("should be nonzero"); - let (round2_secret_package, round2_packages) = frost::keys::dkg::part2( - round1_secret_packages - .remove(&participant_identifier) - .unwrap(), - &received_round1_packages[&participant_identifier], - )?; + let round1_secret_package = round1_secret_packages + .remove(&participant_identifier) + .unwrap(); + let round1_packages = &received_round1_packages[&participant_identifier]; + # // ANCHOR: dkg_part2 + let (round2_secret_package, round2_packages) = + frost::keys::dkg::part2(round1_secret_package, round1_packages)?; + # // ANCHOR_END: dkg_part2 // Store the participant's secret package for later use. // In practice each participant will store it in their own environment. @@ -115,11 +121,11 @@ for participant_index in 1..=max_signers { // sent through some communication channel. // Note that, in contrast to the previous part, here each other participant // gets its own specific package. - for round2_package in round2_packages { + for (receiver_identifier, round2_package) in round2_packages { received_round2_packages - .entry(round2_package.receiver_identifier) - .or_insert_with(Vec::new) - .push(round2_package); + .entry(receiver_identifier) + .or_insert_with(HashMap::new) + .insert(participant_identifier, round2_package); } } @@ -142,13 +148,18 @@ let mut pubkey_packages = HashMap::new(); // In practice, each participant will perform this on their own environments. for participant_index in 1..=max_signers { let participant_identifier = participant_index.try_into().expect("should be nonzero"); - let (key_package, pubkey_package_for_participant) = frost::keys::dkg::part3( - &round2_secret_packages[&participant_identifier], - &received_round1_packages[&participant_identifier], - &received_round2_packages[&participant_identifier], + let round2_secret_package = &round2_secret_packages[&participant_identifier]; + let round1_packages = &received_round1_packages[&participant_identifier]; + let round2_packages = &received_round2_packages[&participant_identifier]; + # // ANCHOR: dkg_part3 + let (key_package, pubkey_package) = frost::keys::dkg::part3( + round2_secret_package, + round1_packages, + round2_packages, )?; + # // ANCHOR_END: dkg_part3 key_packages.insert(participant_identifier, key_package); - pubkey_packages.insert(participant_identifier, pubkey_package_for_participant); + pubkey_packages.insert(participant_identifier, pubkey_package); } // With its own key package and the pubkey package, each participant can now proceed diff --git a/src/frost/redjubjub/keys/dkg.rs b/src/frost/redjubjub/keys/dkg.rs index 4a93fe4..bf25e22 100644 --- a/src/frost/redjubjub/keys/dkg.rs +++ b/src/frost/redjubjub/keys/dkg.rs @@ -64,8 +64,8 @@ pub fn part1( /// must be sent to other participants. pub fn part2( secret_package: round1::SecretPackage, - round1_packages: &[round1::Package], -) -> Result<(round2::SecretPackage, Vec), Error> { + round1_packages: &HashMap, +) -> Result<(round2::SecretPackage, HashMap), Error> { frost::keys::dkg::part2(secret_package, round1_packages) } @@ -80,8 +80,8 @@ pub fn part2( /// signatures. pub fn part3( round2_secret_package: &round2::SecretPackage, - round1_packages: &[round1::Package], - round2_packages: &[round2::Package], + round1_packages: &HashMap, + round2_packages: &HashMap, ) -> Result<(KeyPackage, PublicKeyPackage), Error> { frost::keys::dkg::part3(round2_secret_package, round1_packages, round2_packages) } diff --git a/src/frost/redpallas/dkg.md b/src/frost/redpallas/dkg.md index e6362d7..93abd4d 100644 --- a/src/frost/redpallas/dkg.md +++ b/src/frost/redpallas/dkg.md @@ -3,7 +3,7 @@ The DKG module supports generating FROST key shares in a distributed manner, without a trusted dealer. -Before starting, each participant needs a unique identifier, which can be built from +Before starting, each participant needs an unique identifier, which can be built from a `u16`. The process in which these identifiers are allocated is up to the application. The distributed key generation process has 3 parts, with 2 communication rounds @@ -25,6 +25,7 @@ they can proceed to sign messages with FROST. ## Example ```rust +# // ANCHOR: dkg_import use rand::thread_rng; use std::collections::HashMap; @@ -32,13 +33,14 @@ use reddsa::frost::redpallas as frost; let mut rng = thread_rng(); +let max_signers = 5; +let min_signers = 3; +# // ANCHOR_END: dkg_import + //////////////////////////////////////////////////////////////////////////// // Key generation, Round 1 //////////////////////////////////////////////////////////////////////////// -let max_signers = 5; -let min_signers = 3; - // Keep track of each participant's round 1 secret package. // In practice each participant will keep its copy; no one // will have all the participant's packages. @@ -53,16 +55,18 @@ let mut received_round1_packages = HashMap::new(); // In practice, each participant will perform this on their own environments. for participant_index in 1..=max_signers { let participant_identifier = participant_index.try_into().expect("should be nonzero"); - let (secret_package, round1_package) = frost::keys::dkg::part1( + # // ANCHOR: dkg_part1 + let (round1_secret_package, round1_package) = frost::keys::dkg::part1( participant_identifier, max_signers, min_signers, &mut rng, )?; + # // ANCHOR_END: dkg_part1 // Store the participant's secret package for later use. // In practice each participant will store it in their own environment. - round1_secret_packages.insert(participant_identifier, secret_package); + round1_secret_packages.insert(participant_identifier, round1_secret_package); // "Send" the round 1 package to all other participants. In this // test this is simulated using a HashMap; in practice this will be @@ -76,8 +80,8 @@ for participant_index in 1..=max_signers { .expect("should be nonzero"); received_round1_packages .entry(receiver_participant_identifier) - .or_insert_with(Vec::new) - .push(round1_package.clone()); + .or_insert_with(HashMap::new) + .insert(participant_identifier, round1_package.clone()); } } @@ -99,12 +103,14 @@ let mut received_round2_packages = HashMap::new(); // In practice, each participant will perform this on their own environments. for participant_index in 1..=max_signers { let participant_identifier = participant_index.try_into().expect("should be nonzero"); - let (round2_secret_package, round2_packages) = frost::keys::dkg::part2( - round1_secret_packages - .remove(&participant_identifier) - .unwrap(), - &received_round1_packages[&participant_identifier], - )?; + let round1_secret_package = round1_secret_packages + .remove(&participant_identifier) + .unwrap(); + let round1_packages = &received_round1_packages[&participant_identifier]; + # // ANCHOR: dkg_part2 + let (round2_secret_package, round2_packages) = + frost::keys::dkg::part2(round1_secret_package, round1_packages)?; + # // ANCHOR_END: dkg_part2 // Store the participant's secret package for later use. // In practice each participant will store it in their own environment. @@ -115,11 +121,11 @@ for participant_index in 1..=max_signers { // sent through some communication channel. // Note that, in contrast to the previous part, here each other participant // gets its own specific package. - for round2_package in round2_packages { + for (receiver_identifier, round2_package) in round2_packages { received_round2_packages - .entry(round2_package.receiver_identifier) - .or_insert_with(Vec::new) - .push(round2_package); + .entry(receiver_identifier) + .or_insert_with(HashMap::new) + .insert(participant_identifier, round2_package); } } @@ -142,13 +148,18 @@ let mut pubkey_packages = HashMap::new(); // In practice, each participant will perform this on their own environments. for participant_index in 1..=max_signers { let participant_identifier = participant_index.try_into().expect("should be nonzero"); - let (key_package, pubkey_package_for_participant) = frost::keys::dkg::part3( - &round2_secret_packages[&participant_identifier], - &received_round1_packages[&participant_identifier], - &received_round2_packages[&participant_identifier], + let round2_secret_package = &round2_secret_packages[&participant_identifier]; + let round1_packages = &received_round1_packages[&participant_identifier]; + let round2_packages = &received_round2_packages[&participant_identifier]; + # // ANCHOR: dkg_part3 + let (key_package, pubkey_package) = frost::keys::dkg::part3( + round2_secret_package, + round1_packages, + round2_packages, )?; + # // ANCHOR_END: dkg_part3 key_packages.insert(participant_identifier, key_package); - pubkey_packages.insert(participant_identifier, pubkey_package_for_participant); + pubkey_packages.insert(participant_identifier, pubkey_package); } // With its own key package and the pubkey package, each participant can now proceed diff --git a/src/frost/redpallas/keys/dkg.rs b/src/frost/redpallas/keys/dkg.rs index f0703ac..cb638f3 100644 --- a/src/frost/redpallas/keys/dkg.rs +++ b/src/frost/redpallas/keys/dkg.rs @@ -64,8 +64,8 @@ pub fn part1( /// must be sent to other participants. pub fn part2( secret_package: round1::SecretPackage, - round1_packages: &[round1::Package], -) -> Result<(round2::SecretPackage, Vec), Error> { + round1_packages: &HashMap, +) -> Result<(round2::SecretPackage, HashMap), Error> { frost::keys::dkg::part2(secret_package, round1_packages) } @@ -80,8 +80,8 @@ pub fn part2( /// signatures. pub fn part3( round2_secret_package: &round2::SecretPackage, - round1_packages: &[round1::Package], - round2_packages: &[round2::Package], + round1_packages: &HashMap, + round2_packages: &HashMap, ) -> Result<(KeyPackage, PublicKeyPackage), Error> { frost::keys::dkg::part3(round2_secret_package, round1_packages, round2_packages) } diff --git a/src/orchard/tests.rs b/src/orchard/tests.rs index 4918fa5..1461ed2 100644 --- a/src/orchard/tests.rs +++ b/src/orchard/tests.rs @@ -1,6 +1,7 @@ use std::println; use crate::scalar_mul::{self, VartimeMultiscalarMul}; +use crate::{orchard, Signature, SigningKey, VerificationKey, VerificationKeyBytes}; use alloc::vec::Vec; use group::ff::Field; use group::{ff::PrimeField, GroupEncoding}; @@ -9,6 +10,47 @@ use rand::thread_rng; use pasta_curves::arithmetic::CurveExt; use pasta_curves::pallas; +#[test] +fn orchard_sign() { + let msg = + hex::decode("8ca86a5e2f89da4dd6b8f26f740f360667ec1526cdb0ac7719ddd1c4a1e62981").unwrap(); + + // Generate a secret key and sign the message + let sk_bytes: [u8; 32] = + hex::decode("6a0df875bb9747883d518dd12223c986bb8166468263f0ab27f235c90d07db30") + .unwrap() + .try_into() + .unwrap(); + let sk = SigningKey::::try_from(sk_bytes).unwrap(); + let ak: VerificationKey<_> = (&sk).into(); + let ak: VerificationKeyBytes<_> = ak.into(); + let ak: [u8; 32] = ak.into(); + println!("ak: {}", hex::encode(ak)); + + let randomizer_bytes: [u8; 32] = + hex::decode("10e10752b172b0bfbce1fcc577da34023b67749aa37c50845a35fdc04dc4d51f") + .unwrap() + .try_into() + .unwrap(); + let randomizer = pasta_curves::pallas::Scalar::from_repr(randomizer_bytes).unwrap(); + + let sk = sk.randomize(&randomizer); + + let sig = sk.sign(thread_rng(), &msg); + + // Types can be converted to raw byte arrays using From/Into + let sig_bytes: [u8; 64] = sig.into(); + println!("Signature: {}", hex::encode(sig_bytes)); + let pk: VerificationKey = (&sk).into(); + let pk_bytes: [u8; 32] = pk.into(); + + // Deserialize and verify the signature. + let sig: Signature = sig_bytes.into(); + assert!(VerificationKey::try_from(pk_bytes) + .and_then(|pk| pk.verify(&msg, &sig)) + .is_ok()); +} + #[test] fn orchard_spendauth_basepoint() { use super::ORCHARD_SPENDAUTHSIG_BASEPOINT_BYTES; From e14242f74b74953d22e4fcd9824b7aa596d3b4c1 Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 21 Jul 2023 22:01:02 -0300 Subject: [PATCH 3/8] incorporate frost repo fixes; add into_positive_y() for RedPallas --- Cargo.toml | 7 +- src/frost/redjubjub.rs | 72 +++++++++++---- src/frost/redjubjub/keys/repairable.rs | 55 ++++++++++++ src/frost/redpallas.rs | 117 +++++++++++++++++++++---- src/frost/redpallas/keys/repairable.rs | 55 ++++++++++++ src/orchard/tests.rs | 42 --------- 6 files changed, 272 insertions(+), 76 deletions(-) create mode 100644 src/frost/redjubjub/keys/repairable.rs create mode 100644 src/frost/redpallas/keys/repairable.rs diff --git a/Cargo.toml b/Cargo.toml index a064e52..e1100fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,8 @@ pasta_curves = { version = "0.5", default-features = false } rand_core = { version = "0.6", default-features = false } serde = { version = "1", optional = true, features = ["derive"] } thiserror = { version = "1.0", optional = true } -frost-rerandomized = { version = "0.6.0", optional = true } +# frost-rerandomized = { version = "0.6.0", optional = true } +frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev = "a1834dccd046d852e368c565474e78af77b5d9a8", features=["test-impl"], optional = true } [dependencies.zeroize] version = "1" @@ -50,7 +51,8 @@ proptest = "1.0" rand = "0.8" rand_chacha = "0.3" serde_json = "1.0" -frost-rerandomized = { version = "0.6.0", features=["test-impl"] } +# frost-rerandomized = { version = "0.6.0", features=["test-impl"] } +frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev = "a1834dccd046d852e368c565474e78af77b5d9a8", features=["test-impl"] } num-bigint = "0.4.3" num-traits = "0.2.15" @@ -66,6 +68,7 @@ std = ["blake2b_simd/std", "thiserror", "zeroize", "alloc", alloc = ["hex"] nightly = [] frost = ["std", "frost-rerandomized"] +serde = ["dep:serde", "frost-rerandomized?/serde"] default = ["std"] [[bench]] diff --git a/src/frost/redjubjub.rs b/src/frost/redjubjub.rs index 51a10cd..9e5ae31 100644 --- a/src/frost/redjubjub.rs +++ b/src/frost/redjubjub.rs @@ -8,10 +8,13 @@ use group::GroupEncoding; #[cfg(feature = "alloc")] use group::{ff::Field as FFField, ff::PrimeField}; -use frost_rerandomized::{ - frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError}, - RandomizedParams, +// Re-exports in our public API +#[cfg(feature = "serde")] +pub use frost_rerandomized::frost_core::serde; +pub use frost_rerandomized::frost_core::{ + frost, Ciphersuite, Field, FieldError, Group, GroupError, }; +pub use rand_core; use rand_core::{CryptoRng, RngCore}; @@ -198,8 +201,24 @@ pub mod keys { frost::keys::generate_with_dealer(max_signers, min_signers, identifiers, &mut rng) } + /// Splits an existing key into FROST shares. + /// + /// This is identical to [`generate_with_dealer`] but receives an existing key + /// instead of generating a fresh one. This is useful in scenarios where + /// the key needs to be generated externally or must be derived from e.g. a + /// seed phrase. + pub fn split( + key: &SigningKey, + max_signers: u16, + min_signers: u16, + identifiers: IdentifierList, + rng: &mut R, + ) -> Result<(HashMap, PublicKeyPackage), Error> { + frost::keys::split(key, max_signers, min_signers, identifiers, rng) + } + /// Secret and public key material generated by a dealer performing - /// [`keygen_with_dealer`]. + /// [`generate_with_dealer`]. /// /// # Security /// @@ -207,6 +226,12 @@ pub mod keys { /// .into(), which under the hood also performs validation. pub type SecretShare = frost::keys::SecretShare; + /// A secret scalar value representing a signer's share of the group secret. + pub type SigningShare = frost::keys::SigningShare; + + /// A public group element that represents a single signer's public verification share. + pub type VerifyingShare = frost::keys::VerifyingShare; + /// A FROST(Jubjub, BLAKE2b-512) keypair, which can be generated either by a trusted dealer or using /// a DKG. /// @@ -221,7 +246,22 @@ pub mod keys { /// Used for verification purposes before publishing a signature. pub type PublicKeyPackage = frost::keys::PublicKeyPackage; + /// Contains the commitments to the coefficients for our secret polynomial _f_, + /// used to generate participants' key shares. + /// + /// [`VerifiableSecretSharingCommitment`] contains a set of commitments to the coefficients (which + /// themselves are scalars) for a secret polynomial f, where f is used to + /// generate each ith participant's key share f(i). Participants use this set of + /// commitments to perform verifiable secret sharing. + /// + /// Note that participants MUST be assured that they have the *same* + /// [`VerifiableSecretSharingCommitment`], either by performing pairwise comparison, or by using + /// some agreed-upon public location for publication, where each participant can + /// ensure that they received the correct (and same) value. + pub type VerifiableSecretSharingCommitment = frost::keys::VerifiableSecretSharingCommitment; + pub mod dkg; + pub mod repairable; } /// FROST(Jubjub, BLAKE2b-512) Round 1 functionality and types. @@ -242,6 +282,9 @@ pub mod round1 { /// SigningCommitment can be used for exactly *one* signature. pub type SigningCommitments = frost::round1::SigningCommitments; + /// A commitment to a signing nonce share. + pub type NonceCommitment = frost::round1::NonceCommitment; + /// Performed once by each participant selected for the signing operation. /// /// Generates the signing nonces and commitments to be used in the signing @@ -269,9 +312,8 @@ pub mod round2 { /// shares into the joint signature. pub type SignatureShare = frost::round2::SignatureShare; - /// Generated by the coordinator of the signing operation and distributed to - /// each signing party - pub type SigningPackage = frost::SigningPackage; + /// A randomizer. A random scalar which is used to randomize the key. + pub type Randomizer = frost_rerandomized::Randomizer; /// Performed once by each participant selected for the signing operation. /// @@ -285,20 +327,18 @@ pub mod round2 { signing_package: &SigningPackage, signer_nonces: &round1::SigningNonces, key_package: &keys::KeyPackage, - randomizer_point: &<::Group as Group>::Element, + randomizer: Randomizer, ) -> Result { - frost_rerandomized::sign( - signing_package, - signer_nonces, - key_package, - randomizer_point, - ) + frost_rerandomized::sign(signing_package, signer_nonces, key_package, randomizer) } } /// A Schnorr signature on FROST(Jubjub, BLAKE2b-512). pub type Signature = frost_rerandomized::frost_core::Signature; +/// Randomized parameters for a signing instance of randomized FROST. +pub type RandomizedParams = frost_rerandomized::RandomizedParams; + /// Verifies each FROST(Jubjub, BLAKE2b-512) participant's signature share, and if all are valid, /// aggregates the shares into a signature to publish. /// @@ -315,10 +355,10 @@ pub type Signature = frost_rerandomized::frost_core::Signature; /// can avoid that step. However, at worst, this results in a denial of /// service attack due to publishing an invalid signature. pub fn aggregate( - signing_package: &round2::SigningPackage, + signing_package: &SigningPackage, signature_shares: &HashMap, pubkeys: &keys::PublicKeyPackage, - randomized_params: &RandomizedParams, + randomized_params: &RandomizedParams, ) -> Result { frost_rerandomized::aggregate( signing_package, diff --git a/src/frost/redjubjub/keys/repairable.rs b/src/frost/redjubjub/keys/repairable.rs new file mode 100644 index 0000000..bd92a7a --- /dev/null +++ b/src/frost/redjubjub/keys/repairable.rs @@ -0,0 +1,55 @@ +//! Repairable Threshold Scheme +//! +//! Implements the Repairable Threshold Scheme (RTS) from . +//! The RTS is used to help a signer (participant) repair their lost share. This is achieved +//! using a subset of the other signers know here as `helpers`. + +use std::collections::HashMap; + +use jubjub::Scalar; + +use crate::frost::redjubjub::{ + frost, Ciphersuite, CryptoRng, Error, Identifier, JubjubBlake2b512, RngCore, +}; + +use super::{SecretShare, VerifiableSecretSharingCommitment}; + +/// Step 1 of RTS. +/// +/// Generates the "delta" values from `helper_i` to help `participant` recover their share +/// where `helpers` contains the identifiers of all the helpers (including `helper_i`), and `share_i` +/// is the share of `helper_i`. +/// +/// Returns a HashMap mapping which value should be sent to which participant. +pub fn repair_share_step_1( + helpers: &[Identifier], + share_i: &SecretShare, + rng: &mut R, + participant: Identifier, +) -> Result, Error> { + frost::keys::repairable::repair_share_step_1(helpers, share_i, rng, participant) +} + +/// Step 2 of RTS. +/// +/// Generates the `sigma` values from all `deltas` received from `helpers` +/// to help `participant` recover their share. +/// `sigma` is the sum of all received `delta` and the `delta_i` generated for `helper_i`. +/// +/// Returns a scalar +pub fn repair_share_step_2(deltas_j: &[Scalar]) -> Scalar { + frost::keys::repairable::repair_share_step_2::(deltas_j) +} + +/// Step 3 of RTS +/// +/// The `participant` sums all `sigma_j` received to compute the `share`. The `SecretShare` +/// is made up of the `identifier`and `commitment` of the `participant` as well as the +/// `value` which is the `SigningShare`. +pub fn repair_share_step_3( + sigmas: &[Scalar], + identifier: Identifier, + commitment: &VerifiableSecretSharingCommitment, +) -> SecretShare { + frost::keys::repairable::repair_share_step_3(sigmas, identifier, commitment) +} diff --git a/src/frost/redpallas.rs b/src/frost/redpallas.rs index 3dcb46e..0b62f57 100644 --- a/src/frost/redpallas.rs +++ b/src/frost/redpallas.rs @@ -9,10 +9,13 @@ use group::GroupEncoding; use group::{ff::Field as FFField, ff::PrimeField, Group as FFGroup}; use pasta_curves::pallas; -use frost_rerandomized::{ - frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError}, - RandomizedParams, +// Re-exports in our public API +#[cfg(feature = "serde")] +pub use frost_rerandomized::frost_core::serde; +pub use frost_rerandomized::frost_core::{ + frost, Ciphersuite, Field, FieldError, Group, GroupError, }; +pub use rand_core; use rand_core::{CryptoRng, RngCore}; @@ -116,6 +119,8 @@ impl Group for PallasGroup { /// An implementation of the FROST(Pallas, BLAKE2b-512) ciphersuite. #[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(crate = "self::serde"))] pub struct PallasBlake2b512; impl Ciphersuite for PallasBlake2b512 { @@ -200,8 +205,24 @@ pub mod keys { frost::keys::generate_with_dealer(max_signers, min_signers, identifiers, &mut rng) } + /// Splits an existing key into FROST shares. + /// + /// This is identical to [`generate_with_dealer`] but receives an existing key + /// instead of generating a fresh one. This is useful in scenarios where + /// the key needs to be generated externally or must be derived from e.g. a + /// seed phrase. + pub fn split( + key: &SigningKey, + max_signers: u16, + min_signers: u16, + identifiers: IdentifierList, + rng: &mut R, + ) -> Result<(HashMap, PublicKeyPackage), Error> { + frost::keys::split(key, max_signers, min_signers, identifiers, rng) + } + /// Secret and public key material generated by a dealer performing - /// [`keygen_with_dealer`]. + /// [`generate_with_dealer`]. /// /// # Security /// @@ -209,6 +230,12 @@ pub mod keys { /// .into(), which under the hood also performs validation. pub type SecretShare = frost::keys::SecretShare

; + /// A secret scalar value representing a signer's share of the group secret. + pub type SigningShare = frost::keys::SigningShare

; + + /// A public group element that represents a single signer's public verification share. + pub type VerifyingShare = frost::keys::VerifyingShare

; + /// A FROST(Pallas, BLAKE2b-512) keypair, which can be generated either by a trusted dealer or using /// a DKG. /// @@ -223,7 +250,65 @@ pub mod keys { /// Used for verification purposes before publishing a signature. pub type PublicKeyPackage = frost::keys::PublicKeyPackage

; + /// Contains the commitments to the coefficients for our secret polynomial _f_, + /// used to generate participants' key shares. + /// + /// [`VerifiableSecretSharingCommitment`] contains a set of commitments to the coefficients (which + /// themselves are scalars) for a secret polynomial f, where f is used to + /// generate each ith participant's key share f(i). Participants use this set of + /// commitments to perform verifiable secret sharing. + /// + /// Note that participants MUST be assured that they have the *same* + /// [`VerifiableSecretSharingCommitment`], either by performing pairwise comparison, or by using + /// some agreed-upon public location for publication, where each participant can + /// ensure that they received the correct (and same) value. + pub type VerifiableSecretSharingCommitment = frost::keys::VerifiableSecretSharingCommitment

; + + /// Trait for ensuring the group public key has a positive Y coordinate. + pub trait PositiveY { + /// Convert the given package to make sure the group public key has + /// a positive Y coordinate. + fn into_positive_y(self) -> Self; + } + + impl PositiveY for PublicKeyPackage { + fn into_positive_y(self) -> Self { + let pubkey = self.group_public(); + let pubkey_serialized = pubkey.serialize(); + if pubkey_serialized[31] & 0x80 != 0 { + let pubkey = VerifyingKey::new(-pubkey.to_element()); + let signer_pubkeys: HashMap<_, _> = self + .signer_pubkeys() + .iter() + .map(|(i, vs)| { + let vs = VerifyingShare::new(-vs.to_element()); + (*i, vs) + }) + .collect(); + PublicKeyPackage::new(signer_pubkeys, pubkey) + } else { + self + } + } + } + + impl PositiveY for KeyPackage { + fn into_positive_y(self) -> Self { + let pubkey = self.group_public(); + let pubkey_serialized = pubkey.serialize(); + if pubkey_serialized[31] & 0x80 != 0 { + let pubkey = VerifyingKey::new(-pubkey.to_element()); + let signing_share = SigningShare::new(-self.secret_share().to_scalar()); + let verifying_share = VerifyingShare::new(-self.public().to_element()); + KeyPackage::new(*self.identifier(), signing_share, verifying_share, pubkey) + } else { + self + } + } + } + pub mod dkg; + pub mod repairable; } /// FROST(Pallas, BLAKE2b-512) Round 1 functionality and types. @@ -244,6 +329,9 @@ pub mod round1 { /// SigningCommitment can be used for exactly *one* signature. pub type SigningCommitments = frost::round1::SigningCommitments

; + /// A commitment to a signing nonce share. + pub type NonceCommitment = frost::round1::NonceCommitment

; + /// Performed once by each participant selected for the signing operation. /// /// Generates the signing nonces and commitments to be used in the signing @@ -271,9 +359,8 @@ pub mod round2 { /// shares into the joint signature. pub type SignatureShare = frost::round2::SignatureShare

; - /// Generated by the coordinator of the signing operation and distributed to - /// each signing party - pub type SigningPackage = frost::SigningPackage

; + /// A randomizer. A random scalar which is used to randomize the key. + pub type Randomizer = frost_rerandomized::Randomizer

; /// Performed once by each participant selected for the signing operation. /// @@ -287,20 +374,18 @@ pub mod round2 { signing_package: &SigningPackage, signer_nonces: &round1::SigningNonces, key_package: &keys::KeyPackage, - randomizer_point: &<

::Group as Group>::Element, + randomizer: Randomizer, ) -> Result { - frost_rerandomized::sign( - signing_package, - signer_nonces, - key_package, - randomizer_point, - ) + frost_rerandomized::sign(signing_package, signer_nonces, key_package, randomizer) } } /// A Schnorr signature on FROST(Pallas, BLAKE2b-512). pub type Signature = frost_rerandomized::frost_core::Signature

; +/// Randomized parameters for a signing instance of randomized FROST. +pub type RandomizedParams = frost_rerandomized::RandomizedParams

; + /// Verifies each FROST(Pallas, BLAKE2b-512) participant's signature share, and if all are valid, /// aggregates the shares into a signature to publish. /// @@ -317,10 +402,10 @@ pub type Signature = frost_rerandomized::frost_core::Signature

; /// can avoid that step. However, at worst, this results in a denial of /// service attack due to publishing an invalid signature. pub fn aggregate( - signing_package: &round2::SigningPackage, + signing_package: &SigningPackage, signature_shares: &HashMap, pubkeys: &keys::PublicKeyPackage, - randomized_params: &RandomizedParams

, + randomized_params: &RandomizedParams, ) -> Result { frost_rerandomized::aggregate( signing_package, diff --git a/src/frost/redpallas/keys/repairable.rs b/src/frost/redpallas/keys/repairable.rs new file mode 100644 index 0000000..15d05db --- /dev/null +++ b/src/frost/redpallas/keys/repairable.rs @@ -0,0 +1,55 @@ +//! Repairable Threshold Scheme +//! +//! Implements the Repairable Threshold Scheme (RTS) from . +//! The RTS is used to help a signer (participant) repair their lost share. This is achieved +//! using a subset of the other signers know here as `helpers`. + +use std::collections::HashMap; + +use pasta_curves::pallas::Scalar; + +use crate::frost::redpallas::{ + frost, Ciphersuite, CryptoRng, Error, Identifier, PallasBlake2b512, RngCore, +}; + +use super::{SecretShare, VerifiableSecretSharingCommitment}; + +/// Step 1 of RTS. +/// +/// Generates the "delta" values from `helper_i` to help `participant` recover their share +/// where `helpers` contains the identifiers of all the helpers (including `helper_i`), and `share_i` +/// is the share of `helper_i`. +/// +/// Returns a HashMap mapping which value should be sent to which participant. +pub fn repair_share_step_1( + helpers: &[Identifier], + share_i: &SecretShare, + rng: &mut R, + participant: Identifier, +) -> Result, Error> { + frost::keys::repairable::repair_share_step_1(helpers, share_i, rng, participant) +} + +/// Step 2 of RTS. +/// +/// Generates the `sigma` values from all `deltas` received from `helpers` +/// to help `participant` recover their share. +/// `sigma` is the sum of all received `delta` and the `delta_i` generated for `helper_i`. +/// +/// Returns a scalar +pub fn repair_share_step_2(deltas_j: &[Scalar]) -> Scalar { + frost::keys::repairable::repair_share_step_2::(deltas_j) +} + +/// Step 3 of RTS +/// +/// The `participant` sums all `sigma_j` received to compute the `share`. The `SecretShare` +/// is made up of the `identifier`and `commitment` of the `participant` as well as the +/// `value` which is the `SigningShare`. +pub fn repair_share_step_3( + sigmas: &[Scalar], + identifier: Identifier, + commitment: &VerifiableSecretSharingCommitment, +) -> SecretShare { + frost::keys::repairable::repair_share_step_3(sigmas, identifier, commitment) +} diff --git a/src/orchard/tests.rs b/src/orchard/tests.rs index 1461ed2..4918fa5 100644 --- a/src/orchard/tests.rs +++ b/src/orchard/tests.rs @@ -1,7 +1,6 @@ use std::println; use crate::scalar_mul::{self, VartimeMultiscalarMul}; -use crate::{orchard, Signature, SigningKey, VerificationKey, VerificationKeyBytes}; use alloc::vec::Vec; use group::ff::Field; use group::{ff::PrimeField, GroupEncoding}; @@ -10,47 +9,6 @@ use rand::thread_rng; use pasta_curves::arithmetic::CurveExt; use pasta_curves::pallas; -#[test] -fn orchard_sign() { - let msg = - hex::decode("8ca86a5e2f89da4dd6b8f26f740f360667ec1526cdb0ac7719ddd1c4a1e62981").unwrap(); - - // Generate a secret key and sign the message - let sk_bytes: [u8; 32] = - hex::decode("6a0df875bb9747883d518dd12223c986bb8166468263f0ab27f235c90d07db30") - .unwrap() - .try_into() - .unwrap(); - let sk = SigningKey::::try_from(sk_bytes).unwrap(); - let ak: VerificationKey<_> = (&sk).into(); - let ak: VerificationKeyBytes<_> = ak.into(); - let ak: [u8; 32] = ak.into(); - println!("ak: {}", hex::encode(ak)); - - let randomizer_bytes: [u8; 32] = - hex::decode("10e10752b172b0bfbce1fcc577da34023b67749aa37c50845a35fdc04dc4d51f") - .unwrap() - .try_into() - .unwrap(); - let randomizer = pasta_curves::pallas::Scalar::from_repr(randomizer_bytes).unwrap(); - - let sk = sk.randomize(&randomizer); - - let sig = sk.sign(thread_rng(), &msg); - - // Types can be converted to raw byte arrays using From/Into - let sig_bytes: [u8; 64] = sig.into(); - println!("Signature: {}", hex::encode(sig_bytes)); - let pk: VerificationKey = (&sk).into(); - let pk_bytes: [u8; 32] = pk.into(); - - // Deserialize and verify the signature. - let sig: Signature = sig_bytes.into(); - assert!(VerificationKey::try_from(pk_bytes) - .and_then(|pk| pk.verify(&msg, &sig)) - .is_ok()); -} - #[test] fn orchard_spendauth_basepoint() { use super::ORCHARD_SPENDAUTHSIG_BASEPOINT_BYTES; From 055fbb2d8a7510fb1840d22532ab70060889570c Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 21 Jul 2023 22:11:15 -0300 Subject: [PATCH 4/8] don't use all features in MSRV test --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c1ba9d..85b080d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,6 @@ jobs: - uses: actions-rs/cargo@v1.0.3 with: command: test - args: --all-features test_nightly: name: test on nightly runs-on: ubuntu-latest From b07ca7471f4e735b9382b1c416a2904e6df5edd0 Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 21 Jul 2023 22:27:19 -0300 Subject: [PATCH 5/8] remove unneeded frost-rerandomized import in dev-dependencies --- Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e1100fc..dfc4869 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,8 +51,6 @@ proptest = "1.0" rand = "0.8" rand_chacha = "0.3" serde_json = "1.0" -# frost-rerandomized = { version = "0.6.0", features=["test-impl"] } -frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev = "a1834dccd046d852e368c565474e78af77b5d9a8", features=["test-impl"] } num-bigint = "0.4.3" num-traits = "0.2.15" From 8534e283acf0015cc2450e2a6b49685a3bb3145d Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Fri, 21 Jul 2023 22:36:32 -0300 Subject: [PATCH 6/8] bump frost-rerandomized rev --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dfc4869..9f854fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ rand_core = { version = "0.6", default-features = false } serde = { version = "1", optional = true, features = ["derive"] } thiserror = { version = "1.0", optional = true } # frost-rerandomized = { version = "0.6.0", optional = true } -frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev = "a1834dccd046d852e368c565474e78af77b5d9a8", features=["test-impl"], optional = true } +frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev = "08cbe8f591d178879c26de3672bf11f239a361fe", features=["test-impl"], optional = true } [dependencies.zeroize] version = "1" From 3c4ed8fbecacabd274e6580cf390a287f8e86a96 Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Wed, 13 Sep 2023 17:53:28 -0300 Subject: [PATCH 7/8] update to frost-rerandomized 0.7.0 --- Cargo.toml | 4 ++-- src/frost/redjubjub.rs | 9 +++++++++ src/frost/redpallas.rs | 17 ++++++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9f854fd..15c49dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,7 @@ pasta_curves = { version = "0.5", default-features = false } rand_core = { version = "0.6", default-features = false } serde = { version = "1", optional = true, features = ["derive"] } thiserror = { version = "1.0", optional = true } -# frost-rerandomized = { version = "0.6.0", optional = true } -frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev = "08cbe8f591d178879c26de3672bf11f239a361fe", features=["test-impl"], optional = true } +frost-rerandomized = { version = "0.7.0", optional = true } [dependencies.zeroize] version = "1" @@ -53,6 +52,7 @@ rand_chacha = "0.3" serde_json = "1.0" num-bigint = "0.4.3" num-traits = "0.2.15" +frost-rerandomized = { version = "0.7.0", features = ["test-impl"] } # `alloc` is only used in test code [dev-dependencies.pasta_curves] diff --git a/src/frost/redjubjub.rs b/src/frost/redjubjub.rs index 9e5ae31..cf97e41 100644 --- a/src/frost/redjubjub.rs +++ b/src/frost/redjubjub.rs @@ -173,6 +173,15 @@ impl Ciphersuite for JubjubBlake2b512 { .finalize(), ) } + + /// HID for FROST(Jubjub, BLAKE2b-512) + fn HID(m: &[u8]) -> Option<<::Field as Field>::Scalar> { + Some( + HStar::::new(b"FROST_RedJubjubI") + .update(m) + .finalize(), + ) + } } // Shorthand alias for the ciphersuite diff --git a/src/frost/redpallas.rs b/src/frost/redpallas.rs index 0b62f57..4a705ac 100644 --- a/src/frost/redpallas.rs +++ b/src/frost/redpallas.rs @@ -177,6 +177,15 @@ impl Ciphersuite for PallasBlake2b512 { .finalize(), ) } + + /// HID for FROST(Pallas, BLAKE2b-512) + fn HID(m: &[u8]) -> Option<<::Field as Field>::Scalar> { + Some( + HStar::::new(b"FROST_RedPallasI") + .update(m) + .finalize(), + ) + } } // Shorthand alias for the ciphersuite @@ -300,7 +309,13 @@ pub mod keys { let pubkey = VerifyingKey::new(-pubkey.to_element()); let signing_share = SigningShare::new(-self.secret_share().to_scalar()); let verifying_share = VerifyingShare::new(-self.public().to_element()); - KeyPackage::new(*self.identifier(), signing_share, verifying_share, pubkey) + KeyPackage::new( + *self.identifier(), + signing_share, + verifying_share, + pubkey, + *self.min_signers(), + ) } else { self } From 1293491bb7d4c8244fc869a2793eb316220e56fe Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Thu, 14 Sep 2023 14:19:43 -0300 Subject: [PATCH 8/8] commit lockfile; update CI test to match --- .github/workflows/main.yml | 43 +- .gitignore | 1 - Cargo.lock | 1488 ++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 + rust-toolchain | 1 - 5 files changed, 1504 insertions(+), 31 deletions(-) create mode 100644 Cargo.lock delete mode 100644 rust-toolchain diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85b080d..ade004d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,45 +4,30 @@ on: [push] jobs: test_msrv: - name: test on MSRV + name: build on MSRV runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 - - uses: actions-rs/toolchain@v1.0.7 - with: - # When toolchain is not specified, it uses rust-toolchain, which is the MSRV - override: true - - uses: actions-rs/cargo@v1.0.3 - with: - command: test + - uses: actions/checkout@v4.0.0 + - uses: dtolnay/rust-toolchain@1.65.0 + # Don't use --all-features because `frost` has a higher MSRV and it's non-default. + # Also don't run tests because some dev-dependencies have higher MSRVs. + - run: cargo build test_nightly: name: test on nightly runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 - # Because we use nightly features for building docs, - # using --all-features will fail without nightly toolchain. - - uses: actions-rs/toolchain@v1.0.7 - with: - toolchain: nightly - override: true - - uses: actions-rs/cargo@v1.0.3 - with: - command: test - args: --all-features + - uses: actions/checkout@v4.0.0 + - uses: dtolnay/rust-toolchain@nightly + # Update dependencies since we commit the lockfile + - run: cargo update --verbose + - run: cargo test --all-features build_no_std: name: build with no_std runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.3 - - uses: actions-rs/toolchain@v1.0.7 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - override: true - # This does not support std, so we use to test if no_std works - target: thumbv6m-none-eabi - - uses: actions-rs/cargo@v1.0.3 - with: - command: build - # Disables std feature - args: --no-default-features --target thumbv6m-none-eabi + targets: thumbv6m-none-eabi + - run: cargo build --no-default-features --target thumbv6m-none-eabi diff --git a/.gitignore b/.gitignore index 33c9dcc..9f665f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /target **/*.rs.bk -Cargo.lock *~ diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..a57c084 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1488 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +dependencies = [ + "memchr", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstyle" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atomic-polyfill" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +dependencies = [ + "critical-section", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "bumpalo" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "bitflags 1.3.2", + "clap_lex 0.2.4", + "indexmap", + "textwrap", +] + +[[package]] +name = "clap" +version = "4.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +dependencies = [ + "anstyle", + "clap_lex 0.5.1", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "clap_lex" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + +[[package]] +name = "const-crc32" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68d13f542d70e5b339bf46f6f74704ac052cfd526c58cd87996bd1ef4615b9a0" + +[[package]] +name = "constant_time_eq" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" + +[[package]] +name = "criterion" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" +dependencies = [ + "anes", + "atty", + "cast", + "ciborium", + "clap 3.2.25", + "criterion-plot", + "itertools 0.10.5", + "lazy_static", + "num-traits", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap 4.4.3", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "debugless-unwrap" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f400d0750c0c069e8493f2256cb4da6f604b6d2eeb69a0ca8863acde352f8400" + +[[package]] +name = "derive-getters" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2c35ab6e03642397cdda1dd58abbc05d418aef8e36297f336d5aba060fe8df" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 1.0.109", +] + +[[package]] +name = "document-features" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e493c573fce17f00dcab13b6ac057994f3ce17d1af4dc39bfd482b83c6eb6157" +dependencies = [ + "litrs", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "errno" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "frost-core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b61d737e19bea0cedda9a11dab96ab1fd1e4016f707e8ee9018d8f17d2cd18" +dependencies = [ + "byteorder", + "const-crc32", + "criterion 0.5.1", + "debugless-unwrap", + "derive-getters", + "document-features", + "hex", + "itertools 0.11.0", + "postcard", + "proptest", + "rand_core", + "serde", + "serde_json", + "serdect", + "thiserror", + "visibility", + "zeroize", +] + +[[package]] +name = "frost-rerandomized" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b45409d93cf5000f52ae64847a8a270a4562f1a035e74c3fae0e2462adb97ae" +dependencies = [ + "derive-getters", + "document-features", + "frost-core", + "rand_core", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "heapless" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin", + "stable_deref_trait", +] + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi 0.3.2", + "rustix", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jubjub" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8499f7a74008aafbecb2a2e608a3e13e4dd3e84df198b604451efe93f2de6e61" +dependencies = [ + "bitvec", + "bls12_381", + "ff", + "group", + "rand_core", + "subtle", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.148" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" + +[[package]] +name = "libm" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" + +[[package]] +name = "litrs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9275e0933cf8bb20f008924c0cb07a0692fe54d8064996520bf998de9eb79aa" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.2", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "os_str_bytes" +version = "6.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" + +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff", + "group", + "rand", + "static_assertions", + "subtle", +] + +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "postcard" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d534c6e61df1c7166e636ca612d9820d486fe96ddad37f7abc671517b297488e" +dependencies = [ + "cobs", + "heapless", + "serde", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "proc-macro2" +version = "1.0.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" +dependencies = [ + "bit-set", + "bitflags 1.3.2", + "byteorder", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.6.29", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "proptest-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90b46295382dc76166cb7cf2bb4a97952464e4b7ed5a43e6cd34e1fec3349ddc" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2 1.0.67", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "reddsa" +version = "0.5.1" +dependencies = [ + "bincode", + "blake2b_simd", + "byteorder", + "criterion 0.4.0", + "frost-rerandomized", + "group", + "hex", + "jubjub", + "lazy_static", + "num-bigint", + "num-traits", + "pasta_curves", + "proptest", + "proptest-derive", + "rand", + "rand_chacha", + "rand_core", + "serde", + "serde_json", + "thiserror", + "zeroize", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax 0.7.5", +] + +[[package]] +name = "regex-automata" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" + +[[package]] +name = "serde" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.33", +] + +[[package]] +name = "serde_json" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys", +] + +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + +[[package]] +name = "thiserror" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.33", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "visibility" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3fd98999db9227cf28e59d83e1f120f42bc233d4b152e8fab9bc87d5bb1e0f8" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.33", +] + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.33", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote 1.0.33", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.33", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2 1.0.67", + "quote 1.0.33", + "syn 2.0.33", +] diff --git a/Cargo.toml b/Cargo.toml index 15c49dc..64e9e07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,8 @@ edition = "2021" rust-version = "1.65" # When releasing to crates.io: # - Update CHANGELOG.md +# - Double check if the MSRV above (rust-version field) is equal to the version +# used in main.yml `test_msrv` # - Create git tag. version = "0.5.1" authors = [ diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index 902c741..0000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.65.0