arnaucube
arnaucube/ark-curves-cherry-pickedPublic Self-hosted repository
ark-curves-cherry-picked/mnt6_753/src/constraints/fields.rs
mnt6_753/src/constraints/fields.rsRaw
 1use crate::{Fq, Fq3Parameters, Fq6Parameters};
 2
 3use ark_r1cs_std::fields::{fp::FpVar, fp3::Fp3Var, fp6_2over3::Fp6Var};
 4
 5/// A variable that is the R1CS equivalent of `crate::Fq`.
 6pub type FqVar = FpVar<Fq>;
 7/// A variable that is the R1CS equivalent of `crate::Fq3`.
 8pub type Fq3Var = Fp3Var<Fq3Parameters>;
 9/// A variable that is the R1CS equivalent of `crate::Fq6`.
10pub type Fq6Var = Fp6Var<Fq6Parameters>;
11
12#[test]
13fn mnt6_753_field_gadgets_test() {
14    use super::*;
15    use crate::{Fq, Fq3, Fq6};
16    use ark_curve_constraint_tests::fields::*;
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}