Skip to content

Teylersf/satoshi-cracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

₿ Satoshi Nakamoto Wallet Cracker

Browser-based brute force against all 21,953 known Patoshi-era Bitcoin wallets

Real secp256k1 cryptography · Multi-thread Web Workers · NVIDIA GPU support (BitCrack)

CI License: MIT Next.js React TypeScript PRs Welcome


Important

This is a lottery, not an exploit. The keyspace is 2²⁵⁶ ≈ 10⁷⁷ — even a billion-keys-per-second GPU farm running for the entire age of the universe wouldn't dent it. Every key generated here is a real cryptographic attempt, but the math is not on your side. The project is educational / aesthetic.

What this is

A Next.js + React webapp that generates real Bitcoin private keys in your browser using the actual secp256k1 elliptic curve, derives the corresponding P2PKH address, and checks it against all 21,953 known wallets mined by Satoshi Nakamoto between 2009 and 2010 (the Patoshi pattern, identified by Sergio Lerner). Combined balance: ~1,097,650 BTC — untouched since the genesis era.

If a match is found, the private key is downloaded as a .txt file, persisted to localStorage, and POSTed to a Next.js API route that appends it to found_keys.txt in the project root.

For real horsepower, the project also ships a sidecar setup for BitCrack (open-source CUDA Bitcoin brute-forcer) with a PowerShell wrapper that enforces a GPU temperature budget via nvidia-smi. A live dashboard card pulls nvidia-smi + BitCrack progress into the same UI.

Features

  • 🔐 Real cryptography — no simulation. @noble/secp256k1 + @noble/hashes (SHA-256, RIPEMD-160), fetched as self-contained ESM bundles and run inside module Web Workers.
  • 🧵 Multi-threaded — one worker per CPU logical core (configurable slider, up to 2× core count).
  • 💾 O(1) lookups — all 21,953 hash160 fingerprints preloaded into a Map. Each generated key is checked against the full target set at constant cost.
  • 🎮 GPU sidecar (optional)BitCrack CUDA binary drives an NVIDIA card at ~350 M+ keys/sec on a 3090. Live stats stream into the web UI via /api/gpu-status.
  • 🌡️ Temperature watchdog — PowerShell wrapper monitors nvidia-smi and reduces the GPU power limit if temperature exceeds the target (default 70 °C). Restores on exit.
  • 📥 Match handling — found keys are downloaded as .txt, saved to localStorage, and appended to found_keys.txt server-side.
  • 💵 Live BTC price — Binance API, refreshed every 10 s. USD prize-pool updates in real time.
  • ⚙️ Settings drawer — change thread count live (restarts the worker pool), see WebGPU device info, toggle save-on-match.
  • 🎨 Modern dark UI — Inter + JetBrains Mono, layered shadows, dimensional surfaces. No CRT cosplay.

Quick start

Requires Node.js 20+.

git clone https://github.com/Teylersf/satoshi-cracker.git
cd satoshi-cracker
npm install
npm run dev

Open http://localhost:3000.

For production:

npm run build && npm start

Architecture

┌───────────────────────────────────────────────────────────────────────┐
│                          Browser                                      │
│  ┌─────────────────────┐    spawns N module workers                   │
│  │   <Cracker /> tsx   │ ──▶ each worker imports the bundled @noble   │
│  │   (React 19)        │     libs from blob: URLs (fetched once on    │
│  │                     │     the main thread to avoid CORS issues)    │
│  │   - settings drawer │                                              │
│  │   - live stats UI   │                                              │
│  │   - match overlay   │                                              │
│  └─────────┬───────────┘                                              │
│            │                                                          │
│            │ poll every 2 s                                           │
│            ▼                                                          │
│  ┌────────────────────────────┐    nvidia-smi  ┌──────────────────┐   │
│  │  /api/gpu-status (Node)    │ ──────────────▶│  RTX 3090 / etc. │   │
│  └────────────────────────────┘                 └──────────────────┘   │
│  ┌────────────────────────────┐                                       │
│  │  /api/save-match  (Node)   │ ──▶ appends to ./found_keys.txt       │
│  │  /api/found-keys  (Node)   │ ──▶ reads ./found_keys.txt            │
│  └────────────────────────────┘                                       │
└───────────────────────────────────────────────────────────────────────┘
                                              ▲
                                              │ POSTs any match
                              ┌───────────────┴────────────────┐
                              │  scripts/gpu-watcher.mjs       │
                              │  tails gpu/gpu_found.txt       │
                              └───────────────┬────────────────┘
                                              │
                                  ┌───────────┴────────────┐
                                  │  cuBitCrack.exe        │
                                  │  driven by             │
                                  │  scripts/run-bitcrack  │
                                  │  with temp watchdog    │
                                  └────────────────────────┘

