1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – Henrick Hellström Jul 13 '13 at 19:53
  • $\begingroup$ Yes, I am. Sorry for the miswording. $\endgroup$ – Thomas Gouder Jul 13 '13 at 19:56
3
$\begingroup$

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}$

$\endgroup$
  • $\begingroup$ You sir, just answered my question. Awesome! $\endgroup$ – Thomas Gouder Jul 13 '13 at 20:05
  • 2
    $\begingroup$ I'm glad you have your answer, but I'm not so sure if I get the question. $\endgroup$ – Maarten Bodewes Jul 13 '13 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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