截断md5的统一分布? [英] Uniform distribution of truncated md5?

查看:105
本文介绍了截断md5的统一分布?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以说截断的 md5 散列仍然是均匀分布的吗?

为避免误解: m知道碰撞的可能性远大于从 md5 结果中删除部分的时刻;我的用例实际上是在故意的碰撞中对感兴趣。我也知道有其他 散列方法,它可能更适合用于较短散列的使用情况(实际上包括我自己的情况)和I我肯定也想看看 md5 的均匀分布也适用于它的大块。 (考虑它是一种好奇心)。

由于mediawiki使用它(特别是最左边的两个十六进制数字作为结果的字符)来生成图像的文件路径例如 /4/42/The-image-name-here.png ),他们可能也对至少附近 - 整齐感兴趣分配,我想答案是'是',但我实际上并不知道。

解决方案

是的,没有表现出任何偏见是加密散列的设计要求。从加密的角度来看,MD5是分裂的,但结果的分布从来没有问题。



如果你仍然需要确信,这不是一个巨大的任务一堆文件,截断输出并使用ent( http://www.fourmilab.ch/random/)来分析结果。

Can we say that a truncated md5 hash is still uniformly distributed?

To avoid misinterpretations: I'm aware the chance of collisions is much greater the moment you start to hack off parts from the md5 result; my use-case is actually interested in deliberate collisions. I'm also aware there are other hash methods that may be better suited to use-cases of a shorter hash (including, in fact, my own), and I'm definitely looking into those.

But I'd also really like to know whether md5's uniform distribution also applies to chunks of it. (Consider it a burning curiosity.)

Since mediawiki uses it (specifically, the left-most two hex-digits as characters of the result) to generate filepaths for images (e.g. /4/42/The-image-name-here.png) and they're probably also interested in an at least near-uniform distribution, I imagine the answer is 'yes', but I don't actually know.

解决方案

Yes, not exhibiting any bias is a design requirement for a cryptographic hash. MD5 is broken from a cryptographic point of view however the distribution of the results was never in question.

If you still need to be convinced, it's not a huge undertaking to hash a bunch of files, truncate the output and use ent ( http://www.fourmilab.ch/random/ ) to analyze the result.

这篇关于截断md5的统一分布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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