Title: Theory / Unimportant / CS / Softw / Security / TOTP

Name: Time based one-timpe password
Definition: A OTP depending on the current time
Page: https://www.rfc-editor.org/rfc/rfc6238
Abbreviation: TOTP

Question: What is the default time step of TOTP
Answer: 30 seconds
Page: https://www.rfc-editor.org/rfc/rfc6238

Question: What are the requirements for TOTP
Answer: Both must be able to know time since epoch, at a good enough precision
Page: https://www.rfc-editor.org/rfc/rfc6238
Answer2: Both should share a randomly generated secret

Page: https://www.rfc-editor.org/rfc/rfc6238
Syntactic sugar: TOTP(SECRET_KEY, TIME)
Implementation: HOTP(SECRET_KEY, floor((TIME-T0)/STEP_DURATION))

Question: What should received do when receiving a TOTP
Answer: Check it was not already used
Page: https://www.rfc-editor.org/rfc/rfc6238
Context: TOTP
Answer2: Check if it's valid for emission time, and a few (at least one), previous time step, and a few time step later (in case of time drift)