Skip to content

Commit

Permalink
Merge pull request #354 from ConsenSys/bn254-tower-gnark
Browse files Browse the repository at this point in the history
expose bn254 tower to gnark
  • Loading branch information
yelhousni committed Mar 7, 2023
2 parents f9b8d37 + d0c9e85 commit 022d009
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ecc/bn254/bn254.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ var endo struct {
// seed x₀ of the curve
var xGen big.Int

// expose the tower -- github.com/consensys/gnark uses it in a gnark circuit

// 𝔽p²
type E2 = fptower.E2

// 𝔽p⁶
type E6 = fptower.E6

// 𝔽p¹²
type E12 = fptower.E12

func init() {
aCurveCoeff.SetUint64(0)
bCurveCoeff.SetUint64(3)
Expand Down

0 comments on commit 022d009

Please sign in to comment.