ark-curves-cherry-picked/bw6_761/src/fields/fq6.rs
bw6_761/src/fields/fq6.rsRaw
1use ark_ff::{
2 fields::fp6_2over3::{Fp6, Fp6Config},
3 AdditiveGroup, Field, MontFp,
4};
5
6use crate::{Fq, Fq3, Fq3Config};
7
8pub type Fq6 = Fp6<Fq6Config>;
9
10pub struct Fq6Config;
11
12impl Fp6Config for Fq6Config {
13 type Fp3Config = Fq3Config;
14
15 /// NONRESIDUE = (0, 1, 0)
16 const NONRESIDUE: Fq3 = Fq3::new(Fq::ZERO, Fq::ONE, Fq::ZERO);
17
18 const FROBENIUS_COEFF_FP6_C1: &'static [Fq] = &[
19 Fq::ONE,
20 MontFp!("4922464560225523242118178942575080391082002530232324381063048548642823052024664478336818169867474395270858391911405337707247735739826664939444490469542109391530482826728203582549674992333383150446779312029624171857054392282775649"),
21 MontFp!("4922464560225523242118178942575080391082002530232324381063048548642823052024664478336818169867474395270858391911405337707247735739826664939444490469542109391530482826728203582549674992333383150446779312029624171857054392282775648"),
22 MontFp!("-1"),
23 MontFp!("1968985824090209297278610739700577151397666382303825728450741611566800370218827257750865013421937292370006175842381275743914023380727582819905021229583192207421122272650305267822868639090213645505120388400344940985710520836292650"),
24 MontFp!("1968985824090209297278610739700577151397666382303825728450741611566800370218827257750865013421937292370006175842381275743914023380727582819905021229583192207421122272650305267822868639090213645505120388400344940985710520836292651"),
25 ];
26}