arnaucube
arnaucube/ark-curves-cherry-pickedPublic Self-hosted repository
ark-curves-cherry-picked/cp6_782/src/fields/fq6.rs
cp6_782/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!("2416169158604010336818399199316106389588878314690767988978701685873498866746813334102117883272276610365242925950967572554030909749205624998805208910209389668659757274773858916683688639755413288353778854399286396639505385648830027756862"),
21        MontFp!("2416169158604010336818399199316106389588878314690767988978701685873498866746813334102117883272276610365242925950967572554030909749205624998805208910209389668659757274773858916683688639755413288353778854399286396639505385648830027756861"),
22        MontFp!("22369874298875696930346742206501054934775599465297184582183496627646774052458024540232479018147881220178054575403841904557897715222633333372134756426301062487682326574958588001132586331462553235407484089304633076250782629492557320825576"),
23        MontFp!("19953705140271686593528343007184948545186721150606416593204794941773275185711211206130361134875604609812811649452874332003866805473427708373329547516091672819022569300184729084448897691707139947053705234905346679611277243843727293068715"),
24        MontFp!("19953705140271686593528343007184948545186721150606416593204794941773275185711211206130361134875604609812811649452874332003866805473427708373329547516091672819022569300184729084448897691707139947053705234905346679611277243843727293068716"),
25    ];
26}