Summary

We wanted to write Java programs to test encryption and decryption. We decided to work on an encryption/decryption project using the Caesar Cipher [1]. The challenge was to use the computer to decide which decryption shift was the correct one by brute force testing  all the possible shifts for real English words.

 

We found and modified an open source (GPL) Java Caesar Cipher library [2] to use to encrypt our plain text input. Then we wrote the encryption and decryption programs using this library.

 

The challenge for this project was to use the computer to try all possible shifts and analyze the outputs for sequences of English words. The decryption program generates a report on which shift was the best based on how many English words were found. We found an open source Java spelling checker library (Jazzy) [3] to use for this project but it took us a long time to get this code to work to test the decryption. This was one of the  hardest parts of our project.

 

We also used the spelling checker to separate the decrypted text into words. The input had all spaces removed and was uppercased so there were no word breaks. Separating the text back into words (adding the spaces back in) was also a hard part of the project.

 

We tested different types of text, like Robin Hood and Alice in Wonderland from the Project Gutenberg website [4] and articles from Wikipedia such as Algebra and Java.

 

We achieved our goal of using the spelling checker to figure out which shift was the correct one for the decryption.