Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> One input maps to one output and by knowing the output I cannot find the input nor I can produce two inputs that map to the same output.

> Now, those attacks basically violate the principle that one input maps to one output

That’s not really… the principal. That’s an impossible desire. You simply cannot fit a larger set in a smaller set. Any function that transforms an arbitrary set of data into a smaller set of data is definitionally going to have collisions.

A flawless hashing function that transforms an arbitrary amount of data into a fixed amount of data is subject to an infinite number of collisions for every given output.

The problem is not that there are collisions, it’s mathematically impossible for there not to be. The problem is the speed at which they can be found. If you can find them quickly enough, the potential exists in finding malicious inputs in the mix.



> You simply cannot fit a larger set in a smaller set.

Just restating this in a different way: hash functions are surjective.


That's not what this means and in fact they might not be. It is possible for a hashing functions to have no input that leads to a particular hash (it would still be a hashing function).


I believe you mean “hash functions are not injective”.


Yes, thanks for catching that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: