ed25519

package
v0.0.0-...-9259d71 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: BSD-2-Clause Imports: 4 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

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