1

I have ended up wiping my ledger nanao S during test (thoroughly stupid I know) and I am left with 23 (!) seed words and a passphrase. I understand that I should have both backed up my wallet, and made sure of my seed words. I was looking into a program (in python due to there not being too many combinations) that could brute force it due to me knowing that I had written them down in order, just having missed a word, (pasted here due to the massive size due to the size of the word list)

So how would I go about brute forcing it through python, what I have now can (as far as I can see) will give me all of the valid mnemonics, but from there how would I automate the collection of private keys from a bip-39 generator, and the checking of funds in them?

(edit) I know the order of the words, just not where the missing one is, Ive tried to manually sift through the combinations for if the missing word was the last one

(further edit) Im using an offline version of this site for turning the mnemonics into private keys iancoleman.io/bip39 but unfortunately I dont know how to canabalise the code or interact with it with python. from there I was going to use a tool like this github.com/gurnec/btcrecover to find the wallet with btc in it. At least thats what I have so far.

  • Do you not know the order of any of the words in the list, or do you just not know the position of the missing one? – Pieter Wuille May 9 '18 at 23:14
  • I know the order of the words, just not where the missing one is, Ive tried to manually sift through the combinations for if the missing word was the last one. – JamieDimon May 9 '18 at 23:19
1

There are 2048 words in the BIP39 list, there are 24 possible positions for your missing word.

You need to try 2048 x 24 = 49,152 combinations.

For each one, you need to generate a private key + public key and check whether addresses generated from that have any unspent bitcoin associated with them. You can work with a pruned blockchain and probably further prune based on the known date-ranges of your most recent transactions.

Superficially at least, it seems feasible for an automated process to do this in reasonable time (i.e. less than years).

Having tried all words in one position you should have a reasonable idea of how long this will take.

  • Due to the way that the mnemonic has a checksum, I only needed to sift through 1/256 of the combinations and thats what the above program does, I was just curious if there were tools to do this already, or if I was overly complicating it. I had an offline version of this site for turning the mnemonics into private keys iancoleman.io/bip39 but unfortunately I dont know how to canabalise the code or interact with it with python. from there I was going to use a tool like this github.com/gurnec/btcrecover to find the wallet with btc in it. – JamieDimon May 11 '18 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.