slip10

package
v0.0.0-...-ff9824d Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package slip10 implements the SLIP-0010 master key derivation scheme for Ed25519.

Index

Constants

View Source
const (
	// SeedMinSize is the minimum seed byte sequence size in bytes.
	SeedMinSize = 16

	// SeedMaxSize is the maximum seed byte sequence size in bytes.
	SeedMaxSize = 64

	// ChainCodeSize is the size of a SLIP-0010 chain code in bytes.
	ChainCodeSize = 32

	// SecretSize is the size of a SLIP-0010 secret in bytes.
	SecretSize = 32
)

Variables

View Source
var CurveConstant = []byte("ed25519 seed")

CurveConstant is the SLIP-0010 curve constant.

Functions

func NewChildKey

func NewChildKey(parentSecret *Secret, cPar *ChainCode, index uint32) (*Secret, *ChainCode, error)

NewChildKey derives a child key and chain code from a (parent key, parent chain code, index) tuple.

func NewMasterKey

func NewMasterKey(seed []byte) (*Secret, *ChainCode, error)

NewMasterKey derives a master key and chain code from a seed byte sequence.

Types

type ChainCode

type ChainCode [ChainCodeSize]byte

ChainCode is a SLIP-0010 chain code.

type Secret

type Secret [SecretSize]byte

Secret is a SLIP-0010 secret.

Jump to

Keyboard shortcuts

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