Skip to content

Commit 022d009

Browse files
authored
Merge pull request #354 from ConsenSys/bn254-tower-gnark
expose bn254 tower to gnark
2 parents f9b8d37 + d0c9e85 commit 022d009

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ecc/bn254/bn254.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ var endo struct {
100100
// seed x₀ of the curve
101101
var xGen big.Int
102102

103+
// expose the tower -- github.com/consensys/gnark uses it in a gnark circuit
104+
105+
// 𝔽p²
106+
type E2 = fptower.E2
107+
108+
// 𝔽p⁶
109+
type E6 = fptower.E6
110+
111+
// 𝔽p¹²
112+
type E12 = fptower.E12
113+
103114
func init() {
104115
aCurveCoeff.SetUint64(0)
105116
bCurveCoeff.SetUint64(3)

0 commit comments

Comments
 (0)