Re:Announcing the first SHA-1 collision
by lisper on Thursday February 23, 2017 @01:07PM
(#13716134)
One of the requirements for a hash to be cryptographically secure is that all possible values are equally likely. So yes, it is possible (in fact trivial) to construct a hash of the sort you describe, but such a hash would not be cryptographically secure to begin with.
[ Parent
| on HN ]
Re:Announcing the first SHA-1 collision
by Dylan16807 on Thursday February 23, 2017 @07:48PM
(#13719675)
It's easier to use and to reason about a uniform hash, but you can design a secure system with a non-uniform hash.
I'd be willing to bet that an altered version of SHA3-256 that replaces four bits in the middle with length%16 is better for most purposes than SHA256, despite being non-uniform.