Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
660 views
in Technique[技术] by (71.8m points)

hash - Algorithm Complexity & Security: MD5 or SHA1?

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

From what I know md5 is faster than sha1 but SHA1 is more complex than md5.

Am I missing anything?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...