header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP

How to obtain a set of secret and secure mnemonic words through physical means?

2023-04-26 21:00
Read this article in 13 Minutes
总结 AI summary
View the summary 收起
Original title: "How to obtain a set of secret and safe mnemonic words through physical means?" 》
Original author: @0x_Todd


I have been wanting to do an article on how to obtain secret security "mnemonics" recently The strategy, just in time for Do Kwon's piece a few days ago, I think it is necessary to share it with you.


A total of 5 steps are required:


1. Find help Word list


2. Find some dice


3. Roll the dice-transition into


4. Find the check digit


5. Backup


Is the hardware wallet you carry with you really safe? In fact: Whether it is a hot wallet or a hardware wallet, the mnemonic words you get are automatically generated by the software through random.


Of course, I am happy to give enough trust to hardware wallet providers, but as a crypto native guy, I think relying on "trust "is not enough.


Why do you say that? From the production of a hardware wallet to your hands, there are too many links: developer, hardware design, assembler, packager, courier A, customs, sorting, courier B... and so on.


The worst case is: the automatically generated random algorithm is a cracked version, or simply has a backdoor.


Everyone has heard of the concept of "pseudo-random". Random numbers generated by machines may eventually be predicted by people . For example, if you use a (handled) hardware wallet given to you by someone else, in theory, the 12 words you generate can also be generated by others, and your hardware protection means will lose their meaning.


So, we'd better generate a set of mnemonics ourselves Words, rather than automatically generated by a program.


Hardware wallets cannot access the network, this link is difficult to implant backdoors, as long as you can ensure that your mnemonic is True random generation, then the security of the hardware wallet will make up for the last shortcoming, that is, no one can know your mnemonic.


So how to generate a true random mnemonic? It's simple: physical randomness.


Next is a tutorial, if you are interested, you can retweet it, and wait for the weekend to operate slowly.


Step1 Find the list of 2048 mnemonic words


First popular science A concept: Whether it is Bitcoin, Ethereum, or all subsequent chains, they all use the same set of protocols, that is, BIP-39 created by the Bitcoin community back then. There are 2048 words here, and in order to avoid handwriting mistakes, BIP-39 also thoughtfully removed many words that look similar.


BIP39 in Bitcoin Warehouse


https:/ /github.com/bitcoin/bips/blob/master/bip-0039/english.txt


From any search engine , you can easily get the 2048 words. Of course, since you are just trying to figure it out, you can look for three sources of information and conduct a random survey to confirm that these are real BIP39.


Many people don’t know that BIP-39 also supports Chinese; "Theory can also generate a wallet address. Of course, for better compatibility, it is recommended that you use the default traditional word list.


Step2 Find some dice


Next, let's Do a thought experiment: If you want to get true randomness, the easiest way is that I have a "2048-sided dice" and throw it 12 times in a row (actually 11 times, we will talk about it later), we can get a A completely random set of real mnemonic words.


However, I believe that none of you have such dice, Then we have to use some brains.


There is a classic algorithm question, how to have a standard dice to generate 1-7 random numbers. https://www.zhihu.com/question/62404167


We just need to change the requirement of this question from 7 to 2048 will do. Now you go online to buy 11 dice, or coins (to be honest, coins in the mainland are really less and less used now).

Step3 Roll the dice, convert binary


Now start shaking the dice , the odd number of the dice is recorded as 1, and the even number is recorded as 0 (the same is true for coins). The combination of 11 dice is exactly: 2*2*2*2*2*2*2*2*2*2*2=2048 kinds, so you can use these dice to generate a binary number.


For example, if I shake out a result is 1 0 1 1 1 1 0 0 0 1. If you convert it to decimal it is 1521. The algorithm is very simple, you can use paper and pen to calculate (it is not recommended to use a computer, the private key does not touch the Internet), the algorithm can refer to: https://zhuanlan.zhihu.com/p/75291280


Then you go to the BIP-39 word list and find the 1521st word, which is safe.


A total of 11 consecutive throws, you will get a completely random set of words, for example: safe hill also idle fade shock walnut cigar eye clean water.


Step4 exhaustive method to get the last test word


Why not throw all 12 words with the dice?


The entire mnemonic sequence of BIP-39 contains a certain degree of verification function, which is similar to the tail number of the ID card. the design of.


So while the 12th word itself is not a special check digit, considering the entire set of mnemonic sequences does Certain rules must be met, so when creating a wallet, if the input mnemonic does not meet the verification rules, the creation will fail.


To put it more simply: Not any 12 words on the list can form a set of mnemonics, they Some kind of rule must be met. If you just find a set of words, there is a high probability that you will be prompted: invalid mnemonic.



< p>

If the mnemonic is automatically generated by the program, of course it automatically complies with the rules. And we are created physically, so again, some brainstorming is required.


It's very simple, since the first 11 did not follow the rules. Then, we just let the 12th mnemonic match.


How about the 12th word? Here I will not drop the book bag to explain the principle, and directly adopt the idea of "violent exhaustion" (unexpectedly, creating mnemonics by yourself requires brute force cracking).

In fact, you are in any position in the 2048 mnemonic list, try 0-30 down , there must be words that meet the rules. For example, if I talk about this group, I will try from the 230th word, 233 brown is fine, and 255 cabin is also fine.


Of course, if you try to crack it directly on the hardware wallet, it is the best, after all, it does not touch the Internet. But the disadvantage is that it will be tiring. Most hardware wallets have few buttons...including ledger S and onekey classic. As for Do Kwon's trezor, I haven't bought it yet, so I don't know.


If you want to be lazy, use a retired mobile phone, download a trustwallet or any wallet you are familiar with. Then, disconnect the network and take turns to test. Until the 12th word that meets the rules is found, silently write it down, then delete the app, copy anything (clear the clipboard), restart and shut down several times.


That's it! You have obtained a set of mnemonics that is absolutely impossible for anyone to guess by means of completely random physical randomness, and then you enter this set of mnemonic words into the hardware wallet, and your The security is completely full.


Step5 backup


Of course, it is still recommended to do at least 2 backups. Don't use a pencil (it's easy to fade), don't save it in a computer or mobile phone (that's what we did just now), and don't try to save half in each of the two electronic devices (it's easy to be brute-forced).


Of course, if you are good enough, you can memorize it (to avoid the Do Kwon tragedy), but it is strongly not recommended. Here are some tips for memorizing mnemonic words, such as mine: safe hill also idle fade shock walnut cigar eye clean water cabin.


You can make up a story: In a (safe) small mountain village, there is a (hill) hill, hill Residents on the road can always (also) enjoy a peaceful life. There is an idle young man in the village, his clothes faded badly... balabala


In this way, theoretically remembering the story, you remember the mnemonic. However, I still want to emphasize that the human brain is a very spicy biological storage device, and it is not recommended for ordinary people, except for Do Kwon.

Of course, if you simply want to make a cold wallet as a long-term holder, I think write it on paper, copy this address, and only transfer in but not out, then You don't even need a hardware wallet anymore, this is also the "paper wallet" that people often mentioned in the early years.


Finally, I wish you all You can always protect your wallet and assets.


This article is from a contribution and does not represent the opinion of Rhythm BlockBeats





Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
This platform has fully integrated the Farcaster protocol. If you have a Farcaster account, you canLogin to comment
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit