BUIP084: (passed) Secure BCH coin splitting instructions

79b79aa8

Well-Known Member
Sep 22, 2015
1,031
3,440
BUIP084: Secure BCH coin splitting instructions
Submitted Jan. 11, 2018 by @79b79aa8

Background
While many dedicated hardware and online wallets enable BCH splitting, no well-documented, open source tool / instruction set is readily available to guide users to independently and securely claim their BCH.

The absence of such a tool de-incentivizes security-minded long-term adopters from using the BCH network, especially in light of the present difficulty of transferring cold storage BTC to a wallet that enables splitting.

Motivation
  • To harness Bitcoin’s network effect in favor of Bitcoin Cash by facilitating the separation of BCH from cold storage BTC, thereby promoting BCH usage.
  • To educate users about forking and wallet management.

Task
  • Document each step required for securely transferring BCH stored in a BTC wallet.dat file to a BCH address.
  • Document each step required for securely transferring BCH stored in a BTC paper wallet, paper key or redeemable code to a BCH address.
  • Explain any additional steps that may be taken for peace of mind (e.g. transferring the BTC to a fresh non-deterministically derived address after performing the split).
  • Post a comprehensive, detailed, fully-vetted primer on the BU website.

Bounty
  • A 0.25 BCH reward shall be paid to the author of the first version of the instructions delivered to an elected BU official that is deemed ready for a round of vetting by the membership.
  • 0.25 BCH shall be reserved in case contracting any supplementary services (html coding, translation, etc.) is judged desirable by the leadership before publication on the BU website.

Timetable
Deliverable must be posted for comments no later than four weeks after BUIP approval in order to qualify for bounty.
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
Looks good @79b79aa8
As an operational BUIP this can be included in the vote commencing January 15th. While the process is straightforward to many experienced Bitcoiners, there are many others who need formal guidance like this in one place.

We should also look at adding a section on the CashAddress format to help ordinary BCH users.

Further input from other commenters here is welcome!
 

todu

New Member
Feb 3, 2017
20
36
Sweden
We should also look at adding a section on the CashAddress format to help ordinary BCH users.
I think that having a section that explains the new CashAddress format is arguably even more important right now because I think there will soon be many more people wondering about the new format than there will be people wondering how to separate their BCH from their BTC. We should expect a lot of questions when Bitpay releases BCH support for their merchant payment processing service sometimes early this year. Explaining coin splitting and the new format are both good things to do imo.
 
  • Like
Reactions: torusJKL and solex

stabwah

New Member
Feb 2, 2018
2
6
second draft revision, comments and feedback very much appreciated.
thanks


---

Introduction

Bitcoins are not stored locally on your device. Instead, they are stored on the blockchain.

You can think of your wallet as your personal interface to the Bitcoin network. Bitcoin wallets contain private keys; secret codes that allow you to send or recieve Bitcoins.

This means if you lose your you can still access your Bitcoins when you lose your device by importing keys from a previously-exported backup.

Conversely, private keys allow anyone to use funds associated with those addresses - MAKE SURE YOU TREAT THESE WITH EXTREME CARE!

Before getting started with instructions, let’s clarify some important definitions.
Seed Phrase: A random phrase that is used to generate your private keys. Your wallet can be recovered using this seed.
Remember to always enter your phrase in lowercase - typing it in uppercase would generate a different but valid seed.
Backup: A file containing a wallet’s private key information. Backups can be exported from a wallet or imported to a wallet.
Export: The process of creating a file containing a wallet’s private key data. Exported keys can be imported to a new/different wallet to give access to the Bitcoins associated with the exported private key(s).
Import: The process of gaining control of Bitcoins via an exported backup. Wallets can import private keys via text files or QR code scanning.
CashAddress: Bitcoin Cash recently upgraded their addresses to help users easily distinguish Bitcoin Cash addresses from Bitcoin addresses.
The new address format can include a prefix to make identification even easier, for example - bitcoincash:qze4dyv6znt5h22dxqsejvfn47tz2ermeg62y4cdg6
Thankfully the new address format is backwards compatible with legacy addresses so you can send and receive Bitcoin Cash to/from any address without any issue!
That said, most users should upgrade because the new addresses are safer. Moreover, the user experience will be enhanced when everyone is using the same format.
Aside from offering a unique format, the new addresses are case-insensitive and extendable; so that future functionality can be included without changing the format.

