The Needham–Schroeder protocol is one of the two key transport protocols intended for use over an insecure network, both proposed by Roger Needham and Michael Schroeder.
initiates the communication to Bob
is a server trusted by both parties.
In the communication: The protocol can be specified as follows in security protocol notation: The protocol is vulnerable to a replay attack (as identified by Denning and Sacco[2]).
If an attacker uses an older, compromised value for
to Bob, who will accept it, being unable to tell that the key is not fresh.
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.
[3] At the beginning of the protocol: The protocol then continues as described through the final three steps as described in the original protocol above.
The inclusion of this new nonce prevents the replaying of a compromised version of
which the attacker can't forge since she does not have
This assumes the use of a public-key encryption algorithm.
to distribute public keys on request.
These keys are: The protocol runs as follows: At the end of the protocol,
This protocol is vulnerable to a man-in-the-middle attack.
to initiate a session with them, they can relay the messages to
, which is unchanged, the attack runs as follows: At the end of the attack,
to encrypt the messages she intends to send to her bank.
her nonce encrypted with the public key of
decrypts the message using their private key and contacts
encrypted with the public key of
responds with their own nonce and encrypts the message with the public key of
is not in possession of the private key of
A decrypts the message with her private key and respond with the nonce of
encrypted with the public key of
decrypts the message using their private key and is now in possession of nonce
Therefore, they can now impersonate the bank and the client respectively.
The attack was first described in a 1995 paper by Gavin Lowe.
[4] The paper also describes a fixed version of the scheme, referred to as the Needham–Schroeder–Lowe protocol.
The fix involves the modification of message six to include the responder's identity, that is we replace: with the fixed version: and the intruder cannot successfully replay the message because A is expecting a message containing the identity of I whereas the message will have identity of