S/KEY: A Password Sequence Used Backward
S/KEY is a one-time-password system designed to stop someone from reusing a password captured during a login. Its unusual trick is to calculate a chain of values in one direction, then use them in the opposite order. The computer checking the login, called the server, can verify each new password without receiving the user's secret passphrase.
S/KEY is a specific historical design, described in a 1995 technical specification. It isn't a general name for any code that arrives by text message or appears in an authenticator app.
The problem it addressed was replay: an eavesdropper records a successful login password, then sends the same password later to impersonate the user. A reusable password gives that captured value a continuing life. S/KEY changes what the server will accept after each successful login.
- Make a stolen password useless without the key in your hand.
- Sign in with a tap instead of typing a code.
- Protect Google, Microsoft, Apple and more than 1,000 other accounts.
A calculation that's easy to check forward
The design uses a hash function, a procedure that turns an input into a compact result. A cryptographic hash is designed to be easy to calculate forward and difficult to work backward. Knowing a result shouldn't give someone a practical way to recover the input that produced it.
S/KEY starts with the user's secret passphrase and a seed, a public value used as part of the calculation. Software on the user's side repeatedly hashes the result. Each new value becomes the input to the next calculation.
For a simplified illustration, call three successive results A, B and C. Hashing A produces B; hashing B produces C. A longer chain follows the same idea.
Suppose the server has C saved. The user submits B. The server hashes B once, sees that it produces C and accepts the login. It then replaces its saved C with B.
For the next login, the user submits A. The server hashes A once and compares the result with its newly saved B. The sequence has moved backward, but each verification still uses a forward calculation.
Someone who records B after it has been accepted can't use it again to pass that next check. They need A, and calculating backward from B is the operation the design is intended to make difficult.
What the login prompt tells the user
The user doesn't have to remember a long list of changing values. The server supplies a challenge: information the user's software needs to produce the next answer. In S/KEY, that includes the seed and a sequence number showing how many hashing steps to perform.
The passphrase remains secret. It is used locally to calculate the answer rather than being sent to the server as the login password.
S/KEY also allows the result to be displayed as six short words, making it possible to enter a value without typing a long string of unfamiliar characters. The words are a representation of the calculated password, not a newly chosen sentence.
Because each successful login moves one step back, the sequence is finite. It eventually needs to be initialized again. The number decreases with use; it doesn't advance because a clock reaches the next minute.
That last point separates S/KEY from TOTP, the time-based one-time-password method. TOTP uses a shared secret and a time-based input to calculate codes. The TOTP specification describes that different mechanism.
How Does Your Authenticator Work Without the Internet?
A used password and an unused password are different prizes
The protection depends on successful use. A password stolen before the legitimate user submits it may still be valuable. An active impostor might trick someone into entering a current answer and relay it to the real server while it's valid.
Modern authentication guidance from the National Institute of Standards and Technology identifies this limitation for manually entered one-time codes. Changing the answer doesn't prevent a fake login page from passing that answer along.
S/KEY also protects a login check, not the contents of the conversation that follows. It doesn't itself encrypt the user's later commands or data.
One-Way Functions: Why Losing Information Is Not Enough

Password Sniffing: Who Can Read a Secret in Transit?

Token Devices: The Secret Behind the Changing Code

QUOTE:
"Amateurs hack systems, professionals hack people."
