Skip to content

Comment on Dropbox Lied to Users about Data Security, Complaint to FTC Allegesparent

Comments

The probability of a hash collision between n files if there are N possible hashes, assuming that each hash is equally likely, is roughly 1-e^(-n^2/(2N))[1]. Let's suppose that there are roughly a trillion, that is, 2^20, files; this is way more than the actual number of files, by the way. And let's suppose that we have a 256-bit hash such that every 256-bit string is equally likely(a reasonable assumption as long as the hash hasn't been defeated)--the number of possible hashes is 2^256. So the chance of a collision is roughly 1-e^(-2^80/(2^257)); since the number inside the exponential is so small, we can approximate it as 2^-177, or less than 10^-53. That number is so small that it's more likely your office will get hit by multiple independent meteors.

[1]This formula is taken from http://en.wikipedia.org/wiki/Birthday_paradox

Again all of this assumes unifrom distribution. The files used in dropbox are not guaranteed to be random or uniformly distributed. As I already said in my initial comment, various different files types have internal structures which may (again if you are unlucky) result in multiple different files of those types tending to have similar hashes.

One of the goals of a good hash is a uniform distribution. The source files don't have to be random at all. I wouldn't put any money on the odds of by accident hitting a systematic flaw that security researchers haven't yet found in analyzing the hash.

That said, I think it will be possible to deliberately create a collision in SHA256 at some point in the future.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.