What are the chances that two messages have the same MD5 digest and the same SHA1 digest?

前端 未结 5 1784
时光取名叫无心
时光取名叫无心 2021-02-01 12:51

Given two different messages, A and B (maybe 20-80 characters of text, if size matters at all), what is the probability that the MD5 digest of A is the same as the MD5 digest of

5条回答
  •  日久生厌
    2021-02-01 13:13

    If message size is not restricted, the chance approaches 100% asymptotically, as there's an infinite number of possible messages and a finite number of possible hashes.

    (note: edit to question makes this less relevant now)

提交回复
热议问题