CSci 4554 Lab 3. DES evaluation.

Due Friday, March 26th at 11:59pm (by e-mail)

40 points total

Description

This lab is done in groups of 2. The goal of the lab is to implement DES and evaluate the quality of 2 rounds of DES encryption using statistical analysis.

Resources

DES (Data Encryption Standard) algorithm is publicly known and described in all details. The only secret portion of DES encryption is the key.

Tasks for the lab:

Collaboration

DES implementation

  1. Write a function (a method) that takes a 32-bit binary plaintext and a 48-bit key and encrypts the plaintext using a DES round with that key.
  2. Write a program that runs N rounds of DES (recall that DES works as a Feistel cipher, i.e. it encrypts only half of the current text in one round.
  3. . We ignore the initial permutation.
  4. Write a function to choose 48 bits (each) for the first and second rounds of DES according to the key schedule.

Statistical analysis

The goal is to determine whether any patterns of the original plaintext are preserved after two rounds of DES. Compare decryption of very structured patterns to that of random bit-strings. For each encryption try comparing frequencies of zeros and ones in the resulting encryption or in any of its subsets (e.g. the first half or all odd-numbered bits). Specifically you need to try the following:

  1. At least three very structured patterns, such as all zeros, half ones half zeros, etc.
  2. At least three randomly generated plaintexts (use a seeded random number generator for repeatability), for comparison to patterned plaintexts
  3. Three random 56-bit keys of 0s and 1s (with equal probability of each) that will be used in the DES

Encrypt each of the six plaintexts using two rounds of DES with each of the three keys (choose the key bits according to the key schedule) and try statistical analysis to see if frequencies of bits in the entire ciphertexts or in its portion (or individual bits) are predictable from the plaintext. The dependencies must manifest themselves for all three keys and must be clearly distinct from encryption of a random plaintext.

Write down your analysis, the results, and the conclusions. Submit all your code, including supplemental code (e.g. programs that you used for statistical analysis, such as R or statistical packages, if you choose to use them).

What to submit (by e-mail to me, CC your partner)

  1. All your program code (well-documented) and instructions for running it.
  2. All the keys and the plaintexts that you used and all the corresponding ciphertexts.
  3. Any helper code that you used.
  4. Your detailed analysis and conclusions.

CSci 4554 course web site.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.