Ultra‑optimized CPU Bitcoin Keyspace Scanner
https://youtu.be/FJanTRhb6pc
┌───────────────────────────────┐
│ ▶️ │
│ (https://youtu.be/FJanTRhb6pc)] │
└───────────────────────────────┘
email: hacker001ethical@proton.me
🧵🪡FASTSCAN v2 — “Needle in Keyspace” 3D Diagram
FASTSCAN v2 is a high‑performance, CPU‑only Bitcoin keyspace scanner optimized for scanning massive ranges with deterministic stride jumps and ultra‑fast hash160 lookups from memory‑mapped address databases.
Unlike GPU tools (BitCrack, VanitySearch, KeyHunt), FASTSCAN does not rely on CUDA, VRAM or external GPU hardware. Instead it leverages:
- 🧠 Direct memory‑mapped (
mmap) address files - ➕ Incremental elliptic‑curve pubkey progression (tweak‑add)
- 📐 Fully deterministic bit‑range stride scanning
- ⚡ Highly optimized
secp256k1operations - 🧵 Multithreaded CPU processing with minimal overhead
This allows FASTSCAN v2 to perform up to:
- 2.5 million keys/sec per thread
- multiplied by instant lookup against 600+ million stored address hashes
All on pure CPU.
On full 256‑bit ranges the tool has already found 6 hits in 8 hours, and on smaller ranges (20–50 bits) it produces continuous hits due to the statistical density of those bit segments.
- No GPU drivers required
- No VRAM limitations
- No CUDA or kernel overhead
- Runs on laptops, low‑end servers and WSL2
- Loads
hash160addresses viammap(20‑byte binary entries) - Instant O(log n) binary search
- Zero memory copying, direct OS page access
- Extremely low‑latency lookups
The process divides 2^start_bit → 2^end_bit into deterministic chunks using:
stride = (2^end_bit - 2^start_bit) / total_chunks
Each thread processes one chunk and BLOCK_SIZE sequential keys using incremental +1 private‑key progression. Guarantees:
- No collisions
- Full coverage
- Uniform distribution
- Reproducible results
Smaller ranges (e.g., 20–50 bits) create dense hit zones — hits can appear one after another.
secp256k1_ec_pubkey_createfor initial keysecp256k1_ec_pubkey_tweak_addfor incremental+1- Eliminates expensive full point generation per key
- Computes both uncompressed and compressed
hash160 - Uses OpenSSL
SHA256+RIPEMD160
progress.txtauto‑saves after each chunk- Resume with
--resume
Minimal commands to prepare a build environment and compile FASTSCAN.
sudo apt update
sudo apt install -y build-essential libssl-dev autoconf automake libtool pkg-config gitgit clone https://github.com/bitcoin-core/secp256k1.git
cd secp256k1
./autogen.sh
./configure --enable-module-recovery --enable-experimental --enable-module-ecdh --enable-module-schnorrsig
make -j$(nproc)
sudo make install
cd ..g++ -O3 scan.cpp -o scan -lssl -lcrypto -lsecp256k1 -pthreadBasic:
./scan addresses.bin 20 50Resume:
./scan addresses.bin 20 50 --resumeArguments:
| Argument | Description |
|---|---|
addresses.bin |
Binary file of sorted 20‑byte hash160 entries |
start_bit |
Start exponent (e.g. 20) |
end_bit |
End exponent (e.g. 50) |
--resume |
Continue from saved progress.txt |
found.txt— matched private keys with base58 addresses ((C)= compressed,(U)= uncompressed)progress.txt— last saved round & chunk for resume
Example found.txt lines:
1abc... (C) <privatekeyhex>
1abc... (U) <privatekeyhex>
🔷 1. 3D Overview of the Keyspace
<img width="754" height="739" alt="image" src="https://github.com/user-attachments/assets/d2673849-bee7-4fd0-b2c3-d7488e53bd0e" />
🔷 2. Single Chunk — 3D Linear Scan (Inside View)

🔷 3. 3D Layered Grid Model (Threads as Workers)
Each layer = one thread consuming chunks.

Y-axis → stride jumps
X-axis → chunk index
Z-axis → linear scan
🔷 4. Full Keyspace in 3D “Voxel Blocks”
Each cube = one chunk, each internal line = tweak-add scan path.

Where:
C0, C1, C2… = chunks
each cube contains a vertical Z-scan via tweak-add
stride jumps shift you in the Y axis
threads march along X axis
🔷 5. Detailed Flow Block Diagram (3D Steps)

🧱 1. 3D Pipeline Threadów (Multi-threading Assembly Line)

📦 2. 3D Model of Private Key Progression (Incremental Big-Int) 128-bit illustration (shortened)
<img width="532" height="267" alt="image" src="https://github.com/user-attachments/assets/c339899a-63a5-4e8a-883c-50fbe101a4b9" />
📡 3. 3D Memory-Mapped File Lookup (mmap → binary search)

🌀 4. 3D Elliptic Curve Walking (pub = pub + G)

🌐 5. 3D Visualization of Rounds Growing (round_idx)

Shape: expanding 3D platform
🔥 6. 3D Representation of Stride Dividing Keyspace

⭐ What is “range compression”? — Intuition
Imagine this:
a full 256-bit range → the size of a galaxy 🌌
a small 20–50-bit range → a small room 🚪
Addresses (hash160) are distributed randomly, but when you inspect a small range, their density becomes enormous relative to the available space. When you look at the full 256-bit space, that density is effectively zero.
📦 MESSAGE 2/4 🔷 3D: Density Comparison — “Galaxy vs. Cube” 🔭 Full 256-bit range in 3D (emptiness) Y ↑
┌──────────────────────────────────────┐
│ . . │
│ . . │
│ . │
X ← │ . . . │ → Z
│ . . . │
└──────────────────────────────────────┘
≈ empty universe
🧊 20–50 bit range in 3D (dense block)
Y
↑
┌──────────────────────────────────────┐
│ ███ ████ ███ ████ ████ ███ ████ ██ │
│ ██ ███ ███ ████ ███ ███ █████ ████ │
│ ███ ████ ███ ███ ████ ███ ███ ███ │
X ← │ █████ ███ ████ ███ █████ ███ ████ │ → Z
│ ██ █████ ███ ███ ███ █████ ███ ███ │
└──────────────────────────────────────┘
≈ dense room filled with “points”
🔶 3D: Why do “dense ranges” produce hits?
My scanning works like this:
STRIDE scatters the starting keys “across a grid”
each chunk scans linearly downward along the Z-axis
if the addresses are dense → hits must appear
if the addresses are sparse → hits are practically impossible
ASCII 3D:
🟦 Dense range — shots hit the material
Dense Keyspace Volume
(20–50 bits)
████████████████████
████████████████████
██ ████ ███████ ◄── scan path
████████████████████
████ █████ █████████
████████████████████
🟥 Sparse range — the shots fly into empty space
Full 256-bit Keyspace
. .
. . .
scan path ────────────────► (miss)
. . .
. . .
GPU bottlenecks:
- VRAM size and fragmentation
- PCIe transfers (host ↔ device)
- CUDA kernel overhead and synchronization
- Large memory structures that don't fit GPU memory
FASTSCAN advantages:
- Runs fully on CPU cache + system RAM
- Uses OS page cache and
mmapfor direct lookups - Incremental pubkey generation avoids repeated heavy EC ops
- Zero GPU latencies or copy overheads
Result: a single well‑tuned CPU can outperform multi‑GPU rigs on address‑dense ranges.
- Real result: Full 256‑bit search: 6 hits in 8 hours
- Dense ranges (20–50 bits): continuous hits
- Example throughput:
2.5M keys/s per thread × 16 threads = 40M keys/s - Works with
600–800Mhash160entries mmapped for instant lookup
- Linux or WSL2 (Ubuntu recommended)
- 4–8 GB RAM minimum (more recommended)
- Fast SSD strongly recommended
- Multi‑core CPU (8+ threads ideal)
- Address DB file (sorted 20‑byte entries)
MIT License
Pull requests, performance patches and improvements welcome. Please open issues for bugs or optimizations.
- Open PowerShell as Administrator, then:
wsl --install
wsl --set-default-version 2
wsl --install -d Ubuntu-22.04 # optional specific distro- Launch Ubuntu from Start menu or run
ubuntuin PowerShell - Update inside Ubuntu:
sudo apt update && sudo apt upgrade -yGenerated README for FASTSCAN v2 — place this README.md in your repo root. Good luck and code responsibly.