Private Key XOR Cryptography
The four applets (small applications) on this page let you encrypt, decrypt, and generate private
keys for text messages, and convert plain text to space delimited ASCII (as decimal)
code. The applets use private key XOR encryption. Generated
text that contains "unprintable" (won't display on the screen) characters will
be given as a string of ascii characters as space-delimited decimal numbers.
Java ource code is included with the applets for educational purposes. Viewing
or downloading the source implies your acceptance of these restrictions:
- Use the source code for educational purposes only.
- Give appropriate attribution in all executables and listings derived from
this source.
- Reproduce these restrictions and conditions in any derived programs.
If the Java applets do not appear in the spaces below, you probably need to update your Java
plugin (Java virtual machine, JVM). The latest version from Java.com installs automatically.
Free JVM download with automatic installation.
Private Key XOR Encryption Applet
Encrypt a secret message with a private key. Type or paste in text to be encrypted
into the top text area, and type or paste in a key (or generate one with the
"Generate Random Key" button) in the middle text area, and press the "Encrypt"
button.
Source code: Encrypt.java
Private Key XOR Decryption Applet
Paste the encrypted text from the encryption applet above into the top text area
and the encryption key into the middle text area:
Source code: Decrypt.java
Private Key XOR Key Generation Applet
Compute an XOR encryption key: supply the "encrypted" text and the plaintext
and the decryption key to transform the encrypted text to the plaintext will
be generated. Note that the encrypted and plain text should both be something
that is "printable." For example, "Mary had a little lamb." might be decrypted to
"Its fleece was white as snow." The generated key, of course, will be unprintable
and given as a numeric sequence.
Source code: CryptKey.java
Text to Code Conversion Applet
Convert plain text to space delimited ASCII decimal code.
Source code: TextCode.java
PrivCrypt.html
Hand crafted HTML code, applet, and applet source code copyright 2006-2007, by
Rick Wagner,
all rights reserved.
This page created July 27, 2006.
Last updated June 11, 2007.