Lably
Skip to content

Needham–Schroeder protocol

Key transport protocol

  • 5 min read
  • 2 chapters

Related on Lably

Through Digital signature

  • The Needham–Schroeder Symmetric Key Protocol, based on a symmetric encryption algorithm. It forms the basis for the Kerberos protocol. This protocol aims to establish a session key between two parties on a network, typically to protect further communication.
  • The Needham–Schroeder Public-Key Protocol, based on public-key cryptography. This protocol is intended to provide mutual authentication between two parties communicating on a network, but in its proposed form is insecure.

Symmetric protocol

Here, Alice (A) initiates the communication to Bob ⁠B⁠. S is a server trusted by both parties. In the communication:

  • A and B are identities of Alice and Bob respectively
  • KAS is a symmetric key known only to A and S
  • KBS is a symmetric key known only to B and S
  • NA and NB are nonces generated by A and B respectively
  • KAB is a symmetric, generated key, which will be the session key of the session between A and B

The protocol can be specified as follows in security protocol notation:

A→S:A,B,NA
Alice sends a message to the server identifying herself and Bob, telling the server she wants to communicate with Bob.
S→A:{NA,KAB,B,{KAB,A}KBS}KAS
The server generates KAB and sends back to Alice a copy encrypted under KBS for Alice to forward to Bob and also a copy for Alice. Since Alice may be requesting keys for several different people, the nonce assures Alice that the message is fresh and that the server is replying to that particular message and the inclusion of Bob's name tells Alice who she is to share this key with.
A→B:{KAB,A}KBS
Alice forwards the key to Bob who can decrypt it with the key he shares with the server, thus authenticating the data.
B→A:{NB}KAB
Bob sends Alice a nonce encrypted under KAB to show that he has the key.
A→B:{NB−1}KAB
Alice performs a simple operation on the nonce, re-encrypts it and sends it back verifying that she is still alive and that she holds the key.

Attacks on the protocol

The protocol is vulnerable to a replay attack (as identified by Denning and Sacco). If an attacker uses an older, compromised value for ⁠KAB⁠, he can then replay the message {KAB,A}KBS to Bob, who will accept it, being unable to tell that the key is not fresh.

Fixing the attack

This flaw is fixed in the Kerberos protocol by the inclusion of a timestamp. It can also be fixed with the use of nonces as described below. At the beginning of the protocol:

A→B:A
Alice sends to Bob a request.
B→A:{A,NB′}KBS
Bob responds with a nonce encrypted under his key with the Server.
A→S:A,B,NA,{A,NB′}KBS
Alice sends a message to the server identifying herself and Bob, telling the server she wants to communicate with Bob.
S→A:{NA,KAB,B,{KAB,A,NB′}KBS}KAS
Note the inclusion of the nonce.

The protocol then continues as described through the final three steps as described in the original protocol above. Note that NB′ is a different nonce from ⁠NB⁠. The inclusion of this new nonce prevents the replaying of a compromised version of {KAB,A}KBS since such a message would need to be of the form {KAB,A,NB′}KBS which the attacker can't forge since she does not have ⁠KBS⁠.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Computing and communication