Electrum support - aes_decrypt (sha256 (sha256 ($pass), $data)
#1
Hello,

As you can guess, I have an Electrum wallet whose password I lost. I was considering several options and figured the most efficient way of throwing money at the problem right now should be asking someone to expand hashcat with an Electrum wallet option. I'm not sure of what kind of improvement can be obtained using OpenCL, but I hope for more than an order of magnitude (it should be possible to do around one million tests per second using the code below (or is it 100k/s? I only get 100k/s while the internet is full of people saying they can get 10x that).

Here is a the most optimised cracking function I could find:

Code:
       for count, password in enumerate(passwords, 1):
           key  = l_sha256( l_sha256( password ).digest() ).digest()
           seed = l_aes256_cbc_decrypt(key, iv, part_encrypted_seed)
           # If the first 16 bytes of the encrypted seed is all lower-case hex, we've found it
           for c in seed:
               if c > b"f" or c < b"0" or b"9" < c < b"a": break  # not hex
           else:  # if the loop above doesn't break, it's all hex
               return password if tstr == str else password.decode("utf_8", "replace"), count

https://github.com/gurnec/btcrecover/blo...s.py#L1562

Basically two sha256 rounds and an aes cbc decode operation.

Anyone interested in this?


Messages In This Thread
Electrum support - aes_decrypt (sha256 (sha256 ($pass), $data) - by uaioaqo - 06-26-2017, 08:05 PM