Documentation ¶
Overview ¶
Package ed25519 implements the Ed25519 signature algorithm. See http://ed25519.cr.yp.to/.
Index ¶
Constants ¶
View Source
const ( PublicKeySize = 32 PrivateKeySize = 64 SignatureSize = 64 )
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey(rand io.Reader) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error)
GenerateKey generates a public/private key pair using randomness from rand.
func Sign ¶
func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte
Sign signs the message with privateKey and returns a signature.
func Verify ¶
func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool
Verify returns true iff sig is a valid signature of message by publicKey.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
|
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519. |
Click to show internal directories.
Click to hide internal directories.