openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
9.62k stars 2.04k forks source link

Support for BIP-38 Password Encrypted Paper Wallets #3145

Open kholia opened 6 years ago

kholia commented 6 years ago

References,

The brute38 projects has support for Bitcoin, Bitcoin Cash plus over 170+ other different address styles.

Example,

prodnet commented 5 years ago

hello, Any update ? Thx.

kholia commented 5 years ago

It's pretty low in the "priority list".

sigkill commented 2 years ago

You would need to account for two variant BIP-38 encryption processes - EC Multiply and non Multiply. Ran into a weird issue here: https://github.com/xeroc/python-graphenelib/blob/master/graphenebase/bip38.py

From: https://en.bitcoin.it/wiki/BIP_0038

Proposed specification Object identifier prefix: 0x0142 (non-EC-multiplied) or 0x0143 (EC-multiplied). These are constant bytes that appear at the beginning of the Base58Check-encoded record, and their presence causes the resulting string to have a predictable prefix.

Ran into this because I was looking at a tool that doesn't account for EC multiplied encrypted private keys, whereas it appear s that btcrecover DOES. So you would need to have some logic to account for an EC multiplied encrypted private key, usually with the 8 byte salt etc... I don't know enough YET on how to implement this, but am learning.

sigkill commented 2 years ago

IMHO this issue should get escalated because there are a lot of people with locked wallets, and john would be much faster for resolving these issues than hashcat due to the CPU bound scrypt functions.

sigkill commented 2 years ago

Somewhat helpful: https://github.com/maxweisspoker/pybip38