Uniform distribution of truncated md5?

后端 未结 2 1066
小鲜肉
小鲜肉 2020-12-25 10:29

Can we say that a truncated md5 hash is still uniformly distributed?

To avoid misinterpretations: I\'m aware the chance of collisions is much greater th

2条回答
  •  我在风中等你
    2020-12-25 11:12

    Yes, not exhibiting any bias is a design requirement for a cryptographic hash. MD5 is broken from a cryptographic point of view however the distribution of the results was never in question.

    If you still need to be convinced, it's not a huge undertaking to hash a bunch of files, truncate the output and use ent ( http://www.fourmilab.ch/random/ ) to analyze the result.

提交回复
热议问题