TOTP
TOTP is the acronym for Time-based One-Time Password.

Time-based One-Time Password
A commonly used algorithm for generating time-sensitive, single-use passwords for multi-factor authentication (MFA) or two-factor authentication (2FA). Key points about TOTP:
- Algorithm: TOTP is based on the HMAC-based One-Time Password (HOTP) algorithm, which uses a shared secret key and a counter to generate passwords.
- Time-based: In TOTP, the counter is replaced by the current time, typically in 30-second intervals. This ensures that the generated password is only valid for a short period.
- Shared secret: The server and the user’s device (usually a smartphone app or hardware token) share a secret key, which is used along with the current time to generate the same password independently.
- Password generation: The user’s device generates a new 6-8 digit password every 30 seconds, which the user enters with their regular login credentials to access the service.
- Synchronization: The server and the user’s device must have synchronized clocks for the system to work correctly, as the generated passwords are time-sensitive.
TOTP is widely used for securing online accounts, such as email, banking, and social media, as it adds an extra layer of security beyond the standard username and password. Popular implementations of TOTP include Google Authenticator, Authy, and Microsoft Authenticator.