Categorygithub.com/umbracle/go-eth-bn256
modulepackage
0.0.0-20230125114011-47cb310d9b0b
Repository: https://github.com/umbracle/go-eth-bn256.git
Documentation: pkg.go.dev

# README

Go-eth-bn256

Package go-eth-bn256 implements the particular bilinear group used in the Ethereum bn256 precompiled functions (EIP-196 and EIP-197).

This package is a fork of the cloudflare bn256 library.

# Functions

Miller applies Miller's algorithm, which is a bilinear function from the source groups to F_p^12.
Pair calculates an Optimal Ate pairing.
PairingCheck calculates the Optimal Ate pairing for a set of points.
RandomG1 returns x and g₁ˣ where x is a random, non-zero number read from r.
RandomG2 returns x and g₂ˣ where x is a random, non-zero number read from r.
RandomGT returns x and e(g₁, g₂)ˣ where x is a random, non-zero number read from r.

# Variables

Order is the number of elements in both G₁ and G₂: 36u⁴+36u³+18u²+6u+1.

# Structs

G1 is an abstract cyclic group.
G2 is an abstract cyclic group.
GT is an abstract cyclic group.