Almost 1 year ago, I checked a bunch of crypto addresses generated from naive mnemonics. This time I decided to improve on this and check even more mnemonics and create a solution that can run on a server forever trying to find used mnemonics and addresses generated from them.
Drawbacks of the previous solution
Using the previous solution it’s possible to check mnemonics but it has a couple of drawbacks:
- Dependence on a block explorer. The main disadvantage is that to check an address, you have to make a request to a block explorer. Most block explorers have rate limits, so the checking speed is limited by these rate limits
- Programming language. Elixir is one of the best programming languages and compared to Rust, you can be much more productive with Elixir. But for low-level algorithms like hashing and cryptography used in address generation Rust is more suitable without a question.
- Ease of use. In the elixir application, all operations have to be executed in Elixir’s interactive shell (iex). But for such a use case like checking mnemonics, the ideal form is a CLI app, in my opinion.
So here comes
foogold (Fool’s Gold). It’s a cli app written in Rust that has the following features:
- Indexing of all bitcoin addresses.
Instead of relying on a block explorer,
foogold indexes all addresses that ever participated at least in a single transaction. So basically it’s a dumb blockchain explorer, that can tell you if an address was used in the bitcoin blockchain.
- Checking combinations of 1 and 2 words.
The number of mnemonics with the same word repeated the given number of times (12, 15, 18, 21 or 24) is 2048, and the number of 2-word combinations is 2048 x 2048 = 4_194_304.
The number of 3-word combinations is already 2048 x 2048 x 2048 = 8_589_934_592. But it’s still possible to check considering we just need to make a query to the local DB. But it will require a different approach compared to 1 and 2 words. Maybe using background processing with fang will solve it. For now, it’s only possible to check 1 and 2-word combinations.
- Checking random mnemonics
This feature justifies the name of the project -
foogold (Fool’s Gold).
foogold can be run forever checking random mnemonics trying to unlock existing addresses. The probability of finding is so small that it’s almost impossible.
- Checking a single mnemonic
- Sending notifications about found addresses to Telegram. This feature can be useful if you’re running
foogoldon your server and you want to be notified about found addresses. Otherwise found addresses are just saved to a postgres table.
The project is available on github