HOME

TheInfoList



OR:

The Needham–Schroeder protocol is one of the two key transport protocols intended for use over an insecure network, both proposed by
Roger Needham Roger Michael Needham (9 February 1935 – 1 March 2003) was a British computer scientist. Early life and education Needham was born in Birmingham, England, the only child of Phyllis Mary, ''née'' Baker (''c''.1904–1976) and Leonard Wil ...
and Michael Schroeder. These are: * 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 A session key is a single-use symmetric key used for encrypting all messages in one communication session. A closely related term is content encryption key (CEK), traffic encryption key (TEK), or multicast key which refers to any key used for en ...
between two parties on a network, typically to protect further communication. * The ''Needham–Schroeder Public-Key Protocol'', based on
public-key cryptography Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic a ...
. This protocol is intended to provide mutual
authentication Authentication (from ''authentikos'', "real, genuine", from αὐθέντης ''authentes'', "author") is the act of proving an assertion, such as the identity of a computer system user. In contrast with identification, the act of indicatin ...
between two parties communicating on a network, but in its proposed form is insecure.


The symmetric protocol

Here,
Alice Alice may refer to: * Alice (name), most often a feminine given name, but also used as a surname Literature * Alice (''Alice's Adventures in Wonderland''), a character in books by Lewis Carroll * ''Alice'' series, children's and teen books by ...
(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 * is a symmetric key known only to A and S * is a symmetric key known only to B and S * N_A and N_B are nonces generated by A and B respectively * is a symmetric, generated key, which will be the
session key A session key is a single-use symmetric key used for encrypting all messages in one communication session. A closely related term is content encryption key (CEK), traffic encryption key (TEK), or multicast key which refers to any key used for en ...
of the session between A and B The protocol can be specified as follows in
security protocol notation In cryptography, security (engineering) protocol notation, also known as protocol narrations and Alice & Bob notation, is a way of expressing a protocol of correspondence between entities of a dynamic system, such as a computer network. In the con ...
: A \rightarrow S: \left . A,B,N_A \right . :Alice sends a message to the server identifying herself and Bob, telling the server she wants to communicate with Bob. S \rightarrow A: \_ :The server generates and sends back to Alice a copy encrypted under 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 \rightarrow B: \_ :Alice forwards the key to Bob who can decrypt it with the key he shares with the server, thus authenticating the data. B \rightarrow A: \_ :Bob sends Alice a nonce encrypted under to show that he has the key. A \rightarrow B: \_ :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 K_, he can then replay the message \_ 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 A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. Timestamps do not have to be based on some absolut ...
. It can also be fixed with the use of nonces as described below. At the beginning of the protocol: :: A \rightarrow B: A :Alice sends to Bob a request. :: B \rightarrow A: \_ :Bob responds with a nonce encrypted under his key with the Server. :: A \rightarrow S: \left . A,B,N_A,\_ \right . :Alice sends a message to the server identifying herself and Bob, telling the server she wants to communicate with Bob. :: S \rightarrow A: \_ :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 N_B' is a different nonce from N_B. The inclusion of this new nonce prevents the replaying of a compromised version of \_ since such a message would need to be of the form \_ which the attacker can't forge since she does not have K_.


The public-key protocol

This assumes the use of a public-key encryption algorithm. Here, Alice (A) and Bob (B) use a trusted server (S) to distribute public keys on request. These keys are: * K_ and K_, respectively public and private halves of an encryption key-pair belonging to A (S stands for "secret key" here) * K_ and K_, similar belonging to B * K_ and K_, similar belonging to S. (Note that this key-pair will be used for
digital signature A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature, where the prerequisites are satisfied, gives a recipient very high confidence that the message was created b ...
s, i.e., K_ used for signing a message and K_ used for verification. K_ must be known to A and B before the protocol starts.) The protocol runs as follows: A \rightarrow S: \left . A, B \right . :A requests B's public keys from S S \rightarrow A: \_ :S responds with public key K_ alongside B's identity, signed by the server for authentication purposes. A \rightarrow B: \_ :A chooses a random N_A and sends it to B. B \rightarrow S: \left. B, A \right . :B now knows A wants to communicate, so B requests A's public keys. S \rightarrow B: \_ : Server responds. B \rightarrow A: \_ :B chooses a random N_B, and sends it to A along with N_A to prove ability to decrypt with K_. A \rightarrow B: \_ :A confirms N_B to B, to prove ability to decrypt with K_ At the end of the protocol, A and B know each other's identities, and know both N_A and N_B. These nonces are not known to eavesdroppers.


An attack on the protocol

This protocol is vulnerable to a
man-in-the-middle attack In cryptography and computer security, a man-in-the-middle, monster-in-the-middle, machine-in-the-middle, monkey-in-the-middle, meddler-in-the-middle, manipulator-in-the-middle (MITM), person-in-the-middle (PITM) or adversary-in-the-middle (AiTM) ...
. If an impostor I can persuade A to initiate a session with them, they can relay the messages to B and convince B that he is communicating with A. Ignoring the traffic to and from S, which is unchanged, the attack runs as follows: A \rightarrow I: \_ :A sends N_A to I, who decrypts the message with K_ I \rightarrow B: \_ :I relays the message to B, pretending that A is communicating B \rightarrow I: \_ :B sends N_B I \rightarrow A: \_ :I relays it to A A \rightarrow I: \_ :A decrypts NB and confirms it to I, who learns it I \rightarrow B: \_ :I re-encrypts N_B, and convinces B that she's decrypted it At the end of the attack, B falsely believes that A is communicating with him, and that N_A and N_B are known only to A and B. The following example illustrates the attack. Alice (A) would like to contact her bank (B). We assume that an impostor (I) successfully convinces A that they are the bank. As a consequence A uses the public key of I instead of using the public key of B to encrypt the messages she intends to send to her bank. Therefore, A sends I her nonce encrypted with the public key of I. I decrypts the message using their private key and contacts B sending it the nonce of A encrypted with the public key of B. B has no way to know that this message was actually sent by I. B responds with their own nonce and encrypts the message with the public key of A. Since I is not in possession of the private key of A they have to relay the message to A without knowing the content. A decrypts the message with her private key and respond with the nonce of B encrypted with the public key of I. I decrypts the message using their private key and is now in possession of nonce A and B. Therefore, they can now impersonate the bank and the client respectively.


Fixing the man-in-the-middle attack

The attack was first described in a 1995 paper by
Gavin Lowe Gavin Lowe (born 1 March 1995 in Carluke) is a Scottish international 7s rugby union player at the Full Back position. Rugby union career Amateur career Lowe first played his rugby for Ayr Rugby but moved on to the Glasgow Hawks. He was ...
. 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: B \rightarrow A: \_ with the fixed version: B \rightarrow A: \_ 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 B.


See also

* Kerberos * Otway–Rees protocol * Yahalom * Wide Mouth Frog protocol * Neuman–Stubblebine protocol * Diffie-Hellman key exchange


References


External links

* * *
Explanation of man-in-the-middle attack
by Computerphile. {{DEFAULTSORT:Needham-Schroeder Protocol Authentication protocols Key transport protocols Symmetric-key cryptography Computer access control protocols Telecommunication protocols