diff --git a/Cargo.toml b/Cargo.toml index e87a04b..244d063 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,31 +7,31 @@ description = "EC VRFs with arkworks" repository = "https://github.com/davxy/ark-ecvrf" [dependencies] -ark-ec = { version = "0.4.2", default-features = false } -ark-ff = { version = "0.4.2", default-features = false } -ark-std = { version = "0.4.0", default-features = false } -ark-serialize = { version = "0.4.2", default-features = false } -rand_core = { version = "0.6.4", default-features = false, optional = true } -rand_chacha = { version = "0.3.1", default-features = false } +ark-ec = { version = "0.4", default-features = false } +ark-ff = { version = "0.4", default-features = false } +ark-std = { version = "0.4", default-features = false } +ark-serialize = { version = "0.4", default-features = false } +rand_core = { version = "0.6", default-features = false, optional = true } +rand_chacha = { version = "0.3", default-features = false } rayon = { version = "1.10", default-features = false, optional = true } -zeroize = { version = "1.7.0", default-features = false } -hmac = {version = "0.12.1", default-features = false, optional = true } -digest = { version = "0.10.7", default-features = false } +zeroize = { version = "1.8", default-features = false } +hmac = {version = "0.12", default-features = false, optional = true } +digest = { version = "0.10", default-features = false } +merlin = { version = "3.0", default-features = false, optional = true } # Curves ark-secp256r1 = { version = "0.4.0", default-features = false, optional = true } ark-ed25519 = { version = "0.4.0", default-features = false, optional = true } ark-ed-on-bls12-381-bandersnatch = { version = "0.4.0", default-features = false, optional = true } ark-bls12-381 = { version = "0.4.0", default-features = false, optional = true } # Hashing -sha2 = { version = "0.10.8", default-features = false } +sha2 = { version = "0.10", default-features = false } # Ring VRF (waiting for crates.io) fflonk = { git = "https://github.com/w3f/fflonk", default-features = false, optional = true } -ring-proof = { package = "ring", git = "https://github.com/w3f/ring-proof", default-features = false, optional = true } -merlin = { version = "3.0.0", default-features = false, optional = true } +ring-proof = { package = "ring", git = "https://github.com/w3f/ring-proof", rev = "b273d33", default-features = false, optional = true } [dev-dependencies] -ark-ed25519 = "0.4.0" -hex = "0.4.3" +ark-ed25519 = "0.4" +hex = "0.4" [features] default = [ "std" ] diff --git a/src/ring.rs b/src/ring.rs index a475602..472ef8f 100644 --- a/src/ring.rs +++ b/src/ring.rs @@ -19,30 +19,25 @@ type Pcs = fflonk::pcs::kzg::KZG<::Pairing>; /// Basically the powers of tau URS. type PcsParams = fflonk::pcs::kzg::urs::URS<::Pairing>; -type PairingScalarField = <::Pairing as ark_ec::pairing::Pairing>::ScalarField; +pub type ProverKey = + ring_proof::ProverKey, Pcs, ark_ec::short_weierstrass::Affine>>; -pub type ProverKey = ring_proof::ProverKey< - PairingScalarField, - Pcs, - ark_ec::short_weierstrass::Affine>, ->; +pub type VerifierKey = ring_proof::VerifierKey, Pcs>; -pub type VerifierKey = ring_proof::VerifierKey, Pcs>; - -pub type RingProver = - ring_proof::ring_prover::RingProver, Pcs, CurveConfig>; +pub type RingProver = ring_proof::ring_prover::RingProver, Pcs, CurveConfig>; pub type RingVerifier = - ring_proof::ring_verifier::RingVerifier, Pcs, CurveConfig>; + ring_proof::ring_verifier::RingVerifier, Pcs, CurveConfig>; -pub type RingProof = ring_proof::RingProof, Pcs>; +pub type RingProof = ring_proof::RingProof, Pcs>; -pub type PiopParams = ring_proof::PiopParams, CurveConfig>; +pub type PiopParams = ring_proof::PiopParams, CurveConfig>; #[derive(Clone, CanonicalSerialize, CanonicalDeserialize)] pub struct Proof where BaseField: ark_ff::PrimeField, + CurveConfig: SWCurveConfig, { pub pedersen_proof: PedersenProof, pub ring_proof: RingProof, @@ -188,7 +183,7 @@ where prover_key, self.piop_params.clone(), key_index, - merlin::Transcript::new(b"ring-vrf"), + merlin::Transcript::new(b""), ) } @@ -196,7 +191,7 @@ where RingVerifier::::init( verifier_key, self.piop_params.clone(), - merlin::Transcript::new(b"ring-vrf"), + merlin::Transcript::new(b""), ) } }