Help us shape the future of Go! Take the 2026 Go Developer Survey

ed25519

package standard library
go1.26.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(priv *PrivateKey, message []byte) []byte

func SignCtx

func SignCtx(priv *PrivateKey, message []byte, context string) ([]byte, error)

func SignPH

func SignPH(priv *PrivateKey, message []byte, context string) ([]byte, error)

func Verify

func Verify(pub *PublicKey, message, sig []byte) error

func VerifyCtx

func VerifyCtx(pub *PublicKey, message []byte, sig []byte, context string) error

func VerifyPH

func VerifyPH(pub *PublicKey, message []byte, sig []byte, context string) error

Types

type PrivateKey

type PrivateKey struct {
	// contains filtered or unexported fields
}

func GenerateKey

func GenerateKey() (*PrivateKey, error)

GenerateKey generates a new Ed25519 private key pair.

func NewPrivateKey

func NewPrivateKey(priv []byte) (*PrivateKey, error)

func NewPrivateKeyFromSeed

func NewPrivateKeyFromSeed(seed []byte) (*PrivateKey, error)

func (*PrivateKey) Bytes

func (priv *PrivateKey) Bytes() []byte

func (*PrivateKey) PublicKey

func (priv *PrivateKey) PublicKey() []byte

func (*PrivateKey) Seed

func (priv *PrivateKey) Seed() []byte

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

func NewPublicKey

func NewPublicKey(pub []byte) (*PublicKey, error)

func (*PublicKey) Bytes

func (pub *PublicKey) Bytes() []byte

Jump to

Keyboard shortcuts

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