@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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()
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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,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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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()
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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()
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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()
|
||||
}
|
}
|
@ -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();
|
||||
}
|
}
|
@ -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()
|
||||
}
|
}
|