mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-27 14:13:46 +01:00
Co-authored-by: Michele Orrù <michele.orru@berkeley.edu> Co-authored-by: Weikeng Chen <w.k@berkeley.edu> Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
33 lines
2.9 KiB
Rust
33 lines
2.9 KiB
Rust
use ark_ff::{
|
|
fields::fp6_2over3::{Fp6, Fp6Config},
|
|
AdditiveGroup, Field, MontFp,
|
|
};
|
|
|
|
use crate::{Fq, Fq3, Fq3Config};
|
|
|
|
pub type Fq6 = Fp6<Fq6Config>;
|
|
|
|
pub struct Fq6Config;
|
|
|
|
impl Fp6Config for Fq6Config {
|
|
type Fp3Config = Fq3Config;
|
|
|
|
const NONRESIDUE: Fq3 = Fq3::new(Fq::ZERO, Fq::ONE, Fq::ZERO);
|
|
|
|
// Coefficients for the Frobenius automorphism.
|
|
// c1[0] = 1,
|
|
// c1[1] = 24129022407817241407134263419936114379815707076943508280977368156625538709102831814843582780138963119807143081677569721953561801075623741378629346409604471234573396989178424163772589090105392407118197799904755622897541183052133
|
|
// c1[2] = 24129022407817241407134263419936114379815707076943508280977368156625538709102831814843582780138963119807143081677569721953561801075623741378629346409604471234573396989178424163772589090105392407118197799904755622897541183052132
|
|
// c1[3] = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888458477323173057491593855069696241854796396165721416325350064441470418137846398469611935719059908164220784476160000
|
|
// c1[4] = 17769468560101711995209951371304522748355002843010440790806134764399814103468274958215310983651375801610927890210888755369611256415970113691066895445191924931148019336171640277697829047741006062493737919155152541323243293107868
|
|
// c1[5] = 17769468560101711995209951371304522748355002843010440790806134764399814103468274958215310983651375801610927890210888755369611256415970113691066895445191924931148019336171640277697829047741006062493737919155152541323243293107869
|
|
const FROBENIUS_COEFF_FP6_C1: &'static [Fq] = &[
|
|
Fq::ONE,
|
|
MontFp!("24129022407817241407134263419936114379815707076943508280977368156625538709102831814843582780138963119807143081677569721953561801075623741378629346409604471234573396989178424163772589090105392407118197799904755622897541183052133"),
|
|
MontFp!("24129022407817241407134263419936114379815707076943508280977368156625538709102831814843582780138963119807143081677569721953561801075623741378629346409604471234573396989178424163772589090105392407118197799904755622897541183052132"),
|
|
MontFp!("41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888458477323173057491593855069696241854796396165721416325350064441470418137846398469611935719059908164220784476160000"),
|
|
MontFp!("17769468560101711995209951371304522748355002843010440790806134764399814103468274958215310983651375801610927890210888755369611256415970113691066895445191924931148019336171640277697829047741006062493737919155152541323243293107868"),
|
|
MontFp!("17769468560101711995209951371304522748355002843010440790806134764399814103468274958215310983651375801610927890210888755369611256415970113691066895445191924931148019336171640277697829047741006062493737919155152541323243293107869"),
|
|
];
|
|
}
|