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)
Click to show internal directories.
Click to hide internal directories.