Project layout

satoshi-cracker/
├── app/
│   ├── layout.tsx              # SEO metadata, fonts, JSON-LD
│   ├── page.tsx                # Page entry → renders <Cracker/>
│   ├── Cracker.tsx             # Main client component (engine + UI)
│   ├── globals.css             # All styles (dark / dimensional)
│   ├── sitemap.ts              # /sitemap.xml
│   ├── robots.ts               # /robots.txt
│   ├── opengraph-image.tsx     # /opengraph-image (dynamic OG card)
│   └── api/
│       ├── save-match/route.ts # POST: append match to found_keys.txt
│       ├── found-keys/route.ts # GET:  read found_keys.txt
│       └── gpu-status/route.ts # GET:  nvidia-smi + BitCrack log
├── public/
│   └── satoshi-data.js         # 21,953 hash160 → [address, btc] map
├── scripts/
│   ├── export-addresses.mjs    # gpu/addresses.txt extractor
│   ├── setup-gpu.ps1           # Clone+build BitCrack
│   ├── run-bitcrack.ps1        # Temp-guarded runner
│   ├── gpu-watcher.mjs         # GPU output → /api/save-match
│   └── fix-cuda-integration.ps1# Copies CUDA props into VS BuildTools
├── gpu/
│   └── SETUP_GPU.md            # GPU mode walkthrough
├── .github/
│   ├── workflows/ci.yml        # Build & type-check on push/PR
│   └── dependabot.yml          # Weekly npm + monthly actions updates
├── package.json
├── tsconfig.json
└── next.config.mjs

How the engine works

  1. On mount, <Cracker/> injects /satoshi-data.js as a <script> tag. That file defines window.SATOSHI_HASH160 (a Map<hash160, [address, btc]>) and window.SATOSHI_TOTAL_BTC.
  2. The component fetches bundled @noble/secp256k1 and @noble/hashes modules from cdn.jsdelivr.net on the main thread (where cross-origin redirects work normally), wraps them in local blob: URLs, and rewrites internal relative references so the bundle is self-contained.
  3. A pool of Worker(blobUrl, { type: 'module' }) is spawned — one per requested thread. Each worker imports the blob URLs (no redirects → no Chromium module-worker policy violations) and loops:
    1. utils.randomPrivateKey() → 32 random bytes
    2. secp256k1.getPublicKey(pk, false) → 65-byte uncompressed pubkey
    3. RIPEMD160(SHA256(pubkey)) → 20-byte hash160
    4. map.get(hash160) → hit / miss in constant time, against all 21,953 targets simultaneously
  4. Workers post a stats message every ~350 ms (counter + last sample for display). On a match they post match and the main thread takes over: persist, download, POST to the API.
  5. If module workers fail (e.g. unusual CSP), a single-threaded requestAnimationFrame fallback kicks in using the same noble libs imported via dynamic import() of blob URLs.

Settings panel

Open with the button in the top bar.

Setting Behavior
CPU Threads Slider from 1 to 2 × hardwareConcurrency. Default = min(cores, 16). "Apply Threads" tears down the worker pool and respawns. Going above logical core count is allowed but warned against.
GPU Acceleration Disabled — see GPU Mode for real GPU support.
Save Match to Server + Download When ON: /api/save-match appends to found_keys.txt AND your browser downloads satoshi_match_<timestamp>.txt.
Reset Stats Zero counters + clear log.

GPU mode

The browser cannot drive your GPU for secp256k1 brute force. Porting 256-bit elliptic-curve math to WGSL is a multi-month research project. This project doesn't fake it.

What it does ship: a one-command setup for BitCrack (native CUDA tool) with a Windows PowerShell wrapper that:

  1. Clones + builds BitCrack on first run
  2. Generates gpu/addresses.txt from public/satoshi-data.js
  3. Runs cuBitCrack.exe with a temp guard:
    • sets nvidia-smi -pl 250 (out of 350 W TDP for a 3090) to cap natural draw
    • polls nvidia-smi --query-gpu=temperature.gpu every 5 s
    • drops the limit 10 W if temp exceeds target (default 70 °C), with a floor of 150 W
    • raises it back when temp stays cool for a full minute
    • restores the original limit on exit
  4. Tees BitCrack's stdout to gpu/bitcrack.log so /api/gpu-status can parse it
  5. The web UI's "GPU — Native Brute Force" card pulls live nvidia-smi + BitCrack progress every 2 s
