ed25519

package module
v0.0.0-...-0e573b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2015 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Overview

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

Index

Constants

View Source
const (
	// EntropySize is the number of bytes used as input to GenerateKey.
	EntropySize = 32

	// PublicKeySize is the size of the public key in bytes.
	PublicKeySize = 32

	// SecretKeySize is the size of the secret key in bytes.
	SecretKeySize = 64

	// SignatureSize is size of the signature in bytes.
	SignatureSize = 64
)

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(entropy [EntropySize]byte) (sk SecretKey, pk PublicKey)

GenerateKey generates a public/secret key pair using randomness from rand.

func Verify

func Verify(pk PublicKey, message []byte, sig Signature) bool

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

Types

type PublicKey

type PublicKey *[PublicKeySize]byte

PublicKey is used to verify signatures.

type SecretKey

type SecretKey *[SecretKeySize]byte

SecretKey is used to sign messages.

type Signature

type Signature *[SignatureSize]byte

Signature is used to authenticate a message.

func Sign

func Sign(sk SecretKey, message []byte) (sig Signature)

Sign signs the message with secretKey and returns a signature.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL