Skip to content

Commit

Permalink
Add rfc ref
Browse files Browse the repository at this point in the history
  • Loading branch information
K1li4nL committed May 6, 2024
1 parent b348c25 commit 9dd0c29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions group/edwards25519/point.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@ func byteXor(dst, b1, b2 []byte) ([]byte, error) {
return dst, nil
}

// curve25519Elligator2 implements a map from fieldElement to a point on Curve25519
// as defined in section G.2.1. of [RFC9380]
// [RFC9380]: https://datatracker.ietf.org/doc/html/rfc9380#name-curve25519-q-5-mod-8-k-1
func curve25519Elligator2(u fieldElement) (xn, xd, yn, yd fieldElement) {
// Some const needed
var one fieldElement
Expand Down Expand Up @@ -492,6 +495,9 @@ func curve25519Elligator2(u fieldElement) (xn, xd, yn, yd fieldElement) {
return xn, xd, y, one
}

// mapToCurveElligator2Ed25519 implements a map from fieldElement to a point on ed25519
// as defined in section G.2.2. of [RFC9380]
// [RFC9380]: https://datatracker.ietf.org/doc/html/rfc9380#name-edwards25519
func mapToCurveElligator2Ed25519(u fieldElement) kyber.Point {
var xn, xd, yn, yd fieldElement
var zero, one, tv1 fieldElement
Expand Down

0 comments on commit 9dd0c29

Please sign in to comment.