Project for Handling Credit Card Data using PKI the demo class can be seen here: demo It is interesting to note that the demo is a 'complete round trip' in that for every request it is generating a simple digital signing keypair, a more complex encryption keypair. Wrapping the complex keypair into individually ascii armoured documents, writing said docs to disk, then turning around and reading the public key, using it to encrypt the message, writing that to disk, then reading the private key and message from disk in order to perform the decryption. The demo is using IBM's JDK2-13 and tomcat4 under linux on a 400 mhz pentium 2 and is very responsive. The code breaks down into a couple classes: com.scripps.pki.keystore * `PGPKeyBundle` createKey( String `algorythm`, int size, String name, String email, String passphrase ) ; * `KeyBundleID` saveKey( `PGPKeyBundle` ) ; com.scripps.encryptor * String encrypt( `KeyBundleID` kbid, String message ) ; com.scripps.decryptor * String decrypt( `KeyBundleID` kbid, String passphrase, String ciphertext ) ;