Browse Source

Change test_rng import to ark-std

fq2_neg_nonresidue
ValarDragon 4 years ago
committed by Pratyush Mishra
parent
commit
530d618cca
42 changed files with 84 additions and 58 deletions
  1. +5
    -0
      Cargo.toml
  2. +3
    -3
      bls12_377/src/constraints/mod.rs
  3. +2
    -1
      bls12_377/src/curves/tests.rs
  4. +2
    -1
      bls12_377/src/fields/tests.rs
  5. +2
    -1
      bls12_381/src/curves/tests.rs
  6. +2
    -1
      bn254/src/curves/tests.rs
  7. +2
    -1
      bw6_761/src/curves/tests.rs
  8. +2
    -1
      bw6_761/src/fields/tests.rs
  9. +2
    -1
      cp6_782/src/curves/tests.rs
  10. +2
    -1
      cp6_782/src/fields/tests.rs
  11. +2
    -1
      curve-constraint-tests/src/lib.rs
  12. +2
    -2
      ed_on_bls12_377/src/constraints/mod.rs
  13. +1
    -1
      ed_on_bls12_377/src/curves/tests.rs
  14. +1
    -1
      ed_on_bls12_377/src/fields/tests.rs
  15. +2
    -2
      ed_on_bls12_381/src/constraints/mod.rs
  16. +2
    -1
      ed_on_bls12_381/src/curves/tests.rs
  17. +2
    -1
      ed_on_bls12_381/src/fields/tests.rs
  18. +2
    -2
      ed_on_bn254/src/constraints/mod.rs
  19. +2
    -1
      ed_on_bn254/src/curves/tests.rs
  20. +2
    -1
      ed_on_bn254/src/fields/tests.rs
  21. +2
    -2
      ed_on_bw6_761/src/constraints/mod.rs
  22. +2
    -2
      ed_on_cp6_782/src/constraints/mod.rs
  23. +1
    -1
      ed_on_cp6_782/src/curves/tests.rs
  24. +1
    -1
      ed_on_cp6_782/src/fields/tests.rs
  25. +2
    -2
      ed_on_mnt4_298/src/constraints/mod.rs
  26. +1
    -1
      ed_on_mnt4_298/src/curves/tests.rs
  27. +1
    -1
      ed_on_mnt4_298/src/fields/tests.rs
  28. +2
    -2
      ed_on_mnt4_753/src/constraints/mod.rs
  29. +1
    -1
      ed_on_mnt4_753/src/curves/tests.rs
  30. +1
    -1
      ed_on_mnt4_753/src/fields/tests.rs
  31. +3
    -3
      mnt4_298/src/constraints/mod.rs
  32. +2
    -1
      mnt4_298/src/curves/tests.rs
  33. +2
    -1
      mnt4_298/src/fields/tests.rs
  34. +3
    -3
      mnt4_753/src/constraints/mod.rs
  35. +2
    -1
      mnt4_753/src/curves/tests.rs
  36. +2
    -1
      mnt4_753/src/fields/tests.rs
  37. +3
    -3
      mnt6_298/src/constraints/mod.rs
  38. +2
    -1
      mnt6_298/src/curves/tests.rs
  39. +2
    -1
      mnt6_298/src/fields/tests.rs
  40. +3
    -3
      mnt6_753/src/constraints/mod.rs
  41. +2
    -1
      mnt6_753/src/curves/tests.rs
  42. +2
    -1
      mnt6_753/src/fields/tests.rs

+ 5
- 0
Cargo.toml

@ -29,6 +29,11 @@ members = [
"ed_on_mnt4_298", "ed_on_mnt4_298",
] ]
[patch.crates-io]
ark-ff = { path = '../algebra/ff' }
ark-ec = { path = '../algebra/ec'}
[profile.release] [profile.release]
opt-level = 3 opt-level = 3
lto = "thin" lto = "thin"

+ 3
- 3
bls12_377/src/constraints/mod.rs

@ -20,7 +20,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -67,7 +67,7 @@
//! # use ark_bls12_377::{*, constraints::*}; //! # use ark_bls12_377::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `G1` elements. //! // Generate some random `G1` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);
@ -112,7 +112,7 @@
//! # use ark_bls12_377::{*, constraints::*}; //! # use ark_bls12_377::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate random `G1` and `G2` elements. //! // Generate random `G1` and `G2` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);

+ 2
- 1
bls12_377/src/curves/tests.rs

@ -1,9 +1,10 @@
#![allow(unused_imports)] #![allow(unused_imports)]
use ark_ff::{ use ark_ff::{
fields::{Field, FpParameters, PrimeField, SquareRootField}, fields::{Field, FpParameters, PrimeField, SquareRootField},
test_rng, One, Zero,
One, Zero,
}; };
use ark_serialize::CanonicalSerialize; use ark_serialize::CanonicalSerialize;
use ark_std::test_rng;
use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve};
use core::ops::{AddAssign, MulAssign}; use core::ops::{AddAssign, MulAssign};

