bip39-solver-gpu icon indicating copy to clipboard operation
bip39-solver-gpu copied to clipboard

if using 24 seed lenght, is it going to be a problem

Open mtad2002 opened this issue 4 years ago • 7 comments

first of all thanks for this amazing job you have done.

i want to use your code to recover a 24 seed wallet, after reading your post on medium I was wondering if 64KB local memory of graphic cards has enough space to work or not?

mtad2002 avatar Jun 19 '20 12:06 mtad2002

yes it shouldn't be a problem. Like I mentioned in my article the biggest consumers of space are the secp256k1 multiplication lookup table and the bip39 wordlist itself. The length of the mnemonic doesn't matter too much in terms of space used.

johncantrell97 avatar Jun 22 '20 12:06 johncantrell97

Nice job and thanks for your help.

Wanted to as if it will work for 3 random missing words in a 24 seed wallet?...my calculations are of 34772055000000 possibilties and with 2 nVidia 2080Ti could generate ~24 billion seeds per day...still will take a couple of years..but is it worth trying?

thanks

marfalz avatar Jul 15 '20 12:07 marfalz

if you know the position of the words (e.g. words 1, 7, and 15 are missing) then it's only 2^33 (~8.5 billion) possibilities and can be cracked in a couple of minutes.

if none of the positions of the unknown words are known then you will have to check each 2^33 possibilities for all 2024 possible positions for a total of roughly 2^44 possibilities. more exactly it is: 17,386,027,614,208 or roughly 17 trillion possibilities.

I was able to check 1 trillion possibilities in 1 day with the large rented gpu pool. So 17 trillion could be done with the same setup but would be pretty expensive. I also realized some easy to make optimizations in the code since then so it could also be sped up a bit more.

If you could do 24 billion per day it would take at most 708 days and on average 354 days to complete.

Whether or not it is worth trying comes down to how much money is at stake. If the cost to recover the funds is less than the amount of funds then it's probably worth it.

johncantrell97 avatar Jul 15 '20 12:07 johncantrell97

infact i dont know the positions and yes not doing the same setup that you made will work with my video cards. I worked the maths wrong as i worked 2048* 24* 2048* 23* 2048 *22/3 thats why i got 34trillion...so i think its worth ago...also instead of checking the 3 missing words at once I could try to insert 1 word at atime in 22 different positions and will take less if I happen to find 1 corect word from first 100 words i try...also there is a tutorial how to make the program works?...thanks

marfalz avatar Jul 15 '20 13:07 marfalz

i don't think it makes any difference if you try one word in each of the 24 positions or just iterate through all of them in order. You still need to try each word in each position with all other possible words in the other 2 positions.

the code currently isn't configured to try words out of order though. it always assumes the missing words are the last N words (because it was built to solve the giveaway) and it would take a bit of work to adjust it to support trying missing words in different positions.

johncantrell97 avatar Jul 15 '20 14:07 johncantrell97

ok I understand fair enough...but should i gain same speed if i use similar programs? Then for 2 missing words is 2^22 x 2024? or got the match wrong again ? :) as its comes 8489271296 but with 2 random missing words its supposed to try 1157627904 combinations which is 7.4 billions less

marfalz avatar Jul 15 '20 15:07 marfalz

i am still wondering how to run it, did make it build. and am able to start, but got errors, how to start, please explain. where the bip39 wordlist? and put the address.? thanks a lot.

dextronomous avatar May 25 '21 21:05 dextronomous

@johncantrell97 thanks for this code, thought me a great deal about both rust and opencl.

With regards to the OP question, when trying the code with any mnemonic longer than 128 chars (24 words for example), the resulting seed is wrong. I see the work done with the ipad/opad which is 128 byte long, can you give me a pointer on how to adapt the code to support longer mnemonics?

itayw avatar Jan 26 '22 12:01 itayw