mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-09 07:21:30 +01:00
Replace rand with ark_std::rand (#42)
* replace rand * update CHANGELOG * fmt * fix * fix
This commit is contained in:
@@ -19,8 +19,6 @@ ark-ff = { git = "https://github.com/arkworks-rs/algebra", default-features = fa
|
||||
ark-relations = { git = "https://github.com/arkworks-rs/snark", default-features = false }
|
||||
ark-r1cs-std = { git = "https://github.com/arkworks-rs/r1cs-std", default-features = false }
|
||||
ark-ec = { git = "https://github.com/arkworks-rs/algebra", default-features = false }
|
||||
rand = { version = "0.7", default-features = false}
|
||||
rand_xorshift = { version = "0.2", default-features = false}
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
extern crate ark_relations;
|
||||
|
||||
pub mod fields {
|
||||
use rand::{self, SeedableRng};
|
||||
use rand_xorshift::XorShiftRng;
|
||||
|
||||
use ark_ff::{BitIteratorLE, Field, UniformRand};
|
||||
use ark_r1cs_std::prelude::*;
|
||||
use ark_relations::r1cs::{ConstraintSystem, SynthesisError};
|
||||
@@ -217,7 +214,7 @@ pub mod fields {
|
||||
];
|
||||
for &mode in &modes {
|
||||
let cs = ConstraintSystem::<ConstraintF>::new_ref();
|
||||
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
|
||||
let mut rng = test_rng();
|
||||
for i in 0..=maxpower {
|
||||
let mut a = F::rand(&mut rng);
|
||||
let mut a_gadget = AF::new_variable(ark_relations::ns!(cs, "a"), || Ok(a), mode)?;
|
||||
|
||||
Reference in New Issue
Block a user