对于与输出长度相同的输入,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.
更多推荐
发布评论