A couple of simple Python scripts that help with recovering funds from "broken" MultiBit HD and MultiBit Classic wallets due to the "Password did not unlock the wallet" issue
Based upon the incredibly useful "decrypt_bitcoinj_seed" by Christopher Gurnee
Some of these scripts extract unencrypted Private Keys from your Wallet file or Key Backup. If you are uncertain whether or not your computer is completely free of malware, you should not run this nor any other program that can affect your finances.
Even if you are certain you are currently free of malware, it is strongly advised that you not store unencrypted private keys to your hard drive.
Just download the latest version from https://github.com/HardCorePawn/multibit_recovery/archive/master.zip and unzip it to a location of your choice. There’s no installation procedure for the actual Python scripts, however there are additional requirements below.
NOTE: wll probably not work properly with Python 3... make sure you're using Python 2!
Windows x86 MSI installer
for the 32-bit version of Python, or the Windows x86-64 MSI installer
for the 64-bit one. If you're unsure which one is compatible with your PC, choose the 32-bit one.cmd
and click OK).C:\Python27\Scripts\pip install protobuf pylibscrypt bitcoin
, and then press the Enter
key.As suggested by Matthew Pilsbury you can try:
To install dependencies:
pip install protobuf pylibscrypt bitcoin
To execute:
python2 find_unspent_multibitHD_txes.py mbhd.wallet.aes
Copy your "broken" MultiBit HD wallet file (%appdata%/MulitBitHD/mbhd-\
python find_unspent_multibitHD_txes.py mbhd.wallet.aes
Enter your wallet password and a list of Transactions in the wallet UNSPENT pool should be output along with Addresses and Amounts.
The script will then look through the first 1000 addresses/keys on the m/0'/0 (Receive Addresses) and m/0'/1 (Change Addresses) Derivation Paths. If it there is a match for an address from a transaction in the UNSPENT pool, it will dump the Address and Private Key (in "WIF Compressed" format).
Please note that some MultiBitHD wallet files may take several minutes to decrypt (if you don't have one of the optional libraries installed).
Find your Key Backup (%appdata%/MultiBit/multibit-data/key-backup/multibit-\
python decrypt_multibit_classic_keys.py multibit-\<DATETIMESTAMP>.key
Enter your wallet password and an unencrypted list of all your private keys should be output. Go and import them into another wallet like Electrum ;)
If you don't have a Key Backup, then use this script to extract the keys directly from the .wallet file. Copy your multibit.wallet file to the folder where you extracted multibit_recovery scripts. Open a commandline at the folder where you extracted the scripts and then run the script:
python decrypt_multibit_classic_walletkeys.py multibit.wallet
Enter your wallet password (if wallet was password protected) and an unencrypted list of all your Public and Private Keys should be output. Go and import them into another wallet like Electrum ;)
When a password is first added to a wallet, MultiBit Classic would encrypt any unencrypted backups (in the 'wallet-unenc-backup' folder) using the new wallet password. If you have such a .wallet.cipher file, you can use this script to decrypt the .cipher file and then extract the keys. Open a commandline at the folder where you extracted the scripts and then run the script:
python decrypt_multibit_classic_wallet_cipher.py multibit.wallet.cipher
If you're not comfortable with the commandline, you can actually use "drag and drop" (Tested on Windows). Simply drag and drop the .key or .wallet or .cipher file on the appropriate .py script file and it should automatically launch the script.
Borrowed heavily from the incredibly useful "decrypt_bitcoinj_seed" by Christopher Gurnee
mocaccino - for helping me work out the BIP32 Derivation Path stuff
Third-party libraries distributed with multibit_recovery include:
aespython, please see aespython/README.txt for more information
bitcoinj wallet protobuf, please see wallet.proto for more information