Add documentation

This commit is contained in:
George Tankersley 2017-05-28 00:00:00 +00:00
parent 259e08bc29
commit 54cdb2aef0
2 changed files with 9 additions and 1 deletions

8
doc.go Normal file
View File

@ -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

View File

@ -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