iancoleman / bip39

A web tool for converting BIP39 mnemonic codes
https://iancoleman.io/bip39/
MIT License
3.53k stars 1.44k forks source link

Brute-force recovery of passphrase #359

Closed svrnhdl closed 5 years ago

svrnhdl commented 5 years ago

Hi,

I am trying to recover a wallet. I was setting up a new Ledger wallet with seed + passphrase but apparently, the passphrase was wrong when doing the input into the Ledger. I now have a small amount on a Ledger wallet that I can't access.

I have the 24-word seed phrase and I have a passphrase that I wrote down. I figured it should be possible to brute-force the passphrase from what I have written down. I can create a list of 'typos' using btcrecovery but there is no good way to find which one has the coins on derivation m/84.

I do have the zpub and the first derived public address.

So basically, I need to write a small python script that loops over passphrase inputs, using the seed that is 100% correct and derive the account extended public keys (on m/84) to compare to the one I have to figure out the passphrase I used.

I've been looking into the source code here to see if I can do this, but so far I'm a bit lost on how to start. Could anyone confirm if it is indeed possible to do what I described using this source code? Could anyone point me in the right direction to start?

I'm still not quite sure how I managed to mess this up but I suppose it's a good lesson and fortunately it's not a huge amount but I'd still like to recover it... Could be a good programming exercise. :)

Many thanks in advance, Best,

iancoleman commented 5 years ago

Sorry this is not the place for providing user support. Try stackexchange or reddit.