ex25519

package
v0.0.0-...-0b9e0a5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ex25519 provides operations with expanded 512 bit ed25519 private keys. These keys can't be used with most of standard crypto tools and libraries. The package sole purpose is to add signing and public key derivation methods to BIP32-Ed25519 derived keys.

Index

Constants

View Source
const (
	ExpandedKeySize = 64
	PrivateKeySize  = 96
	PublicKeySize   = 32
	SignatureSize   = 64
)

Variables

This section is empty.

Functions

func Sign

func Sign(pk PrivateKey, message []byte) []byte

Sign is identical to ed25519.PrivateKey.Sign with the hashing step omitted

Types

type PrivateKey

type PrivateKey []byte

func NewKeyFromBytes

func NewKeyFromBytes(src []byte) (PrivateKey, error)

NewKeyFromBytes interprets src as an expanded 64 byte key and expands it further to 96 bytes by appending the derived public key to it

func (PrivateKey) Equal

func (p PrivateKey) Equal(x crypto.PrivateKey) bool

func (PrivateKey) Public

func (p PrivateKey) Public() crypto.PublicKey

func (PrivateKey) Sign

func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error)

Jump to

Keyboard shortcuts

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