Mnemonic For Master Private Key
Abstract
This is a simple extension of the widely used BIP39 Mnemonic seed phrase scheme where 12 to 24 words are used to encode entropy which is then used to derive an extended private key for use with the BRC-32 derivation scheme.
This document proposes a way to encode a single private key as a mnemonic phrase which people have become accustomed to.
Motivation
The purpose is to maintain the familiar interface to store a single key rather than an extended set. Users are already aware of the importance of keeping these words secret and secure, and have developed an awareness around not sharing them with a third party and so on. Rather than retraining users on a new concept, the idea is to do away with BIP32 in favor of BRC-42 style derivations, but keep the backup method for the master key as storing a mnemonic offline.
Note: There is no need to use BIP32 and BIP44 hereafter. You could just derive the first child key of an HD wallet and use that for BRC-44 derivations. However this is a simpler way to get to a single key and remains compatible with the menomics people may have been using for a decase now.
Overview
Using the standard BIP39 mnemonic scheme, a seed is created and can be maintained offline as words. Thereafter we must get from the mnemonic to a seed and then in this case to a private key. The simplest methodology can be used, a sha256 of the seed bytes is taken to arrive at the big number which is the private key.
Implementation
Using libsv/go-bk
, we can generate a mnemonic, and derive the master key from it. All derivations for actual outputs can be derived using the scheme described in BRC-42.
JavaScript
Same idea in js but we use bsv
npm package, and a specific mnemonic to check we get the same resulting key pair:
Last updated