Documentation ¶
Overview ¶
Package mapping contains a set of functions to construct functions that take a field element and return a point on an elliptic curve. Certain mappings restrict the form of the curve or its parameters.
Choosing a mapping function ¶
If the target elliptic curve is:
- a supersingular curve, then use either the Boneh-Franklin method (NewBF) or the Elligator 2 method for A == 0 (newWA0Ell2);
- a Montgomery or twisted Edwards curve, then use the Elligator 2 (NewElligator2);
- a Weierstrass curve, then use either the Simplified SWU (NewSSWU), even if either A or B is zero;
- if none of the above applies, then use the Shallue-van de Woestijne method (NewSVDW).
Note: the mappings must not be used standalone, since its correct and secure usage is determined by each hash to curve suite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapToCurve ¶
MapToCurve maps a field element into a elliptic curve point.
func NewElligator2 ¶
func NewElligator2(e C.EllCurve, sgn0 GF.Sgn0ID) MapToCurve
NewElligator2 implements the Elligator2 method.
Click to show internal directories.
Click to hide internal directories.