Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am puzzled with a question that seems to be based on theory.

If there is a collision resistant hash function (Since it is not possible for a hash function to be collision free this is a theoretical question)

Would it be true to say that there are no two unique hash values for all possible messages x and x' where x ≠ x’?

I feel like this would be true....can anyone back me up on this?

share|improve this question
up vote 17 down vote accepted

As you correctly observed, for any function $H\colon \{0,1\}^\ast\to\{0,1\}^n$ collisions must exist, simply because $\{0,1\}^\ast$ is an infinite set and $\{0,1\}^n$ is finite. One could define "hash function" to mean something else (e.g., taking only a bounded input length), but this is non-standard (and of questionable value).

However, the term "collision resistance" denotes something different from what you seem to think: It just means that collisions are hard to find, in a computational sense. We expect from a good hash function that nobody is able to find two inputs that lead to the same hash value, but we do not care about their abstract existence, which is a necessary evil.

Thus, no: Collision resistance does not mean that $H(x)\neq H(x')$ for any $x\neq x'$. It rather means that practically, nobody should ever find $x\neq x'$ with $H(x)=H(x')$.

share|improve this answer
6  
And here, "nobody should ever find" means "it would take a very, very long time", because given enough time and computing power, you can find just about anything. Except things that don't exist, like my social skills. – QPaysTaxes 6 hours ago
4  
To put it simply, "collision resistant" means there's no way of finding collisions that is faster than simply guessing at random. – Mark 2 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.