BTCRecover supports GPU acceleration through PyOpenCL, which can dramatically reduce recovery time for certain wallet types. Support requires OpenCL 1.2 and a compatible GPU driver. Most AMD and NVIDIA cards on Windows already ship with the necessary drivers.
The speedups below are measured on an Intel i7-8750H (CPU reference) vs an NVIDIA 1660 Ti (GPU reference). Your results will vary depending on your hardware.
| Recovery type | CPU (kp/s) | GPU (kp/s) | GPU speedup |
|---|
| Bitcoin Core (JTR kernel) | 0.07 | 6.75 | 96x |
| Bitcoin Core (OpenCL_Brute) | 0.07 | 0.95 | 14x |
| Blockchain.com main password | 1 | 10 | 10x |
| Blockchain.com second password | 0.39 | 15.5 | 40x |
| Dogechain.info | 1.3 | 11.3 | 10x |
| Electrum 2 wallet password | 4.5 | 21 | 4.5x |
| BIP39 passphrase / Electrum extra words | 2.3 | 10.4 | 4.5x |
| BIP39 12-word seed | 33 | 134 | 4.3x |
| BIP39 12-word seed (tokenlist) | 33 | 130 | 4x |
| BIP39 24-word seed | 160 | 180 | 1.15x |
| BIP39 24-word seed (tokenlist) | 140 | 160 | 1.15x |
| Electrum seed | 200 | 366 | 1.8x |
| BIP38 encrypted key | 0.02 | 0.02 | 1x (scales well with multiple GPUs) |
GPU is not always faster than CPU. A high-end CPU paired with a low-end GPU may actually be slower with OpenCL enabled. Always benchmark both with --no-eta --performance before committing to a GPU run.
For multi-GPU performance data across a wide range of GPU models and cloud configurations, see the Vast.ai multi-GPU example.
Supported wallet types
GPU acceleration is available for:
- Bitcoin Core — JTR kernel (
--enable-gpu) or OpenCL_Brute kernel (--enable-opencl)
- Blockchain.com — main password and second password
- Electrum — wallet passwords
- BIP39 seeds — 12-word and 24-word recovery
- BIP38 encrypted paper wallet keys
Installing PyOpenCL
- Install the driver package for your GPU. Nothing else will work without this.
- Open a command prompt and run:
- For NVIDIA GPUs, install the NVIDIA binary driver. On Ubuntu this is covered at the Ubuntu NVIDIA driver guide. The 440 metapackage is confirmed working.
- Install the PyOpenCL library:
sudo apt install python3-pyopencl
APT packages may be outdated on some distributions and may not function correctly. If you encounter issues, try installing via pip instead:If your environment fails to build the latest version, try an older release, e.g. pyopencl==2019.1.1. Support is only provided for the most recent Ubuntu LTS release.
Verifying your installation
Run the relevant unit tests to confirm PyOpenCL is working before attempting a real recovery.
Bitcoin Core (JTR kernel):
python3 -m btcrecover.test.test_passwords -v GPUTests
Blockchain.com, Electrum wallets, and BIP39 passphrases (OpenCL_Brute kernel):
python3 -m btcrecover.test.test_passwords -v OpenCL_Tests
BIP39 or Electrum seed recovery:
python3 -m btcrecover.test.test_seeds -v OpenCL_Tests
Listing available devices
Use --opencl-info to display all OpenCL-capable devices on your system and their maximum work-group sizes:
python3 btcrecover.py --opencl-info
Enabling GPU acceleration
Bitcoin Core (JTR kernel)
Pass --enable-gpu along with work-size parameters:
python3 btcrecover.py --wallet ./wallet.dat --enable-gpu --global-ws 4096 --local-ws 256 [other options]
--global-ws must always be evenly divisible by --local-ws. Adjusting these values by powers of 2 (e.g. increments of 128 or 256) can yield up to a 10x improvement, so it is worth experimenting.
To benchmark without testing real passwords:
python3 btcrecover.py --wallet ./wallet.dat --performance --enable-gpu --global-ws 4096 --local-ws 256
Press Ctrl+C to stop the benchmark once you have a stable reading.
All other supported wallets (OpenCL_Brute kernel)
Add --enable-opencl to your command. The default platform and work-group size will auto-detect a near-optimal configuration:
python3 btcrecover.py --wallet ./wallet.dat --enable-opencl [other options]
Selecting specific devices
Use --opencl-devices to target specific GPU indices. You can list the same GPU more than once to allocate it a proportionally larger share of work:
# Use GPUs 0 and 1
python3 btcrecover.py --wallet ./wallet.dat --enable-opencl --opencl-devices 0 1
# Allocate GPU 0 twice as many threads as GPU 1
python3 btcrecover.py --wallet ./wallet.dat --enable-opencl --opencl-devices 0 0 1
Work-group size
Use the value reported by --opencl-info as your guide. For password recovery, set --opencl-workgroup-size to an exact multiple of the device’s maximum work-group size.
For seed recovery, BTCRecover automatically scales the work-group size because most generated seeds are checksummed rather than fully hashed. The effective batch multiplier by seed length is:
| Seed type | Seeds generated per hash |
|---|
| BIP39 12-word | 16:1 |
| BIP39 18-word | 64:1 |
| BIP39 24-word | 256:1 |
| Electrum | 125:1 |
Seed recovery: limit derivation paths
BTCRecover defaults to searching all common derivation paths (BIP44, BIP49, BIP84 for Bitcoin). For CPU recovery this is acceptable, but it can halve OpenCL performance. If you know the derivation path, specify it explicitly:
python3 seedrecover.py --wallet ./wallet.dat --enable-opencl --bip32-path "m/44'/0'/0'"
Seed recovery: address generation limit
The --addr-limit argument controls how many addresses to generate per seed. A value higher than 1 can halve OpenCL performance. If your crypto uses a fixed receiving address (e.g. Ethereum, Ripple) or you are using an address database, set it to 1:
python3 seedrecover.py --wallet ./wallet.dat --enable-opencl --addr-limit 1
Multi-GPU systems
JTR kernel (--enable-gpu): uses a single CPU thread and distributes work across all available GPUs automatically. Works best when all GPUs are identical in performance.
OpenCL_Brute kernel (--enable-opencl): allocates GPUs to threads in a round-robin. A general starting point is 2 threads per GPU:
python3 btcrecover.py --wallet ./wallet.dat --enable-opencl --threads 6 # for 3 GPUs
If you have more GPUs than CPU cores, set --threads manually to at least match your GPU count.