🧠 How I Built a Bitcoin Private Key Scanner with Python
Have you ever wondered what would happen if you could scan the Bitcoin private key space?
Well, I built a tool that does exactly that — for educational and research purposes only.
🔍 What It Does
- Generates random private keys within custom bit ranges (e.g. 64 to 131 bits)
- Converts them to multiple address formats:
- Legacy (BIP44)
- P2SH-SegWit (BIP49)
- Native SegWit (BIP84)
- Checks each generated address against a local SQLite database of known Bitcoin addresses (~50 million entries)
- If a match is found, it exports the result in both WIF and Electrum import formats
🛠 Tech Stack
- Python
-
ecdsa
,base58
,bech32
,psutil
- Electrum-compatible WIF output
- Multi-process support using
multiprocessing
🎯 Why I Built It
This tool is meant to demonstrate how private keys relate to address generation, and how wallets like Electrum interpret WIF keys.
It's a great way to visualize the relationship between:
- Private keys
- Public keys
- Address formats
- Real-world blockchain history
Some addresses I scanned even showed over 1,500 transactions in Electrum!
📦 GitHub
⚠️ Disclaimer
This project is strictly for educational purposes.
Do not use it to target wallets or addresses that do not belong to you.
The tool is meant to explore known Bitcoin puzzles and understand blockchain mechanics.
🙏 Support
If this project helped you learn something — or even helped you find a BTC puzzle key — consider supporting the work ❤️
BTC Donation Address:
bc1q4nyq7kr4nwq6zw35pg0zl0k9jmdmtmadlfvqhr
💬 Questions?
Feel free to ask in the comments — I'd be happy to answer!
Top comments (1)
This is nuts - the amount of work you put in just to map all those key relationships blows my mind. Nice one.