gurnec / btcrecover

An open source Bitcoin wallet password and seed recovery tool designed for the case where you already know most of your password/seed, but need assistance in trying different possible combinations.
GNU General Public License v2.0
1.26k stars 677 forks source link

error: WalletBlockchain does not support GPU acceleration #151

Open corwen opened 6 years ago

corwen commented 6 years ago

Hello!

I did not find any reference for blockchain wallets encryption whether it isn't possible to assist the script with a GPU acceleration (or I am pure blind), so i am asking, what do i miss? (pycrypto, pyopencl, pyopengl and pyopengl_accelerate are installed)

D:\>python.exe d:\btcrecover-master\btcrecover.py --list-gpus
Starting btcrecover 0.17.9 on Python 2.7.13 64-bit, 16-bit unicodes, 32-bit ints
#1 GeForce GTX 1060 6GB
#2 Intel(R) HD Graphics 630
#3 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz

D:\>python.exe d:\btcrecover-master\btcrecover.py --wallet d:\btcrecover-master\fr.json.aes --tokenlist d:\btcrecover-master\tok.txt --enable-gpu
Starting btcrecover 0.17.9 on Python 2.7.13 64-bit, 16-bit unicodes, 32-bit ints
btcrecover.py: error: WalletBlockchain does not support GPU acceleration
gurnec commented 6 years ago

You didn't miss it, there's currently no GPU support for Blockchain.info wallets. (It is on the list though.)

You may want to take a look at John the Ripper, it does have GPU support for Blockchain.info (although it can be a bit tricky get up and running...).

These are the notes I took from the last time I tried getting it running on Windows, YMMV:

  1. Download the pre-compiled binary from the wiki here.
  2. Try to run it, e.g.:
    cd run
    set OPENCLBUILDOPTIONS=-I %cd%\kernels
    john --test=0 --format=blockchain-opencl
  3. If it complains that no OpenCL devices were found, delete cygOpenCL-1.dll from the run directory and try again.
  4. If it still complains, locate \Windows\System32\OpenCL.dll, copy it to the run directory, rename it to cygOpenCL-1.dll and try again.

I'd also probably test it with a dummy wallet first. Hope this helps!

udisch commented 6 years ago

Just wondering, is there a technical limitation for not supporting GPU for blockchain.info wallets, or is it lack of time? Can you perhaps give any directions on how to implement something like this from the existing code? Thanks!

rterwedo commented 6 years ago

@udisch Its a matter of time I believe. He states you can do it via John the Ripper, and he said its on the list of things to do.

He is working on improving GPU speeds right now.

udisch commented 6 years ago

@rterwedo I wasn't demanding anything :) I asked because I considered implementing something quick and dirty on my own, but first wanted to know if it's even feasible. I'm aware of the option to use John the ripper after generating the passwords with btcrecover.

rterwedo commented 6 years ago

@udisch I get that. I was just trying to pass on some info I saw parts of in a couple different threads to you. =)

I cannot speak for him, just stating what I have seen him say in other issues. ie He is trying to implement GPU speed increases atm.

As someone who does not have a blockchain.info wallet - why would you want to use GPUs? I have heard reports (correct me if wrong) of billions of pwds an hour on a desktop CPU for blockchain.info wallets. Compare that to say, btc core, where if you get 5k-10k a second using multiple GPUs you are happy!

udisch commented 6 years ago

@rterwedo billions an hour? That's interesting. If that's the case, that would explain why GPU support isn't an urgent requirement. Last time I timed it on my laptop it was about 90k per second, so that's around half a billion per hour. The wallet i'm working on has a long password and typos are quite likely. But perhaps I've been approaching it wrong and should just give it more time.

Edit: it's a blockchain.info wallet with 10 PBK iterations (at least that)

rterwedo commented 6 years ago

@udisch Do you know the size of the keyspace? This is probably the most important thing to consider strategically.

Curious, have u used pypy and --wallet __null to check the max cpu speed?

My guess is you are correct. On an overclocked i7, with a real old wallet file I was seeing ~500-700 /s. Yes, just plain old 500. My mac pro was like 200. On a top of the line setup with multiple overclocked 1080 TI GPUs, we are happy with 37k /s, so the speed improvement matters a ton to us core guys with GPUs. We would kill for 90k/s on a laptop CPU, thats like $10.000 in hardware for us to approach that speed. =)

rterwedo commented 6 years ago

We can chat. Please leave your skype and I will reach out soon when I am done working on a proposal.

udisch commented 6 years ago

@rterwedo Thanks so much for your help. Using pypy for the password generation is already a big improvement. I'll rethink the keyspace and how to split it to smaller chunks.