ark-curves-cherry-picked/mnt6_298/src/curves/g1.rs
mnt6_298/src/curves/g1.rsRaw
1use ark_ec::{
2 mnt6,
3 models::{ModelParameters, SWModelParameters},
4};
5use ark_ff::{field_new};
6
7use crate::{Fq, Fr};
8
9pub type G1Affine = mnt6::G1Affine<crate::Parameters>;
10pub type G1Projective = mnt6::G1Projective<crate::Parameters>;
11pub type G1Prepared = mnt6::G1Prepared<crate::Parameters>;
12
13#[derive(Clone, Default, PartialEq, Eq)]
14pub struct Parameters;
15
16impl ModelParameters for Parameters {
17 type BaseField = Fq;
18 type ScalarField = Fr;
19}
20
21impl SWModelParameters for Parameters {
22 /// COEFF_A = 11
23 #[rustfmt::skip]
24 const COEFF_A: Fq = field_new!(Fq, "11");
25
26 /// COEFF_B = 106700080510851735677967319632585352256454251201367587890185989362936000262606668469523074
27 #[rustfmt::skip]
28 const COEFF_B: Fq = field_new!(Fq, "106700080510851735677967319632585352256454251201367587890185989362936000262606668469523074");
29
30 /// COFACTOR = 1
31 const COFACTOR: &'static [u64] = &[1];
32
33 /// COFACTOR^(-1) mod r =
34 /// 1
35 #[rustfmt::skip]
36 const COFACTOR_INV: Fr = field_new!(Fr, "1");
37
38 /// AFFINE_GENERATOR_COEFFS = (G1_GENERATOR_X, G1_GENERATOR_Y)
39 const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) =
40 (G1_GENERATOR_X, G1_GENERATOR_Y);
41}
42
43/// G1_GENERATOR_X =
44#[rustfmt::skip]
45pub const G1_GENERATOR_X: Fq = field_new!(Fq, "336685752883082228109289846353937104185698209371404178342968838739115829740084426881123453");
46
47/// G1_GENERATOR_Y =
48#[rustfmt::skip]
49pub const G1_GENERATOR_Y: Fq = field_new!(Fq, "402596290139780989709332707716568920777622032073762749862342374583908837063963736098549800");