SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

One-time passwords

A one-time password is a credential that is valid for one use, so a copy captured by an eavesdropper cannot be replayed. Three designs are standard references. Leslie Lamport's 1981 hash chain, Communications of the ACM 24(11), pages 770 to 772, is the basis of the others 1.

Lamport's method is secure against an intruder who can read the system's stored data and can tamper with or eavesdrop on the communication. It assumes a one-way function F that is easy to compute and infeasible to invert. The user picks a secret x. The password for the i-th login is F applied 1000 minus i times to x, so the sequence is used in reverse, and the system stores only the last value it accepted, starting with F applied 1000 times to x. Each password is exactly the value the system needs to check the next one, by applying F once. If user and system fall out of step, repeated applications of F find the match. Lamport says the third weakness, the user's own disclosure of a password, cannot be prevented by any password protocol 1.

S/KEY, described in RFC 1760 (February 1995, informational) by N. Haller of Bellcore, applies this to login using MD4. A user's pass-phrase is combined with a server-supplied seed and run through the hash a number of times that falls by one on each use. The 64-bit result is shown as six short English words from a 2,048-word dictionary. The memo states that S/KEY protects against passive attacks but not against active attackers who can modify the packet stream 2. RFC 2289 later specified OTP on the standards track, saying it evolved from S/KEY 3.

HOTP, RFC 4226 (December 2005, informational), replaces the chain with a counter shared by token and server. The password is a truncated HMAC-SHA-1 of the counter under a shared secret, at least six digits, with server throttling and counter resynchronisation 4. TOTP, RFC 6238 (May 2011, informational), uses time instead of an event counter. It recommends a default 30-second step and an acceptance window of at most one step for network delay, requires that a verifier not accept the same OTP a second time after success, and allows SHA-256 and SHA-512 5. HOTP and TOTP need a secret held on both sides, unlike the hash chain.

Source · Password Authentication with Insecure Communication (opens in a new tab) · Communications of the ACM 24(11); copy hosted by Leslie Lamport

References

  1. Password Authentication with Insecure Communication (opens in a new tab) · Communications of the ACM 24(11), pp. 770-772; copy hosted by Leslie Lamport · Lamport, November 1981. ↩ ↩
  2. RFC 1760, The S/KEY One-Time Password System (opens in a new tab) · IETF (Informational) · N. Haller, Bellcore, February 1995. ↩
  3. RFC 2289, A One-Time Password System (opens in a new tab) · IETF (Standards Track) · February 1998; abstract says OTP evolved from S/KEY. ↩
  4. RFC 4226, HOTP: An HMAC-Based One-Time Password Algorithm (opens in a new tab) · IETF (Informational) · M'Raihi, Bellare, Hoornaert, Naccache and Ranen, December 2005. ↩
  5. RFC 6238, TOTP: Time-Based One-Time Password Algorithm (opens in a new tab) · IETF (Informational) · M'Raihi, Machani, Pei and Rydell, May 2011. ↩

Research articles

In the news

See what connects to it on the map of ideas →

See also