Join GitHub today
[Feature Request] Crypto hardwallet (BIP39 passphrase recovery) - using PBKDF2-HMAC-SHA512 #1546
Hardware wallets for cryptocurrencies generally use BIP39 / BIP44 / BIP49 for the deterministic generation of keys given a master key (stored as a mnemonic for easy restoration). They also have an option for the usage of passphrases - which each generate a new key - for plausible deniability. However, if you don't use a passphrase in a while, you are liable to forget it. Like me.
If you have the seed words (the mnemonic), the target address, and knowledge of the path, using a program like hashcat with a password candidate list could recover the password. I've been working to modify hashcat myself, but figured I'd try asking here as a feature request.
I'm happy to donate a significant amount to this project to help make it worth your time.
The required changes can be broken down as follows:
2.) For my specific use case the target address is m / 49' / 0' / 0' / 0 / 0. You could allow it to be more general by allowing people to specify a path or even a range of paths.
the format of the path is "m / purpose' / coin_type' / account' / change / address_index"
Read more here: https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki
Example test vector:
Extra (not visible to user):
A new set of test vectors can be generated here:
I assume that this involves elliptic curve cryptography that needs to be done on GPU ? not sure if something like this is easy to implement (feasible?)
I'm also not sure how often it happens that you exactly know all the mnemonic words, but just do not know the optional password. I think this is kind of a rare situation (for the time being).