OTP, TOTP, HOTP: What’s the Difference? | OneLogin (2024)

Providing secure access to applications and cloud-based software is aconstant challenge for companies across all industries. Empowering users withsimple but reliable security is critical to protecting user information andsensitive company data.

One of the ways technology companies have counteracted password theft andother types of cyberattacks is through the use of one-time passwords (OTPs).OTP is a form of multi-factor authentication(MFA) designed to make it much harder for hackers to access protectedinformation.

MFAs require additional credentials beyond a simple password before the enduser can gain access to an application or system. For example, an MFA thatuses SMS will send the user a text with a numeric string that has to beentered before they are granted access. That code is a type of OTP.

Both B2B and B2C companies have an incentive to protect their user andcompany data while maintaining a great user experience (UX), which means thatwhatever security solution they choose, it needs to be streamlined withoutdrastically interfering with a user’s workflow.

OTP authentication is an elegant solution to both security concerns and UX.There are two types of OTP: HOTP and TOTP. We’ll get into thedifferences of each below. But first, let’s dig a little deeper intoOTP.

What is OTP and How Does it Work?

An OTP is like a password but it can only be used once, thus it stands forone-time password. It is often used in combination with a regular password asan additional authentication mechanism providing extra security.

OTPs are exactly what they sound like: one and done. Once you’ve usedthat password once, it’s dumped, and the next time you need to get intothat application, you will use another one. Doing this increases security andmakes it a lot harder for bad actors to penetrate private accounts.

Users can access an OTP for a given application or website throughsmartphone apps, a text message, or a proprietary token (such as a key fob).OneLogin Protect is an example of an OTP generator that you can use as an appon your phone. Any time you receive an SMS text with a code to help you getinto a website or application, you’re using an OTP.

There are a variety of industry standard algorithms, such as SHA-1, thatgenerate OTPs. All of these algorithms use two inputs to generate the OTPcode: a seed and a moving factor. The seedis a static value (secret key) that’s created when you establish a newaccount on the authentication server.

While the seed doesn’t change, the moving factor does each time a newOTP is requested. How the moving factor is generated is the big differentiatorbetween HOTP and TOTP.

What is HOTP?

The “H” in HOTP stands for Hash-based Message Authentication Code (HMAC). Put in layman’s terms, HMAC-based One-time Password algorithm (HOTP) is an event-based OTP where the moving factor in each code is based on a counter.

Each time the HOTP is requested and validated, the moving factor is incremented based on a counter. The code that’s generated is valid until you actively request another one and it’s validated by the authentication server. The OTP generator and the server are synced each time the code is validated and the user gains access. Yubiko’s Yubikey is an example of an OTP generator that uses HOTP.

OTP, TOTP, HOTP: What’s the Difference? | OneLogin (1)

You might be interested in:

Privileged Access Management (PAM) Demystified

Find out how Privileged Access Management (PAM) works and why you need it from One Identity experts.

Learn More

Password Vaulting vs SSOWhich is better, a password vault or single sign-on?Learn MoreElevating Security with Advanced Authentication[GATED] Advanced Authentication offers a holistic solution that mitigates most prevalent access management chall...Download Techbrief

What is TOTP?

Time-based One-time Password (TOTP) is a time-based OTP. The seed for TOTP is static, just like in HOTP, but the moving factor in a TOTP is time-based rather than counter-based.

The amount of time in which each password is valid is called a timestep. As a rule, timesteps tend to be 30 seconds or 60 seconds in length. If you haven’t used your password within that window, it will no longer be valid, and you’ll need to request a new one to gain access to your application.

OTP, TOTP, HOTP: What’s the Difference? | OneLogin (2)

Limitations and Advantages

While both are far more secure than not using MFA at all, there are limitations and advantages to both HOTP and TOTP. TOTP (the newer of the two technologies) is easy to use and implement, but the time-based element does have a potential for time-drift (the lag between the password creation and use). If the user doesn’t enter the TOTP right away, there’s a chance it will expire before they do. So the server has to account for that and make it easy for the user to try again without automatically locking them out.

Since HOTP doesn’t have the time-based limitation, it’s a little more user-friendly, but may be more susceptible to brute force attack. That’s because of a potentially longer window in which the HOTP is valid. Some forms of HOTP have accounted for this vulnerability by adding a time-based component to their code, somewhat blurring the lines between these two types of OTP.

A Final Word

Regardless of which type of OTP you use, choosing an OTPgenerator like an authenticator app or key fob is a safer way to use MFAthan the SMS texting options. Scammers have found creative ways to interceptthese SMS codes, whether it’s through SIM card fraud or some other typeof hack that helps them gain access to your texts. While SMS-based MFAs mightbe better than no MFA at all, they’re a lot less secure than having anauthenticator app on your phone or using a key fob code generator.

Try OneLogin for Free

Empower your employees to work better and faster with the OneLogin Identity and Access Management (IAM) solution.

Try Online

OTP, TOTP, HOTP: What’s the Difference? | OneLogin (2024)

FAQs

OTP, TOTP, HOTP: What’s the Difference? | OneLogin? ›