+ 2
- 1
bls12_377/src/fields/tests.rs

@ -4,9 +4,10 @@ use ark_ff::{
fp6_3over2::Fp6Parameters, FftField, FftParameters, Field, Fp2Parameters, FpParameters, fp6_3over2::Fp6Parameters, FftField, FftParameters, Field, Fp2Parameters, FpParameters,
PrimeField, SquareRootField, PrimeField, SquareRootField,
}, },
test_rng, One, UniformRand, Zero,
One, UniformRand, Zero,
}; };
use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize}; use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize};
use ark_std::test_rng;
use core::{ use core::{
cmp::Ordering, cmp::Ordering,
ops::{AddAssign, MulAssign, SubAssign}, ops::{AddAssign, MulAssign, SubAssign},

+ 2
- 1
bls12_381/src/curves/tests.rs

@ -2,9 +2,10 @@
use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{ use ark_ff::{
fields::{Field, FpParameters, PrimeField, SquareRootField}, fields::{Field, FpParameters, PrimeField, SquareRootField},
test_rng, One, Zero,
One, Zero,
}; };
use ark_serialize::CanonicalSerialize; use ark_serialize::CanonicalSerialize;
use ark_std::test_rng;
use core::ops::{AddAssign, MulAssign}; use core::ops::{AddAssign, MulAssign};
use rand::Rng; use rand::Rng;

+ 2
- 1
bn254/src/curves/tests.rs

@ -2,9 +2,10 @@
use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{models::SWModelParameters, AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{ use ark_ff::{
fields::{Field, FpParameters, PrimeField, SquareRootField}, fields::{Field, FpParameters, PrimeField, SquareRootField},
test_rng, One, Zero,
One, Zero,
}; };
use ark_serialize::CanonicalSerialize; use ark_serialize::CanonicalSerialize;
use ark_std::test_rng;
use core::ops::{AddAssign, MulAssign}; use core::ops::{AddAssign, MulAssign};
use rand::Rng; use rand::Rng;

+ 2
- 1
bw6_761/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{test_rng, Field, One, PrimeField};
use ark_ff::{Field, One, PrimeField};
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 2
- 1
bw6_761/src/fields/tests.rs

@ -1,4 +1,5 @@
use ark_ff::{test_rng, Field, PrimeField};
use ark_ff::{Field, PrimeField};
use ark_std::test_rng;
use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize}; use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize};
use rand::Rng; use rand::Rng;

+ 2
- 1
cp6_782/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{test_rng, Field, One, PrimeField};
use ark_ff::{Field, One, PrimeField};
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 2
- 1
cp6_782/src/fields/tests.rs

@ -1,4 +1,5 @@
use ark_ff::{test_rng, Field, PrimeField};
use ark_ff::{Field, PrimeField};
use ark_std::test_rng;
use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize}; use ark_serialize::{buffer_bit_byte_size, CanonicalSerialize};
use rand::Rng; use rand::Rng;

+ 2
- 1
curve-constraint-tests/src/lib.rs

@ -6,7 +6,8 @@ pub mod fields {
use rand::{self, SeedableRng}; use rand::{self, SeedableRng};
use rand_xorshift::XorShiftRng; use rand_xorshift::XorShiftRng;
use ark_ff::{test_rng, BitIteratorLE, Field, UniformRand};
use ark_ff::{BitIteratorLE, Field, UniformRand};
use ark_std::test_rng;
use ark_r1cs_std::prelude::*; use ark_r1cs_std::prelude::*;
use ark_relations::r1cs::{ConstraintSystem, SynthesisError}; use ark_relations::r1cs::{ConstraintSystem, SynthesisError};
use ark_std::vec::Vec; use ark_std::vec::Vec;

+ 2
- 2
ed_on_bls12_377/src/constraints/mod.rs

@ -19,7 +19,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -66,7 +66,7 @@
//! # use ark_ed_on_bls12_377::{*, constraints::*}; //! # use ark_ed_on_bls12_377::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 1
- 1
ed_on_bls12_377/src/curves/tests.rs

@ -1,5 +1,5 @@
use ark_ec::{AffineCurve, ProjectiveCurve}; use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 1
- 1
ed_on_bls12_377/src/fields/tests.rs

@ -1,4 +1,4 @@
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::{Fq, Fr}; use crate::{Fq, Fr};

+ 2
- 2
ed_on_bls12_381/src/constraints/mod.rs

@ -19,7 +19,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -66,7 +66,7 @@
//! # use ark_ed_on_bls12_381::{*, constraints::*}; //! # use ark_ed_on_bls12_381::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 2
- 1
ed_on_bls12_381/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, ProjectiveCurve}; use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::{bytes::FromBytes, test_rng, Zero};
use ark_ff::{bytes::FromBytes, Zero};
use ark_std::test_rng;
use core::str::FromStr; use core::str::FromStr;
use rand::Rng; use rand::Rng;

