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