Extra instructions for the assignment:

1) First, install the ant binaries.  You may download them from http://ant.apache.org/
2) Make sure the ant binaries are part of your shell path.  For instance, if you use bash as a shell and installed your apache ant right under your home directory, you may type "export PATH=$PATH:<home_directory_path>/apache_ant-1.6.2/bin"
3) Download the assignment package: srp.zip and the file containing the safe prime to use: safeprime.object (zipped)
4) Unzip the package.  Change directory to srp/src
5) Create a directory under your name.  For instance, Lara Croft's directory would be lcroft. (All lowercase letters.)
6) All your code will be created within that directory.  All your classes will start with the declaration package <yourname>;
7) Make sure your CLASSPATH variable includes the file lib/srp.jar.  For instance, if you are using bash, you can say
"export CLASSPATH=$CLASSPATH:lib/srp.jar"

8) Whenever you want to compile your files, you may run "ant" from the top directory "srp".
9) When you want to document your files, you may run "ant doc" from the top directory "srp".
10) When you want to run some file type its directory_name.class_name.  For instance, to run the class ClientGUI, which is declared in package srp (directory src/srp), type "java srp.ClientGUI".

These are just some extra information about implementing the messages in the SRP protocol.

Authentication Messages:

Message 1
Integer
byte[]
BigInteger


Message 2
Integer
byte[]
BigInteger


Message 3
Integer
byte[]


Message 4
Integer
byte[]


Communication Messages:

Message n
Integer
byte[]


Each message has at least two parts, as the first part is an Integer encapsulating the message type, an regular int value.

The authentication messages have a non-null byte array that contains specific information:
The communication messages contain a (possibly null) byte array with the contents of the communication.
One example of a communication message that may have a null byte array is a "hangup" message:  It does
not need to carry any content, only its type.

Messages 1 and 2 of the authentication protocol have a third component:  a BigInteger which is their contribution
to the computation of the shared secret from which the session key is extracted.

In order to pack all components of the message, you have to:

1) Encapsulate the int value of the message type as an Integer
2) Create an Object[] (Object array) and assign its first entry to the Integer, second to the (possibly null) byte[] and third (if applicable)
to the BigInteger
3) Cast the Object[] as a plain Object and write it out.