|
|
|
|
|
by _urga
3552 days ago
|
|
"Therefore, you'd have to try 500,000 codes to have a 50% chance of forcing a random collision on a 6-digit code, and the odds only go up linearly with the number of guesses." No, not according to the birthday paradox (https://en.wikipedia.org/wiki/Birthday_problem). There's actually a simple formula to work out the number of attempts required for a 50% chance as shown below. For TOTP (Time-based One-time Password Algorithm): Assuming only the latest code per current time window is allowed (and not codes on either side), the number of brute-force attempts required for a 50% chance of collision against this code, is given by: Math.pow(10,6/2) // base=10, digits=6 This gives roughly 1000 attempts for a system that only accepts the current code and not codes on either side. I am sure there are plenty of systems out there that don't think to rate-limit 2FA codes. |
|