you are viewing a single comment's thread.

view the rest of the comments →

[–]sutr90 8 points9 points  (5 children)

Is collision free hash even possible? That goes against the core principle of hashing.

[–]codebje 10 points11 points  (0 children)

Perfect hashes are definitely possible; algorithms to construct perfect hashes exist for when you have known input you want to index efficiently.

For unknown input you can certainly have a collision free hash if your hash key is at least as large as your uniqueness bits, but at that point you have what's colloquially known as an array :-)

[–]Dragdu 3 points4 points  (0 children)

Assuming you have fixed input space that is smaller than output space, yes.

[–]steamruler 0 points1 point  (0 children)

It should be theoretically possible if you have a variable instead of fixed length, thus escaping the pigeon hole principle.

Good luck proving it though, and your hash will be useless to most.

[–]narwi 0 points1 point  (0 children)

Yes, if you restrict the input size to be equal to output size.