mirror of
https://github.com/arnaucube/ark-r1cs-std.git
synced 2026-01-10 16:01:28 +01:00
Generalize FFT infrastructure to work with group elements as well
This commit is contained in:
@@ -59,9 +59,7 @@ pub(crate) mod tests {
|
|||||||
use crate::{
|
use crate::{
|
||||||
bits::boolean::Boolean, prelude::*, test_constraint_system::TestConstraintSystem, Vec,
|
bits::boolean::Boolean, prelude::*, test_constraint_system::TestConstraintSystem, Vec,
|
||||||
};
|
};
|
||||||
use algebra::{
|
use algebra::{test_rng, BitIterator, Field, PairingEngine, PrimeField, UniformRand};
|
||||||
test_rng, BitIterator, Field, PairingEngine, PrimeField, ProjectiveCurve, UniformRand,
|
|
||||||
};
|
|
||||||
use r1cs_core::ConstraintSystem;
|
use r1cs_core::ConstraintSystem;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
@@ -78,9 +76,9 @@ pub(crate) mod tests {
|
|||||||
let s = E::Fr::rand(&mut rng);
|
let s = E::Fr::rand(&mut rng);
|
||||||
|
|
||||||
let mut sa = a;
|
let mut sa = a;
|
||||||
sa.mul_assign(s);
|
sa *= s;
|
||||||
let mut sb = b;
|
let mut sb = b;
|
||||||
sb.mul_assign(s);
|
sb *= s;
|
||||||
|
|
||||||
let a_g = P::G1Gadget::alloc(&mut cs.ns(|| "a"), || Ok(a)).unwrap();
|
let a_g = P::G1Gadget::alloc(&mut cs.ns(|| "a"), || Ok(a)).unwrap();
|
||||||
let b_g = P::G2Gadget::alloc(&mut cs.ns(|| "b"), || Ok(b)).unwrap();
|
let b_g = P::G2Gadget::alloc(&mut cs.ns(|| "b"), || Ok(b)).unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user