算法的复杂度和放大器;安全性:MD5或SHA-1? [英] Algorithm Complexity & Security: MD5 or SHA1?
问题描述
这是在复杂性和安全性方面的最佳整体哈希算法? MD5或SHA-1?
这是我所知道的 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位输出,而SHA-1有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.
另外两个MD5和SHA1不是加密算法 - 他们是散列算法这意味着你无法通过算法合格后恢复数据。
Also both MD5 and SHA1 are not "encryption" algorithms - they are hash algorithms meaning that you can't restore the data after passing it through the algorithm.
这篇关于算法的复杂度和放大器;安全性:MD5或SHA-1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!