CS 69011 Information Processing Laboratory, Autumn 2003

Assignment 2: Implementation of DES


This assignment instructs the students:

What is DES?

Data Encryption Standard (DES) is a standard encryption algorithm proposed by the US Department of Commerce. DES and its several variants are now widely used for asymmetric encryption.

Suppose that Alice wants to send a message M to Bob using a communication channel, where a third party (Carol) can intercept others' messages. In order to make the message M inaccessible to Carol, Alice transforms M to C = E(M,K) and sends the resulting ciphertext C to Bob. Bob upon receiving C retrieves the plaintext M = D(C,K). The function E is called the encryption function and D the decryption function. They use a key K which introduces the desired privacy in the scheme. Alice and Bob both know K and can encrypt and decrypt, whereas Carol (or Dorothy or Emily) without the knowledge of k cannot make out M even if she obtains C by intercepting the communication channel.

There are several ways in which the (matching) functions E and D can be designed. DES is one popular building block for encryption. Alice first breaks up her secret message M into blocks of 64 bits and encrypts each block using the DES primitive and a secret key K known to Alice and Bob only.

A complete specification of DES is available as a FIPS document at the site: http://www.itl.nist.gov/fipspubs/fip46-2.htm. There are variants of this basic DES scheme, like 2-DES, 3-DES and DESX. In order to encrypt multiple blocks, one typically uses a feedback loop known as cipher block chaining (CBC). In order to know more about the DES variants and the CBC mode of operation, we refer the reader to the book by Menezes, van Oorschot and Vanstone: Handbook of Applied Cryptography (HAC), Chapter 7 (Block Ciphers). We will also distribute sample pages from books in the class.

What to do?

Part 1
Implement the encryption and decryption routines for DES, 2-DES, 3-DES.

Part 2
Implement the CBC modes of operation of the three DES primiives of Part 1.

Part 3
Encrypt English paragraphs by DES, send to your friend and let your friend decrypt your ciphertext. Note that in this context you are your friend's friend.

Part 4
Implement differential cryptanalysis for DES.

How to do?

Use the following step-by-step development:

Downloaded documents

[Lab home] [My home]