在这种情况下,md5和sha1之间有什么区别吗? [英] Is there any difference between md5 and sha1 in this situation?

查看:100
本文介绍了在这种情况下,md5和sha1之间有什么区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知

1.    if   ( md5(a)   == md5(b)   )
2.    then ( md5(a.z) == md5(b.z) )
3.    but  ( md5(z.a) != md5(z.b) )

点将字符串连接起来的地方.

where the dots concatenate the strings.

编辑---

在这里您可以找到ab:
http://www.mscs.dal.ca/~selinger/md5collision/

Here you can find a and b:
http://www.mscs.dal.ca/~selinger/md5collision/

检查以下链接:
hexpaste.com/qzNCBRYb/1 -这是a.md5(a)."kutykurutty"
hexpaste.com/mSXMl13A/1 -这是b.md5(b)."kutykurutty"

Check these links:
hexpaste.com/qzNCBRYb/1 - this is a.md5(a)."kutykurutty"
hexpaste.com/mSXMl13A/1 - this is b.md5(b)."kutykurutty"

它们共享相同的md5哈希,但是它们是不同的.但是您可以将这些字符串称为a'b',因为它们具有相同的md5.

They share the same md5 hash, yet they are different. But you can call these strings a' and b', because they have the same md5.

---编辑

如果将所有 md5 都更改为 sha1 ,在第二行中会发生什么?所以:

What happens in the second row if we change all the md5 to sha1? So:

1.    if   ( sha1(c)   == sha1(d)   )
2.    then ( sha1(c.z) ?= sha1(d.z) )

我找不到两个具有相同 sha1 的不同字符串,这就是为什么我要问这个问题.关于 sha1 还有其他有趣的规则"吗?

I couldn't find two different strings with same sha1, that's why I'm asking this. Are there any other interesting "rules" about sha1?

推荐答案

在这种情况下,SHA1的行为与MD5完全一样.

SHA1 will behave exactly like MD5 in this scenario.

我发现的唯一两个参考文献如下-

The only two references I have found are the following -

  1. http://www.iaik.tugraz.at /content/research/krypto/sha1/MeaningfulCollisions.php
  2. http://www.schneier.com/blog /archives/2005/02/sha1_broken.html#c1654 (请参阅David Schwartz的评论)
  1. http://www.iaik.tugraz.at/content/research/krypto/sha1/MeaningfulCollisions.php
  2. http://www.schneier.com/blog/archives/2005/02/sha1_broken.html#c1654 (See comment by David Schwartz)

从IAIK网站-

请注意,对于冲突的SHA-1消息对(与遵循类似设计原理的所有其他哈希函数一样),只要两个消息相同,就始终可以将后缀附加到这两个消息上.

Note that for colliding SHA-1 message pairs (as for all other hash functions following a similar design principle) it is always possible to append suffixes to both messages as long as they are the same.

我认为没有人发现SHA1有两个冲突的字符串,因此这主要是学术性的讨论.但是据我了解, 发现冲突时,应该可以使用此属性创建其他几次冲突.

I don't think anybody has found two colliding strings for SHA1, so this is mostly an academic discussion. But from what I understand, when a collision is discovered, it should be possible to create several other collisions by using this property.

这篇关于在这种情况下,md5和sha1之间有什么区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