Bitcoin Forum
October 18, 2017, 05:26:55 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to manually decrypt Electrums encrypted seed and xprv from wallet file  (Read 343 times)
adaseb
Legendary
*
Offline Offline

Activity: 1386



View Profile
May 18, 2017, 06:49:46 AM
 #1

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.

FORTUNEJACK.COM[
                            
9 BTC WELCOME PACK FOR 1ST 5 DEPOSITS
FREE 1,000 mBTC daily for LuckyJack winners
[
          
]
1508347615
Hero Member
*
Offline Offline

Posts: 1508347615

View Profile Personal Message (Offline)

Ignore
1508347615
Reply with quote  #2

1508347615
Report to moderator
1508347615
Hero Member
*
Offline Offline

Posts: 1508347615

View Profile Personal Message (Offline)

Ignore
1508347615
Reply with quote  #2

1508347615
Report to moderator
1508347615
Hero Member
*
Offline Offline

Posts: 1508347615

View Profile Personal Message (Offline)

Ignore
1508347615
Reply with quote  #2

1508347615
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
btchris
Hero Member
*****
Offline Offline

Activity: 672

a.k.a. gurnec on GitHub


View Profile WWW
May 29, 2017, 01:09:13 AM
 #2

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
adaseb
Legendary
*
Offline Offline

Activity: 1386



View Profile
June 02, 2017, 11:23:22 PM
 #3

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

FORTUNEJACK.COM[
                            
9 BTC WELCOME PACK FOR 1ST 5 DEPOSITS
FREE 1,000 mBTC daily for LuckyJack winners
[
          
]
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!