Applied Cryptography, Second Edition: Protocols, Algorthms, and Source Code in C (cloth)
(Publisher: John Wiley & Sons, Inc.)
Author(s): Bruce Schneier
ISBN: 0471128457
Publication Date: 01/01/96

Previous Table of Contents Next

The major security hole in this protocol is that old session keys are valuable. If Mallory gets access to an old K, he can launch a successful attack [461]. All he has to do is record Alice’s messages to Bob in step (3). Then, once he has K, he can pretend to be Alice:

(1)  Mallory sends Bob the following message:
(2)  Bob extracts K, generates RB, and sends Alice:
(3)  Mallory intercepts the message, decrypts it with K, and sends Bob:
EK(RB - 1)
(4)  Bob verifies that “Alice’s” message is RB - 1.

Now, Mallory has Bob convinced that he is Alice.

A stronger protocol, using timestamps, can defeat this attack [461,456]. A time-stamp is added to Trent’s message in step (2) encrypted with Bob’s key: EB(K,A,T). Timestamps require a secure and accurate system clock—not a trivial problem in itself.

If the key Trent shares with Alice is ever compromised, the consequences are drastic. Mallory can use it to obtain session keys to talk with Bob (or anyone else he wishes to talk to). Even worse, Mallory can continue to do this even after Alice changes her key [90].

Needham and Schroeder attempted to correct these problems in a modified version of their protocol [1160]. Their new protocol is essentially the same as the Otway-Rees protocol, published in the same issue of the same journal.


This protocol also uses symmetric cryptography [1224].

(1)  Alice generates a message consisting of an index number, her name, Bob’s name, and a random number, all encrypted in the key she shares with Trent. She sends this message to Bob along with the index number, her name, and his name:
(2)  Bob generates a message consisting of a new random number, the index number, Alice’s name, and Bob’s name, all encrypted in the key he shares with Trent. He sends it to Trent, along with Alice’s encrypted message, the index number, her name, and his name:
(3)  Trent generates a random session key. Then he creates two messages. One is Alice’s random number and the session key, encrypted in the key he shares with Alice. The other is Bob’s random number and the session key, encrypted in the key he shares with Bob. He sends these two messages, along with the index number, to Bob:
(4)  Bob sends Alice the message encrypted in her key, along with the index number:
(5)  Alice decrypts the message to recover her key and random number. She then confirms that both have not changed in the protocol.

Assuming that all the random numbers match, and the index number hasn’t changed along the way, Alice and Bob are now convinced of each other’s identity, and they have a secret key with which to communicate.


Kerberos is a variant of Needham-Schroeder and is discussed in detail in Section 24.5. In the basic Kerberos Version 5 protocol, Alice and Bob each share keys with Trent. Alice wants to generate a session key for a conversation with Bob.

(1)  Alice sends a message to Trent with her identity and Bob’s identity.
(2)  Trent generates a message with a timestamp, a lifetime, L, a random session key, and Alice’s identity. He encrypts this in the key he shares with Bob. Then he takes the timestamp, the lifetime, the session key, and Bob’s identity, and encrypts these in the key he shares with Alice. He sends both encrypted messages to Alice.
(3)  Alice generates a message with her identity and the timestamp, encrypts it in K, and sends it to Bob. Alice also sends Bob the message encrypted in Bob’s key from Trent.
(4)  Bob creates a message consisting of the timestamp plus one, encrypts it in K, and sends it to Alice.
EK(T + 1)

This protocol works, but it assumes that everyone’s clocks are synchronized with Trent’s clock. In practice, the effect is obtained by synchronizing clocks to within a few minutes of a secure time server and detecting replays within the time interval.


Whether by system faults or by sabotage, clocks can become unsynchronized. If the clocks get out of sync, there is a possible attack against most of these protocols [644]. If the sender’s clock is ahead of the receiver’s clock, Mallory can intercept a message from the sender and replay it later when the timestamp becomes current at the receiver’s site. This attack is called suppress-replay and can have irritating consequences.

Previous Table of Contents Next
[an error occurred while processing this directive]