john
john copied to clipboard
Limit ethereum2john.py warning to presale wallets
We support 3 wallet sub-types and print a warning that the "hashes" could reveal the private key for all 3, whereas we probably only need to do that for 1 out of 3 (presale), see https://github.com/openwall/john/issues/3130#issuecomment-756786655
sys.stderr.write("WARNING: Upon successful password recovery, this hash format may expose your PRIVATE KEY. Do not share extracted hashes with any untrusted parties!\n")
cc: @Chick3nman
So the idea here is that the 2 non-presale wallet hash formats do not contain the 128 bit IV and are therefore not dangerous once the password has been recovered? That seems acceptable to me, though I do have to question how the IV is derived/generated in the first place. If it's random, this is fine and I have no concern. If it's anything but random then we may need to evaluate how hard it is to arrive at the original IV.
@Chick3nman Yes, that's the idea, and that's the concern/drawback. I think IV is meant to be cryptographically random, yet it also isn't meant to be the only thing protecting the private key, so it is indeed possible that some code creating or (re)encrypting these wallets uses poor IVs.
What about a compromise where for presale we state that the hash IS dangerous but then for the other 2 we state that the hash MAY be dangerous due to containing enough encrypted data from the wallet itself that, should the IV become known, an attacker can possibly steal funds.
Our current message does say "may" as it is, so I'm not sure the distinction will do very much really.