arnaucube
arnaucube/ark-curves-cherry-pickedPublic Self-hosted repository
Fix rng in constraint tests
Pratyush Mishra pratyushmishra@berkeley.edu
Tue, 15 Dec 2020 20:31:45 -0800
commit

9654fb651324696ca2e1ff5fef6543633aeb45d0

parent

145a573b412a781e5934c3a4038b54156d3e29f8

1 files changed, 8 insertions(+), 6 deletions(-)

jump to
M curve-constraint-tests/src/lib.rs → curve-constraint-tests/src/lib.rs

@@ -221,9 +221,9 @@ use ark_ec::{

short_weierstrass_jacobian::GroupProjective as SWProjective, twisted_edwards_extended::GroupProjective as TEProjective, AffineCurve, ProjectiveCurve, }; - use ark_ff::{test_rng, Field, PrimeField}; + use ark_ff::{Field, PrimeField}; use ark_relations::r1cs::{ConstraintSystem, SynthesisError}; - use ark_std::vec::Vec; + use ark_std::{test_rng, vec::Vec}; use ark_r1cs_std::prelude::*;

@@ -306,8 +306,9 @@ GG: CurveVar<SWProjective<P>, <P::BaseField as Field>::BasePrimeField>,

for<'a> &'a GG: GroupOpsBounds<'a, SWProjective<P>, GG>, { use ark_ec::group::Group; - use ark_ff::{BitIteratorLE, UniformRand}; + use ark_ff::BitIteratorLE; use ark_r1cs_std::prelude::*; + use ark_std::UniformRand; group_test::<SWProjective<P>, _, GG>()?;

@@ -383,7 +384,8 @@ GG: CurveVar<TEProjective<P>, <P::BaseField as Field>::BasePrimeField>,

for<'a> &'a GG: GroupOpsBounds<'a, TEProjective<P>, GG>, { use ark_ec::group::Group; - use ark_ff::{BitIteratorLE, UniformRand}; + use ark_ff::BitIteratorLE; + use ark_std::UniformRand; group_test::<TEProjective<P>, _, GG>()?;

@@ -456,10 +458,10 @@ }

pub mod pairing { use ark_ec::{PairingEngine, ProjectiveCurve}; - use ark_ff::{test_rng, BitIteratorLE, Field, PrimeField, UniformRand}; + use ark_ff::{BitIteratorLE, Field, PrimeField}; use ark_r1cs_std::prelude::*; use ark_relations::r1cs::{ConstraintSystem, SynthesisError}; - use ark_std::vec::Vec; + use ark_std::{test_rng, vec::Vec, UniformRand}; #[allow(dead_code)] pub fn bilinearity_test<E: PairingEngine, P: PairingVar<E>>() -> Result<(), SynthesisError>