MD5 hashes always unique?

  • Thread starter Thread starter Rajoo Sharma
  • Start date Start date
Rajoo Sharma said:
I am wondering if MD5 hashes always unique?

No, they are not unique. It is conceivable that a second document could
have the same hash as a given document. However, it is considered
"computationally unfeasible" to purposely craft a new document in such a way
that it will have a given specific hash (such as mimicking the hash of a
different document).
What are the use of these hashes other than crypting and decyping
information?

Hashes are NOT used to encrypt and decrypt information. They are used
to build "signatures", i.e., cryptographicaly robust summaries that
"represent" a document, in the sense that it is unfeasible to build a second
document with the same hash (summary), and therefore the hash can be used to
detect any tampering done on the original document.
 
Rajoo Sharma said:
I am wondering if MD5 hashes always unique? Like unique in the whole
world! What are the use of these hashes other than crypting and
decyping information?

Firstly, as others noted, a hash function's output has fixed length, but
takes arbitrary strings as input, so naturally there will be collisions,
but the odds are so small that for a secure hash function you can
consider this effectively impossible.

But that takes us to the second point about MD5: It is not secure.
Collisions can be constructed for it easily. You should use a hash
function from the SHA-2 family (like SHA-256) or RIPEMD160, for which
such a construction is currently not possible.

Although hash functions can be used to encrypt stuff, this is rarely
done. Rather you would use cipher algorithms like AES, because they are
more flexible (see cipher modes) and usually also faster.

In the future, you should ask cryptography-related questions in
sci.crypt, where some knowledgable people from the cryptographic
community hang around.


Greets,
Ertugrul.
 
Rajoo Sharma said:
Hello everybody,

I am wondering if MD5 hashes always unique? Like unique in the whole

Of course not. Any N bit hash only has 2^N possible outputs. From the set
of (2^k)*(2^N) messages which are N+k bits, on average 2^k of these will
have any particular value of hash.
 
Ben said:
Of course not. Any N bit hash only has 2^N possible outputs. From the
set of (2^k)*(2^N) messages which are N+k bits, on average 2^k of these
will have any particular value of hash.
Thanks :)
 
Alberto said:
No, they are not unique. It is conceivable that a second document
could have the same hash as a given document. However, it is considered
"computationally unfeasible" to purposely craft a new document in such a
way that it will have a given specific hash (such as mimicking the hash
of a different document).


Hashes are NOT used to encrypt and decrypt information. They are
used to build "signatures", i.e., cryptographicaly robust summaries that
"represent" a document, in the sense that it is unfeasible to build a
second document with the same hash (summary), and therefore the hash can
be used to detect any tampering done on the original document.
Thanks it helped me alot :)
 
Back
Top