Browse Source

Update concrete curves in `r1cs-std`.

master
Pratyush Mishra 4 years ago
parent
commit
50388bdc22
28 changed files with 157 additions and 157 deletions
  1. +10
    -10
      r1cs-std/src/instantiated/bls12_377/curves.rs
  2. +14
    -14
      r1cs-std/src/instantiated/bls12_377/fields.rs
  3. +2
    -2
      r1cs-std/src/instantiated/bls12_377/pairing.rs
  4. +4
    -4
      r1cs-std/src/instantiated/ed_on_bls12_377/curves.rs
  5. +3
    -3
      r1cs-std/src/instantiated/ed_on_bls12_377/fields.rs
  6. +4
    -4
      r1cs-std/src/instantiated/ed_on_bls12_381/curves.rs
  7. +3
    -3
      r1cs-std/src/instantiated/ed_on_bls12_381/fields.rs
  8. +4
    -4
      r1cs-std/src/instantiated/ed_on_bn254/curves.rs
  9. +3
    -3
      r1cs-std/src/instantiated/ed_on_bn254/fields.rs
  10. +1
    -1
      r1cs-std/src/instantiated/ed_on_bw6_761/fields.rs
  11. +4
    -4
      r1cs-std/src/instantiated/ed_on_cp6_782/curves.rs
  12. +3
    -3
      r1cs-std/src/instantiated/ed_on_cp6_782/fields.rs
  13. +4
    -4
      r1cs-std/src/instantiated/ed_on_mnt4_298/curves.rs
  14. +3
    -3
      r1cs-std/src/instantiated/ed_on_mnt4_298/fields.rs
  15. +4
    -4
      r1cs-std/src/instantiated/ed_on_mnt4_753/curves.rs
  16. +3
    -3
      r1cs-std/src/instantiated/ed_on_mnt4_753/fields.rs
  17. +10
    -10
      r1cs-std/src/instantiated/mnt4_298/curves.rs
  18. +10
    -10
      r1cs-std/src/instantiated/mnt4_298/fields.rs
  19. +2
    -2
      r1cs-std/src/instantiated/mnt4_298/pairing.rs
  20. +10
    -10
      r1cs-std/src/instantiated/mnt4_753/curves.rs
  21. +10
    -10
      r1cs-std/src/instantiated/mnt4_753/fields.rs
  22. +2
    -2
      r1cs-std/src/instantiated/mnt4_753/pairing.rs
  23. +10
    -10
      r1cs-std/src/instantiated/mnt6_298/curves.rs
  24. +10
    -10
      r1cs-std/src/instantiated/mnt6_298/fields.rs
  25. +2
    -2
      r1cs-std/src/instantiated/mnt6_298/pairing.rs
  26. +10
    -10
      r1cs-std/src/instantiated/mnt6_753/curves.rs
  27. +10
    -10
      r1cs-std/src/instantiated/mnt6_753/fields.rs
  28. +2
    -2
      r1cs-std/src/instantiated/mnt6_753/pairing.rs

+ 10
- 10
r1cs-std/src/instantiated/bls12_377/curves.rs

@ -1,23 +1,23 @@
use crate::groups::bls12; use crate::groups::bls12;
use algebra::bls12_377::Parameters; 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] #[test]
fn test() { fn test() {
use algebra::curves::models::bls12::Bls12Parameters; use algebra::curves::models::bls12::Bls12Parameters;
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as Bls12Parameters>::G1Parameters, <Parameters as Bls12Parameters>::G1Parameters,
G1Gadget,
>();
G1Var,
>()
.unwrap();
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as Bls12Parameters>::G2Parameters, <Parameters as Bls12Parameters>::G2Parameters,
G2Gadget,
>();
G2Var,
>()
.unwrap();
} }

+ 14
- 14
r1cs-std/src/instantiated/bls12_377/fields.rs

@ -1,27 +1,27 @@
use algebra::bls12_377::{Fq, Fq12Parameters, Fq2Parameters, Fq6Parameters}; 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] #[test]
fn bls12_377_field_gadgets_test() {
fn bls12_377_field_test() {
use super::*; use super::*;
use crate::fields::tests::*; use crate::fields::tests::*;
use algebra::bls12_377::{Fq, Fq12, Fq2, Fq6}; 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();
} }

+ 2
- 2
r1cs-std/src/instantiated/bls12_377/pairing.rs

@ -1,8 +1,8 @@
use algebra::bls12_377::Parameters; use algebra::bls12_377::Parameters;
pub type PairingGadget = crate::pairing::bls12::PairingGadget<Parameters>;
pub type PairingVar = crate::pairing::bls12::PairingVar<Parameters>;
#[test] #[test]
fn test() { fn test() {
crate::pairing::tests::bilinearity_test::<algebra::Bls12_377, _, PairingGadget>()
crate::pairing::tests::bilinearity_test::<algebra::Bls12_377, PairingVar>().unwrap()
} }

+ 4
- 4
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 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] #[test]
fn test() { fn test() {
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap();
} }

