How random are TOTP codes?

The author humorously speculates about a possible bias towards the number 8 in their bank’s TOTP app generated codes due to its auspiciousness. They delve into the technicalities of the TOTP algorithm, questioning the distribution of digits in the codes generated. Conducting a Python experiment to plot the frequency of each digit in the codes, they initially observe a possible bias towards the number 8, which decreases with more generations. Ultimately, they dismiss the conspiracy theory, highlighting the randomness and large number of TOTP codes generated in a year. They emphasize the importance of both checking the source code and measuring the output for reassurance.

https://shkspr.mobi/blog/2024/07/how-random-are-totp-codes/

To top