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.28k stars 688 forks source link

Rig to use for btcrecover #210

Closed drumamat closed 6 years ago

drumamat commented 6 years ago

Hi everyone,

I've been using btcrecover for more than a year with my 8 yrs old laptop without any success (I manage to make it work and found the pass on mock wallets but not on the $$$$ wallet), it's too slow to have a decent token list running.

I want to build a machine/mining rig just to find my passphrase, since it would be now way worth it.

I would love to know what type of speeds I would get with 1,2,3, or 4 GTX 1070 for example, trying to unlock my BTC core QT using a token list.

Currently I get 6 "tries" per seconds, 3 days+ to try 17million combinaisons => I'll never find it.

What do you guys recommend? What results speeds do you get with a 1070 or 1080 on windows?

Thanks for you advice, I'll remember you when I find my password ;)

ps: I used to be a altcoin miner 4 yrs ago, I no longer know what GPUs are good or whatnot, but I would also continue using the machine after finding my password to mine coins, if that can help in the way you respond to me.

Chococat commented 6 years ago

I don't know about 1070 but I'm using 1080ti to find password for my Vertcoin wallet 78,362 SHA-512 iterations. If your token file not good, it will slow down much, and if your wallet have higher difficult it will run lower too, for now with my not so good tocken file one 1080ti run around 13kP/s (~13,000 passs per second), 2x 1080ti run around 22-23 kP/s and 3x run around 33kP/s.

I'm running with 2x 1080Ti at this moment, and 5 day 8 hours it tried 10,453,065,728 passwords.

Hope this help.

drumamat commented 6 years ago

Thank you Chococat, it does actually help, it gives me a good idea of the range of effects a card can have!

rterwedo commented 6 years ago

@drumamat - how many sha 512 iterations is the btc wallet? What version of btc core was the wallet made on? (.4 by chance?)

Our team has benchmarked a ton of setups, built rigs for cracking, and can offer some advice... we spent months doing it since there was no definitive answers.

Ex: a wallet with sha 512 of 55k, and a gtx 1080ti sc2 with (3584 cuda cores, overclocked to 2075 mhz) ---> ~24k passwords / sec. You get lots of other issues when trying to scale tho, ie 3 gpus does NOT equal 72k pwd/s, and there are non linear performance degradations from token file stuff, as well as practical limitations (ie use pre-gen pwds, or gen on fly, what if you have to stop, etc)

drumamat commented 6 years ago

@rterwedo - Thanks for your answer. The original wallet was made on (if you mean the very first version I used to create the address) version 0.8.6.

I won't be buying any rig before early February (I'm on the move until then), so any recommendation is still greatly welcome!

rterwedo commented 6 years ago

First off (for others readying this) you need to know whether the wallet is CPU or GPU bound. Your wallet on core is GPU bound.

Next step is figuring out the sha 512 iterations (I use 55k bc its a number I know off the top of my head, circa 2011 laptop). Yours may be more or less.

Btcrecover in its current state does not scale linearly, in short for GPU bound wallets it does not do well in "rig" setups...there are a ton of tweaks, code modifications, etc needed.

The next issue is you need to know the size of your keyspace. Is the number of pwds 1m? 1b? 1trillion? more? This determines if it even makes economic sense to try...

Use https://zerobin.net/ to post your skype/email and I can chat when I have a few (set to expire in a week so you don't get spammed)

winnph commented 6 years ago

Sorry to piggyback here, but does anyone have any specific suggestions for tweaking a rig with 6 GTX 1060's to work with btcrecover? I believe the password is 2 or possibly 3 dictionary words with some capitalization/numeric replacements, plus one or two standard keyboard symbols (i.e., ~!@#$%^&*?.), I'm not sure how to accurately calculate the number of potential passwords that would be.

rterwedo commented 6 years ago

Is your wallet GPU or CPU bound? Tweaking a gpu rig for a cpu wallet makes no sense.

winnph commented 6 years ago

GPU -- it's bitcoin core

rterwedo commented 6 years ago

I would spend time calc the keyspace to see if its worth it, as that will not have any downtime on the rig to do.

A good btc recover rig is 1/3 machine learning hardware (fast, many cores, good amount of ram), 1/3 mining hardware (lots of gpus), and 1/3 good software configs/tweaks(too many to list).

If your keyspace is sufficiently small you do have to mess with getting crazy, you just wait a little longer.

You have the math sorted?

winnph commented 6 years ago

This is an existing ethereum/zcash mining rig I hoped to repurpose as it was not currently being used by its owner, who offered to lend it to me. So, as long as it will do a better job than the single GTX 1050 that I have in my desktop, it's worth it to me to try to access the 6 BTC I have in this wallet.

I'll add that my wallet difficulty is 80,645 SHA-512 iterations according to btcrecover, which I installed on my desktop just to familiarize myself with it.

