TOTP vs HOTP - what's the difference?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TOTP vs HOTP - what's the difference?

fapeiyeunesou
The case was at work - I needed to set up two-factor authentication for an internal service, and for some reason, I thought that all one-time passwords (OTPs) are the same. I started digging and realised that there are TOTP, HOTP, and some other variants. While reading, I got confused because visually everything is similar - a code comes, you enter it, and that's it. But at the level of logic and application, there is a difference. Can someone explain the exact difference between TOTP and HOTP, and when it is better to use one over the other?
Reply | Threaded
Open this post in threaded view
|

Re: TOTP vs HOTP - what's the difference?

kimberlyto6
I had some confusion with this when I was connecting 2FA to one client's panel at one time. The default was TOTP, but then there was a task to make authorization on devices where there is no permanent connection to the Internet. That's where good old HOTP came in handy. It doesn't depend on time, only on the counter, and it's easy to test - by the way, I used hotp generator to see how the codes change. Very handy, especially if you want to make sure the counter hasn't moved away. And if you need quick and easy testing, TOTP is often enough. But if there are nuances, such as offline access, then HOTP really helps.
Reply | Threaded
Open this post in threaded view
|

Re: TOTP vs HOTP - what's the difference?

lossauzasalle
In reply to this post by fapeiyeunesou
I turned on 2FA in mail and messengers at most, I didn't really look into it. But now I'm thinking that perhaps I should look deeper into it, especially if I'm going to be working with security.