forked from cloudflare/circl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Package goldilocks provides elliptic curve operations over the goldilocks | ||
// curve and the decaf group. | ||
// | ||
// Goldilocks Curve | ||
// | ||
// The goldilocks curve is defined over GF(2^448-2^224-1) by the twisted Edwards | ||
// curve | ||
// Goldilocks: ax^2+y^2 = 1 + dx^2y^2, where a=1 and d=-39081. | ||
// This curve was proposed by Hamburg (1) and is also known as edwards448 | ||
// after RFC-7748 (2). | ||
// | ||
// order = 4*(2^446 - 0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d) | ||
// G = (x,y) = | ||
// (224580040295924300187604334099896036246789641632564134246125461 | ||
// 686950415467406032909029192869357953282578032075146446173674602635 | ||
// 247710 | ||
// | ||
// Y(P) 298819210078481492676017930443930673437544040154080242095928241 | ||
// 372331506189835876003536878655418784733982303233503462500531545062 | ||
// 832660 | ||
|
||
// The datatypes Curve, Point, and Scalar provide methods to perform arithmetic | ||
// operations on the Goldilocks curve. | ||
// | ||
// Decaf Group | ||
// | ||
// Decaf (3) is a prime-order group constructed as a quotient of groups. A Decaf | ||
// element can be represented by any point in the coset P+J[2], where J is a | ||
// Jacobi quartic and J[2] are its 2-torsion points. | ||
// Since P+J[2] has four points, Decaf specifies rules to choose one canonical | ||
// representative, which has a unique encoding. Two representations are | ||
// equivalent if they belong to the same coset. | ||
// | ||
// The types Decaf, Elt, and Scalar provide methods to perform arithmetic | ||
// operations on the Decaf group. | ||
// | ||
// Internals | ||
// | ||
// Both Goldilocks and Decaf use as internal representation the curve | ||
// 4Iso-Goldilocks: ax^2+y^2 = 1 + dx^2y^2, where a=-1 and d=-39082. | ||
// This curve is 4-degree isogeous to the Goldilocks curve, and 2-degree | ||
// isogeneous to the Jacobi quartic. The 4Iso-Goldilocks curve was chosen as | ||
// provides faster arithmetic operations. | ||
// | ||
// References | ||
// | ||
// (1) https://www.shiftleft.org/papers/goldilocks | ||
// | ||
// (2) https://tools.ietf.org/html/rfc7748 | ||
// | ||
// (3) https://doi.org/10.1007/978-3-662-47989-6_34 | ||
// | ||
package goldilocks |