Password recovery is like sailing a small boat on an endless ocean, casting a net in the hope of catching the only small fish in the vast sea...

1. Introduction

"My relative went away, and we found this Bitcoin wallet on his computer. Can you help us recover it?"

"My friend is a miner; he is a very reliable person. He gave me this wallet, and I spent 3.6 million to buy 20 high-end machines for recovery, but after running for half a year, I still haven't succeeded. You have experience; can you see what the problem is?"

"My friend owes me money and won't pay it back; he gave me this wallet as a settlement. Can it be recovered?"

"I broke up with my boyfriend, and he gave me this wallet as a breakup gift. I forgot the password, can it be recovered?"

"This is my own wallet. It accidentally got leaked. I have password clues; can you help me recover it?"

Having done password recovery for five years, I have encountered many clients coming to us with public wallets for recovery. This happens every year, but this year is particularly frequent. This year, I have encountered at least 50 consultations regarding public wallets, and today I will talk about the story behind public wallets.

2. Difficulty in distinguishing the authenticity of public wallets

A public wallet refers to BTC/LTC/Doge wallet.dat and other files that are publicly sold online. They lead people to believe: (1) the sold files contain encrypted private keys; (2) having the password can decrypt the correct private key, thus transferring coins; (3) anyone might be able to recover the password. Based on these three points, websites selling wallets can make money, and many cryptocurrency enthusiasts hoping to strike it rich are eager to try their luck.

I must understand public wallets as I work in this industry, so in 2021, I spent 35,000 yuan to buy 60-70 wallets. After that, I conducted some analysis on the characteristics of these wallets and found it very difficult to distinguish between real and fake wallets, which is related to the structure of Wallet.dat.

Wallet.dat is a key-value database that stores a lot of data related to private keys, public keys, addresses, etc. The most important ones are the master key (master private key) and address's private key. The master key is the main private key used to decrypt the address's private key; the address's private key can be used to generate the public key and address and is also ultimately used to sign and send transactions. With this private key, you can transfer coins from the corresponding address.

The reason why it is said that it is impossible to determine the authenticity of a wallet is that the wallet.dat can be easily modified, leaving no trace:

1 The public key can be written freely, and even if it does not correspond to the private key, there is no way to verify it; this allows counterfeit wallet.dat files to synchronize transactions and update balances just like real wallets, except that they cannot produce coins;

2 The ciphertext of the master key can be altered or randomly generated, making it impossible to collide with the corresponding password; even if a password is collided, the decrypted document may still yield an incorrect master private key;

3 The ciphertext of the address's private key can be freely rewritten or randomly generated. Even if the master key is correctly calculated, the address's private key cannot be decrypted;

3. Password recovery technology and difficulty

This starts with the encryption process. The generation process of the master private key and the address's private key is as follows:

1 Master private key generation: randomly generate a 32-byte private key, which is the master private key (master key);

2 Address's private key: randomly generate a 32-byte address's private key => Encrypt with the master key => Save together with the public key in Wallet.dat;

3 The master key is encrypted and saved: user password => N rounds of SHA512 iterations => Key used to encrypt the master key => Encrypt the master key => Save it in Wallet.dat;

From the above process, we can deduce the following decryption steps:

Guessing the password => N rounds of SHA512 iterations => Key used to encrypt the master key => Decrypting the master key => Decrypting unsuccessfully, continue guessing the password; if decryption is successful, use the decrypted key to decrypt the address's private key => If successful, coins can be transferred successfully, which is the ultimate success; if decryption fails, continue guessing the password.

The difficulty in decrypting the master private key lies in:

1 The user-defined password undergoes N iterations, with a different N value for each wallet, ranging from tens of thousands to hundreds of thousands. The larger the value, the slower the recovery computing power, the fewer the number of passwords that can be attempted, and the greater the difficulty of recovery.

2 The user password has no clues, and the password space is extremely large. Although some public wallets claim to have clues, the credibility of such claims is very low, with a high possibility of forgery, and you cannot judge;

3 It requires significant computing power to exhaust the password space, and the costs for data center construction, equipment, electricity, and management can reach millions or tens of millions, with very little chance of ever generating income. Wouldn't it be better to invest that money in mining or power leasing for stable returns?

4 In public wallets, the public key, address's private key, and master private key can be easily altered, making the possibility of fakes very high. Who would use a large amount of real money to recover a wallet that is likely fake?

4. Conclusion on public wallets

In short, public wallets can be summarized in three sentences:

1 It is unlikely that you will be able to decrypt the master private key;

2 Even if the master private key is decrypted, it is unlikely to decrypt the address's private key;

3 Even if the address's private key is decrypted, it is unlikely that the address's private key corresponds to the public key, and not being able to transfer coins should be the normal situation;

The previous text has clarified the issues with public wallets, and I believe many people have abandoned the idea of recovering public wallets.

But if you think you are a chosen one, why not give it a try? You might decrypt a big wallet and transform your fortunes.

Just don’t come up with a new script and come looking for me with public wallets again...