Author

Topic: How to manually decrypt Electrums encrypted seed and xprv from wallet file (Read 988 times)

legendary
Activity: 3710
Merit: 1586
 I'm not the developer. Create an issue on that github repo to get the developer's attention.
newbie
Activity: 3
Merit: 0
You need the password to decrypt it. If you don't know the exact password but have some idea of what it might be you can attempt to bruteforce it. That means to try various combinations of passwords until you hit the right one. You can bruteforce it using btchris' script given below or hire someone to do it for you:

https://github.com/gurnec/btcrecover

However you must have at least some idea of what the password might be for bruteforcing to be feasible.


I also attempted to use the decrypt_electrum_seed code from GitHub but kept getting the messages unexpected seed_version: 13 and KeyError : 'seed'.  The same error is produced by wallets that have a password and wallets that don't have a password so do you have any idea what else might be causing these errors?

I think the file mnemonic.py on the decrypt_electrum_seed page possibly contains the words the code uses to try and decrypt the wallet but I could be wrong.  If this is the case then the problem may be in the fact that some of the seed words Electrum generates when new wallets are created are not contained within the mnemonic.py list of words?

But the code might be using a more up to date list than the one shown in mnemonic.py and the problem might be being caused by something else.
legendary
Activity: 3710
Merit: 1586
You need the password to decrypt it. If you don't know the exact password but have some idea of what it might be you can attempt to bruteforce it. That means to try various combinations of passwords until you hit the right one. You can bruteforce it using btchris' script given below or hire someone to do it for you:

https://github.com/gurnec/btcrecover

However you must have at least some idea of what the password might be for bruteforcing to be feasible.
newbie
Activity: 5
Merit: 0
I have tried this but receive an error message: KeyError: 'seed'

If anyone can help me decrypt my Electrum 2.7.9 wallet I will be willing to pay a reward.
I do have the original wallet file but unfortunately (and stupidly) do not have seed or password!


legendary
Activity: 3808
Merit: 1723
1. Decode the base-64 into binary.
2. Remove the first 16 bytes, they are the IV. The rest is the cyphertext.
3. Derive the encryption key as sha256(sha256(convert_to_utf8(password))).
4. Decrypt they cyphertext with AES-256 in CBC mode using the key, IV, and cyphertext from above.
5. Remove the trailing PKCS7 padding.

This script will do so for you from a wallet file: https://github.com/gurnec/decrypt_electrum_seed

Hello

Thank you for this
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
1. Decode the base-64 into binary.
2. Remove the first 16 bytes, they are the IV. The rest is the cyphertext.
3. Derive the encryption key as sha256(sha256(convert_to_utf8(password))).
4. Decrypt they cyphertext with AES-256 in CBC mode using the key, IV, and cyphertext from above.
5. Remove the trailing PKCS7 padding.

This script will do so for you from a wallet file: https://github.com/gurnec/decrypt_electrum_seed
legendary
Activity: 3808
Merit: 1723
Looking at the wallet file.

If a password is set, how would one be able to decrypt the keystore seed and keystore xprv?

From what I understand you need to convert into base64 first and then decrypt with des3. However doing so it returns a bunch of random ASCII weird characters which aren't the correct seed.
Jump to: