by leni536 · 1y ago · 0 comments
And I also often wonder about the OTP aspect, whether there is any protection in TOTP backends for the same TOTP being used twice.
Because of clock skew and latency, a service might choose to allow the previous and/or next code as being acceptable.
Rather pleasingly, 30,000,000 seconds is roughly 1 year.
So, assuming a uniform distribution of codes, you would expect to see a repeat after a year.
You also need to keep in mind the birthday paradox. Repeated codes will happen with high probability after around sqrt(1,000,000) = 1000 code emissions. https://en.wikipedia.org/wiki/Birthday_problem