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.
question from:
https://stackoverflow.com/questions/8184941/uniform-distribution-of-truncated-md5 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…