Skip to content

Instantly share code, notes, and snippets.

@ashgkwd
Created February 18, 2020 05:48
Show Gist options
  • Save ashgkwd/0129d944b69bf6cd845158c4ef6ee6f3 to your computer and use it in GitHub Desktop.
Save ashgkwd/0129d944b69bf6cd845158c4ef6ee6f3 to your computer and use it in GitHub Desktop.
import hashlib
passwd = "mywalletpassword"
salt = "summersaltstringwhichislong"
p = 1
r = 8
n = 262144
dklen = 32
dec_key = hashlib.scrypt(bytes(passwd, 'utf-8'), salt=bytes.fromhex(salt), n=n, r=r, p=p, maxmem=2000000000, dklen=dklen)
print(dec_key)
@ashgkwd
Copy link
Author

ashgkwd commented Feb 18, 2020

If you know password of your wallet, you can export keystore json file. This file will have p, r, n, dklen and salt parameters needed to run this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment