Update concrete curves in `r1cs-std`.
Pratyush Mishra pratyushmishra@berkeley.edu
Mon, 24 Aug 2020 00:47:21 -0700
28 files changed,
157 insertions(+),
157 deletions(-)
jump to
M
r1cs-std/src/instantiated/bls12_377/curves.rs
→
r1cs-std/src/instantiated/bls12_377/curves.rs
@@ -1,23 +1,23 @@
use crate::groups::bls12; use algebra::bls12_377::Parameters; -pub type G1Gadget = bls12::G1Gadget<Parameters>; -pub type G2Gadget = bls12::G2Gadget<Parameters>; +pub type G1Var = bls12::G1Var<Parameters>; +pub type G2Var = bls12::G2Var<Parameters>; -pub type G1PreparedGadget = bls12::G1PreparedGadget<Parameters>; -pub type G2PreparedGadget = bls12::G2PreparedGadget<Parameters>; +pub type G1PreparedVar = bls12::G1PreparedVar<Parameters>; +pub type G2PreparedVar = bls12::G2PreparedVar<Parameters>; #[test] fn test() { use algebra::curves::models::bls12::Bls12Parameters; crate::groups::curves::short_weierstrass::test::< - _, <Parameters as Bls12Parameters>::G1Parameters, - G1Gadget, - >(); + G1Var, + >() + .unwrap(); crate::groups::curves::short_weierstrass::test::< - _, <Parameters as Bls12Parameters>::G2Parameters, - G2Gadget, - >(); + G2Var, + >() + .unwrap(); }
M
r1cs-std/src/instantiated/bls12_377/fields.rs
→
r1cs-std/src/instantiated/bls12_377/fields.rs
@@ -1,27 +1,27 @@
use algebra::bls12_377::{Fq, Fq12Parameters, Fq2Parameters, Fq6Parameters}; -use crate::fields::{fp::FpGadget, fp12::Fp12Gadget, fp2::Fp2Gadget, fp6_3over2::Fp6Gadget}; +use crate::fields::{fp::FpVar, fp12::Fp12Var, fp2::Fp2Var, fp6_3over2::Fp6Var}; -pub type FqGadget = FpGadget<Fq>; -pub type Fq2Gadget = Fp2Gadget<Fq2Parameters, Fq>; -pub type Fq6Gadget = Fp6Gadget<Fq6Parameters, Fq>; -pub type Fq12Gadget = Fp12Gadget<Fq12Parameters, Fq>; +pub type FqVar = FpVar<Fq>; +pub type Fq2Var = Fp2Var<Fq2Parameters>; +pub type Fq6Var = Fp6Var<Fq6Parameters>; +pub type Fq12Var = Fp12Var<Fq12Parameters>; #[test] -fn bls12_377_field_gadgets_test() { +fn bls12_377_field_test() { use super::*; use crate::fields::tests::*; use algebra::bls12_377::{Fq, Fq12, Fq2, Fq6}; - field_test::<_, Fq, FqGadget>(); - frobenius_tests::<Fq, Fq, FqGadget>(13); + field_test::<_, _, FqVar>().unwrap(); + frobenius_tests::<Fq, _, FqVar>(13).unwrap(); - field_test::<_, Fq, Fq2Gadget>(); - frobenius_tests::<Fq2, Fq, Fq2Gadget>(13); + field_test::<_, _, Fq2Var>().unwrap(); + frobenius_tests::<Fq2, _, Fq2Var>(13).unwrap(); - field_test::<_, Fq, Fq6Gadget>(); - frobenius_tests::<Fq6, Fq, Fq6Gadget>(13); + field_test::<_, _, Fq6Var>().unwrap(); + frobenius_tests::<Fq6, _, Fq6Var>(13).unwrap(); - field_test::<_, Fq, Fq12Gadget>(); - frobenius_tests::<Fq12, Fq, Fq12Gadget>(13); + field_test::<_, _, Fq12Var>().unwrap(); + frobenius_tests::<Fq12, _, Fq12Var>(13).unwrap(); }
M
r1cs-std/src/instantiated/bls12_377/pairing.rs
→
r1cs-std/src/instantiated/bls12_377/pairing.rs
@@ -1,8 +1,8 @@
use algebra::bls12_377::Parameters; -pub type PairingGadget = crate::pairing::bls12::PairingGadget<Parameters>; +pub type PairingVar = crate::pairing::bls12::PairingVar<Parameters>; #[test] fn test() { - crate::pairing::tests::bilinearity_test::<algebra::Bls12_377, _, PairingGadget>() + crate::pairing::tests::bilinearity_test::<algebra::Bls12_377, PairingVar>().unwrap() }
M
r1cs-std/src/instantiated/ed_on_bls12_377/curves.rs
→
r1cs-std/src/instantiated/ed_on_bls12_377/curves.rs
@@ -1,11 +1,11 @@
-use crate::groups::curves::twisted_edwards::AffineGadget; +use crate::groups::curves::twisted_edwards::AffineVar; use algebra::ed_on_bls12_377::*; -use crate::ed_on_bls12_377::FqGadget; +use crate::ed_on_bls12_377::FqVar; -pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>; +pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>; #[test] fn test() { - crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); + crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_bls12_377/fields.rs
→
r1cs-std/src/instantiated/ed_on_bls12_377/fields.rs
@@ -1,9 +1,9 @@
-use crate::fields::fp::FpGadget; +use crate::fields::fp::FpVar; use algebra::ed_on_bls12_377::fq::Fq; -pub type FqGadget = FpGadget<Fq>; +pub type FqVar = FpVar<Fq>; #[test] fn test() { - crate::fields::tests::field_test::<_, Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, FqVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_bls12_381/curves.rs
→
r1cs-std/src/instantiated/ed_on_bls12_381/curves.rs
@@ -1,11 +1,11 @@
-use crate::groups::curves::twisted_edwards::AffineGadget; +use crate::groups::curves::twisted_edwards::AffineVar; use algebra::ed_on_bls12_381::*; -use crate::ed_on_bls12_381::FqGadget; +use crate::ed_on_bls12_381::FqVar; -pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>; +pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>; #[test] fn test() { - crate::groups::curves::twisted_edwards::test::<Fq, _, EdwardsGadget>(); + crate::groups::curves::twisted_edwards::test::<_, EdwardsVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_bls12_381/fields.rs
→
r1cs-std/src/instantiated/ed_on_bls12_381/fields.rs
@@ -1,8 +1,8 @@
-use crate::fields::fp::FpGadget; +use crate::fields::fp::FpVar; -pub type FqGadget = FpGadget<algebra::ed_on_bls12_381::Fq>; +pub type FqVar = FpVar<algebra::ed_on_bls12_381::Fq>; #[test] fn test() { - crate::fields::tests::field_test::<_, algebra::ed_on_bls12_381::Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, FqVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_bn254/curves.rs
→
r1cs-std/src/instantiated/ed_on_bn254/curves.rs
@@ -1,11 +1,11 @@
-use crate::groups::curves::twisted_edwards::AffineGadget; +use crate::groups::curves::twisted_edwards::AffineVar; use algebra::ed_on_bn254::*; -use crate::ed_on_bn254::FqGadget; +use crate::ed_on_bn254::FqVar; -pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>; +pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>; #[test] fn test() { - crate::groups::curves::twisted_edwards::test::<Fq, _, EdwardsGadget>(); + crate::groups::curves::twisted_edwards::test::<_, EdwardsVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_bn254/fields.rs
→
r1cs-std/src/instantiated/ed_on_bn254/fields.rs
@@ -1,8 +1,8 @@
-use crate::fields::fp::FpGadget; +use crate::fields::fp::FpVar; -pub type FqGadget = FpGadget<algebra::ed_on_bn254::Fq>; +pub type FqVar = FpVar<algebra::ed_on_bn254::Fq>; #[test] fn test() { - crate::fields::tests::field_test::<_, algebra::ed_on_bn254::Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, FqVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_bw6_761/fields.rs
→
r1cs-std/src/instantiated/ed_on_bw6_761/fields.rs
@@ -5,5 +5,5 @@ pub type FqGadget = FpGadget<Fq>;
#[test] fn test() { - crate::fields::tests::field_test::<_, Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, Fq, FqGadget>(); }
M
r1cs-std/src/instantiated/ed_on_cp6_782/curves.rs
→
r1cs-std/src/instantiated/ed_on_cp6_782/curves.rs
@@ -1,11 +1,11 @@
-use crate::groups::curves::twisted_edwards::AffineGadget; +use crate::groups::curves::twisted_edwards::AffineVar; use algebra::ed_on_cp6_782::*; -use crate::instantiated::ed_on_cp6_782::FqGadget; +use crate::instantiated::ed_on_cp6_782::FqVar; -pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>; +pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>; #[test] fn test() { - crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); + crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_cp6_782/fields.rs
→
r1cs-std/src/instantiated/ed_on_cp6_782/fields.rs
@@ -1,9 +1,9 @@
-use crate::fields::fp::FpGadget; +use crate::fields::fp::FpVar; use algebra::ed_on_cp6_782::fq::Fq; -pub type FqGadget = FpGadget<Fq>; +pub type FqVar = FpVar<Fq>; #[test] fn test() { - crate::fields::tests::field_test::<_, Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, FqVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs
→
r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs
@@ -1,11 +1,11 @@
-use crate::groups::curves::twisted_edwards::AffineGadget; +use crate::groups::curves::twisted_edwards::AffineVar; use algebra::ed_on_mnt4_298::*; -use crate::instantiated::ed_on_mnt4_298::fields::FqGadget; +use crate::instantiated::ed_on_mnt4_298::fields::FqVar; -pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>; +pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>; #[test] fn test() { - crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); + crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs
→
r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs
@@ -1,9 +1,9 @@
-use crate::fields::fp::FpGadget; +use crate::fields::fp::FpVar; use algebra::ed_on_mnt4_298::fq::Fq; -pub type FqGadget = FpGadget<Fq>; +pub type FqVar = FpVar<Fq>; #[test] fn test() { - crate::fields::tests::field_test::<_, Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, FqVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs
→
r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs
@@ -1,11 +1,11 @@
-use crate::groups::curves::twisted_edwards::AffineGadget; +use crate::groups::curves::twisted_edwards::AffineVar; use algebra::ed_on_mnt4_753::*; -use crate::instantiated::ed_on_mnt4_753::fields::FqGadget; +use crate::instantiated::ed_on_mnt4_753::fields::FqVar; -pub type EdwardsGadget = AffineGadget<EdwardsParameters, Fq, FqGadget>; +pub type EdwardsVar = AffineVar<EdwardsParameters, FqVar>; #[test] fn test() { - crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>(); + crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap(); }
M
r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs
→
r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs
@@ -1,9 +1,9 @@
-use crate::fields::fp::FpGadget; +use crate::fields::fp::FpVar; use algebra::ed_on_mnt4_753::fq::Fq; -pub type FqGadget = FpGadget<Fq>; +pub type FqVar = FpVar<Fq>; #[test] fn test() { - crate::fields::tests::field_test::<_, Fq, FqGadget>(); + crate::fields::tests::field_test::<_, _, FqVar>().unwrap(); }
M
r1cs-std/src/instantiated/mnt4_298/curves.rs
→
r1cs-std/src/instantiated/mnt4_298/curves.rs
@@ -1,23 +1,23 @@
use crate::groups::mnt4; use algebra::mnt4_298::Parameters; -pub type G1Gadget = mnt4::G1Gadget<Parameters>; -pub type G2Gadget = mnt4::G2Gadget<Parameters>; +pub type G1Var = mnt4::G1Var<Parameters>; +pub type G2Var = mnt4::G2Var<Parameters>; -pub type G1PreparedGadget = mnt4::G1PreparedGadget<Parameters>; -pub type G2PreparedGadget = mnt4::G2PreparedGadget<Parameters>; +pub type G1PreparedVar = mnt4::G1PreparedVar<Parameters>; +pub type G2PreparedVar = mnt4::G2PreparedVar<Parameters>; #[test] fn test() { use algebra::curves::models::mnt4::MNT4Parameters; crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT4Parameters>::G1Parameters, - G1Gadget, - >(); + G1Var, + >() + .unwrap(); crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT4Parameters>::G2Parameters, - G2Gadget, - >(); + G2Var, + >() + .unwrap(); }
M
r1cs-std/src/instantiated/mnt4_298/fields.rs
→
r1cs-std/src/instantiated/mnt4_298/fields.rs
@@ -1,10 +1,10 @@
use algebra::mnt4_298::{Fq, Fq2Parameters, Fq4Parameters}; -use crate::fields::{fp::FpGadget, fp2::Fp2Gadget, fp4::Fp4Gadget}; +use crate::fields::{fp::FpVar, fp2::Fp2Var, fp4::Fp4Var}; -pub type FqGadget = FpGadget<Fq>; -pub type Fq2Gadget = Fp2Gadget<Fq2Parameters, Fq>; -pub type Fq4Gadget = Fp4Gadget<Fq4Parameters, Fq>; +pub type FqVar = FpVar<Fq>; +pub type Fq2Var = Fp2Var<Fq2Parameters>; +pub type Fq4Var = Fp4Var<Fq4Parameters>; #[test] fn mnt4_298_field_gadgets_test() {@@ -12,12 +12,12 @@ use super::*;
use crate::fields::tests::*; use algebra::mnt4_298::{Fq, Fq2, Fq4}; - field_test::<_, Fq, FqGadget>(); - frobenius_tests::<Fq, Fq, FqGadget>(13); + field_test::<_, _, FqVar>().unwrap(); + frobenius_tests::<Fq, _, FqVar>(13).unwrap(); - field_test::<_, Fq, Fq2Gadget>(); - frobenius_tests::<Fq2, Fq, Fq2Gadget>(13); + field_test::<_, _, Fq2Var>().unwrap(); + frobenius_tests::<Fq2, _, Fq2Var>(13).unwrap(); - field_test::<_, Fq, Fq4Gadget>(); - frobenius_tests::<Fq4, Fq, Fq4Gadget>(13); + field_test::<_, _, Fq4Var>().unwrap(); + frobenius_tests::<Fq4, _, Fq4Var>(13).unwrap(); }
M
r1cs-std/src/instantiated/mnt4_298/pairing.rs
→
r1cs-std/src/instantiated/mnt4_298/pairing.rs
@@ -1,8 +1,8 @@
use algebra::mnt4_298::Parameters; -pub type PairingGadget = crate::pairing::mnt4::PairingGadget<Parameters>; +pub type PairingVar = crate::pairing::mnt4::PairingVar<Parameters>; #[test] fn test() { - crate::pairing::tests::bilinearity_test::<algebra::MNT4_298, _, PairingGadget>() + crate::pairing::tests::bilinearity_test::<algebra::MNT4_298, PairingVar>().unwrap() }
M
r1cs-std/src/instantiated/mnt4_753/curves.rs
→
r1cs-std/src/instantiated/mnt4_753/curves.rs
@@ -1,23 +1,23 @@
use crate::groups::mnt4; use algebra::mnt4_753::Parameters; -pub type G1Gadget = mnt4::G1Gadget<Parameters>; -pub type G2Gadget = mnt4::G2Gadget<Parameters>; +pub type G1Var = mnt4::G1Var<Parameters>; +pub type G2Var = mnt4::G2Var<Parameters>; -pub type G1PreparedGadget = mnt4::G1PreparedGadget<Parameters>; -pub type G2PreparedGadget = mnt4::G2PreparedGadget<Parameters>; +pub type G1PreparedVar = mnt4::G1PreparedVar<Parameters>; +pub type G2PreparedVar = mnt4::G2PreparedVar<Parameters>; #[test] fn test() { use algebra::curves::models::mnt4::MNT4Parameters; crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT4Parameters>::G1Parameters, - G1Gadget, - >(); + G1Var, + >() + .unwrap(); crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT4Parameters>::G2Parameters, - G2Gadget, - >(); + G2Var, + >() + .unwrap(); }
M
r1cs-std/src/instantiated/mnt4_753/fields.rs
→
r1cs-std/src/instantiated/mnt4_753/fields.rs
@@ -1,10 +1,10 @@
use algebra::mnt4_753::{Fq, Fq2Parameters, Fq4Parameters}; -use crate::fields::{fp::FpGadget, fp2::Fp2Gadget, fp4::Fp4Gadget}; +use crate::fields::{fp::FpVar, fp2::Fp2Var, fp4::Fp4Var}; -pub type FqGadget = FpGadget<Fq>; -pub type Fq2Gadget = Fp2Gadget<Fq2Parameters, Fq>; -pub type Fq4Gadget = Fp4Gadget<Fq4Parameters, Fq>; +pub type FqVar = FpVar<Fq>; +pub type Fq2Var = Fp2Var<Fq2Parameters>; +pub type Fq4Var = Fp4Var<Fq4Parameters>; #[test] fn mnt4_753_field_gadgets_test() {@@ -12,12 +12,12 @@ use super::*;
use crate::fields::tests::*; use algebra::mnt4_753::{Fq, Fq2, Fq4}; - field_test::<_, Fq, FqGadget>(); - frobenius_tests::<Fq, Fq, FqGadget>(13); + field_test::<_, _, FqVar>().unwrap(); + frobenius_tests::<Fq, _, FqVar>(13).unwrap(); - field_test::<_, Fq, Fq2Gadget>(); - frobenius_tests::<Fq2, Fq, Fq2Gadget>(13); + field_test::<_, _, Fq2Var>().unwrap(); + frobenius_tests::<Fq2, _, Fq2Var>(13).unwrap(); - field_test::<_, Fq, Fq4Gadget>(); - frobenius_tests::<Fq4, Fq, Fq4Gadget>(13); + field_test::<_, _, Fq4Var>().unwrap(); + frobenius_tests::<Fq4, _, Fq4Var>(13).unwrap(); }
M
r1cs-std/src/instantiated/mnt4_753/pairing.rs
→
r1cs-std/src/instantiated/mnt4_753/pairing.rs
@@ -1,8 +1,8 @@
use algebra::mnt4_753::Parameters; -pub type PairingGadget = crate::pairing::mnt4::PairingGadget<Parameters>; +pub type PairingVar = crate::pairing::mnt4::PairingVar<Parameters>; #[test] fn test() { - crate::pairing::tests::bilinearity_test::<algebra::MNT4_753, _, PairingGadget>() + crate::pairing::tests::bilinearity_test::<algebra::MNT4_753, PairingVar>().unwrap() }
M
r1cs-std/src/instantiated/mnt6_298/curves.rs
→
r1cs-std/src/instantiated/mnt6_298/curves.rs
@@ -1,23 +1,23 @@
use crate::groups::mnt6; use algebra::mnt6_298::Parameters; -pub type G1Gadget = mnt6::G1Gadget<Parameters>; -pub type G2Gadget = mnt6::G2Gadget<Parameters>; +pub type G1Var = mnt6::G1Var<Parameters>; +pub type G2Var = mnt6::G2Var<Parameters>; -pub type G1PreparedGadget = mnt6::G1PreparedGadget<Parameters>; -pub type G2PreparedGadget = mnt6::G2PreparedGadget<Parameters>; +pub type G1PreparedVar = mnt6::G1PreparedVar<Parameters>; +pub type G2PreparedVar = mnt6::G2PreparedVar<Parameters>; #[test] fn test() { use algebra::curves::models::mnt6::MNT6Parameters; crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT6Parameters>::G1Parameters, - G1Gadget, - >(); + G1Var, + >() + .unwrap(); crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT6Parameters>::G2Parameters, - G2Gadget, - >(); + G2Var, + >() + .unwrap(); }
M
r1cs-std/src/instantiated/mnt6_298/fields.rs
→
r1cs-std/src/instantiated/mnt6_298/fields.rs
@@ -1,10 +1,10 @@
use algebra::mnt6_298::{Fq, Fq3Parameters, Fq6Parameters}; -use crate::fields::{fp::FpGadget, fp3::Fp3Gadget, fp6_2over3::Fp6Gadget}; +use crate::fields::{fp::FpVar, fp3::Fp3Var, fp6_2over3::Fp6Var}; -pub type FqGadget = FpGadget<Fq>; -pub type Fq3Gadget = Fp3Gadget<Fq3Parameters, Fq>; -pub type Fq6Gadget = Fp6Gadget<Fq6Parameters, Fq>; +pub type FqVar = FpVar<Fq>; +pub type Fq3Var = Fp3Var<Fq3Parameters>; +pub type Fq6Var = Fp6Var<Fq6Parameters>; #[test] fn mnt6_298_field_gadgets_test() {@@ -12,12 +12,12 @@ use super::*;
use crate::fields::tests::*; use algebra::mnt6_298::{Fq, Fq3, Fq6}; - field_test::<_, Fq, FqGadget>(); - frobenius_tests::<Fq, Fq, FqGadget>(13); + field_test::<_, _, FqVar>().unwrap(); + frobenius_tests::<Fq, _, FqVar>(13).unwrap(); - field_test::<_, Fq, Fq3Gadget>(); - frobenius_tests::<Fq3, Fq, Fq3Gadget>(13); + field_test::<_, _, Fq3Var>().unwrap(); + frobenius_tests::<Fq3, _, Fq3Var>(13).unwrap(); - field_test::<_, Fq, Fq6Gadget>(); - frobenius_tests::<Fq6, Fq, Fq6Gadget>(13); + field_test::<_, _, Fq6Var>().unwrap(); + frobenius_tests::<Fq6, _, Fq6Var>(13).unwrap(); }
M
r1cs-std/src/instantiated/mnt6_298/pairing.rs
→
r1cs-std/src/instantiated/mnt6_298/pairing.rs
@@ -1,8 +1,8 @@
use algebra::mnt6_298::Parameters; -pub type PairingGadget = crate::pairing::mnt6::PairingGadget<Parameters>; +pub type PairingVar = crate::pairing::mnt6::PairingVar<Parameters>; #[test] fn test() { - crate::pairing::tests::bilinearity_test::<algebra::MNT6_298, _, PairingGadget>() + crate::pairing::tests::bilinearity_test::<algebra::MNT6_298, PairingVar>().unwrap() }
M
r1cs-std/src/instantiated/mnt6_753/curves.rs
→
r1cs-std/src/instantiated/mnt6_753/curves.rs
@@ -1,23 +1,23 @@
use crate::groups::mnt6; use algebra::mnt6_753::Parameters; -pub type G1Gadget = mnt6::G1Gadget<Parameters>; -pub type G2Gadget = mnt6::G2Gadget<Parameters>; +pub type G1Var = mnt6::G1Var<Parameters>; +pub type G2Var = mnt6::G2Var<Parameters>; -pub type G1PreparedGadget = mnt6::G1PreparedGadget<Parameters>; -pub type G2PreparedGadget = mnt6::G2PreparedGadget<Parameters>; +pub type G1PreparedVar = mnt6::G1PreparedVar<Parameters>; +pub type G2PreparedVar = mnt6::G2PreparedVar<Parameters>; #[test] fn test() { use algebra::curves::models::mnt6::MNT6Parameters; crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT6Parameters>::G1Parameters, - G1Gadget, - >(); + G1Var, + >() + .unwrap(); crate::groups::curves::short_weierstrass::test::< - _, <Parameters as MNT6Parameters>::G2Parameters, - G2Gadget, - >(); + G2Var, + >() + .unwrap(); }
M
r1cs-std/src/instantiated/mnt6_753/fields.rs
→
r1cs-std/src/instantiated/mnt6_753/fields.rs
@@ -1,10 +1,10 @@
use algebra::mnt6_753::{Fq, Fq3Parameters, Fq6Parameters}; -use crate::fields::{fp::FpGadget, fp3::Fp3Gadget, fp6_2over3::Fp6Gadget}; +use crate::fields::{fp::FpVar, fp3::Fp3Var, fp6_2over3::Fp6Var}; -pub type FqGadget = FpGadget<Fq>; -pub type Fq3Gadget = Fp3Gadget<Fq3Parameters, Fq>; -pub type Fq6Gadget = Fp6Gadget<Fq6Parameters, Fq>; +pub type FqVar = FpVar<Fq>; +pub type Fq3Var = Fp3Var<Fq3Parameters>; +pub type Fq6Var = Fp6Var<Fq6Parameters>; #[test] fn mnt6_753_field_gadgets_test() {@@ -12,12 +12,12 @@ use super::*;
use crate::fields::tests::*; use algebra::mnt6_753::{Fq, Fq3, Fq6}; - field_test::<_, Fq, FqGadget>(); - frobenius_tests::<Fq, Fq, FqGadget>(13); + field_test::<_, _, FqVar>().unwrap(); + frobenius_tests::<Fq, _, FqVar>(13).unwrap(); - field_test::<_, Fq, Fq3Gadget>(); - frobenius_tests::<Fq3, Fq, Fq3Gadget>(13); + field_test::<_, _, Fq3Var>().unwrap(); + frobenius_tests::<Fq3, _, Fq3Var>(13).unwrap(); - field_test::<_, Fq, Fq6Gadget>(); - frobenius_tests::<Fq6, Fq, Fq6Gadget>(13); + field_test::<_, _, Fq6Var>().unwrap(); + frobenius_tests::<Fq6, _, Fq6Var>(13).unwrap(); }
M
r1cs-std/src/instantiated/mnt6_753/pairing.rs
→
r1cs-std/src/instantiated/mnt6_753/pairing.rs
@@ -1,8 +1,8 @@
use algebra::mnt6_753::Parameters; -pub type PairingGadget = crate::pairing::mnt6::PairingGadget<Parameters>; +pub type PairingVar = crate::pairing::mnt6::PairingVar<Parameters>; #[test] fn test() { - crate::pairing::tests::bilinearity_test::<algebra::MNT6_753, _, PairingGadget>() + crate::pairing::tests::bilinearity_test::<algebra::MNT6_753, PairingVar>().unwrap() }