HNHacker News
TopNewBestAskShowJobs

yulle

67 karma · joined December 26, 2022

submissionscomments
yulle··on How random are TOTP codes?
For those curious on how to find that ~1200 values are needed before a 50% probability of collision, this is a generalized form of the birthday problem [0].

With a calculator [1], we can find the exact amount. plugging in D=10^6 (# of unique codes) with P=0.5 (odds of collision) gives you 1178 values.

[0] https://en.wikipedia.org/wiki/Birthday_problem

[1] https://www.bdayprob.com/

yulle··on [dead]
- Acquired in Feb, just announced Tuesday