mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-11 00:11:29 +01:00
Rename curves
This commit is contained in:
@@ -46,6 +46,6 @@ std = ["r1cs", "algebra-core/std", "r1cs-core/std", "r1cs-std/std"]
|
||||
parallel = ["std", "rayon", "gm17/parallel", "groth16/parallel", "ff-fft/parallel"]
|
||||
|
||||
[dev-dependencies]
|
||||
algebra = { path = "../algebra", default-features = false, features = [ "jubjub", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
||||
r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "jubjub", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
||||
algebra = { path = "../algebra", default-features = false, features = [ "edwards_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
||||
r1cs-std = { path = "../r1cs-std", default-features = false, features = [ "edwards_on_bls12_381", "bls12_377", "mnt4_298", "mnt6_298" ] }
|
||||
rand_xorshift = { version = "0.2" }
|
||||
|
||||
@@ -143,7 +143,7 @@ mod test {
|
||||
},
|
||||
*,
|
||||
};
|
||||
use algebra::{jubjub::Fq as Fr, test_rng};
|
||||
use algebra::{edwards_on_bls12_381::Fq as Fr, test_rng};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
use r1cs_std::{prelude::*, test_constraint_system::TestConstraintSystem};
|
||||
use rand::Rng;
|
||||
|
||||
@@ -200,7 +200,7 @@ where
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use algebra::{
|
||||
jubjub::{Fq, Fr, JubJubProjective as JubJub},
|
||||
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq, Fr},
|
||||
test_rng, ProjectiveCurve, UniformRand,
|
||||
};
|
||||
|
||||
@@ -215,7 +215,8 @@ mod test {
|
||||
};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
use r1cs_std::{
|
||||
jubjub::JubJubGadget, prelude::*, test_constraint_system::TestConstraintSystem,
|
||||
edwards_on_bls12_381::JubJubGadget, prelude::*,
|
||||
test_constraint_system::TestConstraintSystem,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -145,13 +145,13 @@ mod test {
|
||||
FixedLengthCRH, FixedLengthCRHGadget,
|
||||
};
|
||||
use algebra::{
|
||||
jubjub::{Fq as Fr, JubJubProjective as JubJub},
|
||||
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
|
||||
test_rng, ProjectiveCurve,
|
||||
};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
use r1cs_std::{
|
||||
alloc::AllocGadget, jubjub::JubJubGadget, test_constraint_system::TestConstraintSystem,
|
||||
uint8::UInt8,
|
||||
alloc::AllocGadget, edwards_on_bls12_381::JubJubGadget,
|
||||
test_constraint_system::TestConstraintSystem, uint8::UInt8,
|
||||
};
|
||||
|
||||
type TestCRH = BoweHopwoodPedersenCRH<JubJub, Window>;
|
||||
|
||||
@@ -173,7 +173,7 @@ mod test {
|
||||
crh::{bowe_hopwood::BoweHopwoodPedersenCRH, pedersen::PedersenWindow},
|
||||
FixedLengthCRH,
|
||||
};
|
||||
use algebra::{jubjub::JubJubProjective, test_rng};
|
||||
use algebra::{edwards_on_bls12_381::EdwardsProjective, test_rng};
|
||||
|
||||
#[test]
|
||||
fn test_simple_bh() {
|
||||
@@ -186,9 +186,9 @@ mod test {
|
||||
|
||||
let rng = &mut test_rng();
|
||||
let params =
|
||||
<BoweHopwoodPedersenCRH<JubJubProjective, TestWindow> as FixedLengthCRH>::setup(rng)
|
||||
<BoweHopwoodPedersenCRH<EdwardsProjective, TestWindow> as FixedLengthCRH>::setup(rng)
|
||||
.unwrap();
|
||||
<BoweHopwoodPedersenCRH<JubJubProjective, TestWindow> as FixedLengthCRH>::evaluate(
|
||||
<BoweHopwoodPedersenCRH<EdwardsProjective, TestWindow> as FixedLengthCRH>::evaluate(
|
||||
¶ms,
|
||||
&[1, 2, 3],
|
||||
)
|
||||
|
||||
@@ -133,12 +133,13 @@ mod test {
|
||||
FixedLengthCRH, FixedLengthCRHGadget,
|
||||
};
|
||||
use algebra::{
|
||||
jubjub::{Fq as Fr, JubJubProjective as JubJub},
|
||||
edwards_on_bls12_381::{EdwardsProjective as JubJub, Fq as Fr},
|
||||
test_rng, ProjectiveCurve,
|
||||
};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
use r1cs_std::{
|
||||
jubjub::JubJubGadget, prelude::*, test_constraint_system::TestConstraintSystem,
|
||||
edwards_on_bls12_381::JubJubGadget, prelude::*,
|
||||
test_constraint_system::TestConstraintSystem,
|
||||
};
|
||||
use rand::Rng;
|
||||
|
||||
|
||||
@@ -207,13 +207,15 @@ mod test {
|
||||
},
|
||||
merkle_tree::*,
|
||||
};
|
||||
use algebra::jubjub::{Fq, JubJubAffine as JubJub};
|
||||
use algebra::edwards_on_bls12_381::{EdwardsAffine as JubJub, Fq};
|
||||
use r1cs_core::ConstraintSystem;
|
||||
use rand::SeedableRng;
|
||||
use rand_xorshift::XorShiftRng;
|
||||
|
||||
use super::*;
|
||||
use r1cs_std::{jubjub::JubJubGadget, test_constraint_system::TestConstraintSystem};
|
||||
use r1cs_std::{
|
||||
edwards_on_bls12_381::JubJubGadget, test_constraint_system::TestConstraintSystem,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(super) struct Window4x256;
|
||||
|
||||
@@ -369,7 +369,7 @@ mod test {
|
||||
crh::{pedersen::*, *},
|
||||
merkle_tree::*,
|
||||
};
|
||||
use algebra::{jubjub::JubJubAffine as JubJub, Zero};
|
||||
use algebra::{edwards_on_bls12_381::EdwardsAffine as JubJub, Zero};
|
||||
use rand::SeedableRng;
|
||||
use rand_xorshift::XorShiftRng;
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ impl<ConstraintF: PrimeField> PRFGadget<Blake2s, ConstraintF> for Blake2sGadget
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use algebra::jubjub::Fq as Fr;
|
||||
use algebra::edwards_on_bls12_381::Fq as Fr;
|
||||
use rand::{Rng, SeedableRng};
|
||||
use rand_xorshift::XorShiftRng;
|
||||
|
||||
|
||||
@@ -54,7 +54,8 @@ pub trait SignatureScheme {
|
||||
mod test {
|
||||
use crate::{signature::schnorr::SchnorrSignature, SignatureScheme};
|
||||
use algebra::{
|
||||
groups::Group, jubjub::JubJubAffine as JubJub, test_rng, to_bytes, ToBytes, UniformRand,
|
||||
edwards_on_bls12_381::EdwardsAffine as JubJub, groups::Group, test_rng, to_bytes, ToBytes,
|
||||
UniformRand,
|
||||
};
|
||||
use blake2::Blake2s;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user