The above applet is modeled after the Solitaire algorithm, also known as Pontifex in Neal Stephenson's book "Cryptonomicon". For a full explanation of the algorithm, go here: www.counterpane.com/solitaire.html. This version though expandes the basic concept of using a deck of playing cards to a system that can be used in the real world. All characters with the ANSI code of 32 to 122 are compatable with this Pontifex varient.
To Use
This applet isn't complicated to use. First, input a passphrase at the top for the key. In the picture below, it is "This is my key." Now, type in the text you want to encrypt in the text area under the label plaintext. The example is "This is the plaintext to be coded." Now click "Encrypt" and the cyphertext will appear. Clear out the plaintext and click "Decrypt" to see what the cyphertext will appear after decryption. As you can see, it is just as you typed it in. There is no 5-letter blocks in capital letters. Here is the snapshot:
Implementation Notes
To implement the given applet, take all .class files and within the HTML file, have the following:
<APPLET code = "Pontifex_Solitaire_II.class" width = "500" height = "300" > </APPLET>
If you just want the needed classes to encrypt/decrypt, you will need all but Pontifex_Solitaire_II.class. My implementation has each class using another. You will use Coder only for your own coding and decoding with public String encrypt(String plaintext) and public String decrypt(String cyphertext). Coder uses Pontifex to get the keystream, Pontifex uses Deck to generate the keystream, and Deck uses Card.
The folder "Source Code" contains, of course, the source code. Besides the JDK, I used the JCreator IDE found here: www.jcreator.com.
Brian Ogan
www.geocities.com/patriciointp/