Documentation ¶
Overview ¶
Package ed25519 implements the Ed25519 signature algorithm. See http://ed25519.cr.yp.to/.
Index ¶
- Constants
- func GenerateKey(rand io.Reader) (publicKey *[PublicKeySize]byte, privateKey *[PrivateKeySize]byte, err error)
- func MakePublicKey(privateKey *[PrivateKeySize]byte) (publicKey *[PublicKeySize]byte)
- func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte
- func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool
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 MakePublicKey ¶
func MakePublicKey(privateKey *[PrivateKeySize]byte) (publicKey *[PublicKeySize]byte)
MakePublicKey makes a publicKey from the first half of privateKey.
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.
Click to show internal directories.
Click to hide internal directories.