Problems

Numbers and Symbols

 

Our encryption program had a problem with numbers and symbols. We solved this by just not encrypting or decrypting non-alphabetical characters in the input. Since Caesar, a Roman emperor, would not have had these in his text, it was decided that our Caesar Cipher should be ignoring these characters.

 

Example original Input: Java is a programming language originally developed by Sun Microsystems and released in 1995 [8]

Encrypted Text (shift = 11): ULGLTDLACZRCLXXTYRWLYRFLRPZCTRTYLWWJOPGPWZAPOMJDFYXTNCZDJDEPXDLY OCPWPLDPOTY1995

Decrypted Input (shift = 11): JAVAISAPROGRAMMINGLANGUAGEORIGINALLYDEVELOPEDBYSUNMICROSYSTEMSAND RELEASEDIN1995

Integrating with Jazzy

One of the hardest parts of our project was to integrate the Jazzy spelling checker with our decryption program. We spent several weeks of experimenting with the spelling checker and making changes to our code to find the English words.

Spacing and Finding Words

The spelling checker did a good job of finding the English words and our program also found longer words and compound words that started with English words. But adding spaces back into the decrypted text gave us some problems. After finishing finding an English word we added the space between the last word found and the new word. But Jazzy would not return unknown (but real) words that were not in its dictionary so these were totally skipped in the output. For example if the decrypted input was:

 

 INMERRYENGLANDINTHETIMEOFOLD,WHENGOODKINGHENRYTHESECONDRULEDTHEL AND ...

 

We wanted the output to be:

 

IN MERRY ENGLAND IN THE TIME OF OLD,WHEN GOOD KING HENRY THE SECOND RULED THE LAND ...

 

But the output (on the first pass) was:

 

IN MERRY ENGLAND IN THE TIME OF OLD WHEN GOOD KING HEN THESE ON RULED THE LAND ...

 

which was wrong because the RY of HENRY was missing. Henry is not in the spelling checker dictionary, so the word finder stopped at Hen and left out the RY because this is not a valid word. It starts again when it found the word THESE.

 

Another problem is shown in these results. Our program tries to find the longest English word that starts with any valid word found. This is to avoid finding cat and not caterpiller because the erpiller is not a valid word and would be rejected by the spelling checker so that not all the valid English words in the decrypted text would be found.

 

But this leads to a problem that sometimes the shortest word found is the correct word. We cannot stop the program from finding the and continuing on to find these when the input is thesecond. The correct output is the second but the program will not stop at the when it can find these in this sequence of characters [thesecond] ->  [these][cond] and the spelling checker would reject cond, just finding on. As a result the output would end up being these on instead of what it is supposed to be.