Versions in this module Expand all Collapse all v0 v0.1.0 Jan 22, 2021 Changes in this version + var ErrIdentity = errors.New("point was in the h-torsion") + var ErrInvalidPoint error = errors.New("not a valid jubjub point") + var ErrScalarOutOfRange = errors.New("scalar was not in the correct range") + type FieldElement struct + func (z *FieldElement) Add(x, y *FieldElement) *FieldElement + func (z *FieldElement) Cmp(x *FieldElement) int + func (z *FieldElement) Equals(x *FieldElement) bool + func (z *FieldElement) Exp(x, y *FieldElement) *FieldElement + func (z *FieldElement) ModInverse(x *FieldElement) *FieldElement + func (z *FieldElement) ModSqrt(x *FieldElement) *FieldElement + func (z *FieldElement) Mul(x, y *FieldElement) *FieldElement + func (z *FieldElement) Neg(x *FieldElement) *FieldElement + func (z *FieldElement) Set(x *FieldElement) *FieldElement + func (z *FieldElement) Sub(x, y *FieldElement) *FieldElement + func (z *FieldElement) ToBytes() []byte + type Jubjub struct + func Curve() *Jubjub + func (curve *Jubjub) Add(p1 *Point, p2 *Point) *Point + func (curve *Jubjub) Decompress(compressed []byte) (*Point, error) + func (curve *Jubjub) Double(p1 *Point) *Point + func (curve *Jubjub) FeFromBytes(in []byte) *FieldElement + func (curve *Jubjub) Generator() *Point + func (curve *Jubjub) Identity() *Point + func (curve *Jubjub) ScalarFromBig(n *big.Int) (*Scalar, error) + func (curve *Jubjub) ScalarFromBytes(in []byte) (*Scalar, error) + func (curve *Jubjub) ScalarMult(scalar *Scalar, point *Point) (*Point, error) + func (curve *Jubjub) SubgroupGenerator() *Point + type Point struct + func (p *Point) Add(p1 *Point, p2 *Point) *Point + func (p *Point) Clone() *Point + func (p *Point) Compress() []byte + func (p *Point) Double(p1 *Point) *Point + func (p *Point) Equals(q *Point) bool + func (p *Point) IsIdentity() bool + func (p *Point) IsOnCurve() bool + func (p *Point) MarshalBinary() ([]byte, error) + func (p *Point) MulByCofactor() *Point + func (p *Point) Neg(q *Point) *Point + func (p *Point) UnmarshalBinary(compressed []byte) error + type Scalar struct + func (sc Scalar) ToBytes() []byte