HTW Berlin Medieninformatik

HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Aktuelle Themen: Cryptography
Winter Term 2024/25

Lab 8: Diffie-Hellman Key Exchange


  1. Use the discrete logarithm and the Diffie-Hellman Key Exchange protocol to implement a simple simulation. Create a class Alice and a class Bob (could there be a super class here, perhaps?) that choose a random number, compute the one-way function, and set up a connection (remember this? Listening on a socket!) with some other instance of the class. Over this connection the instance exchanges a key with a partner and then calculates the common key.
  2. Test your implementation by setting up Diffie-Hellmann and sending a message from Alice to Bob that only Bob can read and one from Bob to Alice that only Alice can read.
  3. Can you now create a class Eve that can conduct a man-in-the-middle attack on Alice and Bob? What did you have to do?
  4. What would be necessary to keep Eve from doing such an attack? You will need to do some research on this topic. Your answer should not be all-inclusive, but sketch some ideas for determining the validity of the shared key.

The report is due the evening before the next lecture at 22.00!

 


Dr. Hermann Thiel & Prof. Dr. Debora Weber-WulffCC-BY-NC-SA

This material is jointly prepared by Dr. Hermann Thiel and Prof. Dr. Debora Weber-Wulff. Some of the material may come from other sources and is denoted by the copyright notices on the individual pages.