+ 2
- 1
ed_on_bls12_381/src/fields/tests.rs

@ -3,8 +3,9 @@ use ark_ff::{
biginteger::BigInteger256 as BigInteger, biginteger::BigInteger256 as BigInteger,
bytes::{FromBytes, ToBytes}, bytes::{FromBytes, ToBytes},
fields::{Field, LegendreSymbol::*, SquareRootField}, fields::{Field, LegendreSymbol::*, SquareRootField},
test_rng, One, Zero,
One, Zero,
}; };
use ark_std::test_rng;
use ark_curve_tests::fields::*; use ark_curve_tests::fields::*;

+ 2
- 2
ed_on_bn254/src/constraints/mod.rs

@ -19,7 +19,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -66,7 +66,7 @@
//! # use ark_ed_on_bn254::{*, constraints::*}; //! # use ark_ed_on_bn254::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 2
- 1
ed_on_bn254/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, ProjectiveCurve}; use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::{bytes::FromBytes, test_rng, Zero};
use ark_ff::{bytes::FromBytes, Zero};
use ark_std::test_rng;
use core::str::FromStr; use core::str::FromStr;
use rand::Rng; use rand::Rng;

+ 2
- 1
ed_on_bn254/src/fields/tests.rs

@ -3,8 +3,9 @@ use ark_ff::{
biginteger::BigInteger256 as BigInteger, biginteger::BigInteger256 as BigInteger,
bytes::{FromBytes, ToBytes}, bytes::{FromBytes, ToBytes},
fields::{Field, LegendreSymbol::*, SquareRootField}, fields::{Field, LegendreSymbol::*, SquareRootField},
test_rng, One, Zero,
One, Zero,
}; };
use ark_std::test_rng;
use ark_curve_tests::fields::*; use ark_curve_tests::fields::*;

+ 2
- 2
ed_on_bw6_761/src/constraints/mod.rs

@ -19,7 +19,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -66,7 +66,7 @@
//! # use ark_ed_on_bw6_761::{*, constraints::*}; //! # use ark_ed_on_bw6_761::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 2
- 2
ed_on_cp6_782/src/constraints/mod.rs

@ -20,7 +20,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -67,7 +67,7 @@
//! # use ark_ed_on_cp6_782::{*, constraints::*}; //! # use ark_ed_on_cp6_782::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 1
- 1
ed_on_cp6_782/src/curves/tests.rs

@ -1,5 +1,5 @@
use ark_ec::{AffineCurve, ProjectiveCurve}; use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 1
- 1
ed_on_cp6_782/src/fields/tests.rs

@ -1,4 +1,4 @@
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::{Fq, Fr}; use crate::{Fq, Fr};

+ 2
- 2
ed_on_mnt4_298/src/constraints/mod.rs

@ -19,7 +19,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -66,7 +66,7 @@
//! # use ark_ed_on_mnt4_298::{*, constraints::*}; //! # use ark_ed_on_mnt4_298::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 1
- 1
ed_on_mnt4_298/src/curves/tests.rs

@ -1,5 +1,5 @@
use ark_ec::{AffineCurve, ProjectiveCurve}; use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 1
- 1
ed_on_mnt4_298/src/fields/tests.rs

@ -1,4 +1,4 @@
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::fields::*; use crate::fields::*;

+ 2
- 2
ed_on_mnt4_753/src/constraints/mod.rs

@ -19,7 +19,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -66,7 +66,7 @@
//! # use ark_ed_on_mnt4_753::{*, constraints::*}; //! # use ark_ed_on_mnt4_753::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Edwards` elements. //! // Generate some random `Edwards` elements.
//! let a_native = EdwardsProjective::rand(&mut rng); //! let a_native = EdwardsProjective::rand(&mut rng);

+ 1
- 1
ed_on_mnt4_753/src/curves/tests.rs

@ -1,5 +1,5 @@
use ark_ec::{AffineCurve, ProjectiveCurve}; use ark_ec::{AffineCurve, ProjectiveCurve};
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 1
- 1
ed_on_mnt4_753/src/fields/tests.rs

@ -1,4 +1,4 @@
use ark_ff::test_rng;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::{Fq, Fr}; use crate::{Fq, Fr};

+ 3
- 3
mnt4_298/src/constraints/mod.rs

