1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
use ark_ec::{
mnt4,
models::{short_weierstrass::SWCurveConfig, CurveConfig},
};
use ark_ff::{Field, MontFp};
use crate::{Fq, Fr};
pub type G1Affine = mnt4::G1Affine<crate::Config>;
pub type G1Projective = mnt4::G1Projective<crate::Config>;
pub type G1Prepared = mnt4::G1Prepared<crate::Config>;
#[derive(Clone, Default, PartialEq, Eq)]
pub struct Config;
impl CurveConfig for Config {
type BaseField = Fq;
type ScalarField = Fr;
const COFACTOR: &'static [u64] = &[1];
const COFACTOR_INV: Fr = Fr::ONE;
}
impl SWCurveConfig for Config {
const COEFF_A: Fq = MontFp!("2");
const COEFF_B: Fq = MontFp!("423894536526684178289416011533888240029318103673896002803341544124054745019340795360841685");
const GENERATOR: G1Affine = G1Affine::new_unchecked(G1_GENERATOR_X, G1_GENERATOR_Y);
}
pub const G1_GENERATOR_X: Fq = MontFp!(
"60760244141852568949126569781626075788424196370144486719385562369396875346601926534016838"
);
pub const G1_GENERATOR_Y: Fq = MontFp!(
"363732850702582978263902770815145784459747722357071843971107674179038674942891694705904306"
);