TOTP: The time-based OTP system generates the secret passcode based on the current Unix time. The code is then based on the TOTP algorithm, ensuring that every time, the system generates a unique and new OTP for every other user. HOTP: On the other hand, the OTP code is generated using a counter-based approach.

What's the difference between OTP TOTP and HOTP? ›

HOTP stands for Hash Based OTP, It is another algorithmic method for generating one-time passwords used in authentication processes. Unlike TOTP which relies on a clock as a moving factor, HOTP relies on a counter value that increments with each use.

Is HOTP more secure than TOTP? ›

TOTPs are more secure than passwords, HOTPs, and SMS authentication. HOTPs are more secure than passwords but less so than TOTPs. They are vulnerable to brute force attacks. HOTPs and TOTPs are not entirely unique protocols from scratch; they're two means of achieving the same end.

Does Google Authenticator use HOTP or TOTP? ›

Google Authenticator is a software-based authenticator by Google. It implements multi-factor authentication services using the time-based one-time password (TOTP; specified in RFC 6238) and HMAC-based one-time password (HOTP; specified in RFC 4226), for authenticating users of software applications.

What does HOTP mean? ›

The first is HOTP itself – it stands for “HMAC-based one-time password.” HMAC means “hash-based message authentication code.” So, to save ourselves a mouthful, we usually just refer to this password type as hash-based one-time passwords, or, even simpler, stick to the initial acronym.

Can I use TOTP instead of OTP? ›

TOTP is time-based one time password to be used as alternate to Aadhaar-based OTP in case there is a limitation of mobile signal to every receive OTP from Aadhaar on mobile.

What is HOTP used for? ›

HMAC-based One-Time Password (HOTP) is a type of one-time password (OTP) algorithm that is used for authenticating users in a variety of security applications. HOTP generates a unique numeric or alphanumeric code that is single-use and used for login or transaction validation.

What are the disadvantages of OTP? ›

Disadvantages of One-Time Passwords

A user may also be unable to access the OTP. Some emailed OTPs may be delayed or end up in a Spam folder. If a user loses a physical token, they've lost access to their OTP.

Is OTP secure enough? ›

Two-factor authentication is inherently more secure than using standard passwords. OTPs can't be used in a replay attack. Since OTPs become invalid shortly after they're generated, OTPs are worthless to hackers.

What is the secret key in OTP? ›

The secret key/seed is a static value that's created when you establish a new account on the authentication server. While the secret key/seed doesn't change, the moving factor changes each time a new OTP is requested.

What are the disadvantages of TOTP? ›

The one major downside of TOTP is that the secret key is stored on both the user's device and the server. If either of these systems were to be compromised, a malicious actor would now be able to generate codes and have unfettered access to the user's account.

What is the secret key in Google Authenticator? ›

The secret key is like a secondary password shared between the authenticator app on your device and your Knowledge Hub account. If you have multiple devices, they must all share the same secret key. If you feel that the secret key has been compromised, you should regenerate and save a new secret key.

Does Gmail support TOTP? ›

TOTP 2FA can only be used as a secondary/backup 2-factor authentication method on Google accounts, and you must set up 2-factor authentication with one of the three supported primary 2FA methods (I suggest using your FIDO U2F security key — see below for instructions on getting that working) prior to being able to set ...

What is the alternative to OTP? ›

The most common alternative to OTP is an authenticator app that requires the user to obtain a password from another application on the phone.

Does HOTP expire? ›

HOTP (Duo-protected accounts) passcodes are valid until they have been used. If a second passcode is generated and used before the first, then the first becomes invalid. The passcode will remain on display until you either generate another passcode or close the application.

What is the difference between OTP and token? ›

A token is the collective data that is used to produce one time passwords, and whilst OTP codes typically change every 30 or 60 seconds, the token seed data itself does not.

What is the difference between TOTP and HOTP in Keycloak? ›

So, TOTPs are valid only for a short window of time (usually 30 seconds). For HOTP a shared counter is used instead of the current time. The server increments the counter with each successful OTP login. So, valid OTPs only change after a successful login.

Is SMS 2FA better than TOTP? ›

Increased security compared to SMS 2FA: the secret key input for TOTP is only shared once and the method does not rely on the telephony network, which helps reduce the attack surface.

Is SMS OTP better than authenticator? ›

You should use an authenticator app over SMS authentication because it is more secure and less likely to be intercepted by cybercriminals. Authenticator apps generate 2FA codes locally on a device, rather than sending them unencrypted over text message.

What is the difference between SSO and OTP? ›

Short Messaging Service (SMS) where a code is sent to a smartphone is one example of an OTP. OTP offers Authentication and Authorization. Single Sign On (SSO): uses the security of networks to store and manage account passwords. SSO offers Authentication, Authorization, and Non- Repudiation.

Top Articles
Protocols and Applications — YubiKey Technical Manual documentation
Wypłata kryptowalut z konta na Crypto.com Exchange (Na: Konto w aplikacji Crypto.com) | Centrum Wsparcia Crypto.com
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 5377

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.