mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-08 15:01:29 +01:00
Change test_rng import to ark-std
This commit is contained in:
committed by
Pratyush Mishra
parent
b17b17efcc
commit
530d618cca
@@ -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"
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|||||||
@@ -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,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,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;
|
||||||
|
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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,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,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};
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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,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,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};
|
||||||
|
|||||||
@@ -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,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,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::*;
|
||||||
|
|||||||
@@ -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,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,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};
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
@@ -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::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user