Documentation ¶
Overview ¶
Package bip32 implements the various screwed up legacy Oasis variants of BIP32-Ed25519.
Index ¶
Constants ¶
const ( // HardenedIndexOffset is the offset added to derivation indexes to indicate // that the hardened formula should be used. HardenedIndexOffset = 1 << 31 )
Variables ¶
var ( // ErrDivisibleByBaseOrder is the error returned when the derived child // is a multiple of the scalar group order. ErrDivisibleByBaseOrder = errors.New("bip32: kL divisible by basepoint order") )
Functions ¶
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a HKD derivation node.
func NewBitpieRoot ¶
func NewLedgerRoot ¶
NewLedgerRoot returns the root (master) node, corresponding to the provided seed, using the fucked up Ledger BIP32-Ed25519 variant.
func (*Node) DeriveChild ¶
DeriveChild derives a sub-key with the provided index.
func (*Node) DerivePath ¶
DerivePath derives the node associated with a path.
func (*Node) GetBitpiePrivateKey ¶
func (n *Node) GetBitpiePrivateKey() ed25519.PrivateKey
GetBitpiePrivateKey returns the Oasis network private key associated with a node, derived using the Bitpie method.
Just use Ristretto, but using kL as the RFC 8032 seeds is marginally less bad than BIP-Ed25519.
func (*Node) GetExtendedPrivateKey ¶
GetExtendedPrivateKey returns the Oasis network private key associated with a node, in the BIP-Ed25519 extended format.
func (*Node) GetLedgerPrivateKey ¶
func (n *Node) GetLedgerPrivateKey() ed25519.PrivateKey
GetLedgerPrivateKey returns the Oasis network private key associated with a node, derived using the legacy Ledger method.
Just use Ristretto, but using kL as the RFC 8032 seeds is marginally less bad than BIP-Ed25519.