What is a one-time password (OTP)? Definition from SearchSecurity (2024)

By

  • Kathleen Richards
  • Ivy Wigmore

What is a one-time password (OTP)?

A one-time password (OTP) is an automatically generated numeric or alphanumeric string of characters that authenticates a user for a single transaction or login session.

An OTP is more secure than a static password, especially a user-created password, which can be weak and reused across multiple accounts.

OTPs might replace traditional authentication login information or may be used in addition to it to add another layer of security.

One-time password examples

OTP security tokens are microprocessor-based smart cards or pocket-size key fobs that produce a numeric or alphanumeric code to authenticate access to the system or transaction. This secret code changes every 30 or 60 seconds, depending on how the token is configured.

Mobile device apps, such as Google Authenticator, rely on the token device and PIN to generate the one-time password for two-step verification.

OTP security tokens can be implemented using hardware, software or on demand. Unlike traditional passwords that remain static or expire every 30 to 60 days, the one-time password is used for one transaction or login session.

How to get a one-time password

When an unauthenticated user attempts to access a system or perform a transaction on a device, an authentication manager on the network server generates a number or shared secret, using one-time password algorithms. The same number and algorithm are used by the security token on the smart card or device to match and validate the one-time password and user.

Many companies use Short Message Service (SMS) to provide a temporary passcode via text for a second authentication factor. The temporary passcode is obtained out of band through cellphone communications after the user enters his username and password on networked information systems and transaction-oriented web applications.

For two-factor authentication (2FA), the user enters a user ID, traditional password and temporary passcode to access the account or system.

What is a one-time password (OTP)? Definition from SearchSecurity (1)

How a one-time password works

In OTP-based authentication methods, the user's OTP app and the authentication server rely on shared secrets.

Values for one-time passwords are generated using the following factors in conjunction with one another:

  • HMAC, or Hash-based Message Authentication Code, algorithm.
  • A moving factor, such as time-based information -- e.g., a time-based OTP (TOTP) -- or an event counter that tracks the number of authorization attempts -- e.g., HMAC-based OTP (HOTPs).

The OTP values have minute or second timestamps for greater security. The one-time password can be delivered to a user through several channels, including an SMS-based text message, an email or a dedicated application on the endpoint.

Security professionals have long been concerned that SMS message spoofing and man-in-the-middle attacks can be used to break 2FA systems that rely on one-time passwords.

The U.S. National Institute of Standards and Technology (NIST) considered deprecating SMS for 2FA and one-time passwords in 2016. Ultimately, however, the organization decided that while using SMS as a second authentication factor is not the most secure option, it is more effective than single-factor authentication.

Experts such as those at NIST recommend enterprises consider one-time password delivery methods besides SMS -- and avoid delivering OTPs via SMS to email addresses or VoIP numbers, which cannot prove device possession.

Benefits of a one-time password

The one-time password avoids some common pitfalls of password security. With OTPs, IT administrators and security managers do not have to worry about composition rules, known-bad and weak passwords, sharing of credentials or reuse of the same password on multiple accounts and systems.

Another advantage of one-time passwords is that they become invalid in minutes -- in the case of TOTPs -- or once they have been used -- in the case of HOTPs. In this way, one-time passwords prevent attackers from obtaining the secret codes and reusing them.

Editor's note: This article was written by Ivy Wigmore in 2014 and subsequently updated by Kathleen Richards. TechTarget editors revised it in 2023 to improve the reader experience.

This was last updated in December 2023

Continue Reading About one-time password

  • What is identity and access management? Guide to IAM
  • How secure are one-time passwords from attacks?
  • 5 password management tips for MSP customers
  • What is passwordless authentication?

Related Terms

identity theft
Identity theft, also known as identity fraud, is a crime in which an imposter obtains key pieces of personally identifiable ...Seecompletedefinition
password spraying
Password spraying is a cyberattack tactic that involves a hacker using a single password to try and break into multiple target ...Seecompletedefinition
phishing
Phishing is a fraudulent practice in which an attacker masquerades as a reputable entity or person in an email or other form of ...Seecompletedefinition

Dig Deeper on Identity and access management

  • soft tokenBy: PaulKirvan
  • multifactor authenticationBy: KinzaYasar
  • security tokenBy: PaulKirvan
  • YubiKeyBy: AlexanderGillis
What is a one-time password (OTP)? Definition from SearchSecurity (2024)
Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6184

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.