Documentation ¶
Index ¶
- Variables
- func DeriveFieldElementFromPoint(point Point) *big.Int
- func RandomFieldElement(r io.Reader) (*big.Int, error)
- type Curve
- type G1
- func (e *G1) Add(a, b Point) Point
- func (e *G1) Curve() Curve
- func (e *G1) Marshal() []byte
- func (e *G1) Neg(a Point) Point
- func (e *G1) ScalarBaseMult(k *big.Int) Point
- func (e *G1) ScalarMult(a Point, k *big.Int) Point
- func (e *G1) Set(a Point) Point
- func (e *G1) String() string
- func (e *G1) Unmarshal(m []byte) ([]byte, error)
- type G2
- func (e *G2) Add(a, b Point) Point
- func (e *G2) Curve() Curve
- func (e *G2) Marshal() []byte
- func (e *G2) Neg(a Point) Point
- func (e *G2) ScalarBaseMult(k *big.Int) Point
- func (e *G2) ScalarMult(a Point, k *big.Int) Point
- func (e *G2) Set(a Point) Point
- func (e *G2) String() string
- func (e *G2) Unmarshal(m []byte) ([]byte, error)
- type GT
- func (e *GT) Add(a, b Point) Point
- func (e *GT) Curve() Curve
- func (e *GT) Marshal() []byte
- func (e *GT) Neg(a Point) Point
- func (e *GT) ScalarBaseMult(k *big.Int) Point
- func (e *GT) ScalarMult(a Point, k *big.Int) Point
- func (e *GT) Set(a Point) Point
- func (e *GT) String() string
- func (e *GT) Unmarshal(m []byte) ([]byte, error)
- type Point
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Order = bn256.Order
)
Functions ¶
func DeriveFieldElementFromPoint ¶
DeriveFieldElementFromPoint derives a field element k by the following rules: (1) Calculate h = SHA256(point.Marshal()) (2) Calculate k = BigInt(h) % Order (3) If k == 0, calculate h = SHA256(h), then jump to (2)
Types ¶
Click to show internal directories.
Click to hide internal directories.