JavaPad in a nutshell Chapter 3, Encrypting and decrypting


You should now know how to make a key, and it's a simple matter to start encrypting

just encrypt the program by running the JavaPad program.
"java JavaPad <inputfile> <keyfile> <outputfile>"

This will encrypt the information in the file  with the key in <keyfile>
and put the output in the file <outputfile>.
Thats it.
To decrypt the file just reverse the process, by using the ciphertext as inputfile.
The file can now only be decrypted with the file <keyfile>, so dont loose it.


To continue on the example from last chapter, you and Picard has agreed on 
encrypting your files using a zipfile of "Romeo & Juliet" as keyfile.

You then enter "java JavaPad secretdocument.html romeandjuliet.gz encryptedfile"
this stores the encrypted secretdocument in the encryptedfile.

Then it's just sending the file, and picard makes it readable with the following command
"java JavaPad encryptedfile romeandjuliet.gz plaintext.html"
and can then view the plaintext.html file.

And Tomalak must head back to Romulus without any federation secrets.



If you wish to do encryption/decryption from another java application please read chapter6

-End of chapter 3
<- Last Next ->