Easy guide: Move your Bitcoin off an exchange, and into your brain wallet

Blake Cuningham
9 min readDec 14, 2017

The magic of Bitcoin is the ability to control your own money, without the need for a centralised 3rd party. When we start to rely on exchanges and their wallets to store all of our Bitcoin (more than the portion used for every day transactions), then we start to negate this feature of Bitcoin. You want to be able to keep your Bitcoin safe, and not have to worry whether or not any particular exchange or online wallet gets hacked, or runs into financial difficulty.

Storing your own Bitcoin and controlling your own private key shouldn’t be a complicated process, and this guide aims to simplify it. I also think going through this process will help some people to better understand many of the components of Bitcoin. There are three sections, to be read in order:

  1. A simple explanation for why this is secure
  2. A step-by-step guide (with pictures) on how to store your Bitcoin in your brain
  3. A step-by-step guide (with pictures) on how to spend your Bitcoin from your brain

[Note: All images with potentially identifying information showing actual transactions have had parts hidden with magenta blocks]

[Note 2: Read this full guide, and ensure you understand it, before attempting to move your Bitcoin]

Section 1: Why this is secure

Your easy to remember passphrase, plus your salt, is all you need to store your Bitcoin securely
  1. Generate a long, but easy to remember passphrase. This phrase should be unique (i.e. not a passage from a book or a poem). I find a list of objects can be very easy to remember, especially with a simple linking strategy — alternatively, you can write this passphrase down somewhere safe and offline (or even store it as a list of hand-drawn pictures). Your salt should be easy to remember if it’s just your standard personal info (name + birthday etc.).
  2. The brainwallet.io web page takes the information from step 1, and hashes it into a 256 bit private key (256 bit means there are 2²⁵⁶ possible private keys — there are only 2⁸³ atoms in the known universe). It’s not possible for someone to go backwards and work out your passphrase and salt from your private key. Your private key is the fundamental unit of Bitcoin storage — you can generate your public key, your address, and your transaction signatures from it (but can’t generate your private key from these). However, it’s a very complicated sequence of numbers and letters (it’s a 256 bit (bit is base 2) number in base 58 format) that would be unsafe to try and remember — so all you need to know is how to generate it from your passphrase and salt.
  3. The public key is then generated from your private key using a cryptographic formula such that it’s not possible to work out the private key from the public key. There is no need to know the public key, as what you really want is the Bitcoin address (where you send Bitcoin to, from a wallet).
  4. The public key then undergoes a few more transformations (it’s a complex 9-step process that you can look at here) to get a public address — once again, it’s not possible to reverse this step.

What we’ve done is go from an easy to remember list of words and some personal information, to a Bitcoin public address secured by 3 levels of impossible to crack security. You can safely share this public address generated at step 4.

The point is: you don’t need to remember or store all your key information, so long as you have an easy to replicate process, as you will need your private key later when you want to move / spend Bitcoin stored at this public address.

Section 2: Guide to storing your Bitcoin in your brain

Great, you now have a public key! And, you’re able to easily generate the private key associated with it from the list of words in your brain. Let’s walk through the process of actually doing this:

  1. Go to https://brainwallet.io/, then save the webpage as a file on your desktop. (In Chrome, you just right-click on the screen, then click “Save As…”, then choose where to save it.)
  2. Turn off your wifi, and/or unplug your internet connection — it’s unlikely, but this helps insure against a hack, or from the brainwallet.io webpage itself secretly sending your private key to someone (it won’t, but we take the precaution anyway).
  3. Open the webpage file that you saved — in my case, the file is saved as “brainwallet.io — deterministic bitcoin address generator.htm”.
  4. Enter a unique (remember, not from a book or something that could already be on the internet) passphrase, or use the “random” button to generate one for you. Remember this phrase, or list of words. Or, write them down somewhere very secure and offline. (If you lose it, or can’t remember it, then you lose the Bitcoin at the public address — there’s nothing to be done.)
  5. Select one of the salt options — using “personal info” is the easiest to remember.
  6. Click “generate”. The web page is coded in a front-end language called JavaScript — this means that all the calculations are actually being performed by your web browser, and not at a remote server. This is why the page works even when you are offline, as you should be while doing this.
  7. You will now get a private key and a public address. Do not store the private key (you can always generate it again from repeating this process). Keep the public address somewhere as you will be able to send Bitcoin to it (and have others send to it). Also, when trying to re-generate your keys in the future, you will easily be able to see if you’ve done it correctly because the public address outputted will be the same.
  8. Close the web page, and turn your internet back on.
