Skip to content

Commit c97b01e

Browse files
committed
Adapting ed448 for using the internal ted448 package.
1 parent 537c053 commit c97b01e

File tree

11 files changed

+363
-560
lines changed

11 files changed

+363
-560
lines changed

ecc/decaf/decaf.go

+36-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1-
// Package decaf provides operations on a prime-order group derived from the goldilocks curve.
1+
// Package decaf provides a prime-order group derived from a quotient of
2+
// Edwards curves.
23
//
3-
// Its internal implementation uses the twist of the goldilocks curve.
4-
// This implementation uses Decaf v1.0 of the encoding.
4+
// Decaf Group
55
//
6-
// References:
7-
// - https://www.shiftleft.org/papers/decaf/
8-
// - https://www.shiftleft.org/papers/goldilocks
9-
// - https://sourceforge.net/p/ed448goldilocks/code/ci/v1.0/tree/
6+
// Decaf (3) is a prime-order group constructed as a quotient of groups. A Decaf
7+
// element can be represented by any point in the coset P+J[2], where J is a
8+
// Jacobi quartic and J[2] are its 2-torsion points.
9+
// Since P+J[2] has four points, Decaf specifies rules to choose one canonical
10+
// representative, which has a unique encoding. Two representations are
11+
// equivalent if they belong to the same coset.
12+
//
13+
// The types Elt and Scalar provide methods to perform arithmetic operations on
14+
// the Decaf group.
15+
//
16+
// Version
17+
//
18+
// This implementation uses Decaf v1.0 of the encoding (see (4) for a complete
19+
// specification).
20+
//
21+
// Internals
22+
//
23+
// Decaf uses as internal representation the curve
24+
// ted448: ax^2+y^2 = 1 + dx^2y^2, where a=-1 and d=-39082.
25+
// This curve is 4-degree isogeneous to the Goldilocks curve, and 2-degree
26+
// isogeneous to the Jacobi quartic. The ted448 curve was chosen because it
27+
// provides faster arithmetic operations.
28+
//
29+
// References
30+
//
31+
// (1) https://www.shiftleft.org/papers/goldilocks
32+
//
33+
// (2) https://tools.ietf.org/html/rfc7748
34+
//
35+
// (3) https://doi.org/10.1007/978-3-662-47989-6_34 and https://www.shiftleft.org/papers/decaf
36+
//
37+
// (4) https://sourceforge.net/p/ed448goldilocks/code/ci/v1.0/tree/
1038
package decaf
1139

1240
import (
@@ -16,7 +44,7 @@ import (
1644
fp "github.com/cloudflare/circl/math/fp448"
1745
)
1846

19-
// Version targets Decaf v1.0 of the encoding. As implemented in https://sourceforge.net/p/ed448goldilocks/code/ci/v1.0/tree/.
47+
// Decaf v1.0 of the encoding.
2048
const Version = "v1.0"
2149

2250
// Elt is an element of the Decaf group. It must be always initialized using

ecc/goldilocks/constants.go

-98
This file was deleted.

ecc/goldilocks/curve.go

-59
This file was deleted.

ecc/goldilocks/doc.go

-43
This file was deleted.

ecc/goldilocks/isogeny.go

-52
This file was deleted.

ecc/goldilocks/isogeny_test.go

-41
This file was deleted.

0 commit comments

Comments
 (0)