1

I know that hash collision is possible with large number of files. But i want to know if 2 files can share "many , different" types of hash.
I have 2 hashes SHA256 and BLAKE256 (Both will result in different hashes)
For example:
File A have SHA256 hash : jhsj8sd87a89sihd8d78a7... etc.
And BLAKE256 : js8us8d8saa621g2h34hg... etc.
So what is the probability that a File B will have the same SHA256 and BLAKE256 when hashed.
And will chance of collision decreases with more hashes, Say 5.
Note : Both the files A and B have exactly same size but different content.
I have read on internet about hash collision with 2 hashes. But here is the case of 4 hashes. 2 of File A and 2 of file B.
And both types are different, one is SHA256 and one is BLAKE256.

Akash
  • 19
  • 3
  • Please share more details. How is this related to programming? – Nico Haase Aug 30 '21 at 15:32
  • 2
    SHA-256 outputs 256 bits and SHA1 will output 160 bits, so they cannot be the same. – Arthur Attout Aug 30 '21 at 15:33
  • Is the question: "Given that two files compute to the same hash code using hashing-algorithm A, does that mean they are more likely to also compute to the same hash code using hashing-algorithm B?" – Jeremy Friesner Aug 30 '21 at 15:34
  • @JeremyFriesner I am asking if given a file A hashes down to a unique BLAKE256 and SHA256. What is the chance that an another file B (with different content) will hash down to the same BLAKE256 and SHA256. – Akash Aug 30 '21 at 15:48
  • @Akash my intuition is that the two probabilities are independent of each other, so if there is an 1/N chance of a collision under BLAKE256 and a 1/M chance of a collision under SHA256, then there would be a 1/(N*M) chance of collision under both protocols simultaneously. I'm not knowledgeable enough about hashing to be certain of my intuition, though. – Jeremy Friesner Aug 30 '21 at 15:52
  • 1
    Btw this question might get more skilled attention at cs.stackexchange.com, since it seems to be more closely related to the theory of hashing algorithms than to practical programming technique. – Jeremy Friesner Aug 30 '21 at 16:00

0 Answers0