Documentation ¶
Index ¶
- type EdCurve
- type Point
- func (p *Point) AddFixedPoint(cs *frontend.ConstraintSystem, p1 *Point, x, y interface{}, curve EdCurve) *Point
- func (p *Point) AddGeneric(cs *frontend.ConstraintSystem, p1, p2 *Point, curve EdCurve) *Point
- func (p *Point) Double(cs *frontend.ConstraintSystem, p1 *Point, curve EdCurve) *Point
- func (p *Point) MustBeOnCurve(cs *frontend.ConstraintSystem, curve EdCurve)
- func (p *Point) ScalarMulFixedBase(cs *frontend.ConstraintSystem, x, y interface{}, scalar frontend.Variable, ...) *Point
- func (p *Point) ScalarMulNonFixedBase(cs *frontend.ConstraintSystem, p1 *Point, scalar frontend.Variable, ...) *Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
Point point on a twisted Edwards curve in a Snark cs
func (*Point) AddFixedPoint ¶
func (p *Point) AddFixedPoint(cs *frontend.ConstraintSystem, p1 *Point, x, y interface{}, curve EdCurve) *Point
AddFixedPoint Adds two points, among which is one fixed point (the base), on a twisted edwards curve (eg jubjub) p1, base, ecurve are respectively: the point to add, a known base point, and the parameters of the twisted edwards curve
func (*Point) AddGeneric ¶
AddGeneric Adds two points on a twisted edwards curve (eg jubjub) p1, p2, c are respectively: the point to add, a known base point, and the parameters of the twisted edwards curve
func (*Point) MustBeOnCurve ¶
func (p *Point) MustBeOnCurve(cs *frontend.ConstraintSystem, curve EdCurve)
MustBeOnCurve checks if a point is on the twisted Edwards curve ax^2 + y^2 = 1 + d*x^2*y^2
func (*Point) ScalarMulFixedBase ¶
func (p *Point) ScalarMulFixedBase(cs *frontend.ConstraintSystem, x, y interface{}, scalar frontend.Variable, curve EdCurve) *Point
ScalarMulFixedBase computes the scalar multiplication of a point on a twisted Edwards curve x, y: coordinates of the base point curve: parameters of the Edwards curve scal: scalar as a SNARK constraint Standard left to right double and add
func (*Point) ScalarMulNonFixedBase ¶
func (p *Point) ScalarMulNonFixedBase(cs *frontend.ConstraintSystem, p1 *Point, scalar frontend.Variable, curve EdCurve) *Point
ScalarMulNonFixedBase computes the scalar multiplication of a point on a twisted Edwards curve p1: base point (as snark point) curve: parameters of the Edwards curve scal: scalar as a SNARK constraint Standard left to right double and add