diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..f2a98d5 --- /dev/null +++ b/doc.go @@ -0,0 +1,8 @@ +// Package ed25519 implements an elliptic.Curve interface on top of the twisted +// Edwards curve -x^2 + y^2 = 1 + -(121665/121666)*x^2*y^2. This is better +// known as the Edwards curve equivalent to curve25519, and is the curve used +// by the Ed25519 signature scheme. +// +// Because of the Curve interface, this package takes input in affine (x,y) +// pairs instead of the more standard compressed Edwards y. +package ed25519 diff --git a/ed25519.go b/ed25519.go index 3b4a5d4..ca3d7ec 100644 --- a/ed25519.go +++ b/ed25519.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Implements an elliptic.Curve interface over the ed25519 curve. package ed25519 import ( @@ -34,6 +33,7 @@ func initEd25519Params() { ed25519Params.BitSize = 256 } +// Ed25519 returns a Curve that implements Ed25519. func Ed25519() elliptic.Curve { once.Do(initEd25519Params) return ed25519