Versions in this module Expand all Collapse all v0 v0.15.6 Dec 21, 2022 Changes in this version + var Gen1 = &G1 + var Gen2 = &G2 + var Order = bigFromHex("b640000002a3a6f1d603ab4ff58ec74449f2934b18ea8beee56ee19cd69ecf25") + func GenerateGTFieldTable(basePoint *GT) *[32 * 2]GTFieldTable + func GenerateKey(curve Curve, rand io.Reader) (priv []byte, x, y *big.Int, err error) + func Marshal(curve Curve, x, y *big.Int) []byte + func MarshalCompressed(curve Curve, x, y *big.Int) []byte + func NewCurveGenerator() *curvePoint + func NewCurvePoint() *curvePoint + func NewTwistGenerator() *twistPoint + func NewTwistPoint() *twistPoint + func NormalizeScalar(scalar []byte) []byte + func Unmarshal(curve Curve, data []byte) (x, y *big.Int) + func UnmarshalCompressed(curve Curve, data []byte) (x, y *big.Int) + type Curve interface + Add func(x1, y1, x2, y2 *big.Int) (x, y *big.Int) + Double func(x1, y1 *big.Int) (x, y *big.Int) + IsOnCurve func(x, y *big.Int) bool + Params func() *CurveParams + ScalarBaseMult func(k []byte) (x, y *big.Int) + ScalarMult func(x1, y1 *big.Int, k []byte) (x, y *big.Int) + type CurveParams struct + B *big.Int + BitSize int + Gx *big.Int + Gy *big.Int + N *big.Int + Name string + P *big.Int + func (curve *CurveParams) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) + func (curve *CurveParams) Double(x1, y1 *big.Int) (*big.Int, *big.Int) + func (curve *CurveParams) IsOnCurve(x, y *big.Int) bool + func (curve *CurveParams) Params() *CurveParams + func (curve *CurveParams) ScalarBaseMult(k []byte) (*big.Int, *big.Int) + func (curve *CurveParams) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int) + type G1 struct + func RandomG1(r io.Reader) (*big.Int, *G1, error) + func (e *G1) Add(a, b *G1) *G1 + func (e *G1) Double(a *G1) *G1 + func (e *G1) Equal(other *G1) bool + func (e *G1) IsOnCurve() bool + func (e *G1) Marshal() []byte + func (e *G1) MarshalCompressed() []byte + func (e *G1) MarshalUncompressed() []byte + func (e *G1) Neg(a *G1) *G1 + func (e *G1) ScalarBaseMult(scalar []byte) (*G1, error) + func (e *G1) ScalarMult(a *G1, scalar []byte) (*G1, error) + func (e *G1) Set(a *G1) *G1 + func (e *G1) Unmarshal(m []byte) ([]byte, error) + func (e *G1) UnmarshalCompressed(data []byte) ([]byte, error) + func (g *G1) String() string + type G1Curve struct + func (curve *G1Curve) Unmarshal(data []byte) (x, y *big.Int) + func (curve *G1Curve) UnmarshalCompressed(data []byte) (x, y *big.Int) + func (g1 *G1Curve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) + func (g1 *G1Curve) Double(x, y *big.Int) (*big.Int, *big.Int) + func (g1 *G1Curve) IsOnCurve(x, y *big.Int) bool + func (g1 *G1Curve) Params() *CurveParams + func (g1 *G1Curve) ScalarBaseMult(scalar []byte) (*big.Int, *big.Int) + func (g1 *G1Curve) ScalarMult(Bx, By *big.Int, scalar []byte) (*big.Int, *big.Int) + type G2 struct + func RandomG2(r io.Reader) (*big.Int, *G2, error) + func (e *G2) Add(a, b *G2) *G2 + func (e *G2) Equal(other *G2) bool + func (e *G2) IsOnCurve() bool + func (e *G2) Marshal() []byte + func (e *G2) MarshalCompressed() []byte + func (e *G2) MarshalUncompressed() []byte + func (e *G2) Neg(a *G2) *G2 + func (e *G2) ScalarBaseMult(scalar []byte) (*G2, error) + func (e *G2) ScalarMult(a *G2, scalar []byte) (*G2, error) + func (e *G2) Set(a *G2) *G2 + func (e *G2) String() string + func (e *G2) Unmarshal(m []byte) ([]byte, error) + func (e *G2) UnmarshalCompressed(data []byte) ([]byte, error) + type GT struct + func Miller(g1 *G1, g2 *G2) *GT + func Pair(g1 *G1, g2 *G2) *GT + func RandomGT(r io.Reader) (*big.Int, *GT, error) + func ScalarBaseMultGT(tables *[32 * 2]GTFieldTable, scalar []byte) (*GT, error) + func ScalarMultGT(a *GT, scalar []byte) (*GT, error) + func (e *GT) Add(a, b *GT) *GT + func (e *GT) Finalize() *GT + func (e *GT) Marshal() []byte + func (e *GT) ScalarBaseMult(k *big.Int) *GT + func (e *GT) ScalarMult(a *GT, k *big.Int) *GT + func (e *GT) Set(a *GT) *GT + func (e *GT) SetOne() *GT + func (e *GT) Unmarshal(m []byte) ([]byte, error) + func (g *GT) String() string + type GTFieldTable [15]*GT + func (table *GTFieldTable) Select(p *GT, n uint8)