ark-r1cs-std/r1cs-std/src/instantiated/mnt6_298/fields.rs
r1cs-std/src/instantiated/mnt6_298/fields.rsRaw
1use algebra::mnt6_298::{Fq, Fq3Parameters, Fq6Parameters};
2
3use crate::fields::{fp::FpVar, fp3::Fp3Var, fp6_2over3::Fp6Var};
4
5/// A variable that is the R1CS equivalent of `algebra::mnt4_298::Fq`.
6pub type FqVar = FpVar<Fq>;
7/// A variable that is the R1CS equivalent of `algebra::mnt4_298::Fq3`.
8pub type Fq3Var = Fp3Var<Fq3Parameters>;
9/// A variable that is the R1CS equivalent of `algebra::mnt4_298::Fq6`.
10pub type Fq6Var = Fp6Var<Fq6Parameters>;
11
12#[test]
13fn mnt6_298_field_gadgets_test() {
14 use super::*;
15 use crate::fields::tests::*;
16 use algebra::mnt6_298::{Fq, Fq3, Fq6};
17
18 field_test::<_, _, FqVar>().unwrap();
19 frobenius_tests::<Fq, _, FqVar>(13).unwrap();
20
21 field_test::<_, _, Fq3Var>().unwrap();
22 frobenius_tests::<Fq3, _, Fq3Var>(13).unwrap();
23
24 field_test::<_, _, Fq6Var>().unwrap();
25 frobenius_tests::<Fq6, _, Fq6Var>(13).unwrap();
26}