对于与输出长度相同的输入,SHA(

编程入门 行业动态 更新时间:2024-10-17 04:58:04
对于与输出长度相同的输入,SHA(-1-2-3)是一对一的函数吗?(Is SHA(-1-2-3) a one to one function for inputs the same length as the output?)

对于与输出长度相同的输入,SHA(-1-2-3)是一对一的函数吗?

作为一个具体的例子重申这个问题:SHA-1有160字节的输出,所以所有的160字节输入都有独特的160字节输出? SHA-2和3以及所有可用输出尺寸的答案是否相同?

Is SHA(-1-2-3) a one to one function for inputs the same length as the output?

To restate the question as a concrete example: SHA-1 has a 160 byte output, so do all 160 byte inputs have unique 160 byte outputs? Is the answer the same for SHA-2 and 3 and for all available output sizes?

最满意答案

没有人知道,因为没有人证明过这种或那种方式,或者测试了该范围内的每种可能的输入。 这是简单的事实。

如果函数是真正随机的,那么由于生日悖论,答案几乎肯定是“否” - 平均而言,对于160位输出,您需要测试2 ^ 80个输入来找出任何一对之间的冲突。

Nobody knows, because nobody has proven it one way or the other, or tested every possible input at that range. That's the simple truth.

If the functions behaved truly randomly, then the answer would almost certainly be "no" due to the birthday paradox -- on average, you need to test 2^80 inputs to find a collision between any pair, for a 160-bit output.

更多推荐

本文发布于:2023-08-02 07:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1372359.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:长度   SHA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!