What’s BIP44? It is a Bitcoin Improvement Proposal 44
and it specifies a particular way of deriving public keys and private keys from a master key. But even better than that, it works together with BIP39
Well that’s a lot of useless technical jargon…. What good is it and how does it help Ravencoin?
Ok, before I get there, let’s start with just a tiny bit of background so the remainder of this article will make sense.
Almost everybody knows that you need a private key, preferably held by you, to spend Bitcoin, or even better, to spend Ravencoin. A private key is just a huge random number that nobody knows but you. There’s lots of ways to generate this number. If you want, you can flip a coin two hundred and fifty-six times, or you can roll dice one hundred times. Or, for most of us, we just let the computer do it for us. This gives a number between 0 and roughly 115792089237316000000000000000000000000000000000000000000000000000000000000000. That’s a big number, and it needs to be big because if someone guesses it, then they take your Bitcoin, or even worse, your Ravencoin. The number is 1.157x1077and is pretty close to the number of atoms in the known universe. You can think of your Ravencoin’s safety as hiding all your RVN as an atom somewhere in the known universe. Sure, someone can start searching, but where to start?
Since the best practice in both Bitcoin (BTC) and Ravencoin (RVN) is to not re-use addresses or keys, then you need lots of these random numbers. And in early incarnations of Bitcoin, the software would create 100 of them at a time. That way, there was a bunch of them to draw from. That was great, UNTIL you needed address 101. Sure the software was smart enough to create another 100 addresses, but it wasn’t smart enough to tell you that none of the backups you made and carefully stored in safety-deposit boxes, safes, and bunkers are out-of-date. Any Bitcoin or change received to those addresses are at-risk. Yes, before you ask, lots of Bitcoin was lost that way.
to the rescue. Using almost magical math which enabled by Elliptic Curve Cryptography, you can store just one master private key, and from that key, you can derive as many private keys and as many matching public keys as you’d every need. This amazing breakthrough was added to Bitcoin core, and subsequently copied by Ravencoin (legally under the MIT license of course). At the bottom of Bitcoin core, or Ravencoin core, in the status area you’ll see [HD] to indicate that it is using H
That might be the end of the story, except two other breakthroughs were adopted by mobile wallets, and by some multi-coin desktop wallets. Let’s start with the multii-coin idea. Somebody figured out that since you can derive from a single master key as many private keys as you’d ever need, they came up with a way to break those up and use a different set for each coin you want to store in the same wallet. Brilliant. And, they went a few steps further by breaking those into accounts so you could store your fun crypto money separately from your business crypto money, and then further breaking those up into receive addresses and change addresses. This is BIP44
So take a wallet like the Edge wallet
. It can store lots of different coins, including Bitcoin and Ravencoin. Or for your desktop, a wallet like Exodus wallet
can do the same. They use a different number for each coin and that list is public.
Ok, great, so now all we need to do is store a great big random number? Yep. So why are the wallets asking to write down 12-words? Great question! Because it is easier and less error prone to write down 12-words.
So how do words turn into a huge random number? Another great question. That is BIP39
. It does two things, it turns words into numbers and numbers into words. How? First take the number and turn it into binary (the native tongue of computers). You’ll have a bunch of 1's and 0’s. Then group the 1’s and 0’s into groups of eleven. Each group of 11 maps to one of 2048 words. Or the other way around, each word maps to eleven 1’s and 0’s.
00000000000 = "abandon" (word 0)
00000100000 = "advice" (word 32)
11111111111 = "zoo" (word 2047)
What if the number of bits don’t divide equally by eleven? No problem, the extra can be used as a checksum
, which can often catch some errors in writing down the words.
Ravencoin Core - BIP44
If you’ve already created a wallet before the version 4 release, then it will continue to use just the BIP32 HD derivation and should be backwards compatible with your existing wallet.dat file. If Ravencoin core does not find a wallet.dat, it will prompt you and give you 12-words to write down as your backup. You should still encrypt your wallet and never forget your password.
Ravencoin uses decimal 175
as its coin index. The good multi-coin wallets will use this list so there is compatibility between wallets.
What this means for you is that if you write down your 12-words and keep your password, you don’t have to store your wallet.dat (for new wallets created in version 4+). One exception is if you import a private key using importprivkey. Then you’ll need to back up the wallet.dat because there’s no way to include the imported private key into the derivation, and it has to be stored separately. Better, easier backups for everyone, and compatibility with most mobile wallets.
Be sure to write down your words!
Or store them securely using one of these:
If you want to experiment with BIP44, you can use this website.
- All the calculations are done by your browser and no data is sent to a server. For additional assurance, you can view the page and disconnect from the internet and then use the page. If you are concerned about the page having been hacked (unlikely, but possible), then don’t put in words for wallets that store any RVN. The words will calculate and show you the master private key, master public key, and derived addresses. The derived addresses should match the ones provided by Ravencoin core
, RVN wallets
) and Mango Farm wallet. This free tool is a derivative of Ian Coleman’s BIP39 tool