I am unsure how to calculate the keyspace... I was hoping to use a dictionary file because I've already exhausted my attempts to remember the password using a token file on my desktop with 1 GPU. Edit: This password is from 2012 and my memory is not very good, so I suspect my guesses just havent been accurate, though I'm pretty confident it was 2 dictionary words and definitely not more than 3.

rterwedo commented 6 years ago

(combos)*(combos)...

If you have 10m dict file, and you know its 2 words. = 500k*500k = 250b.

If subs in a dict file make the 500k---> 5m = 5m*5m combos. = big.

You other subs are going of course make it bigger/smaller. If you randomly picked 2 or 3 words, with some possible subs, specials and uppers/lowers (and have no idea how you did this). My guess is your key space will be quite large, outside a 6 gpu rig - even if you spent the time optimizing it.

Do you have core wallet from version .4? Were the pwds ever saved in plain text somewhere? There might be other options that make more sense.

winnph commented 6 years ago

Not sure of the version of core at the time, but it was created using whatever the latest version was in July 2012, and I no longer have either the computer it was created on or its hard drive, only the wallet.dat file, so unless there was some faulty way wallets were being encrypted in that version of core, I don't have much of another option right now.

winnph commented 6 years ago

To put this another way -- what do you think the ceiling is for a feasible keyspace for a rig with 6 GTX 1060's, if I'm willing to run it for 6 months or longer? If I can make some educated guesses on likely words and whittle it down to 100's of billions instead of 10's of trillions, how long would it take this kind of rig to get through that many guesses with the proper software tweaks?

rterwedo commented 6 years ago

What you are asking has a ton of variables, I cannot type it all out (this could be a white paper topic). I suggest benchmarking your rig. I could calc some guesses that are prob pretty close, but none of that matters if the rig does differently.

Benchmark the stock rig, naming just 1 gpu as well as all 6. Look at the number at ~30sec, and again after 15 min. It will prob drop 15%-20%. My guess is an untweaked rig, with 6 cards will get ~2.5x of a single card. Now there are a ton of tweaks to get those numbers increased both so it scales better with more cards (currently it doesn't as is) and the single gpu speeds up. (which will increase it overall).

Do it and see what the numbers say. Then do the math on 6 months etc.

I wrote a post about how to test specs and guess benchmarks for GPUs.

A custom made, tweaked hardware, custom software 8 gpu gtx 1080 ti (OC cpu, OC GPU) with your wallet would prob do ~110k pwd/s based on some benchmarks we did. In 6 months it could do 1.7T combos, at a cost of $14k (assuming you can get parts), electricity of 11,400 kw hrs ($2k-$5k) and lost mining revenue of $14,500 for the CHANCE you picked the right word combo.

winnph commented 6 years ago

OK thanks! This was all very helpful, and hopefully others who find this later will also find it to be helpful.

rterwedo commented 6 years ago

@winnph post your findings as well... =)

505Mike commented 6 years ago

What does this mean is it the wallet difficulty? sha 512 iterations 33k

rterwedo commented 6 years ago

@505Mike Thats an "old" wallet created on a "slower" computer. The password was hashed 33k times. So when trying passwords we have to hash it that many times before we can check if its correct. The higher the number the longer it takes to try each password all else being equal. 33k is low for a core wallet.

505Mike commented 6 years ago

Yeah try to recover a password to a wallet just could remember how long it is and thought that might be a clue

drumamat commented 6 years ago

@rterwedo Hey there! As I said earlier, I was waiting for February to buy a rig, and here we are, in February indeed haha!

=> So I can buy a rig anytime now, there is a computer shop a block away from me with everything I'd need, I'm ready to pull the trigger, I just need confirmation that I'm not throwing money away for no reason.

Only problem is that they don't have any 1070s nor 1080s for sale. 1060s are the best gpus available in the country, no way to get around that without paying a CRAZY premium.

How many of those 1060s should I get? What kind of CPU should I get (I saw in one of your answers that it actually was important)? How about the ram: 8gb is enough?

==> of course I'm looking to spend the least amount of $, and in the first place my objective was to reach between 10k and 30k tries per second, that should be enough to find my password, since once again I know most of it and I'm looking at around 10 billion possibilities (more or less 5 days at 20k tries per second)

Thanks so much for your answer in advance!!!!

rterwedo commented 6 years ago

@drumamat Hey, sorry for the bad news, but as I have mentioned before BTCR does not currently scale well for a rig setup needed for a GPU bound wallet in a large keyspce. In short, you will be wasting money. That being said there are ways around it, but we have spent a long time researching things, and its complicated. More than I can go into here on an issue. I have joked I should write a whitepaper... this is a fun research hobby for us, and there is a lot to it.

Assuming you cannot tweak the hardware/software setups needed to optimize for a rig environment - your best bang for the buck is 1 or 2 (at most) GPUs with a fast CPU (2 cores? 4 cores?) and fast ram, probably on a gaming mobo.

From a hardware standpoint (assuming you can customize the software to your needs) an optimized GPU wallet cracking rig is closer to a machine learning rig than a mining rig. You need a medium to large amount of ram (32gb+), shit ton of fast cores, and fast pascal gpus (1080 tis). This is only 1/3 of the way there... now you have to mess with the software.

