ed25519: github.com/agl/ed25519 Index | Files | Directories

package ed25519

import "github.com/agl/ed25519"

Package ed25519 implements the Ed25519 signature algorithm. See http://ed25519.cr.yp.to/.

Index

Package Files

ed25519.go

Constants

const (
    PublicKeySize  = 32
    PrivateKeySize = 64
    SignatureSize  = 64
)

func GenerateKey Uses

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 Uses

func Sign(privateKey *[PrivateKeySize]byte, message []byte) *[SignatureSize]byte

Sign signs the message with privateKey and returns a signature.

func Verify Uses

func Verify(publicKey *[PublicKeySize]byte, message []byte, sig *[SignatureSize]byte) bool

Verify returns true iff sig is a valid signature of message by publicKey.

Directories

PathSynopsis
edwards25519Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
extra25519

Package ed25519 imports 4 packages (graph) and is imported by 203 packages. Updated 2017-08-28. Refresh now. Tools for package owners.