Bitcoin Forum
August 17, 2017, 09:09:31 AM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to manually decrypt Electrums encrypted seed and xprv from wallet file  (Read 243 times)
adaseb
Legendary
*
Offline Offline

Activity: 1330



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[
                             
WIN A SHARE OF 5BTC EVERY WEEK ON LEADERBOARD
FREE 1,000 mBTC daily for LuckyJack winners
[
           
]
1502960971
Hero Member
*
Offline Offline

Posts: 1502960971

View Profile Personal Message (Offline)

Ignore
1502960971
Reply with quote  #2

1502960971
Report to moderator
1502960971
Hero Member
*
Offline Offline

Posts: 1502960971

View Profile Personal Message (Offline)

Ignore
1502960971
Reply with quote  #2

1502960971
Report to moderator
Satoshi is no god. He did not come down from the mountain with 10 golden rules engraved in stone for no one to question.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1502960971
Hero Member
*
Offline Offline

Posts: 1502960971

View Profile Personal Message (Offline)

Ignore
1502960971
Reply with quote  #2

1502960971
Report to moderator
1502960971
Hero Member
*
Offline Offline

Posts: 1502960971

View Profile Personal Message (Offline)

Ignore
1502960971
Reply with quote  #2

1502960971
Report to moderator
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: 1330



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[
                             
WIN A SHARE OF 5BTC EVERY WEEK ON LEADERBOARD
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!