Cryptology - I: Project #1

Instructors: R.E. Newman-Wolfe and M.S. Schmalz


Undergrads:

Pick programs worth a total of 10 points from List 1 and implement only one version of each program selected.

Grads:

Pick programs worth a total of 10 points from List 2 and implement only one version of each program selected.


General:

You shall submit electronically:
  1. Documentation in form of one man page for each program, with format similar to Unix man pages (see /usr/man/man1/*). Include a section for theory of operation. Be sure to specify input and output.
  2. Makefile (see make(1)) - this should be cumulative for the entire term (i.e., every makefile you submit should include commands to make everything you have submitted).
  3. Complete source code, including header files. Code should have sufficient comments internally to aid understanding, and be free of manifest constants (use the #define preprocessor command as needed). Programs should handle erroneous input and provide help to the user.

Read the Programming Hints at the end of this document to help make your life a little easier.


List 1: Undergrads - Encryption/decryption programs

The following programs should read from stdin and write to stdout for the plaintext/ciphertext, reading the key from the command line; or prompt the user for the key and read it from stdin. Alternatively, you can prompt the user for the input and output file names and read them from stdin, reading and writing to files as specified by the user.

The symbol space for plaintext and ciphertext should be the same size, and should either be identical or should be [a..z] for the plaintext symbols space (denoted by P) and [A..Z] for the ciphertext symbol space (denoted by C). In the following options for P and C, the last four have P and C identical. The following are permissible alphabets for this programming assignment:

Be sure to specify which symbol set you are using in your programs. In points calculations, in addition to the points noted below for each cipher, you will get one additional point for implementing symbol set A or C, and two points for implementing symbol set B. This is for the whole assignment, not for each program, except as noted with individual programs.

To obtain credit, you must provide both encryption and decryption programs for each cipher you submit. Specify encryption with -e flag on the command line and decryption with -d flag on the command line. The key provided for decryption should be the same key used for encryption (so the program must compute the inverse key if needed from the encryption key).

Notation. In the following description, let p[i] denote the ith element of the plaintext, c[i] denote the ith element of the ciphertext, and k[i] denote the ith element of the key, starting with i = 0. Also let N be the size of the symbol set and L be the length of the key, with n(s) the numerical position of symbol s in the alphabet (s is in [0..N-1]).

Here follow the undergraduate program choices:


List 2: Graduate Students - Cryptanalysis Programs

Here follows a list of programs that will help you build a "toolkit" for later cryptanalysis projects:


Programming Hints.

Here are some hints to make life a little easier:


This concludes the description for Project #1.