News for hackers. Stuff that matters.
Re:Tiny Toy TOTP Generator in 18 Lines of Python by dunham on Sunday August 11, 2019 @12:47PM (#20668997)
In the past, when I've implemented TOTP on the server, I've allowed for a couple of time periods of drift. But I recorded the time period that last matched, and only allowed subsequent authentication attempts to be strictly greater than the last successful time period, to prevent replay attacks.
Re:Tiny Toy TOTP Generator in 18 Lines of Python by susam on Sunday August 11, 2019 @01:54PM (#20669420)
Yes, RFC 6238 requires this too. Quoting from https://tools.ietf.org/html/rfc6238#section-5.2:

> Note that a prover may send the same OTP inside a given time-step window multiple times to a verifier. The verifier MUST NOT accept the second attempt of the OTP after the successful validation has been issued for the first OTP, which ensures one-time only use of an OTP.