ark-curves-cherry-picked/mnt6_298/src/fields/fq6.rs
mnt6_298/src/fields/fq6.rsRaw
1use crate::{Fq, Fq3, Fq3Parameters, FQ_ONE, FQ_ZERO};
2use ark_ff::{
3 biginteger::BigInteger320 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 #[rustfmt::skip]
19 const FROBENIUS_COEFF_FP6_C1: &'static [Fq] = &[
20 field_new!(Fq, BigInteger([
21 0xc3177aefffbb845c,
22 0x9b80c702f9961788,
23 0xc5df8dcdac70a85a,
24 0x29184098647b5197,
25 0x1c1223d33c3,
26 ])),
27 field_new!(Fq, BigInteger([
28 0xdf2f366476c3dfc6,
29 0xc1a2299f1c7e5543,
30 0xe79fefde1a054632,
31 0x32edfa196a9cb651,
32 0x245cfad65ca,
33 ])),
34 field_new!(Fq, BigInteger([
35 0x1c17bb7477085b6a,
36 0x2621629c22e83dbb,
37 0x21c062106d949dd8,
38 0x9d5b981062164ba,
39 0x84ad703207,
40 ])),
41 field_new!(Fq, BigInteger([
42 0xf82bb9b400447ba5,
43 0x5fc8850498c7534a,
44 0x50f3b95b083993a,
45 0x794de405433502f7,
46 0x1fbd57fa0b0,
47 ])),
48 field_new!(Fq, BigInteger([
49 0xdc13fe3f893c203b,
50 0x39a7226875df158f,
51 0xe34ed98542eefb62,
52 0x6f782a843d139e3c,
53 0x177280f6ea9,
54 ])),
55 field_new!(Fq, BigInteger([
56 0x9f2b792f88f7a497,
57 0xd527e96b6f752d18,
58 0xa92e6752ef5fa3bc,
59 0x98906b1ca18eefd4,
60 0x3384a4ca26c,
61 ])),
62 ];
63}