@ -20,7 +20,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -67,7 +67,7 @@
//! # use ark_mnt4_298::{*, constraints::*}; //! # use ark_mnt4_298::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `G1` elements. //! // Generate some random `G1` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);
@ -112,7 +112,7 @@
//! # use ark_mnt4_298::{*, constraints::*}; //! # use ark_mnt4_298::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate random `G1` and `G2` elements. //! // Generate random `G1` and `G2` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);

+ 2
- 1
mnt4_298/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{test_rng, Field, One, PrimeField, UniformRand};
use ark_ff::{Field, One, PrimeField, UniformRand};
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 2
- 1
mnt4_298/src/fields/tests.rs

@ -1,4 +1,5 @@
use ark_ff::{test_rng, Field};
use ark_ff::Field;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 3
- 3
mnt4_753/src/constraints/mod.rs

@ -20,7 +20,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -67,7 +67,7 @@
//! # use ark_mnt4_753::{*, constraints::*}; //! # use ark_mnt4_753::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `G1` elements. //! // Generate some random `G1` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);
@ -112,7 +112,7 @@
//! # use ark_mnt4_753::{*, constraints::*}; //! # use ark_mnt4_753::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate random `G1` and `G2` elements. //! // Generate random `G1` and `G2` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);

+ 2
- 1
mnt4_753/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{test_rng, Field, One, PrimeField, UniformRand};
use ark_ff::{Field, One, PrimeField, UniformRand};
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 2
- 1
mnt4_753/src/fields/tests.rs

@ -1,4 +1,5 @@
use ark_ff::{test_rng, Field};
use ark_ff::Field;
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 3
- 3
mnt6_298/src/constraints/mod.rs

@ -20,7 +20,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -67,7 +67,7 @@
//! # use ark_mnt6_298::{*, constraints::*}; //! # use ark_mnt6_298::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `G1` elements. //! // Generate some random `G1` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);
@ -112,7 +112,7 @@
//! # use ark_mnt6_298::{*, constraints::*}; //! # use ark_mnt6_298::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate random `G1` and `G2` elements. //! // Generate random `G1` and `G2` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);

+ 2
- 1
mnt6_298/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{test_rng, Field, One, PrimeField, UniformRand};
use ark_ff::{Field, One, PrimeField, UniformRand};
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 2
- 1
mnt6_298/src/fields/tests.rs

@ -1,7 +1,8 @@
use ark_ff::{ use ark_ff::{
fields::{models::fp6_2over3::*, quadratic_extension::QuadExtParameters}, fields::{models::fp6_2over3::*, quadratic_extension::QuadExtParameters},
test_rng, Field,
Field,
}; };
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 3
- 3
mnt6_753/src/constraints/mod.rs

@ -20,7 +20,7 @@
//! let cs = ConstraintSystem::<Fq>::new_ref(); //! let cs = ConstraintSystem::<Fq>::new_ref();
//! // This rng is just for test purposes; do not use it //! // This rng is just for test purposes; do not use it
//! // in real applications. //! // in real applications.
//! let mut rng = ark_ff::test_rng();
//! let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `Fq` elements. //! // Generate some random `Fq` elements.
//! let a_native = Fq::rand(&mut rng); //! let a_native = Fq::rand(&mut rng);
@ -67,7 +67,7 @@
//! # use ark_mnt6_753::{*, constraints::*}; //! # use ark_mnt6_753::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate some random `G1` elements. //! // Generate some random `G1` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);
@ -112,7 +112,7 @@
//! # use ark_mnt6_753::{*, constraints::*}; //! # use ark_mnt6_753::{*, constraints::*};
//! //!
//! # let cs = ConstraintSystem::<Fq>::new_ref(); //! # let cs = ConstraintSystem::<Fq>::new_ref();
//! # let mut rng = ark_ff::test_rng();
//! # let mut rng = ark_std::test_rng();
//! //!
//! // Generate random `G1` and `G2` elements. //! // Generate random `G1` and `G2` elements.
//! let a_native = G1Projective::rand(&mut rng); //! let a_native = G1Projective::rand(&mut rng);

+ 2
- 1
mnt6_753/src/curves/tests.rs

@ -1,5 +1,6 @@
use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{test_rng, Field, One, PrimeField, UniformRand};
use ark_ff::{Field, One, PrimeField, UniformRand};
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

+ 2
- 1
mnt6_753/src/fields/tests.rs

@ -1,7 +1,8 @@
use ark_ff::{ use ark_ff::{
fields::{models::fp6_2over3::*, quadratic_extension::QuadExtParameters}, fields::{models::fp6_2over3::*, quadratic_extension::QuadExtParameters},
test_rng, Field,
Field,
}; };
use ark_std::test_rng;
use rand::Rng; use rand::Rng;
use crate::*; use crate::*;

Loading…
Cancel
Save