My suggestion is borrow a rig from a friend, OR build out a fun gaming comp that you can use (2 gpu max), OR be nice and maybe I can get you some time on one of our research setups. =)

drumamat commented 6 years ago

@rterwedo Thanks so much for your answer! So if I understand well, my only option is to get something more like a gaming PC with tons of RAM and 1 or 2 1080 ti, that are sold out worldwide. So, since I can't buy any 1080, should I just drop the idea, you really think 1060 would be plain useless (I'm thinking 2 1060 with nice CPU and lots of RAM so at least can be used as good gaming rig)? I have been proposed by some miners I've met to use their 1080 rig remotely, but I want to do things locally for safety reasons, and also since I want to try things out ( adjusting token list, and looking for the pswd of 2 other wallets I have of other currencies). Let me know! Thanks for your help!

drumamat commented 6 years ago

I want to give an update because I'm getting surprisingly good results:

I lost patience and ended up buying a machine, more like an average gaming rig as recommended by @rterwedo : CPU i3 8100, 8gb RAM (couldn't afford more), found 1 GTX 1070ti by chance. My wallet difficulty (I didn't know it because I was on an old version of btcrecover) turned out to be very low: 25k SHA-512 (old QT encrypted on a 2009 computer).

====> I am getting a whooping 28k password tries per sec!!!!!!!!! With a single gtx 1070ti !!!!

My settings are: global-ws 19456 local-ws 1024

Now, I'm having an issue that seems to not be covered in other topics: my password count seems to stop after a while (around 100 million pswd/1h ETA). I tried to delete some lines in the token list for a test, and it works well and crushes those pswd at around 28k per second!

Still would like to know why the pswd count seems to slow down after it reaches 20 min eta, which is weird (it does continue, but muuuuuch slower, whereas before this "limit" it seems to be counting around 500k pswd per sec like it should).

Anyone? @gurnec have you experienced that? Any help to make it count pswrd regularly until the end without stoping?

Thanks so much :)

rterwedo commented 6 years ago

@drumamat all that is covered in other areas. Read all the manuals, and other issues. Try to flip things on and off and test your setup.

Please close this issue. There isn't a bug to report.

gregorycarnegie commented 6 years ago

@Chococat & @rterwedo how were you able to get that rate? I'm only getting 4kP/s on my 1080ti.

winnph commented 6 years ago

Probably has to do with wallet difficulty? Maybe cpu differences, too, and system memory speed differences?

Schnitzengruben-CN commented 2 years ago

How can i reduce lines and typos in my token, i already know 99% of my password, somebody help me 🤭

Schnitzengruben-CN commented 2 years ago

Besides, I'm using a cpu not gpu

ipensatori commented 2 years ago

How can i reduce lines and typos in my token, i already know 99% of my password, somebody help me 🤭

It's not clear what the problem is that you are experiencing, can you try to clarify please perhaps with an example?

Definitely try investing in a GPU, even one for a couple hundred dollars will result in a massive performance increase and save you a lot of time.

Schnitzengruben-CN commented 2 years ago

I tried cracking a wallet, after a few minutes i got an error message : out of memory Notice: the __no-dupchecks option will reduce memory usage at the possible expense of speed Interrupted after counting 158800000 passwords

ipensatori commented 2 years ago

yes, add the "--no-dupchecks" parameter to your command line and you shouldn't get the memory error. you really want to get a GPU to help you out here, with a decent card you can do 158 million passwords in about two hours.

Schnitzengruben-CN commented 2 years ago

Thanks for the tip!

On Fri, Feb 11, 2022 at 12:44 AM ipensatori @.***> wrote:

yes, add the "--no-dupchecks" parameter to your command line and you shouldn't get the memory error. you really want to get a GPU to help you out here, with a decent card you can do 158 million passwords in about two hours.

— Reply to this email directly, view it on GitHub https://github.com/gurnec/btcrecover/issues/210#issuecomment-1035649143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVGSCGH7WQXCHR2BQZLHWDU2REWDANCNFSM4EJSOMJQ . You are receiving this because you commented.Message ID: @.***>

ipensatori commented 2 years ago

Yeah sure I can help you out, and hopefully get you sorted.

email me: info@ipensatori.com

Schnitzengruben-CN commented 2 years ago

Awesome, thanks!

On Fri, Feb 11, 2022 at 1:13 AM ipensatori @.***> wrote:

Yeah sure I can help you out, and hopefully get you sorted.

email me: @.***

— Reply to this email directly, view it on GitHub https://github.com/gurnec/btcrecover/issues/210#issuecomment-1035666761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVGSCFYWKLX4JIRMSWWDTLU2RIBTANCNFSM4EJSOMJQ . You are receiving this because you commented.Message ID: @.***>

Schnitzengruben-CN commented 2 years ago

Awesome! Thanks