ed25519

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: BSD-3-Clause Imports: 8 Imported by: 6

Documentation

Overview

Package ed25519 implements Ed25519 signature scheme as described in RFC-8032.

References:

Index

Constants

View Source
const Size = fp.Size

Size is the length in bytes of Ed25519 keys.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivKey

type PrivKey [Size]byte

PrivKey represents a private key of Ed25519.

type PubKey

type PubKey [Size]byte

PubKey represents a public key of Ed25519.

type Pure

type Pure struct{}

Pure corresponds to the Ed25519 PureEdDSA instance.

func (Pure) KeyGen

func (e Pure) KeyGen(public *PubKey, private *PrivKey)

KeyGen generates a public key from a secret key.

func (Pure) Sign

func (e Pure) Sign(message []byte, public *PubKey, private *PrivKey) *Signature

Sign returns the signature of a message using both the private and public keys of the signer.

func (Pure) Verify

func (e Pure) Verify(message []byte, public *PubKey, sig *Signature) bool

Verify returns true if the signature is valid. Failure cases are invalid signature, or public key cannot be decoded.

type Signature

type Signature [2 * Size]byte

Signature represents an Ed25519 signature.

Jump to

Keyboard shortcuts

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