Exporting Private Key
* Paper Wallet: Your Private Key is printed on the wallet, usually labelled as Private Key / Withdraw
* Bitcoin-QT: Access the Debug Window from the Help Menu
Unlock the wallet with passphrase and extract the private key:
walletpassphrase <passphrase> 9999
dumpprivatekey <bitcoinaddress>
* Blockchain.info: Navigate to Advanced Settings: Import/Export -> Export Unencrypted
* Electrum: Use the menu: Wallet -> Private Keys -> Export

* Mycelium: You can export your private keys for single key accounts in plaintext in the Keys tab.
* Airbitz: Log into your Airbitz account
Go to your Wallets Screen
On the top right, tap the 3 dots
Tap Export
Tap Wallet Private Seed (advanced)
Enter your password and then you will be able to Print, Save to SD Card, and/or View it
Go to https://airbitz.co/recovery/
Enter your Wallet Private Seed
A list of all your public addresses, private keys, and balances will be displayed
You will be able to sweep any of the addresses that has funds on them
* Coinomi: Please use https://coinomi.com/recovery-phrase-tool.html (Please see Converting Recovery Phrase to Private Key instructions below)
* Other Mobile wallets (eg: Breadwallet): Please see Converting Recovery Phrase to Private Key instructions below

* Hardware Wallets (Ledger, Trezor, KeepKey): Private Keys can not be extracted from these devices. Use the recovery-phrase you wrote down during setup instead

Converting Recovery Phrase to Private Key
There following open source tools are available for converting your 12 or 24-word recovery phrases to private keys and addresses.
https://github.com/Coinomi/bip39
https://github.com/iancoleman/bip39

Online versions:
https://dcpos.github.io/bip39/
https://iancoleman.io/bip39/
https://coinomi.com/recovery-phrase-tool.html

Follow these steps to recover your private keys using the BIP39 tool:
1. In the "BIP39 Mnemonic" field, type your 24 words
2. In "number of words", select "24"
3. Select "Bitcoin Cash" or "Bitcoin" in "Coin"
4. In "Derivation Path > External / Internal", type 0 to access the addresses and private keys meant to "Receive" your coins, and 1 to access the change addresses (see: https://en.bitcoin.it/wiki/Change)
5. Then, scroll to "Derived Addresses" : you will see all the calculated addresses and corresponding private keys.

Importing Private Key to Electron-Cash

PLEASE ensure you update and verify your downloads before using Electron-Cash client!
Only download files from https://electroncash.org/
Detailed instructions here: https://github.com/fyookball/electrum/blob/master/pubkeys/README.md

You cannot import private keys into a wallet that already has a seed - you should sweep them instead.
If you want to import private keys and not sweep them you need to create a special wallet that does not have a seed.
For this, create a new wallet, select "restore", and instead of typing your seed, type a list of private keys, or a list of addresses if you want to create a watching-only wallet.

IMPORTANT! You will need to back up this wallet because it cannot be recovered from seed.

Sweeping private keys basically sends all the Bitcoins that address controls to an existing wallet address.

To sweep private keys go to Wallet menu -> Private Keys -> Sweep.

* Text Import
Type the private keys in the appropriate field.
Leave the ‘Address’ field unchanged - this is the destination address generated from your existing Electron-Cash wallet.

* Recovery Phrase Import
This method involves using your hand-written 12 word “seed phrase" that was obtained during the wallet backup process.
Select File -> New/restore from the menu
Enter a new wallet name or leave the default (eg: wallet_1) - press Next
Select "Standard Wallet" - press Next
Choose "I already have a seed" - press Next
Enter your seed phrase - press Next

* QR Code Import
Click the "Read QR Code" icon in the bottom-right corner of the import window
Take a photo of your Private Key QR code
Leave the ‘Address’ field unchanged - this is the destination address generated from your existing Electron-Cash wallet.

OPTIONAL
For piece of mind, transfer all the funds into a new wallet.

IMPORTANT!
Once you have verified your wallet shows up on the destination device delete the old wallet and destroy or wipe the old device.

Security Considerations
* Write down and safely store your recovery phrase - store this as you would cash or other valuables
* Do not screenshot or copy and paste your backup phrase onto your PC or other device(s)
* Consider “cold storage” like a paper wallet which can be stowed in a secure place such as a safety deposit box.
* Hardware wallets provide an extra layer of security
 

solex

Moderator
Staff member
Aug 22, 2015
1,558
4,693
Great work @stabwah
You cover a number of different wallets, which is of course, what we want. It does mean that we need review by someone prepared to follow the same route you took, or at least several people to have a test.
Any chance of some screen-prints, plus a mention of the standard priv-key prefixes, which would help users?