One-time password

Definition
A one-time password (OTP) is a password that is valid for only a single authentication session or transaction. Unlike static passwords that can be reused, an OTP becomes unusable after it has been entered correctly, thereby reducing the risk of credential theft and replay attacks.

Historical Development
The concept of OTPs emerged in the 1980s alongside early work on secure remote authentication. Notable contributions include the S/KEY system (published in 1994) and the OPIE (One-time Passwords In Everything) system, both of which employed hash‑chain methods to generate sequences of single‑use passwords. In the early 2000s, the advent of mobile devices and hardware tokens facilitated wider adoption, and the IETF published formal specifications for OTP algorithms, most prominently RFC 4226 (HOTP – HMAC‑based One‑Time Password) in 2005 and RFC 6238 (TOTP – Time‑Based One‑Time Password) in 2011.

Generation Mechanisms

Mechanism Principle Typical Use Cases
HMAC‑Based One‑Time Password (HOTP) Generates passwords by applying a keyed‑hash message authentication code (HMAC) to a moving counter value. Each increment of the counter yields a new password. Hardware tokens, software tokens where synchronization via a counter is feasible.
Time‑Based One‑Time Password (TOTP) Derives passwords from the current time (usually in 30‑second or 60‑second steps) using an HMAC function. The secret key is shared between client and server. Mobile authenticator apps (e.g., Google Authenticator, Microsoft Authenticator), web‑based two‑factor authentication.
Event‑Based OTPs Combine a counter with additional event data such as a transaction identifier. Specialized banking or payment systems that tie the OTP to a specific operation.
Challenge‑Response OTPs Server sends a random challenge; client computes an OTP based on the challenge and a shared secret. Systems requiring per‑transaction freshness beyond simple time‑based codes.
SMS/Email OTPs OTP is transmitted to the user through an out‑of‑band channel (text message or electronic mail). Consumer account recovery, two‑factor authentication for web services.

Delivery Channels

  • Hardware tokens (e.g., RSA SecurID, YubiKey) display or transmit OTPs via a small screen, USB, NFC, or Bluetooth.
  • Software tokens run on smartphones, computers, or dedicated appliances and often generate TOTPs.
  • Out‑of‑band communication such as SMS, voice calls, or email delivers OTPs to a device distinct from the authentication endpoint.

Security Characteristics

  • Resistance to Replay: Since each OTP can be used only once, intercepted codes are useless after the legitimate authentication.
  • Limited Exposure Window: Time‑based OTPs are typically valid for 30–60 seconds, constraining the time an attacker has to exploit a captured code.
  • Secret Key Protection: The shared secret (seed) must be securely provisioned and stored; compromise of this secret enables generation of valid OTPs.
  • Phishing Vulnerability: OTPs do not protect against real‑time phishing where an attacker solicits the user’s current code and forwards it immediately to the legitimate service.
  • Man‑in‑the‑Middle (MitM) Risks: If an attacker controls the communication channel used to deliver the OTP (e.g., intercepting SMS), they may obtain the code.

Standards and Protocols

  • RFC 4226 – HOTP algorithm, defines a 6‑ to 8‑digit numeric OTP derived from a secret key and counter.
  • RFC 6238 – TOTP algorithm, extends HOTP by using time as the moving factor.
  • OATH (Initiative for Open Authentication) – Industry consortium that maintains specifications for OTP generation, including OATH‑TOTP, OATH‑HOTP, and OCRA (OATH Challenge‑Response Algorithm).

Applications

  • Two‑Factor Authentication (2FA): OTPs augment passwords, providing a second factor of possession.
  • Transaction Authorization: Banking, payment processors, and cryptocurrency platforms often require OTPs to confirm high‑value operations.
  • Password Reset and Account Recovery: Services send OTPs to verify ownership of a recovery channel before permitting credential changes.

Limitations and Criticisms

  • Usability: Manual entry of short‑lived numeric codes can be inconvenient, especially on devices lacking a convenient input method.
  • Reliance on Secondary Channels: SMS and email OTPs depend on the security and availability of telecom or mail infrastructure, which can be subject to delays, outages, or interception.
  • Scalability of Hardware Tokens: Deploying physical tokens incurs logistical costs for issuance, replacement, and lifecycle management.

Future Directions

  • Password‑less Authentication: Emerging protocols (e.g., FIDO2/WebAuthn) incorporate asymmetric cryptography and hardware authenticators that may reduce reliance on OTPs.
  • Push‑Based Approvals: Mobile push notifications that carry authentication challenges, combined with contextual risk analysis, are increasingly used as alternatives to static OTP entry.
  • Biometric Fusion: Research explores combining OTPs with biometric factors to achieve multi‑modal assurance without degrading user experience.

References

  • RFC 4226 – HMAC‑Based One‑Time Password Algorithm (2005).
  • RFC 6238 – TOTP: Time‑Based One‑Time Password Algorithm (2011).
  • OATH – OATH‑TOTP and OATH‑HOTP specifications, available through the Initiative for Open Authentication.

The information presented reflects the state of knowledge up to 2024.

Browse

More topics to explore