3rdIteration / btcrecover

BTCRecover is an open source wallet password and seed recovery tool. For seed based recovery, this is primarily useful in situations where you have lost/forgotten parts of your mnemonic, or have made an error transcribing it. (So you are either seeing an empty wallet or gettign an error that your seed is invalid) For wallet password or passphrase recovery, it is primarily useful if you have a reasonable idea about what your password might be.
https://btcrecover.readthedocs.io/
GNU General Public License v2.0
592 stars 186 forks source link

OTS: For BIP38 - there is a really fast 1040 keys per second repo on here too - https://github.com/agurodriguez/brute_force_bip38.git I think it's considerably faster than btcrecover, but it's also written in cpp, and is full of bugs. #228

Open sigkill opened 3 years ago

sigkill commented 3 years ago

Worth a look. The BIP38 routine in this repo is incredibly fast. I tested with a few test BIP38 encrypted wallet keys I generated, and it was able to find the correct password.

1040 keys per second on a dual Xeon 16 core each, about 3K on a 64 core cpu.

https://github.com/agurodriguez/brute_force_bip38.git I think it's considerably faster than btcrecover, but it's also written in cpp, and is full of bugs.

Originally posted by @sigkill in https://github.com/3rdIteration/btcrecover/issues/227#issuecomment-896412279

Just wanted to open a ticket incase it could be re-written and incorporated into btcrecover.py

sigkill commented 3 years ago

32

sigkill commented 3 years ago

image

Cool this actually works. --no-eta --enable-opencl --opencl-platform 0 --opencl-workgroup-size 8 --threads=480

sigkill commented 3 years ago

Didn't get any output stats, it locked up the mic0 and mic1 cards and rebooted them. There's also no flag to disable selected devices from what I can tell.

3rdIteration commented 3 years ago

Open CL hanging on sCrypt means you are running out of GPU memory, depending on the wallet difficulty this could happen with as few as half a dozen threads.

In terms of performance, are you doing an apples to apples comparison in terms of wallet difficulty?

sigkill commented 3 years ago

Yeah same wallet on btcrecover and with the cpp based brute_force_bip38, the bforce loads and parses your entire password list (in this case the password is unknown, but I did validate with a known passphrase / test key) The configuration is a bit different too and you have to figure out the lowercase hex address to use the bforce script. It almost compiles on the Intel k1om based Xeon Phi, but errors when linking to libwally, which is a real shame because I think it would scream on that hardware.

But yeah - tested with a 64 core cpu and tested btcrecover against my known wallet, along with the brute_force_bip38, which was much faster.

There is a python libwally implementation that might do the trick, if the bip38 parts of btcrecover can by cython / cpp / c compiled. The performance comparison between the two is pretty substantial.