ed25519

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package ed25519 implements signature algorithm Ed25519 for COSE as defined in RFC9053. https://datatracker.ietf.org/doc/html/rfc9053#name-edwards-curve-digital-signa.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckKey

func CheckKey(k key.Key) error

CheckKey checks whether the given key is a valid Ed25519 key.

func GenerateKey

func GenerateKey() (key.Key, error)

GenerateKey generates a new Key for Ed25519.

func KeyFromPrivate

func KeyFromPrivate(pk goed25519.PrivateKey) (key.Key, error)

KeyFromPrivate returns a private Key with given ed25519.PrivateKey.

func KeyFromPublic

func KeyFromPublic(pk goed25519.PublicKey) (key.Key, error)

KeyFromPublic returns a public Key with given ed25519.PublicKey.

func KeyFromSeed added in v0.4.1

func KeyFromSeed(seed []byte) (key.Key, error)

KeyFromSeed returns a private Key with given ed25519.PrivateKey seed.

func KeyToPrivate added in v0.5.0

func KeyToPrivate(k key.Key) (goed25519.PrivateKey, error)

KeyToPrivate returns a ed25519.PrivateKey from the given key.

func KeyToPublic added in v0.5.0

func KeyToPublic(k key.Key) (goed25519.PublicKey, error)

KeyToPublic returns a ed25519.PublicKey from the given key.

func NewSigner

func NewSigner(k key.Key) (key.Signer, error)

NewSigner creates a key.Signer for the given private key.

func NewVerifier

func NewVerifier(k key.Key) (key.Verifier, error)

NewVerifier creates a key.Verifier for the given key.

func ToPublicKey

func ToPublicKey(k key.Key) (key.Key, error)

ToPublicKey converts the given private key to a public key. If the key is already a public key, it is returned as-is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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