DES / AES program

How do I turn in my program?

  1. Make a subdirectory with the same name as your username.
  2. Put your sourcefile(s), a Makefile, a README file, and, if you use Java, a shell script in this directory.
  3. Make a gzipped tar file from the directory (see below).
  4. Send an email where the subject states whether it is DES or AES, and where you include the compressed tarfile as an attachement.
When make has been executed it should be possible to encrypt using the command des (or aes).

Please note!

The input files will consist of a large number of bytes where 8 bytes make a DES-block and 16 bytes make an AES block. The first byte in the input is the first ("leftmostmost") byte in the first DES/AES block and so on. If you are not developing the program on a SUN, beware of endiean problems. The files are not terminated by a newline or any other special characeter.

In order for your program to be a candidate for fastest encryption it must be turned in on time.

How is it going to be tested?

Your program will be built using your makefile. If you are using Java, I will use the module jdk/latest (jdk/1.4.0). If you want something else modify the make-file and the shellscript accordingly. Similarly, for gcc and g++ I will use gcc/3.1.

The programs will be tested both for correctness and speed by running them on several input files. The files will be stored locally on computer. Time will be measured by considering user time and system time as indicated by /usr/bin/time on a Sun Blade 100. The input files will typically be from about 1 Mbyte to 10 Mbyte in size. When determining the fastest program, larger files may be used (roughly enough to make the prgram run for about five seconds).

Note that I want to be able to write
/usr/bin/time des deskey < infile > outfile
(or /usr/bin/time aes aeskey < infile > outfile).

How will results be announced?

Results for the fastest programs will be posted on the course web page. Assuming the winners (one for DES, one for AES) do not mind, their names and code will also be posted.

When you present your solutions you will also get the results for your program. You can of course get a pretty good idea by running time on it yourself.

How do I construct the gzipped tar-file?

For instance, if I (migo) had a C-program called des.c, I would make a subdirectory called migo/ and therein put my README file, the file des.c and a makefile.

The gzipped tar-file migo.tar.gz is created by the commands
tar cf migo.tar migo
gzip migo.tar

excecuted in the directory that contains migo/.

The makefile might simply contain the following lines (note that the second line starts with a tab):
des: des.c
        gcc -O4 des.c -o des

Mikael Goldmann
Last modified: Tue Apr 16 10:15:01 MEST 2002