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::MontFp;
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 /// COFACTOR = 1
21 const COFACTOR: &'static [u64] = &[1];
22
23 /// COFACTOR^(-1) mod r = 1
24 const COFACTOR_INV: Fr = MontFp!(Fr, "1");
25}
26
27impl SWModelParameters for Parameters {
28 /// COEFF_A = 11
29 const COEFF_A: Fq = MontFp!(Fq, "11");
30
31 /// COEFF_B = 106700080510851735677967319632585352256454251201367587890185989362936000262606668469523074
32 const COEFF_B: Fq = MontFp!(Fq, "106700080510851735677967319632585352256454251201367587890185989362936000262606668469523074");
33
34 /// AFFINE_GENERATOR_COEFFS = (G1_GENERATOR_X, G1_GENERATOR_Y)
35 const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) =
36 (G1_GENERATOR_X, G1_GENERATOR_Y);
37}
38
39/// G1_GENERATOR_X =
40#[rustfmt::skip]
41pub const G1_GENERATOR_X: Fq = MontFp!(Fq, "336685752883082228109289846353937104185698209371404178342968838739115829740084426881123453");
42
43/// G1_GENERATOR_Y =
44#[rustfmt::skip]
45pub const G1_GENERATOR_Y: Fq = MontFp!(Fq, "402596290139780989709332707716568920777622032073762749862342374583908837063963736098549800");