Discrete Mathematics for Computing: Secure Key Exchange Project¶
University: Prince Sultan University
Course: CS285 - Discrete Mathematics for Computing
Project Title: Secure Key Exchange System (Diffie-Hellman Demonstration)
Instructor: Dr. Jalila Zouhair
Submission Date: November 9, 2025
Team Members
- Shoug Fawaz Alomran
- Fai Mohammad Khanjar
- Aljoharah Waleed Albawardi
- Yara Mutlaq Alzamel
Abstract¶
This project demonstrates how two participants can establish a shared secret using public-key cryptography. The implementation uses the Diffie-Hellman key exchange algorithm, allowing key establishment over an insecure channel without transmitting private values.
After the shared secret is derived, the system uses it for message encryption and decryption. The project also includes validation checks, error handling, and two operating modes: a guided numerical example and an interactive live mode.
Learning Objectives¶
- Apply discrete mathematics concepts used in public-key cryptography.
- Implement Diffie-Hellman key exchange in Java.
- Verify that both participants derive the same shared secret.
- Use the shared secret for encryption and decryption flow validation.
- Document architecture, code behavior, and test evidence in a reproducible format.
Key Insight
Diffie-Hellman security relies on the practical difficulty of solving the discrete logarithm problem for large parameter choices.