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/
1038package decaf
1139
1240import (
@@ -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.
2048const Version = "v1.0"
2149
2250// Elt is an element of the Decaf group. It must be always initialized using
0 commit comments