TOTP
Time-based One-Time Password
(TOTP) is a type of two-factor authentication
that involves the generation of one-time passwords based on a time factor. It's commonly used to enhance the security of user logins, especially in online services and applications.
Here's how TOTP typically works:
- Secret Key Generation:
-
The user is initially provided with a secret key during the setup process.
-
Time Factor:
-
The TOTP algorithm uses the current time as a factor to generate a unique, time-dependent one-time password.
-
Password Generation:
-
The user's device (such as a mobile app) generates a new password based on the secret key and the current time.
-
Authentication:
-
The user enters this generated one-time password along with their regular credentials during the login process.
-
Verification:
- The server, which also knows the secret key, independently generates the expected one-time password based on the current time. If the entered password matches the expected one, authentication is successful.
TOTP is commonly used in scenarios where an additional layer of security is desired. It doesn't involve any network communication in its basic form; instead, it relies on the synchronization of time between the user's device and the server. TOTP is often implemented in mobile apps or hardware tokens and is a part of multi-factor authentication strategies to enhance security.