passphrase

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package passphrase implements passphrase based signing key derivation / backup from github.com/brave/crypto.

Index

Constants

This section is empty.

Variables

View Source
var (
	// LedgerHKDFSalt from browser for deriving anonymous wallet signing key.
	// NOTE do not reuse this for other purposes, generate a new salt for new uses.
	LedgerHKDFSalt = []byte{126, 244, 99, 158, 51, 68, 253, 80, 133, 183, 51, 180, 77, 62, 74, 252, 62, 106, 96, 125, 241, 110, 134, 87, 190, 208, 158, 84, 125, 69, 246, 207, 162, 247, 107, 172, 37, 34, 53, 246, 105, 20, 215, 5, 248, 154, 179, 191, 46, 17, 6, 72, 210, 91, 10, 169, 145, 248, 22, 147, 117, 24, 105, 12}
)

Functions

func DeriveSigningKeysFromSeed

func DeriveSigningKeysFromSeed(seed, salt []byte) (ed25519.PrivateKey, error)

DeriveSigningKeysFromSeed using optional salt.

func FromBytes

func FromBytes(in []byte) ([]string, error)

FromBytes converts bytes to passphrase using bip39.

func FromHex

func FromHex(in string) ([]string, error)

FromHex converts hex bytes to passphrase using bip39.

func ToBytes32

func ToBytes32(phrase string) ([]byte, error)

ToBytes32 converts a 32-byte passphrase to bytes. Infers whether the passphrase is bip39 or niceware based on length.

func ToHex32

func ToHex32(phrase string) (string, error)

ToHex32 converts a 32-byte passphrase to hex. Infers whether the passphrase is bip39 or niceware based on length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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