Bitcoin Improvement Proposal 39 (BIP39) - Definition and Overview
What is BIP39?
BIP39 stands for Bitcoin Improvement Proposal 39. It is a widely used standard that defines a list of words used to create a seed phrase for cryptocurrency wallets. This mnemonic sentence provides a human-readable form of a wallet’s master key. This facilitates the backup and recovery of wallets, as users can easily write down or memorize the mnemonic sentence to restore their wallets in case of loss or damage.
The BIP39 standard specifies the word list used for generating the mnemonic sentence, typically consisting of 2048 words.
Combined with BIP32 and BIP44, BIP39 provides a standardized method for creating and recovering cryptocurrency wallets with multiple accounts. BIP39 is not specific to Bitcoin and can be used with other platforms.
Despite looking small, the mnemonic sentence generated by BIP39 has a high level of security due to the number of possible combinations.
The concept of ‘seed phrases,’ ‘mnemonic,’ or ‘mnemonic seeds’ is often used interchangeably with BIP39.
Purpose of BIP39
BIP39 was created by Marek Palatinus, Pavol Rusnak, Aaron Voisine, and Sean Bowe in 2013. The primary purposes of BIP39 are:
- Human Readable Keys: BIP39 converts complex seed phrases into simple, memorable words.
- Ease of Recovery: The mnemonic sentence can be used to restore a wallet if the device is lost or damaged.
- Standardization: BIP39 provides a standardized method for wallet recovery across different platforms and services.
- Deterministic Wallets: BIP39 enables the creation of deterministic wallets, where the same seed phrase can generate the same private keys.
Using a standard word list and a consistent method for generating mnemonic sentences, BIP39 ensures that users can easily back up and recover their wallets without complex technical knowledge.
Components of BIP39
- Entropy: A random number that is the initial source for generating a mnemonic sentence.
- Mnemonic Sentence: A list of words generated from the entropy, typically 12, 18, or 24 words long.
- Seed: A binary seed derived from the mnemonic sentence, often through a process involving a passphrase and a hashing function.
- Checksum: A portion of the mnemonic sentence used to verify its integrity. This ensures that the mnemonic sentence is entered correctly during wallet recovery.
The words in the mnemonic sentence are chosen from a predefined word list, with each word corresponding to a specific number. The mnemonic sentence is used to generate a seed, which is then used to derive the private keys for the wallet.
BI39 Entropy
Higher entropy values result in longer and more secure mnemonic sentences. The entropy is used as the initial source for generating the mnemonic sentence and is typically represented as a series of random bits. The entropy is converted into a mnemonic sentence using the BIP39 word list.
BIP39 Word List
The BIP39 word list consists of 2048 words, each corresponding to a unique number between 0 and 2047. The words are carefully chosen to be distinct and easily recognizable to prevent errors in transcription or memorization.
BIP39 Checksum
The last word of the mnemonic sentence is used to store the checksum, which is used to verify the correctness and integrity of the mnemonic sentence. It’s calculated based on the first part of the mnemonic sentence (excluding the checksum itself).
If the checksum does not match the expected value, the user is alerted that the mnemonic sentence is incorrect.
BIP39 and Cryptocurrency Wallets
Cryptocurrency wallets use BIP39 to generate mnemonic phrases for wallet creation and recovery. Internally, the wallet software uses the mnemonic phrase to derive the private keys for the wallet.
The derivation process involves converting the mnemonic phrase into a seed, which is then used to generate a hierarchical deterministic (HD) wallet master key. HD wallets allow for the creation of multiple accounts and addresses. These accounts are derived from the master key, ensuring that all keys can be recovered from the mnemonic phrase.
The derivation algorithm is described in BIP32, which defines a hierarchical deterministic wallet structure. BIP44 extends BIP32 by defining a multi-account structure for wallets, allowing users to manage multiple cryptocurrencies and accounts using a single seed phrase.
BIP39 on Neo
While BIP39 is not directly related to the Neo blockchain, the concept of mnemonic phrases for wallet recovery is common in many cryptocurrency wallets, including those for Neo.
Neon Wallet Mobile is a popular Neo wallet that uses BIP39 mnemonic phrases for wallet recovery. Users can generate a mnemonic phrase during the wallet creation process to restore their wallet on a new device.
Single Point of Failure
Using a single mnemonic sentence for multiple wallets can create a single point of failure. If the mnemonic sentence is compromised, all associated wallets can be accessed.