# In a separate shell (Admin shell to enable the soft power cap):
npm run gpu:setup     # one-time: clone + build BitCrack
npm run gpu:run       # start GPU brute force with temp guard
npm run gpu:watch     # bridge gpu_found.txt → /api/save-match

Prerequisites (the setup script detects and reports missing pieces):

Full walkthrough including patches applied to BitCrack for CUDA 12 + Ampere compatibility: see gpu/SETUP_GPU.md.

Realistic throughput on a 3090: ~1–3 billion keys/sec on bare metal. With this Tee-Object pipeline you'll see ~350 MKey/sec (Windows console I/O overhead). Probability of finding a Patoshi key in a human lifetime: still indistinguishable from zero. The card will be fully engaged, though.

API reference

Method Path Purpose
GET /api/found-keys Read the contents of found_keys.txt. Returns plain text.
POST /api/save-match Append a match. Body: { privkey, address, btc, usd }.
GET /api/gpu-status nvidia-smi stats + parsed BitCrack progress. Returns JSON.

Found-keys file

When a match is found, /api/save-match appends an entry like this to found_keys.txt in the project root:

==================== MATCH FOUND ====================
Timestamp:    2026-05-18 22:14:08
Private Key:  5KJ... (full 256-bit hex)
Address:      1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
BTC Balance:  50.00000000 BTC
USD Value:    $3,849,968.00
Source:       Satoshi Cracker (Next.js)
=====================================================

The page reads this file via GET /api/found-keys on mount and renders the Found Keys card.

Caution

found_keys.txt is gitignored by default. Never commit it. Anyone with the private key controls the corresponding wallet — broadcasting a transaction from a Patoshi address would be globally visible and a magnet for front-running bots.

Tradeoffs / deliberate non-features

  • No "already tried" key database. Random 256-bit draws collide with probability ~2⁻¹²⁸ — you can run for the age of the universe and never repeat. Storing tried keys wastes disk for zero benefit.
  • No fake GPU slider. If the browser can't actually dispatch work to the GPU, the UI says so. Real GPU work is the BitCrack sidecar.
  • No telemetry / analytics. The page makes exactly four outbound requests: Binance for BTC/USD, jsdelivr for the noble libs (only once, cached), Google Fonts for typography, and (only after deploy) Vercel Analytics if you wire it.

Deploying

The project is a standard Next.js 15 App Router app — deploys to any platform that supports Node 20+. Tested on Vercel:

  1. Push to GitHub (you're reading this from there)
  2. https://vercel.com/new → import the repo
  3. Set NEXT_PUBLIC_SITE_URL to your production domain (used by sitemap.ts, robots.ts, and OG metadata)
  4. Deploy

The /api/save-match, /api/found-keys, and /api/gpu-status routes use the Node.js runtime (not Edge) because they read/write the filesystem and shell out to nvidia-smi. On Vercel's read-only filesystem the file-write routes are no-ops; for a real deployment with persistent found-key logging, deploy to your own server / VPS.

Tech stack

  • Framework: Next.js 15 (App Router)
  • Runtime: React 19, Node.js 20+
  • Crypto: @noble/secp256k1, @noble/hashes — audited, zero-dependency JavaScript implementations
  • CDN: jsdelivr's /+esm for self-contained ESM bundles
  • Language: TypeScript 5 (strict mode)
  • Styling: Plain CSS in globals.css — no Tailwind, no CSS-in-JS
  • Fonts: Inter (UI) + JetBrains Mono (hex/code)
  • GPU sidecar: BitCrack (C++/CUDA, GPL-2.0)

Inspiration & credits

License

MIT © Taylor Kalin. Use freely. The author takes no responsibility for electricity bills or existential dread.

About

Browser-based brute force against Satoshi Nakamoto's 21,953 Patoshi wallets (~1,097,650 BTC). Real secp256k1 cryptography, multi-thread Web Workers, NVIDIA GPU sidecar via BitCrack. Next.js 15 + React 19.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors