4 ms·
Not necessarily. The hash could have been generated with something other than javascript. In fact because functions like sha256 are iterative it's possible to
by AdamJacobMuller 5y ago
Not necessarily. The hash could have been generated with something other than javascript.
In fact because functions like sha256 are iterative it's possible to hash a password which is longer than the RAM in a system. Technically possible to hash a password which is longer than storage in a system too, if you don't care about storing the password.
- kzrdude 5y agoso the puzzle author could "cheat" and just present a 256-bit number and not know the preimage at all, which would be a fun shortcut.
- mulmen 5y agoHuh, I realize I don’t know the answer to this seemingly simple question. Are all 256 bit vectors valid sha-256 hashes?
- talkin 5y agoYes. In a secure hash function, all output bits are without bias. So all combinations exist.
- kzrdude 5y agoSounds like the ideal. Can we prove that sha256 has this property?
- thaumasiotes 5y agoProbably not. The point of a cryptographic hash function is to be resistant to analysis. Can we prove it has the much simpler property that toggling one bit of the input will, on average, toggle half of the bits in the output? (Probably not.)
- AdamJacobMuller 5y agoDepends how you define "prove" If you calculate a billion sha256 hashes and look at the results you'll have an even enough distribution to say it's proven, but, it's not "mathematically" proven.