+ 3
- 3
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; use algebra::ed_on_bls12_377::fq::Fq;
pub type FqGadget = FpGadget<Fq>;
pub type FqVar = FpVar<Fq>;
#[test] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, FqVar>().unwrap();
} }

+ 4
- 4
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 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] #[test]
fn test() { fn test() {
crate::groups::curves::twisted_edwards::test::<Fq, _, EdwardsGadget>();
crate::groups::curves::twisted_edwards::test::<_, EdwardsVar>().unwrap();
} }

+ 3
- 3
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] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, algebra::ed_on_bls12_381::Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, FqVar>().unwrap();
} }

+ 4
- 4
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 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] #[test]
fn test() { fn test() {
crate::groups::curves::twisted_edwards::test::<Fq, _, EdwardsGadget>();
crate::groups::curves::twisted_edwards::test::<_, EdwardsVar>().unwrap();
} }

+ 3
- 3
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] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, algebra::ed_on_bn254::Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, FqVar>().unwrap();
} }

+ 1
- 1
r1cs-std/src/instantiated/ed_on_bw6_761/fields.rs

@ -5,5 +5,5 @@ pub type FqGadget = FpGadget;
#[test] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, Fq, FqGadget>();
} }

+ 4
- 4
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 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] #[test]
fn test() { fn test() {
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap();
} }

+ 3
- 3
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; use algebra::ed_on_cp6_782::fq::Fq;
pub type FqGadget = FpGadget<Fq>;
pub type FqVar = FpVar<Fq>;
#[test] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, FqVar>().unwrap();
} }

+ 4
- 4
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 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] #[test]
fn test() { fn test() {
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap();
} }

+ 3
- 3
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; use algebra::ed_on_mnt4_298::fq::Fq;
pub type FqGadget = FpGadget<Fq>;
pub type FqVar = FpVar<Fq>;
#[test] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, FqVar>().unwrap();
} }

+ 4
- 4
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 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] #[test]
fn test() { fn test() {
crate::groups::curves::twisted_edwards::test::<_, EdwardsParameters, EdwardsGadget>();
crate::groups::curves::twisted_edwards::test::<EdwardsParameters, EdwardsVar>().unwrap();
} }

