News for hackers. Stuff that matters.
Re:How random are TOTP codes? by codeflo on Friday July 05, 2024 @03:58AM (#40880664)
The very rough rule of thumb that I think one should remember is: You get a 50% chance of collision with sqrt(total) samples.

Sqrt(1 000 000) = 1 000, close enough to the exact number you calculated.

Re:How random are TOTP codes? by ColinWright on Friday July 05, 2024 @05:52PM (#40886368)
More accurately, for 50% it's \sqrt(\ln(4))\sqrt(N) which is \sqrt( ln(4) N ).

That's about 1.17741 times \sqrt(N).

The reasons are explained here: https://news.ycombinator.com/item?id=40886363