Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
A one-time password, or OTP, is a throwaway code that becomes invalid once it has been used. Because a different number is used at every login, a peeked-at or stolen number cannot be used again later.
How does a one-time password work?
Think of the torn stub of a movie ticket. Once it has been used to enter, the same stub no longer lets you in.
There are mainly two ways to make the numbers: a method that changes with the passing of time (TOTP, RFC 6238) and a method that advances a count at each use (HOTP, RFC 4226). In TOTP, the user's app and the service calculate the same number from the same secret value and the current time, and compare them. RFC 6238 recommends 30 seconds as the interval at which the number changes.
The number can be delivered by an authenticator app, by SMS, or by a dedicated device. Measures against improper login are collected under unauthorized access measures. The free URL check sees only the outside of your site, so which one-time number method your staff use cannot be read from it.
Why does a one-time password matter?
Even if the password leaks, login can be stopped unless the attacker knows the number at that moment. It is widely used as the "something you have" factor of multi-factor authentication.
It is not all-powerful, however. A method that makes someone type the number into a fake site and immediately types it into the real site to get in (AiTM phishing) can beat even a throwaway number.
When the number is delivered by SMS, the damage from having a phone number taken over (SIM swap) also applies. A passkey, which uses a key tied to a device, is a method that resists fake sites.
Related terms
- TOTP: a one-time password whose number changes with the passing of time
- Two-factor authentication: a mechanism that checks identity by combining two factors
- SIM swap: a method that takes over a phone number to intercept SMS numbers
- AiTM phishing: a method that relays a fake site and steals the number along with the password
Next step
For any service where you now receive numbers by SMS, check whether you can change to an authenticator app. Register a backup way to receive numbers before you switch. The free URL check cannot tell which methods your services use. For help choosing a method, ask in a free consultation.
Frequently asked questions
Is a one-time password safe even against phishing?
It is not. There is a method in which a number typed into a fake site is immediately typed into the real site to get in. A method that resists fake sites includes a passkey, which uses a key tied to a device.
Which is better, a number sent by SMS or a number from an authenticator app?
If you can, use an authenticator app. With SMS, the phone number may be taken over or the number may become unreceivable after a device change. However, both are more secure than a password alone.
Frequently asked questions
Is a one-time password safe even against phishing?
It is not. There is a method in which a number typed into a fake site is immediately typed into the real site to get in. A method that resists fake sites includes a passkey, which uses a key tied to a device.
Which is better, a number sent by SMS or a number from an authenticator app?
If you can, use an authenticator app. With SMS, the phone number may be taken over or the number may become unreceivable after a device change. However, both are more secure than a password alone.