News for hackers. Stuff that matters.
Re:BitTorrent v2 by doomrobo on Monday September 07, 2020 @09:43PM (#24404498)
Hashes are now 256 bits. In order to get a collision with probability 1% you need to produce about 4e37 hashes. For comparison, if you had a 5GHz computer that did a SHA-256 hash every cycle and gave 100 of these computers to every human on Earth, it'd take over 300 million years to produce 4e37 hashes.
Re:BitTorrent v2 by ShinTakuya on Monday September 07, 2020 @10:09PM (#24404645)
Yep, basically while it's entirely possible (as per Murphy's Law) that there'll be an accidental collision, the likelihood is close to zero. It's a fair risk to be taking.
Re:BitTorrent v2 by fenomas on Monday September 07, 2020 @11:51PM (#24405051)
> In order to get a collision with probability 1% you need to produce about 4e37 hashes

Does "get a collision" here mean finding a particular collision with a known hash, or finding any collision between any two of the generated hashes?

Re:BitTorrent v2 by doomrobo on Tuesday September 08, 2020 @12:37AM (#24405242)
The latter. I used the formula from the Wikipedia page on the birthday attack: p ~= 1 - e^{-n^2/2H} where n is the number of items you've picked and H is the size of the universe
Re:BitTorrent v2 by fenomas on Tuesday September 08, 2020 @12:49AM (#24405299)
I see, thanks!