Skip to content

2FA Authenticator can be used to securely register and generate 2FA OTP for any website or app

Notifications You must be signed in to change notification settings

arshkkk/Authenticator-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time-based One-Time Password (TOTP) Authentication

TOTP is a popular method of implementing Two-Factor Authentication (2FA) that generates a one-time password based on the current time.

Steps:

  1. Secret Key Generation: A unique secret key is generated for each user during the setup process. This secret key is known only to the user and the authentication system.

  2. Initial Configuration: The user configures their authentication device, such as a smartphone or authentication app, with the secret key.

  3. Time-Based Generation: When the user attempts to log in, the authentication system generates a one-time password based on the current time and the shared secret key. The current time is typically divided into time intervals, often 30 seconds.

  4. Algorithm Calculation: The one-time password is calculated using a cryptographic algorithm, usually HMAC-SHA1, which combines the current time interval with the secret key. This calculation ensures that the generated password is unpredictable and unique for each time interval.

  5. User Input: The authentication system prompts the user to enter the one-time password generated by their authentication device.

  6. Validation: The authentication system independently calculates the one-time password using the current time and the secret key associated with the user's account. If the entered password matches the calculated password, the user is successfully authenticated.

  7. Expiration: After a time interval (e.g., 30 seconds), the one-time password becomes invalid, and a new password must be generated for the next time interval.

By using TOTP, the authentication process becomes more secure as the one-time passwords are valid only for a short period and are generated based on a shared secret key and the current time, making them resistant to replay attacks and interception.

About

2FA Authenticator can be used to securely register and generate 2FA OTP for any website or app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published