+ 3
- 3
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; use algebra::ed_on_mnt4_753::fq::Fq;
pub type FqGadget = FpGadget<Fq>;
pub type FqVar = FpVar<Fq>;
#[test] #[test]
fn test() { fn test() {
crate::fields::tests::field_test::<_, Fq, FqGadget>();
crate::fields::tests::field_test::<_, _, FqVar>().unwrap();
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt4_298/curves.rs

@ -1,23 +1,23 @@
use crate::groups::mnt4; use crate::groups::mnt4;
use algebra::mnt4_298::Parameters; 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] #[test]
fn test() { fn test() {
use algebra::curves::models::mnt4::MNT4Parameters; use algebra::curves::models::mnt4::MNT4Parameters;
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT4Parameters>::G1Parameters, <Parameters as MNT4Parameters>::G1Parameters,
G1Gadget,
>();
G1Var,
>()
.unwrap();
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT4Parameters>::G2Parameters, <Parameters as MNT4Parameters>::G2Parameters,
G2Gadget,
>();
G2Var,
>()
.unwrap();
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt4_298/fields.rs

@ -1,10 +1,10 @@
use algebra::mnt4_298::{Fq, Fq2Parameters, Fq4Parameters}; 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] #[test]
fn mnt4_298_field_gadgets_test() { fn mnt4_298_field_gadgets_test() {
@ -12,12 +12,12 @@ fn mnt4_298_field_gadgets_test() {
use crate::fields::tests::*; use crate::fields::tests::*;
use algebra::mnt4_298::{Fq, Fq2, Fq4}; 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();
} }

+ 2
- 2
r1cs-std/src/instantiated/mnt4_298/pairing.rs

@ -1,8 +1,8 @@
use algebra::mnt4_298::Parameters; use algebra::mnt4_298::Parameters;
pub type PairingGadget = crate::pairing::mnt4::PairingGadget<Parameters>;
pub type PairingVar = crate::pairing::mnt4::PairingVar<Parameters>;
#[test] #[test]
fn test() { fn test() {
crate::pairing::tests::bilinearity_test::<algebra::MNT4_298, _, PairingGadget>()
crate::pairing::tests::bilinearity_test::<algebra::MNT4_298, PairingVar>().unwrap()
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt4_753/curves.rs

@ -1,23 +1,23 @@
use crate::groups::mnt4; use crate::groups::mnt4;
use algebra::mnt4_753::Parameters; 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] #[test]
fn test() { fn test() {
use algebra::curves::models::mnt4::MNT4Parameters; use algebra::curves::models::mnt4::MNT4Parameters;
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT4Parameters>::G1Parameters, <Parameters as MNT4Parameters>::G1Parameters,
G1Gadget,
>();
G1Var,
>()
.unwrap();
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT4Parameters>::G2Parameters, <Parameters as MNT4Parameters>::G2Parameters,
G2Gadget,
>();
G2Var,
>()
.unwrap();
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt4_753/fields.rs

@ -1,10 +1,10 @@
use algebra::mnt4_753::{Fq, Fq2Parameters, Fq4Parameters}; 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] #[test]
fn mnt4_753_field_gadgets_test() { fn mnt4_753_field_gadgets_test() {
@ -12,12 +12,12 @@ fn mnt4_753_field_gadgets_test() {
use crate::fields::tests::*; use crate::fields::tests::*;
use algebra::mnt4_753::{Fq, Fq2, Fq4}; 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();
} }

+ 2
- 2
r1cs-std/src/instantiated/mnt4_753/pairing.rs

@ -1,8 +1,8 @@
use algebra::mnt4_753::Parameters; use algebra::mnt4_753::Parameters;
pub type PairingGadget = crate::pairing::mnt4::PairingGadget<Parameters>;
pub type PairingVar = crate::pairing::mnt4::PairingVar<Parameters>;
#[test] #[test]
fn test() { fn test() {
crate::pairing::tests::bilinearity_test::<algebra::MNT4_753, _, PairingGadget>()
crate::pairing::tests::bilinearity_test::<algebra::MNT4_753, PairingVar>().unwrap()
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt6_298/curves.rs

@ -1,23 +1,23 @@
use crate::groups::mnt6; use crate::groups::mnt6;
use algebra::mnt6_298::Parameters; 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] #[test]
fn test() { fn test() {
use algebra::curves::models::mnt6::MNT6Parameters; use algebra::curves::models::mnt6::MNT6Parameters;
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT6Parameters>::G1Parameters, <Parameters as MNT6Parameters>::G1Parameters,
G1Gadget,
>();
G1Var,
>()
.unwrap();
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT6Parameters>::G2Parameters, <Parameters as MNT6Parameters>::G2Parameters,
G2Gadget,
>();
G2Var,
>()
.unwrap();
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt6_298/fields.rs

@ -1,10 +1,10 @@
use algebra::mnt6_298::{Fq, Fq3Parameters, Fq6Parameters}; 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] #[test]
fn mnt6_298_field_gadgets_test() { fn mnt6_298_field_gadgets_test() {
@ -12,12 +12,12 @@ fn mnt6_298_field_gadgets_test() {
use crate::fields::tests::*; use crate::fields::tests::*;
use algebra::mnt6_298::{Fq, Fq3, Fq6}; 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();
} }

+ 2
- 2
r1cs-std/src/instantiated/mnt6_298/pairing.rs

@ -1,8 +1,8 @@
use algebra::mnt6_298::Parameters; use algebra::mnt6_298::Parameters;
pub type PairingGadget = crate::pairing::mnt6::PairingGadget<Parameters>;
pub type PairingVar = crate::pairing::mnt6::PairingVar<Parameters>;
#[test] #[test]
fn test() { fn test() {
crate::pairing::tests::bilinearity_test::<algebra::MNT6_298, _, PairingGadget>()
crate::pairing::tests::bilinearity_test::<algebra::MNT6_298, PairingVar>().unwrap()
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt6_753/curves.rs

@ -1,23 +1,23 @@
use crate::groups::mnt6; use crate::groups::mnt6;
use algebra::mnt6_753::Parameters; 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] #[test]
fn test() { fn test() {
use algebra::curves::models::mnt6::MNT6Parameters; use algebra::curves::models::mnt6::MNT6Parameters;
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT6Parameters>::G1Parameters, <Parameters as MNT6Parameters>::G1Parameters,
G1Gadget,
>();
G1Var,
>()
.unwrap();
crate::groups::curves::short_weierstrass::test::< crate::groups::curves::short_weierstrass::test::<
_,
<Parameters as MNT6Parameters>::G2Parameters, <Parameters as MNT6Parameters>::G2Parameters,
G2Gadget,
>();
G2Var,
>()
.unwrap();
} }

+ 10
- 10
r1cs-std/src/instantiated/mnt6_753/fields.rs

@ -1,10 +1,10 @@
use algebra::mnt6_753::{Fq, Fq3Parameters, Fq6Parameters}; 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] #[test]
fn mnt6_753_field_gadgets_test() { fn mnt6_753_field_gadgets_test() {
@ -12,12 +12,12 @@ fn mnt6_753_field_gadgets_test() {
use crate::fields::tests::*; use crate::fields::tests::*;
use algebra::mnt6_753::{Fq, Fq3, Fq6}; 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();
} }

+ 2
- 2
r1cs-std/src/instantiated/mnt6_753/pairing.rs

@ -1,8 +1,8 @@
use algebra::mnt6_753::Parameters; use algebra::mnt6_753::Parameters;
pub type PairingGadget = crate::pairing::mnt6::PairingGadget<Parameters>;
pub type PairingVar = crate::pairing::mnt6::PairingVar<Parameters>;
#[test] #[test]
fn test() { fn test() {
crate::pairing::tests::bilinearity_test::<algebra::MNT6_753, _, PairingGadget>()
crate::pairing::tests::bilinearity_test::<algebra::MNT6_753, PairingVar>().unwrap()
} }

Loading…
Cancel
Save