Is double hashing collision resistant?

Double Hashing certainly provides more security than just 1 hash level, but does that mean it is more collision resistant? This question is in a more mathematical form: If H is a collision-resistant hash function, then H (H (x)) for some x still collision-resistant?

+3


source to share


2 answers


In fact, it can be even worse for collision resistance, because the output of the inner H is limited.

For example, take a function H that maps from {0,1} n → {0,1} n . (We restrict x to {0,1} n to make it easier to see.) Let's say that a, b are from {0,1} n and c = H (a) = H (b). This means that H (c) = H (H (a)) = H (H (b)). When you encounter the first conversion, you cannot undo it.



If you don't have a collision at {0,1} n then the second transformation is done in the same way.

Since we usually talk about hash functions as {0,1} * → {0,1} n, the first transformation involves collisions, and the second transformation can make it even worse.

+1


source


In principle, the reduced hash function H (H (x)) is either less or equally collision resistant, since



  • For the hash function H (x) as there is one collision allowed in every N unique preview image. which means the two hashes are the same and H (H (x)) won't differ.
  • For the hash function H (x) as there is one collision allowed in every N unique preview image. this will also be true for H (H (x)), since H (H (x)) is nothing but H (strings of fixed length). This increases the likelihood of collision.
+1


source







All Articles