ark-curves-cherry-picked/mnt6_753/src/fields/fq6.rs
mnt6_753/src/fields/fq6.rsRaw
1use crate::{Fq, Fq3, Fq3Parameters, FQ_ONE, FQ_ZERO};
2use ark_ff::{
3 biginteger::BigInteger768 as BigInteger,
4 field_new,
5 fields::fp6_2over3::{Fp6, Fp6Parameters},
6};
7
8pub type Fq6 = Fp6<Fq6Parameters>;
9
10pub struct Fq6Parameters;
11
12impl Fp6Parameters for Fq6Parameters {
13 type Fp3Params = Fq3Parameters;
14
15 #[rustfmt::skip]
16 const NONRESIDUE: Fq3 = field_new!(Fq3, FQ_ZERO, FQ_ONE, FQ_ZERO);
17
18 // Coefficients for the Frobenius automorphism.
19 // c1[0] = 1,
20 // c1[1] = 24129022407817241407134263419936114379815707076943508280977368156625538709102831814843582780138963119807143081677569721953561801075623741378629346409604471234573396989178424163772589090105392407118197799904755622897541183052133
21 // c1[2] = 24129022407817241407134263419936114379815707076943508280977368156625538709102831814843582780138963119807143081677569721953561801075623741378629346409604471234573396989178424163772589090105392407118197799904755622897541183052132
22 // c1[3] = 41898490967918953402344214791240637128170709919953949071783502921025352812571106773058893763790338921418070971888458477323173057491593855069696241854796396165721416325350064441470418137846398469611935719059908164220784476160000
23 // c1[4] = 17769468560101711995209951371304522748355002843010440790806134764399814103468274958215310983651375801610927890210888755369611256415970113691066895445191924931148019336171640277697829047741006062493737919155152541323243293107868
24 // c1[5] = 17769468560101711995209951371304522748355002843010440790806134764399814103468274958215310983651375801610927890210888755369611256415970113691066895445191924931148019336171640277697829047741006062493737919155152541323243293107869
25 #[rustfmt::skip]
26 const FROBENIUS_COEFF_FP6_C1: &'static [Fq] = &[
27 FQ_ONE,
28 field_new!(Fq, BigInteger([
29 2665418275744511426,
30 7073776242814464967,
31 4441331072847607829,
32 5681016258918493042,
33 18254896527151449163,
34 10681724016023285331,
35 1760041123371930134,
36 4557299868084578750,
37 16702481779049799698,
38 14149724469588165150,
39 5617650120443517591,
40 449252806040736,
41 ])),
42 field_new!(Fq, BigInteger([
43 7739145380395648640,
44 1403348385939055902,
45 11220424057264707228,
46 4567962295300549271,
47 5929583493640677751,
48 17618207486530478833,
49 16600462137977359741,
50 16551719371247820635,
51 12057922785354578416,
52 13022559182829558162,
53 13308285686168533250,
54 313705269181021,
55 ])),
56 field_new!(Fq, BigInteger([
57 2265581976117350591,
58 18442012872391748519,
59 3807704300793525789,
60 12280644139289115082,
61 10655371227771325282,
62 1346491763263331896,
63 7477357615964975877,
64 12570239403004322603,
65 2180620924574446161,
66 12129628062772479841,
67 8853285699251153944,
68 362282887012814,
69 ])),
70 field_new!(Fq, BigInteger([
71 12973180669431253567,
72 17038664486452692616,
73 11034024317238370177,
74 7712681843988565810,
75 4725787734130647531,
76 2175028350442404679,
77 9323639551697167751,
78 14465264105466053583,
79 8569442212929419360,
80 17553812953652473294,
81 13991744086792172309,
82 48577617831792,
83 ])),
84 field_new!(Fq, BigInteger([
85 7899453564780116353,
86 4262348269618550065,
87 4254931332821270779,
88 8825735807606509581,
89 17051100767641418943,
90 13685288953644762793,
91 12929962610801289759,
92 2470844602302811697,
93 13214001206624640642,
94 234234166701528666,
95 6301108521067156651,
96 184125154691507,
97 ])),
98 ];
99}