I wonder how safe it is to hash a bunch of MD5 hash values ββto create a new hash, or will it increase the chance of collisions in any way.
Background: I have several files with dependencies. Each file has an associated hash value, which is calculated based on its contents. Let us call this hash value "single file". In addition to this, the file must also have a hash value that includes all dependent files, the hash value of "multi-file".
So the question is: can I just take all the MD5 hash values ββof one dependent file, merge them, and then calculate the MD5 from the concatenated values ββto get the hash value of the multi-file. Or this will result in an MD5 hash file, which is more likely to collide than if I combined the contents of all the dependent files.
Alternatively, is it possible to map the hash values ββof the same file together to generate a multi-factor hash value, or can this lead to more conflicts?
Janick bernet
source share