Documentation ¶
Overview ¶
Package edwards25519 implements RFC9380 for the edwards25519 group, and returns points and scalars in filippo.io/edwards25519.
Index ¶
- Constants
- func AffineToEdwards(x, y *field.Element) *edwards25519.Point
- func Elligator2Edwards(e *field.Element) *edwards25519.Point
- func Elligator2Montgomery(e *field.Element) (x, y *field.Element)
- func EncodeToCurve(input, dst []byte) *edwards25519.Point
- func HashToCurve(input, dst []byte) *edwards25519.Point
- func HashToScalar(input, dst []byte) *edwards25519.Scalar
- func MontgomeryToEdwards(u, v *field.Element) (x, y *field.Element)
- func MontgomeryUToEdwardsY(u *field.Element) *field.Element
Constants ¶
const ( // H2C represents the hash-to-curve string identifier. H2C = "edwards25519_XMD:SHA-512_ELL2_RO_" // E2C represents the encode-to-curve string identifier. E2C = "edwards25519_XMD:SHA-512_ELL2_NU_" )
Variables ¶
This section is empty.
Functions ¶
func AffineToEdwards ¶
func AffineToEdwards(x, y *field.Element) *edwards25519.Point
AffineToEdwards takes the affine coordinates of an Edwards25519 and returns a pointer to Point, represented in extended projective coordinates.
func Elligator2Edwards ¶
func Elligator2Edwards(e *field.Element) *edwards25519.Point
Elligator2Edwards maps the field element to a point on Edwards25519.
func Elligator2Montgomery ¶
Elligator2Montgomery implements the Elligator2 mapping to Curve25519.
func EncodeToCurve ¶
func EncodeToCurve(input, dst []byte) *edwards25519.Point
EncodeToCurve implements encode-to-curve mapping to Edwards25519 of input with dst. The DST must not be empty or nil, and is recommended to be longer than 16 bytes.
func HashToCurve ¶
func HashToCurve(input, dst []byte) *edwards25519.Point
HashToCurve implements hash-to-curve mapping to Edwards25519 of input with dst. The DST must not be empty or nil, and is recommended to be longer than 16 bytes.
func HashToScalar ¶
func HashToScalar(input, dst []byte) *edwards25519.Scalar
HashToScalar returns a safe mapping of the arbitrary input to a scalar for the Edwards25519 group. The DST must not be empty or nil, and is recommended to be longer than 16 bytes.
func MontgomeryToEdwards ¶
MontgomeryToEdwards lifts a Curve25519 point to its Edwards25519 equivalent.
Types ¶
This section is empty.