Generating your private key and public address offline

9. Finally, you are ready to send Bitcoin from your exchange to this public address. However, before you send the Bitcoin, ensure you’re happy with the transaction fee you’re likely to pay. For example, at the time of writing the typical transaction fee on the Bitcoin network was 400 satoshis/byte (a satoshi is a 100 millionth of a Bitcoin)— at $16000 per 1.0 Bitcoin, this is approximately $14, which was very expensive (I actually spent more on transaction fees than the Bitcoin I moved for this example). At many points this year the transaction fee was less than 100 satoshis/byte, so it may be advisable to wait for a quieter time. I find the webpage https://bitcoinfees.21.co helpful for seeing a good fee approximation:

Fee estimation at 21.com (now called earn.com)

10. Once you are happy with the transaction fee, go to your exchange and look for where it says “Send” or sometimes even “Withdraw”, depending on their terminology. You should be at a page that allows you to type in (better to copy and paste rather) a public Bitcoin address. Put your public address from step 7 here, choose the amount you want to send, and send it. Usually, the exchange will calculate and automatically deduct the transaction fee. You should get a notification that your transaction has been sent to the network, and a transaction ID which you can search for and track at a block explorer such as https://blockchain.info/:

Using blockchain.info to monitor the transaction sent from my exchange to my new public address

Section 3: Guide to spending your Bitcoin from your brain

If you’ve already taken the trouble to move your Bitcoin off an exchange, in order to keep them safe in the long term, then you probably already get this. Bitcoin is exceedingly volatile in fiat money terms (Dollars / Rands), and you may be tempted to try and take advantage of this in order to make some small profit — many people try, and most just end up with less Bitcoin. I hope you’ve come to Bitcoin, and bought some, because you believe in it’s potential to create a monetary system that’s backed by its users, and not a government or other centralised 3rd party — if you believe this then you want to hold onto your Bitcoin no matter what, until such time that you no longer need to exchange it for fiat. The exception is the small fraction of your Bitcoin that you may keep in your exchange wallet in order to make online payments — this is analogous to the cash you keep in your physical wallet, just a small fraction of your bank account.

However, you may want to move your long-term holdings to another Bitcoin address, or sell some in order to pay off any debts you may have. Here’s how to move your Bitcoin to another address:

  1. Get a desktop Bitcoin wallet — I recommend, and use in this guide, Electrum. It’s been proven to work well over the years — https://electrum.org/#download
  2. Go to the menu, and choose to create a new wallet (this may also happen automatically the first time you open Electrum):

3. Because we want to move this Bitcoin, and not merely observe an address, paste the private key into the “Import Bitcoin Addresses” text box. You should be able to repeat section 2 in order to generate your private key from the passphrase you store in your brain using the brainwallet.io web page.

Electrum: Import private key

4. Once Electrum has done syncing your wallet, you should see the previous transaction made in section 2 in your wallet history:

Electrum: Wallet history

5. Click on “Send” in order to see the sending console. Enter the public address you wish to send Bitcoin to, and the amount you want to send (a mBTC is a millibitcoin, or 1 thousandth of a Bitcoin). You can adjust the fee, although better to leave the fee amount in the middle as per the image below — this will optimise to ensure the transaction is included within the next five blocks (~1 hour). Click “Send”.

Electrum: Add details to send your Bitcoin

6. You will now be shown a box confirming the details of your transaction — including the exact fee amount, transaction size in bytes, and lock time (the earliest block the transaction can be included in). If you are happy with all the details, click “Sign”. This now signs the transaction with your private key (without revealing your actual private key), thus proving that you are the owner of the input address, and allowing miners to include your transaction as valid in the blockchain. Finally, select “Yes” to confirm that you signed:

Electrum: Transaction ready to sign
Electrum: Confirm that you signed

7. The payment has been sent to the Bitcoin network, and will quickly propagate via the P2P network of nodes — you get notified of the transaction ID:

Electrum: Transaction ID

8. You can now monitor the transaction on a block explorer, as described previously:

That’s it.

There are other more complex security strategies that more advanced users could use, such as spending the remainder of your Bitcoin into a new address whose private key hasn’t been revealed to an internet-enabled computer yet. Once you understand the above guide, I would encourage you to consider this.

Please let me know if you have any comments, suggestions to improve this process, or any questions.

--

--

Blake Cuningham

Poorly thought out opinions on machine learning, Bitcoin, and product management. All views my own, not my employer’s.