What are BIP39, BIP32, and BIP44?
Articles about cryptocurrency wallets are sprinkled with references to a mysterious-sounding "BIP39." Once you learn a little about it, you see that BIP39 is not mysterious at all - in fact, its very purpose is to make encryption keys less mysterious for us mere mortals to work with.
BIP39 is a design implementation that defines how cryptocurrency wallets produce the set of words (or "mnemonic codes") that make up a mnemonic sentence, and how the wallet turns them into a binary "seed" that is used to create the encryption keys that are used to perform cryptocurrency transactions. In establishing guidelines for how wallets do this, BIP39 simplifies cryptocurrency for us.
It is not necessary to understand all of the details of BIP39 in order to use cryptocurrency - but you would benefit from knowing a few things.
Why should you know about BIP39?
BIP39 is a great conversation starter at cocktail parties! Well, maybe not, but if you want to buy some cryptocurrency, and have decided to establish your own cryptocurrency wallet, it becomes relevant whether your choice of wallet supports BIP39. Because BIP39 is supported by so many wallet manufacturers, if you use a wallet that implements BIP39, and in the future, you decide to migrate your keys to a different wallet, you should be able to re-create your crypto holdings in your new BIP39-supporting wallet by feeding it your original BIP39 mnemonic sentence. As a result, not only does BIP39 satisfy its original intent to simplify wallet and key management, it also opens the door to simpler wallet migration. Although it is a "Proposal," in practice, BIP39 is a de facto standard that has greatly evolved the cryptocurrency industry.
Why is it called "BIP39?"
BIP39 is one of a set of technical design documents introduced by the cryptocurrency developer community since Bitcoin's inception. As you might guess, it was the 39th Bitcoin Improvement Proposal (BIP). It has a longer and slightly-catchier formal title: "Mnemonic code for generating deterministic keys," but that gets a bit cumbersome to say, so you can think of "BIP39" as its nickname. BIP39 turned out to be one of the most widely-used BIPs, and it is now implemented by many wallet manufacturers, and used for more cryptocurrencies than just Bitcoin.
What Is a BIP39 mnemonic sentence / seed phrase?
A BIP39 mnemonic sentence is a set of words (most commonly 12 or 24) that humans can interact with more successfully than we do characters that are not words. BIP39's purpose in introducing the use of mnemonic words is to reduce the errors that often occur when we type, speak, or otherwise communicate long strings of unfamiliar characters. The wallet handles the heavy lifting of converting the mnemonic words through complex hashing, salting, and checksum operations into a binary "seed," which is then used to generate private and public encryption keys.
It is very important that mnenomic sentences are generated from randomly-selected numbers. These numbers can be generated in a variety of ways, which are described in other articles. (LINKs: What is an RNG, [Seed Phrase Generation Articles])
What is a BIP39 Passphrase?
BIP39 defines an option for users to add a passphrase as well as having a mnemonic sentence. Many cryptocurrency wallets by default disable the use of the BIP39 optional passphrase because although it can add some security, it also adds complexity. If you set a passphrase, consider that your backup strategy has just gotten much more complicated: you then have two important pieces of information - your mnemonic sentence and your passphrase - both of which are critical to securely and separately store. This additional complexity increases the risk of misplacing the passphrase, and losing your cryptocurrency.
How much security does a passphrase add? Because the BIP39 mnenomic phrase itself offers an incredibly high level of protection against being guessed, the addition of a passphrase does not significantly reduce the risk of a brute-force guessing attack. Instead, the purpose for a passphrase is to add a layer of security to protect against the possibility that your mnenomic phrase may be accidentally revealed to someone. However, the passphrase likely can be guessed with a brute-force attack, so if someone did gain access to your mnemonic sentence, the level of protection that a passphrase offers is only temporary - you would have a chance of saving your cryptocurrency from theft only if you noticed that someone had gained access to your mnenomic sentence before they were able to brute-force guess your passphrase (which could be days or weeks). Is that limited increase in security worth the increased risk of loss of the passphrase? You decide, based on your individual situation, but you can see why many experts recommend not setting a passphrase.
How likely is your BIP39 seed phrase to be guessed?
A mnenomic sentence constructed from random inputs is more unique than most people can imagine. For a 24-word BIP39 sentence, there are 2048 to the 24th power possible combinations of words - or stated another way, around 3 times 10 to the 79th power. To try to comprehend how enormous this number is, it is often compared to estimates of the total number of atoms in the known universe (10 to the power of 80). It is effectively unguessable with today's technology.
Why are BIP39 words chosen from a limited dictionary?
BIP39 wordlists may seem arbitrary, but they are not - they are carefully chosen to reduce the chance of mis-specification. In any defined language, words in a BIP39 wordlist are selected in such a way that they do not have synonyms, do not have alternative spellings, do not have just 1 character variation with other words in the list, and are not profane. Additionally, the first four characters of each word are unique to each wordlist, which is a convenience when typing them into hardware wallets with limited input mechanisms, stamping them onto steel cards, or backing them up in any form.
BIP39 wordlists can be seen here: https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md).
Also, you don't have to remember this detail, but BIP39 wordlists have 2048 words in them because it aligns with how BIP39 uses 32-bit blocks of entropy (random inputs) plus a checksum bit concatenated into a long binary string that is divisible into 11-bit numbers, each of which can hold up to 2048 bits. In short, 2048 words are all that are needed to achieve extremely high levels of entropy.
Do you need to understand BIP39 mathematics?
As a user of a cryptocurrency wallet, you don't need to understand the precise details of BIP39 calculations, but you might want to understand that they include the generation of a checksum of the random numbers, which is used as an integrity check. The checksum is included in the last mnemonic code word, and it helps wallets to verify the validity of mnemonic sentences. If a user types in a set of words and it fails validation because the checksum isn't as expected, there is likely a typo in what the user entered.
BIP39's other mathematical functions transform its inputs (the random numbers, and the optional passphrase) through one-way functions that guarantee that they can not be reverse-engineered from the resultant public key.
If you would like to understand the exact mechanisms of how BIP39 wallets convert mnemonic codes into a binary seed, there is a description in the design document at https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki.
Vault12 has a more-detailed description in "How to Generate a Seed Phrase."
BIP32 and BIP44
As described in this article, BIP39 ("Mnemonic codes") defines the words that make up a seed phrase.
Related BIP wallet standards include BIP32 and BIP44:
BIP32 ("Hierarchical deterministic wallets "), lays out a framework for HD Wallets so that they can be shared.
BIP44 ("Multi-account hierarchy for deterministic wallets") defines an organizational hierarchy for managing mulitple accounts in deterministic wallets.
These standards work together to add flexibility, privacy, and interoperability to Hierarchical Deterministic wallets (HD Wallets). HD Wallets extend the capabilities of deterministic wallets to allow for the management of a huge number of keys, all of which are derived from the original BIP39 mnemonic sentence.
For the purposes of this set of guides, we will focus on BIP39, as most crypto wallets support this standard, however, you will run across wallets like Coinomi which also use BIP44, and default to 24-word seed phrases.