eddsa

package
v0.0.0-...-d02f37a Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotHardened = errors.New("only hardened derivation is supported")

ErrNotHardened is returned when the input led to an invalid private or public key.

Functions

func Ed25519

func Ed25519() slip10.Curve

Ed25519 returns a slip10.Curve which implements the Ed25519 signature algorithm. See https://ed25519.cr.yp.to/.

Types

type PublicKey

type PublicKey ed25519.PublicKey

PublicKey implements slip10.Key and represents an Ed25519 public key.

func (PublicKey) Bytes

func (p PublicKey) Bytes() []byte

Bytes returns the SLIP-10 serialization of the key.

func (PublicKey) IsPrivate

func (PublicKey) IsPrivate() bool

IsPrivate always returns false.

func (PublicKey) Public

func (p PublicKey) Public() slip10.Key

Public returns a reference to itself.

func (PublicKey) Shift

func (PublicKey) Shift([]byte) (slip10.Key, error)

Shift implements the Shift method of slip10.Key.

type Seed

type Seed []byte

Seed implements slip10.Key and represents an Ed25519 seed. RFC 8032's private keys correspond to seeds in this package.

func (Seed) Bytes

func (s Seed) Bytes() []byte

Bytes returns the SLIP-10 serialization of the key.

func (Seed) Ed25519Key

func (s Seed) Ed25519Key() (ed25519.PublicKey, ed25519.PrivateKey)

Ed25519Key generates the corresponding public/private key pair.

func (Seed) IsPrivate

func (Seed) IsPrivate() bool

IsPrivate always returns true.

func (Seed) Public

func (s Seed) Public() slip10.Key

Public returns the corresponding PublicKey.

func (Seed) Shift

func (Seed) Shift(buf []byte) (slip10.Key, error)

Shift derives a new Seed from the provided bytes.

Jump to

Keyboard shortcuts

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