Homework 5

Q1: Imagine you are researching security products (e.g. CCTV, alarms etc.) on a helpful website. They ask you for your address details? Think about where this can be bad for you.

A: An adversary is likely able to conclude that you don’t have any security for your house if you are looking for security products for your address. They may also be able to find out which security system you are installing at your address and exploit any known vulnerabilities.

Q2: What can an attacker that controls the network do to a communication between a client and a server?

A: They could very easily perform a Man in the Middle (MitM) attack where they can masquerade as the client to the server and the server to the client.

Q3: Before starting a TCP connection, client and servers perform a three-way handshake. Describe how can this three-way handshake be abused by an attacker?

A: An attacker could spam SYN requests and never complete the handshake. The server will keep track of the handshake state for each of these requests and thus an attacker could cause the server to run out of memory.

Q4: Consider the following simple mutual authentication protocol:

Explain how an attacker can launch an impersonation attack by intercepting all messages for and make decrypt her own challenges.

A: The attacker can simply deflect ’s messages back to her to appear as a friend. For example:

  1. . initiates a challenge with a nonce.
  2. . initiates a challenge with the same nonce provided and waits for to respond.
  3. . responds to ’s challenge as soon as possible.
  4. . responds to ’s challenge with what replied to their challenge, which accepts as it has been encrypted under the key and contains the correct challenge.
  5. . completes the protocol by sending .
  6. . completes the protocol by sending .

Q5: What is the main problem with the following authentication protocol where sends a mutually shared key?

A: The key is sent in clear text.

Q6: Nonces are unpredictable random numbers used in protocols. Consider the following protocol

Write down three facts that can infer after this protocol has been successfully completed?


  • has recieved the message as it can’t just be deflected back on the network as the response requires calculation.
  • could only have generated their answer after the initial message as is always new and random.
  • The response must have come from if only and know the key .

Q7: Write down a protocol which establishes a secret key between and using a mutually trusted third party . You can assume and , respectfully and , share secret keys.


  1. . ( tells that they would like to speak to .)
  2. and . ( responds with a shared key in two forms. One form for after has decrypted and the other encrypted so that only can decrypt it.)
  3. . ( sends the key that only can decrypt to .)
  4. . ( sends message to that only they can decrypt.)

Q8: Consider the following protocol between a car and a key transponder:

  1. generates a random number
  2. calculates
  3. calculates
  4. checks that
  5. checks that

In Step 2 and 4 a message is split into two halves. Explain what the purpose of this split is? Assume the key is shared only between the car and the transponder. Does the protocol achieve that the transponder authenticates itself to the car ? Does the car authenticate itself to the transponder?

A: The purpose of splitting the message is to allow the Car and Transponder to know if their communication channel has been tampered with. A person-in-the-middle is unable to decrypt half of a message and forward it onto the Car or Transponder. Only a complete message can be decrypted and re-encrypted, but the Car and Transponder expect message halves. This results in the Car being able to authenticate the Transponder.

Q9: (Optional) This is question is for you to provide regular feedback to me, for example what were the most interesting, or confusing parts in this lecture? Please feel free to share any other questions or concerns.

A: The handout was extremely useful for revising the protocols this week and it really helped to write down and go through the interlock protocol slowly in my own time.