ark_bls12_381/fields/
fq6.rsuse ark_ff::{fields::*, MontFp};
use crate::*;
pub type Fq6 = Fp6<Fq6Config>;
#[derive(Clone, Copy)]
pub struct Fq6Config;
impl Fp6Config for Fq6Config {
type Fp2Config = Fq2Config;
const NONRESIDUE: Fq2 = Fq2::new(Fq::ONE, Fq::ONE);
const FROBENIUS_COEFF_FP6_C1: &'static [Fq2] = &[
Fq2::new(
Fq::ONE,
Fq::ZERO,
),
Fq2::new(
Fq::ZERO,
MontFp!("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436"),
),
Fq2::new(
MontFp!("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350"),
Fq::ZERO,
),
Fq2::new(
Fq::ZERO,
Fq::ONE,
),
Fq2::new(
MontFp!("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436"),
Fq::ZERO,
),
Fq2::new(
Fq::ZERO,
MontFp!("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350"),
),
];
#[rustfmt::skip]
const FROBENIUS_COEFF_FP6_C2: &'static [Fq2] = &[
Fq2::new(
Fq::ONE,
Fq::ZERO,
),
Fq2::new(
MontFp!("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437"),
Fq::ZERO,
),
Fq2::new(
MontFp!("4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939436"),
Fq::ZERO,
),
Fq2::new(
MontFp!("-1"),
Fq::ZERO,
),
Fq2::new(
MontFp!("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620350"),
Fq::ZERO,
),
Fq2::new(
MontFp!("793479390729215512621379701633421447060886740281060493010456487427281649075476305620758731620351"),
Fq::ZERO,
),
];
fn mul_fp2_by_nonresidue_in_place(fe: &mut Fq2) -> &mut Fq2 {
let t0 = fe.c0;
fe.c0 -= &fe.c1;
fe.c1 += &t0;
fe
}
}