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/.


Package Files



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.


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

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