May 19, 2024

With the increase in cyber security Threats, it is become increasingly necessary to update the safety standards of your internet applications. You will need to be certain that your customers’ accounts are secure. Today, a lot of Internet web Applications are requesting users to add another layer of safety for their accounts. They do it by allowing 2-factor authentication. There are various procedures of implementing 2-factor authentication, and TOTP the Time-based One-Time Password algorithm authentication is among them. This article explains what it is, and how and why to use it. But before understanding that, let us first briefly have a look at what two-factor authentication means.

Two-factor authentication or multi Factor authentication is just an additional layer of safety for an individual’s account. Meaning that, after allowing two factor authentication, the user needs to undergo an additional step to log in successfully. For example, the usual steps for logging into an account are. This adds one more step to the login process. This system is more secure, as a criminal can’t access the user’s account unless they have access to both the user’s routine password and one password. Presently, there are two widely used Methods to get that 1 time password.

  • SMS-based: In This procedure, whenever the user logs in, they get a text message to their registered phone number, which comprises a 1 Time Password.
  • TOTP-based: In This procedure, while allowing 2-factor authentication, the user is asked to scan a QR image with a particular smartphone application.

That program then always creates the otp service for the user. The SMS-based method does not require any explanation. It is simple, but it has its own issues, like waiting for the SMS on each login attempt, safety issues, etc. The TOTP-based technique is becoming popular because of it is benefits over the SMS-based method. So, let us understand how the TOTP-based method works. Before understanding this, let us first Talk about what issues this method will resolve for us. By using this TOTP method, we are Creating a 1 time password on the consumer side rather than server side via a smartphone application. This means that users always have access to their one time password. So that it prevents the server from sending a text message each time user attempts to login. In Addition, the generated password changes After a specific time interval, so it acts like a 1 time password. Great! Now let us understand the Workings of this TOTP-method and attempt to execute the above solution ourselves. Our requirement here is to make a password on the consumer side, and that Password must keep changing.