-
Notifications
You must be signed in to change notification settings - Fork 190
How to Encrypt a Wallet Seed
There are two standard ways of encrypting a wallet seed. The Key Encryption method allows you to encrypt an existing wallet seed. The Mnemonic method requires you to accept a wallet seed derived from a temporary seed (i.e. entropy, which is not recoverable).
Create a new HD key from a 256 bit seed.
$ echo [user entropy] | bx hd-newc82425d18a88ea6c5a92d06bc4ee26bfaf1b8782e7c0537544ae6dd40bb5083b
xprv9s21ZrQH143K4EdfsuwWHdxaGgcwGkTB1f71fbzJNfJma1Xga5XE3LqYxXKkwJJLevsp16iDRyk35MwvmKEEyyqLkHQVziTNs6VtPr1xGM8
Encrypt the seed (using a stronger passphrase).
$ bx ec-to-ek "my passphrase" c82425d18a88ea6c5a92d06bc4ee26bfaf1b8782e7c0537544ae6dd40bb5083b6PYVupXn6GTGVxpdVgamwbnTzh8hNAswxDeAhUc5ufTCRu8KZgjoSQEqSN
Verify your ability to recover the HD key.
$ bx ek-to-ec "my passphrase" 6PYVupXn6GTGVxpdVgamwbnTzh8hNAswxDeAhUc5ufTCRu8KZgjoSQEqSN | bx hd-newxprv9s21ZrQH143K4EdfsuwWHdxaGgcwGkTB1f71fbzJNfJma1Xga5XE3LqYxXKkwJJLevsp16iDRyk35MwvmKEEyyqLkHQVziTNs6VtPr1xGM8
Save the encrypted private key 6PYVupXn6GTGVxpdVgamwbnTzh8hNAswxDeAhUc5ufTCRu8KZgjoSQEqSN and memorize the passphrase my passphrase.
Create a new mnemonic from a temporary seed. Longer seeds produce longer mnemonics.
$ echo [user entropy] | bx mnemonic-newbetray senior exhibit slot apart affair welcome dog hockey razor cart side
Generate a new HD key from the seed (using a stronger passphrase), or verify your ability to recover the HD key.
$ bx mnemonic-to-seed -p "my passphrase" betray senior exhibit slot apart affair welcome dog hockey razor cart side | bx hd-newxprv9s21ZrQH143K38Jah6HduU5yGFkyDqtVDn24E1vjSMZ9vqdtCnUYn1v7pPedGoNvDFzjUG77VuYjWptQLsbCzqMy3AYXaWWFo7cbAvBxPqa
Save the encrypted mnemonic (including word order) betray senior exhibit slot apart affair welcome dog hockey razor cart side and memorize the passphrase my passphrase.
The passphrase is optional but if not used the mnemonic is not encrypted and therefore must be kept secret.
Users | Developers | License | Copyright © 2011-2024 libbitcoin developers
- Home
- Build BX
- General Information
- Developer Information
- Configuration Settings
- Tutorials
- Meta Commands
- Wallet Commands
- Key Encryption Commands
- Stealth Commands
- Messaging Commands
- Transaction Commands
- Online Commands
- Encoding Commands
- Hash Commands
- Math Commands