CSE497b - Project #3 - Networked DH-Hughes Protocol

Due Date: March 27th, 2007.

This assignment demonstrates the use of previously developed library functions to implement a cryptographic protocol. In particular, you will be required to use the Gnu multiprecision and crypto libraries to implement Diffie-Hellman (Hughes variant) based secure file transfer. Note that this assignment is significantly more difficult than it may seem at first. Do not attempt to do this work in the last few days before the assignment is due.

Follow these instructions

  1. Obtain the tarfile from here.

  2. Unpack the tarfile in some appropriate directory on a UNIX system (there are many available at CSE -- see Notes below).

  3. You are to implement a secure file transfer program that communicates a file between the client and server. The idea is that the client encrypts the file using the Hughes variant of Diffie-Hellman that you developed in the last project, and sends the encrypted file to the server. The server (the part that you are building) must: (1) complete the DH-Hughes exchange with the client; (2) decrypt the file using the resultant key; and (3) return the decrypted file to the client. You are given the protocol client implementation and required to complete the following tasks:

  4. When you have completed the code, email it to the course professor by 5:00pm on the 27th. Please attach a tar file containing all the original source, your documented protocol file, plus your additions. Failure to compile or execute properly will likely result in a failing grade for the assignment. You will also need to hand in your documentation for the protocol implemented.


  1. You should to replace the initAppCryptoLibrary function from the original appcrypto with the one in the tarfile.

  2. If you are using the Solaris systems in Lab 222 (don't bother with 218), then you will need to do some things:

  3. You are to complete this on your own. Any sharing of code or help during the coding of this project is expressly forbidden. Do not discuss this project with anyone.

  4. A Makefile has been created to help you build the applications. To build, simply type "make" in the target directories.


gcrypt library -- As part of this assignment, you will be required learn and use the GNU cryptography library. Details of this library are presented in the manual. Do not contact the professor or TA (or anyone else) for information about this library -- learning how to use it is part of the exercise.

Here is example output for the client and server. Note that I only print the DH parameters in the client output.

Trent Jaeger
Last modified: Feb 28 06:43:07 EST 2007