Have Ciphersuite re-export Group

This commit is contained in:
Luke Parker 2023-03-07 03:46:16 -05:00
parent af5702fccd
commit e08adcc1ac
No known key found for this signature in database
22 changed files with 54 additions and 65 deletions

3
Cargo.lock generated
View file

@ -1695,7 +1695,6 @@ dependencies = [
"ciphersuite",
"dleq",
"flexible-transcript",
"group",
"multiexp",
"rand_core 0.6.4",
"schnorr-signatures",
@ -4675,7 +4674,6 @@ dependencies = [
"dkg",
"dleq",
"flexible-transcript",
"group",
"hex",
"minimal-ed448",
"multiexp",
@ -7521,7 +7519,6 @@ dependencies = [
"ciphersuite",
"dalek-ff-group",
"flexible-transcript",
"group",
"hex",
"multiexp",
"rand_core 0.6.4",

View file

@ -14,6 +14,7 @@ use subtle::ConstantTimeEq;
use digest::{core_api::BlockSizeUser, Digest, HashMarker};
use transcript::SecureDigest;
pub use group;
use group::{
ff::{Field, PrimeField, PrimeFieldBits},
Group, GroupOps,

View file

@ -24,9 +24,8 @@ serde = { version = "1", features = ["derive"], optional = true }
transcript = { package = "flexible-transcript", path = "../transcript", version = "0.2", features = ["recommended"] }
chacha20 = { version = "0.9", features = ["zeroize"] }
group = "0.12"
multiexp = { path = "../multiexp", version = "0.2", features = ["batch"] }
ciphersuite = { path = "../ciphersuite", version = "0.1", features = ["std"] }
multiexp = { path = "../multiexp", version = "0.2", features = ["batch"] }
schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.2" }
dleq = { path = "../dleq", version = "0.2", features = ["serialize"] }

View file

@ -17,9 +17,8 @@ use chacha20::{
use transcript::{Transcript, RecommendedTranscript};
#[cfg(test)]
use group::ff::Field;
use group::GroupEncoding;
use ciphersuite::Ciphersuite;
use ciphersuite::group::ff::Field;
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use multiexp::BatchVerifier;
use schnorr::SchnorrSignature;
@ -222,7 +221,7 @@ impl<C: Ciphersuite, E: Encryptable> EncryptedMessage<C, E> {
from: Participant,
to: C::G,
) {
use group::ff::PrimeField;
use ciphersuite::group::ff::PrimeField;
let mut repr = <C::F as PrimeField>::Repr::default();
for b in repr.as_mut().iter_mut() {
@ -246,7 +245,7 @@ impl<C: Ciphersuite, E: Encryptable> EncryptedMessage<C, E> {
from: Participant,
to: C::G,
) {
use group::ff::PrimeField;
use ciphersuite::group::ff::PrimeField;
// Assumes the share isn't randomly 1
let repr = C::F::one().to_repr();

View file

@ -10,11 +10,13 @@ use zeroize::{Zeroize, ZeroizeOnDrop, Zeroizing};
use transcript::{Transcript, RecommendedTranscript};
use group::{
use ciphersuite::{
group::{
ff::{Field, PrimeField},
Group, GroupEncoding,
},
Ciphersuite,
};
use ciphersuite::Ciphersuite;
use multiexp::{multiexp_vartime, BatchVerifier};
use schnorr::SchnorrSignature;

View file

@ -16,13 +16,14 @@ use thiserror::Error;
use zeroize::{Zeroize, Zeroizing};
use group::{
use ciphersuite::{
group::{
ff::{Field, PrimeField},
GroupEncoding,
},
Ciphersuite,
};
use ciphersuite::Ciphersuite;
/// Encryption types and utilities used to secure DKG messages.
pub mod encryption;

View file

@ -7,9 +7,7 @@ use std::{
use rand_core::{RngCore, CryptoRng};
use group::GroupEncoding;
use ciphersuite::Ciphersuite;
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use transcript::{Transcript, RecommendedTranscript};
use dleq::DLEqProof;

View file

@ -3,9 +3,7 @@ use std::collections::HashMap;
use rand_core::{RngCore, CryptoRng};
use group::ff::Field;
use ciphersuite::Ciphersuite;
use ciphersuite::{group::ff::Field, Ciphersuite};
use crate::{Participant, ThresholdCore, ThresholdKeys, lagrange};

View file

@ -5,9 +5,7 @@ use rand_core::{RngCore, CryptoRng};
use zeroize::Zeroize;
use group::Group;
use ciphersuite::Ciphersuite;
use ciphersuite::{group::Group, Ciphersuite};
use crate::{
promote::{GeneratorPromotion, GeneratorProof},

View file

@ -26,12 +26,11 @@ hex = { version = "0.4", optional = true }
digest = "0.10"
transcript = { package = "flexible-transcript", path = "../transcript", version = "0.2", features = ["recommended"] }
group = "0.12"
ciphersuite = { path = "../ciphersuite", version = "0.1", features = ["std"] }
dalek-ff-group = { path = "../dalek-ff-group", version = "^0.1.2", optional = true }
minimal-ed448 = { path = "../ed448", version = "^0.1.2", optional = true }
ciphersuite = { path = "../ciphersuite", version = "0.1", features = ["std"] }
multiexp = { path = "../multiexp", version = "0.2", features = ["batch"] }
schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.2" }

View file

@ -1,10 +1,7 @@
use digest::Digest;
use group::GroupEncoding;
use minimal_ed448::{Scalar, Point};
pub use ciphersuite::{Shake256_114, Ed448};
pub use ciphersuite::{group::GroupEncoding, Shake256_114, Ed448};
use crate::{curve::Curve, algorithm::Hram};

View file

@ -1,6 +1,4 @@
use group::GroupEncoding;
use ciphersuite::Ciphersuite;
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use crate::{curve::Curve, algorithm::Hram};

View file

@ -8,13 +8,14 @@ use subtle::ConstantTimeEq;
use digest::{Digest, Output};
use group::{
pub use ciphersuite::{
group::{
ff::{Field, PrimeField},
Group,
},
Ciphersuite,
};
pub use ciphersuite::Ciphersuite;
#[cfg(any(feature = "ristretto", feature = "ed25519"))]
mod dalek;
#[cfg(feature = "ristretto")]

View file

@ -21,7 +21,7 @@ use zeroize::{Zeroize, Zeroizing};
use transcript::Transcript;
use group::{ff::PrimeField, Group, GroupEncoding};
use ciphersuite::group::{ff::PrimeField, Group, GroupEncoding};
use multiexp::multiexp_vartime;
use dleq::MultiDLEqProof;

View file

@ -11,7 +11,7 @@ use zeroize::{Zeroize, Zeroizing};
use transcript::Transcript;
use group::{ff::PrimeField, GroupEncoding};
use ciphersuite::group::{ff::PrimeField, GroupEncoding};
use multiexp::BatchVerifier;
use crate::{
@ -195,7 +195,7 @@ impl<C: Curve> Writable for SignatureShare<C> {
#[cfg(any(test, feature = "tests"))]
impl<C: Curve> SignatureShare<C> {
pub(crate) fn invalidate(&mut self) {
use group::ff::Field;
use ciphersuite::group::ff::Field;
self.0 += C::F::one();
}

View file

@ -7,7 +7,7 @@ use rand_chacha::ChaCha20Rng;
use transcript::{Transcript, RecommendedTranscript};
use group::{ff::Field, Group, GroupEncoding};
use ciphersuite::group::{ff::Field, Group, GroupEncoding};
use dleq::MultiDLEqProof;
pub use dkg::tests::{key_gen, recover_key};

View file

@ -9,7 +9,7 @@ use zeroize::Zeroizing;
use rand_core::{RngCore, CryptoRng, SeedableRng};
use rand_chacha::ChaCha20Rng;
use group::{ff::PrimeField, GroupEncoding};
use ciphersuite::group::{ff::PrimeField, GroupEncoding};
use crate::{
curve::Curve,

View file

@ -19,9 +19,8 @@ zeroize = { version = "^1.5", features = ["zeroize_derive"] }
transcript = { package = "flexible-transcript", path = "../transcript", version = "0.2" }
group = "0.12"
multiexp = { path = "../multiexp", version = "0.2", features = ["batch"] }
ciphersuite = { path = "../ciphersuite", version = "0.1" }
multiexp = { path = "../multiexp", version = "0.2", features = ["batch"] }
[dev-dependencies]
hex = "0.4"

View file

@ -4,12 +4,14 @@ use zeroize::Zeroize;
use transcript::{Transcript, SecureDigest, DigestTranscript};
use group::{
use ciphersuite::{
group::{
ff::{Field, PrimeField},
Group, GroupEncoding,
},
Ciphersuite,
};
use multiexp::multiexp_vartime;
use ciphersuite::Ciphersuite;
use crate::SchnorrSignature;

View file

@ -5,15 +5,15 @@ use rand_core::{RngCore, CryptoRng};
use zeroize::{Zeroize, Zeroizing};
use group::{
use ciphersuite::{
group::{
ff::{Field, PrimeField},
Group, GroupEncoding,
},
Ciphersuite,
};
use multiexp::{multiexp_vartime, BatchVerifier};
use ciphersuite::Ciphersuite;
pub mod aggregate;
#[cfg(test)]

View file

@ -3,11 +3,12 @@ use core::ops::Deref;
use zeroize::Zeroizing;
use rand_core::OsRng;
use group::{ff::Field, Group};
use ciphersuite::{
group::{ff::Field, Group},
Ciphersuite, Ed25519,
};
use multiexp::BatchVerifier;
use ciphersuite::{Ciphersuite, Ed25519};
use crate::{
SchnorrSignature,
aggregate::{SchnorrAggregator, SchnorrAggregate},

View file

@ -5,9 +5,8 @@
use sha2::{Digest, Sha512};
use group::GroupEncoding;
use dalek_ff_group::Scalar;
use ciphersuite::{Ciphersuite, Ed25519};
use ciphersuite::{group::GroupEncoding, Ciphersuite, Ed25519};
use crate::SchnorrSignature;