# Are collision-resistant hash functions even possible? [see description] [duplicate]

Surely there can be no real collision resistant Hash function since hash values are of finite size which means there are finitely many of them, but there are an infinite number of messages we could hash, which means (using the pigeon-hole principle) that some messages must lead to the same hash value.

## marked as duplicate by otus, e-sushiApr 24 '16 at 8:20

Collision resistance relates to how difficult it is to find a collision, not the total lack of collisions. In other words, a hash function $H(x)$ is collision resistant if and only if all attackers given reasonable computational resources (probabilistic polynomial algorithms) have only a negligible chance of finding two messages, $m_0$ and $m_1$ such that $H(m_0)=H(m_1)$.