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
3.3 Authentication and Key Exchange
These protocols combine authentication with key exchange to solve a general computer problem: Alice and Bob are on opposite ends of a network and want to talk securely. How can Alice and Bob exchange a secret key and at the same time each be sure that he or she is talking to the other and not to Mallory? Most of the protocols assume that Trent shares a different secret key with each participant, and that all of these keys are in place before the protocol begins.
The symbols used in these protocols are summarized in Table 3.1.
Wide-Mouth Frog
The Wide-Mouth Frog protocol [283,284] is probably the simplest symmetric key-management protocol that uses a trusted server. Both Alice and Bob share a secret key with Trent. The keys are just used for key distribution and not to encrypt any actual messages between users. Just by using two messages, Alice transfers a session key to Bob:
TABLE 3.1 Symbols used in authentication and key exchange protocols
|
|
A
| Alices name
|
B
| Bobs name
|
EA
| Encryption with a key Trent shares with Alice
|
EB
| Encryption with a key Trent shares with Bob
|
I
| Index number
|
K
| A random session key
|
L
| Lifetime
|
TA,TB
| A timestamp
|
RA,RB
| A random number, sometimes called a nonce, chosen by Alice and Bob respectively
|
|
- (1) Alice concatenates a timestamp, Bobs name, and a random session key and encrypts the whole message with the key she shares with Trent. She sends this to Trent, along with her name.
- A,EA(TA,B,K)
- (2) Trent decrypts the message from Alice. Then he concatenates a new timestamp, Alices name, and the random session key; he encrypts the whole message with the key he shares with Bob. Trent sends to Bob:
- EB(TB,A,K)
The biggest assumption made in this protocol is that Alice is competent enough to generate good session keys. Remember that random numbers arent easy to generate; it might be more than Alice can be trusted to do properly.
Yahalom
In this protocol, both Alice and Bob share a secret key with Trent [283,284].
- (1) Alice concatenates her name and a random number, and sends it to Bob.
- A,RA
- (2) Bob concatenates Alices name, Alices random number, his own random number, and encrypts it with the key he shares with Trent. He sends this to Trent, along with his name.
- B,EB(A,RA,RB)
- (3) Trent generates two messages. The first consists of Bobs name, a random session key, Alices random number, and Bobs random number, all encrypted with the key he shares with Alice. The second consists of Alices Zname and the random session key, encrypted with the key he shares with Bob. He sends both messages to Alice.
- EA(B,K,RA,RB),EB(A,K)
- (4) Alice decrypts the first message, extracts K, and confirms that RA has the same value as it did in step (1). Alice sends Bob two messages. The first is the message received from Trent, encrypted with Bobs key. The second is RB, encrypted with the session key.
- EB(A,K),EK(RB)
- (5) Bob decrypts the message encrypted with his key, extracts K, and confirms that RB has the same value as it did in step (2).
At the end, Alice and Bob are each convinced that they are talking to the other and not to a third party. The novelty here is that Bob is the first one to contact Trent, who only sends one message to Alice.
Needham-Schroeder
This protocol, invented by Roger Needham and Michael Schroeder [1159], also uses symmetric cryptography and Trent.
- (1) Alice sends a message to Trent consisting of her name, Bobs name, and a random number.
- A,B,RA
- (2) Trent generates a random session key. He encrypts a message consisting of a random session key and Alices name with the secret key he shares with Bob. Then he encrypts Alices random value, Bobs name, the key, and the encrypted message with the secret key he shares with Alice. Finally, he sends her the encrypted message:
- EA(RA,B,K,EB(K,A))
- (3) Alice decrypts the message and extracts K. She confirms that RA is the same value that she sent Trent in step (1). Then she sends Bob the message that Trent encrypted in his key.
- EB(K,A)
- (4) Bob decrypts the message and extracts K. He then generates another random value, RB. He encrypts the message with K and sends it to Alice.
- EK(RB)
- (5) Alice decrypts the message with K. She generates RB - 1 and encrypts it with K. Then she sends the message back to Bob.
- EK(RB - 1)
- (6) Bob decrypts the message with K and verifies that it is RB - 1.
All of this fussing around with RA and RB and RB - 1 is to prevent replay attacks. In this attack, Mallory can record old messages and then use them later in an attempt to subvert the protocol. The presence of RA in step (2) assures Alice that Trents message is legitimate and not a replay of a response from a previous execution of the protocol. When Alice successfully decrypts RB and sends Bob RB - 1 in step (5), Bob is ensured that Alices messages are not replays from an earlier execution of the protocol.
[an error occurred while processing this directive]