Documentation
¶
Index ¶
- Variables
- func New() curve.Point
- type BJJ
- func (g *BJJ) Add(a, b curve.Point)
- func (g *BJJ) Equal(a curve.Point) bool
- func (p *BJJ) Marshal() []byte
- func (p *BJJ) MarshalJSON() ([]byte, error)
- func (g *BJJ) Neg(a curve.Point)
- func (g *BJJ) New() curve.Point
- func (g *BJJ) Order() *big.Int
- func (p *BJJ) Point() (*big.Int, *big.Int)
- func (g *BJJ) SafeAdd(a, b curve.Point)
- func (g *BJJ) ScalarBaseMult(scalar *big.Int)
- func (g *BJJ) ScalarMult(a curve.Point, scalar *big.Int)
- func (g *BJJ) Set(a curve.Point)
- func (g *BJJ) SetGenerator()
- func (p *BJJ) SetPoint(x, y *big.Int) curve.Point
- func (g *BJJ) SetZero()
- func (g *BJJ) String() string
- func (p *BJJ) Unmarshal(buf []byte) error
- func (p *BJJ) UnmarshalJSON(buf []byte) error
Constants ¶
This section is empty.
Variables ¶
var Params babyjubjub.CurveParams
Functions ¶
Types ¶
type BJJ ¶
type BJJ struct {
// contains filtered or unexported fields
}
BJJ is the affine representation of the BabyJubJub group element.
func (*BJJ) MarshalJSON ¶
MarshalJson serializes the elliptic curve element into a JSON byte slice.
func (*BJJ) Point ¶
Point returns the X and Y coordinates of the elliptic curve element in Twisted Edwards coordinates.
func (*BJJ) ScalarBaseMult ¶
ScalarBaseMult performs scalar multiplication using the base point.
func (*BJJ) ScalarMult ¶
ScalarMult performs scalar multiplication of a point by a scalar.
func (*BJJ) SetGenerator ¶
func (g *BJJ) SetGenerator()
SetGenerator sets the point to the BabyJubJub generator.
func (*BJJ) SetPoint ¶
SetPoint sets the elliptic curve element from the X and Y coordinates in Twisted Edwards coordinates.
func (*BJJ) SetZero ¶
func (g *BJJ) SetZero()
SetZero sets the current point to the identity element (0, 1).
func (*BJJ) String ¶
String returns a string representation of the point in Twisted Edwards coordinates.
func (*BJJ) UnmarshalJSON ¶
UnmarshalJson deserializes the elliptic curve element from a JSON byte slice.