Algorithm Complexity & Security: MD5 or SHA1?

前端 未结 3 1342
栀梦
栀梦 2020-12-04 09:28

Which is the best overall hashing algorithm in terms of complexity and security? md5 or sha1?

From what I know md5<

3条回答
  •  醉酒成梦
    2020-12-04 10:07

    First of all, MD5 is broken - you can generate a collision, so MD5 should not be used for any security applications. SHA1 is not known to be broken and is believed to be secure. Other than that - yes, MD5 is faster but has 128-bit output, while SHA1 has 160-bit output.

    Update: SHA1 has been broken: a team of researchers at Google and CWI have published a collision - https://shattered.io/static/shattered.pdf

提交回复
热议问题