Sept 26th, 2007

CMSC414, Fall 2007
Prof: Udaya Shankar
TA: Phil Huynh

Project 1: Using DES in Java

Description

This project is to get you familiar with the Java Cryptography Extension (JCE) library from Sun, in particular, with the javax.crypto package. You will use the package to complete the implementation of two functions, encryptDES( ) and decryptDES( ), in the supplied file DesEncrypter.java. The first function takes plaintext message and password and returns ciphertext. The second function takes ciphertext and password and returns plaintext message.

Your functions will essentially be wrappers for corresponding encryption functions in javax.crypto. Because of this and the information given below, the project is a piece of cake.

Details

sun.misc.BASE64Decoder/Encoder are classes inside the standard JDK 5.0 but not documented. In order to use these 2 classes, just need to import the package that they belong to, in this case, "import sun.misc.*;" If you are using Eclipse, the "intellisense" feature will allow you to discovery these classes' API.

Any question about the project please direct them to the TA

Delivery and Submission

The file src.zip, avaliable in /afs/glue.umd.edu/class/fall2007/cmsc/414/0101/public/p1_handout, contains the DesEncrypter.java skeleton.

 

Modify the DesEncrypter.java file in src.zip, then re-zip the src directory to src.zip. Do NOT change the directory structure.

Submit the zip file by typing the following in the directory where you have your src.zip:

 

Late submissions

Submit time is as indicated by the clock on the grace machines.

p1tester

For your convenience, we have provided a program p1tester that you can use for testing your solution. You can input a password and a message and it will output the encrypted cipher text, which you can then compare it with the output from your solution.

Additional