算法复杂性安全性:MD5 还是 SHA1? [英] Algorithm Complexity & Security: MD5 or SHA1?
问题描述
就复杂性和安全性而言,哪种整体哈希算法最好?md5 还是 sha1?
据我所知,md5 比 sha1 快,但 SHA1 比 md5 更复杂.
From what I know md5 is faster than sha1 but SHA1 is more complex than md5.
我错过了什么吗?
推荐答案
首先,MD5 已损坏——您可能会产生冲突,因此 MD5 不应用于任何安全应用程序.SHA1 未知被破坏,被认为是安全的.除此之外 - 是的,MD5 速度更快但具有 128 位输出,而 SHA1 具有 160 位输出.
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.
更新: SHA1 已被破解:Google 和 CWI 的一组研究人员发布了一个冲突 - https://shattered.io/static/shattered.pdf
Update: SHA1 has been broken: a team of researchers at Google and CWI have published a collision - https://shattered.io/static/shattered.pdf
这篇关于算法复杂性安全性:MD5 还是 SHA1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!