News for hackers. Stuff that matters.
Re:Dirty Coding Tricks by donatj on Thursday January 08, 2015 @06:12PM (#8859665)
I find th CRC collision story rather unbelievable.
Re:Dirty Coding Tricks by dietrichepp on Thursday January 08, 2015 @08:06PM (#8860131)
Most people find this kind of thing unbelievable, which is why they call it a paradox (the "birthday paradox"). Assuming a perfect 64-bit hash, and "tens of thousands of files" meaning 20,000 files, the chance of collision is one in 46 billion.

However, if they reuse filenames, then the chance of collision is much higher. For example, assuming 1000 distinct filenames chosen at random, the chance of collision rises to about 1 in 10,000.

Re:Dirty Coding Tricks by FLUX-YOU on Thursday January 08, 2015 @10:45PM (#8860641)
You see, shortly after leaving his boss's office and learning about the hidden-allocated 2MB, that guy implemented his own CRC that would throw the same hash just before release.
Re:Dirty Coding Tricks by sixothree on Thursday January 08, 2015 @11:21PM (#8860732)
Maybe they were using 32-bit integers as their crc?
Re:Dirty Coding Tricks by pjc50 on Friday January 09, 2015 @04:25AM (#8861422)
Apparently with CRC32 you only need about 77,000 items to have a 50% chance of a collision by birthday paradox.
Re:Dirty Coding Tricks by yzzxy on Thursday January 08, 2015 @07:19PM (#8859954)
It's not a "true" almost impossible collision that occurred, but two files that shared the same content and filename and would collide by definition.
Re:Dirty Coding Tricks by delecti on Thursday January 08, 2015 @08:10PM (#8860142)
They shared the filename, but the story says "even though they were completely different", IE, not the same content. It was a hash collision; certainly rare, but enough project with enough files around the world and it's bound to have happened to somebody.