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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
use crate::bw6_761::{Fq, Fr};
use snarkvm_models::{
curves::{ModelParameters, SWModelParameters, Zero},
field,
};
use snarkvm_utilities::biginteger::{BigInteger384, BigInteger768};
#[derive(Clone, Default, PartialEq, Eq)]
pub struct BW6_761G1Parameters;
impl ModelParameters for BW6_761G1Parameters {
type BaseField = Fq;
type ScalarField = Fr;
}
impl SWModelParameters for BW6_761G1Parameters {
const AFFINE_GENERATOR_COEFFS: (Self::BaseField, Self::BaseField) = (G1_GENERATOR_X, G1_GENERATOR_Y);
const COEFF_A: Fq = field!(Fq, BigInteger768([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
const COEFF_B: Fq = field!(
Fq,
BigInteger768([
0xf29a000000007ab6,
0x8c391832e000739b,
0x77738a6b6870f959,
0xbe36179047832b03,
0x84f3089e56574722,
0xc5a3614ac0b1d984,
0x5c81153f4906e9fe,
0x4d28be3a9f55c815,
0xd72c1d6f77d5f5c5,
0x73a18e069ac04458,
0xf9dfaa846595555f,
0xd0f0a60a5be58c,
])
);
const COFACTOR: &'static [u64] = &[
0x3de580000000007c,
0x832ba4061000003b,
0xc61c554757551c0c,
0xc856a0853c9db94c,
0x2c77d5ac34cb12ef,
0xad1972339049ce76,
];
const COFACTOR_INV: Fr = field!(
Fr,
BigInteger384([
489703175600125849,
3883341943836920852,
1678256062427438196,
5848789333018172718,
7127967896440782320,
71512347676739162,
])
);
#[inline(always)]
fn mul_by_a(_elem: &Self::BaseField) -> Self::BaseField {
Self::BaseField::zero()
}
}
pub const G1_GENERATOR_X: Fq = field!(
Fq,
BigInteger768([
0xd6e42d7614c2d770,
0x4bb886eddbc3fc21,
0x64648b044098b4d2,
0x1a585c895a422985,
0xf1a9ac17cf8685c9,
0x352785830727aea5,
0xddf8cb12306266fe,
0x6913b4bfbc9e949a,
0x3a4b78d67ba5f6ab,
0x0f481c06a8d02a04,
0x91d4e7365c43edac,
0xf4d17cd48beca5,
])
);
pub const G1_GENERATOR_Y: Fq = field!(
Fq,
BigInteger768([
0x97e805c4bd16411f,
0x870d844e1ee6dd08,
0x1eba7a37cb9eab4d,
0xd544c4df10b9889a,
0x8fe37f21a33897be,
0xe9bf99a43a0885d2,
0xd7ee0c9e273de139,
0xaa6a9ec7a38dd791,
0x8f95d3fcf765da8e,
0x42326e7db7357c99,
0xe217e407e218695f,
0x9d1eb23b7cf684,
])
);