What exactly are mnemonics and private keys?
After entering the blockchain world, we often hear phrases like "how important the private key is" and "how important the mnemonic is."
So, what exactly are mnemonics and private keys?
Why are they so important?
Which one is more important?
What is the relationship between mnemonics and private keys?
What does a private key look like?
A Bitcoin private key is essentially a random number, similar to throwing dice and getting a number. However, a Bitcoin private key is longer, more specifically, it is a 256-bit number composed of 0s and 1s.
0100101…01010100 (total of 256 bits)
So, the question arises, how can we back up such a long string of 0s and 1s when it's dizzying just to look at?
A special encoding method (Base58) was invented to transform the private key into a more easily backed-up state.
For example, the following string of characters is the common form of a private key:
KwYHFL7WfhJPkfQkp1LsUwHvy1Pd9KynuxjjVDMZvRSV5D9VJq3v
Such a private key is "relatively" easier to back up and input, cough cough...
(Private keys generally start with the letters 5, K, or L)
So, what is the use of a private key?
How is your receiving address created?
It is calculated from the private key.
How is your transaction authorized to be sent?
It is signed by the private key.
How are your assets recovered in the wallet?
The private key assists with that.
The private key is electricity, the private key is light, the private key is the father.
The private key is the sole voucher for your assets in the blockchain world. Whoever possesses the private key owns the assets on the corresponding address.
So, is the private key secure?
As we mentioned earlier, the private key is essentially a 256-bit random number, so the total number of private keys generated is 2 to the power of 256.
This total number may sound ordinary, but it is actually indescribably vast:
"The diameter of a human hair is about 500,000 atoms stacked together, and the total number of private keys is close to the number of atoms in the observable universe."
"Imagine 360 Earths, where every gram of land (matter) on each Earth becomes a separate Earth, and the sum of all the water molecules on these Earths is the total number of private keys."
So, trying to obtain the private key of a specific address through brute force is as difficult as finding a single water molecule on so many Earths, or searching for an atom in the vast universe... and you can't even find your house key when it's lost.
Although the range of private key generation is large enough, if there is a problem with the algorithm that generates the private key, there will be hidden dangers.
For example, if a wallet's random number generation is not random enough, it is possible to generate the same set of private keys for two users. This is where the cryptographic skills of the wallet team are tested.
(The extremely random algorithm pioneered by the Bitpie team involves adding user-side signals, sounds, images, and other random factors to increase the entropy pool when users calculate their private keys, to generate high-quality random numbers. The invention of the extremely random algorithm is one of the reasons why our team is recommended by bitcoin.org.)
So, everyone is stunned to see that the private key is so important, but many wallets only back up 12 words, not the private key. Am I in trouble?
Don't worry, I'm here to warm you up, how could you be in trouble?
That 12-word set is called a mnemonic.
Let's talk about mnemonics next.
What does a mnemonic look like?
The most common mnemonic is a set of 12 words.
1. health 2. fine 3. profit 4. below
5. crowd 6. wish 7. task 8. gown
9. mind 10. surge 11. apple 12. max
(I made these up, don't try them out)
What is the use of mnemonics?
How is your receiving address created?
It is calculated from the mnemonic.
How is your transaction authorized to be sent?
It is signed by the mnemonic.
How are your assets recovered in the wallet?
The mnemonic assists with that.
The mnemonic is electricity, the mnemonic is light, the mnemonic is the father.
The mnemonic is the sole voucher for your assets in the blockchain world. Whoever possesses the mnemonic owns the assets on the corresponding address.
"...Wait a minute, you just said the same thing about the private key!"
"Shut up... I'm just trying to fill up the word count."
So, what is the relationship between mnemonics and private keys?
In fact, mnemonics and private keys are functionally identical.
The essence of the mnemonic is also a string of random numbers (128-256 bits), but because both the random number form and the private key form are inconvenient to use, the Bitcoin community adopted the BIP39 protocol to allow the transformation of random numbers into words from a specific word list through a certain encoding.
(Trivia: Bitcoin Improvement Proposals, abbreviated as BIP, are design documents that provide guidelines for improving Bitcoin and its processes, as well as the characteristics of its external environment.)
Mnemonics are not case-sensitive and are more common words, making them much more convenient to use than private keys. Therefore, in recent years, mnemonic wallets have gradually become the mainstream.
Another advantage of mnemonic wallets is that a set of mnemonics can generate N private keys, and each private key can correspond to a different cryptocurrency. If you have 30 types of cryptocurrencies (BTC, ETH, LTC, EOS, etc.), you don't need to record the private key for each one separately; just keep a set of mnemonics to control all your assets.
Bitpie Wallet, for example, displays both the mnemonic and the private key to users, but generally, it's enough to back up the mnemonic.
(We have hidden the private key in the upper right corner of the receiving QR code page)
Are mnemonics from different wallets interchangeable?
The generation of mnemonics relies on Bitcoin's BIP32, 39, and 44 protocols. Therefore, as long as the mnemonic follows the standard protocol, it can be used interchangeably. (However, due to varying security levels of different wallets, it is not recommended to mix and use mnemonics from different wallets)
Will mnemonics be phased out?
The emergence of mnemonics has been recognized by the Bitcoin core development team and the community, and the corresponding BIP protocols are written in the Bitcoin open-source code.
Looking at the history of wallet backups:
Wallets have gone through the process of backing up wallet files, backing up private keys, and backing up mnemonics.
However, the birth of each new trend is still backward compatible, for example, the birth of mnemonics did not make private keys unusable. If a new form of backup develops in the future, mnemonics will still be usable.
What should be noted when backing up and restoring private keys and mnemonics?
1. Private keys consist of uppercase and lowercase letters and numbers, so be careful to distinguish them when backing up and restoring.
2. Do not store private keys and mnemonics on connected devices. Carefully copy them onto paper or store them on a cold storage mnemonic board.
3. The level of security among wallets varies, so if there is no urgent need, try not to import and mix the use of mnemonics and private keys from different wallets.
What does it mean when the mnemonic is indicated as "invalid" when restoring?
This is generally because one of the words was copied incorrectly. However, since the words all come from a fixed word list, you can try replacing it with a similar word from the list.
Official English word list address: https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt
Official Chinese (Simplified) word list address: https://github.com/bitcoin/bips/blob/master/bip-0039/chinese_simplified.txt
What is the difference between Chinese and English mnemonics?
Well, the only difference is the language, the usage is the same.
Both Chinese and English mnemonics have official word lists. But globally, more wallets support English mnemonics, and the Chinese word list contains obscure characters that may lead to users feeling embarrassed for their lack of culture, so I recommend using English.
(Chinese and English mnemonics cannot be converted into each other)