by rix0r · 11y ago · 0 comments
Is it to protect against bruteforcing? What if the hash is made expensive to compute?
If fear of collisions is the reason you don't use a crypto hash function, then you are using a broken hash function.
A hash doesn't satisfy all the requirements of the problem, but it's not because of collisions.
This fact applies to any hash function even those you don't consider broken.
As optimiz3 already pointed out, a critical property of crypto hash functions is extreme difficulty in finding collisions, let alone meaningful ones. So if a hash function passes muster cryptographically, then we can use it to practically assert equality of inputs.
In other words, it's so improbable that we treat it as if it's impossible. When that assumption is not safe to make anymore, that's when we upgrade to a new hash function.
If a hash function is cryptographically secure, it has the property where finding collisions is infeasable, which makes it suitable for evaluating equality.
This is why cryptographic hash functions are used as a proxy for passwords in order to avoid storing the plaintext.