Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Altbn128 = &altbn128{}
Altbn128Inst is the instance for the altbn128 curve, with all of its functions.
Functions ¶
func AltbnBlake2b ¶
AltbnBlake2b Hashes a message to a point on Altbn128 using Blake2b and try and increment The return value is the x,y affine coordinate pair.
func AltbnKeccak3 ¶
AltbnKeccak3 Hashes a message to a point on Altbn128 using Keccak3 and try and increment Keccak3 is only for compatability with Ethereum hashing. The return value is the x,y affine coordinate pair.
func AltbnSha3 ¶
AltbnSha3 Hashes a message to a point on Altbn128 using SHA3 and try and increment The return value is the x,y affine coordinate pair.
func EthereumSum256 ¶
EthereumSum256 returns the Keccak3-256 digest of the data. This is because Ethereum uses a non-standard hashing algo.
Types ¶
type CurveSystem ¶
type CurveSystem interface { Name() string MakeG1Point([]*big.Int, bool) (Point, bool) MakeG2Point([]*big.Int, bool) (Point, bool) UnmarshalG1([]byte) (Point, bool) UnmarshalG2([]byte) (Point, bool) UnmarshalGT([]byte) (PointT, bool) GetG1() Point GetG2() Point GetGT() PointT GetG1Infinity() Point GetG2Infinity() Point GetGTIdentity() PointT HashToG1(message []byte) Point GetG1Q() *big.Int GetG1Order() *big.Int Pair(Point, Point) (PointT, bool) // Product of Pairings PairingProduct([]Point, []Point) (PointT, bool) // contains filtered or unexported methods }
CurveSystem is a set of parameters and functions for a pairing based cryptosystem It has everything necessary to support all bgls functionality which we use.
type Point ¶
type Point interface { Add(Point) (Point, bool) Copy() Point Equals(Point) bool Marshal() []byte MarshalUncompressed() []byte Mul(*big.Int) Point ToAffineCoords() []*big.Int }
Point is a way to represent a point on G1 or G2, in the first two elliptic curves.
func AggregatePoints ¶
AggregatePoints takes the sum of points.