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 want to know if having a 8-byte hash value is better than 16-byte hash value for use within hash trees.

My mind tells me that the shorter the hash value, the better. But doesn't a smaller hash value make it easier to invert? More strings would lead to the same hash value.

I guess this is very opinion-based, but I'd like to hear different reasoning for your answers.

share|improve this question
Cryptographically secure hash functions typically have an output length of 160 bits or greater. Are you referring to non-cryptographic hash function used for hash trees? – Henrick Hellström Jul 13 '13 at 19:53
Yes, I am. Sorry for the miswording. – Thomas Gouder Jul 13 '13 at 19:56
up vote 3 down vote accepted

The shorter the hash value the less effort for the attacker to brute force it. If the output is 16bytes then the attacker must spend $2^{128/2}$ "time" to find a collision. If it was 8bytes it would need $2^{64/2}$

share|improve this answer
You sir, just answered my question. Awesome! – Thomas Gouder Jul 13 '13 at 20:05
I'm glad you have your answer, but I'm not so sure if I get the question. – Maarten Bodewes Jul 13 '13 at 21:32

Your Answer


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.