# Best hash size for hash trees

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.

-
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

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