JavaPad in a nutshell Chapter 4, Passphrasing


One problem with encrypting stuff like this is that you need a 100% secure place to
put the keyfile. If you find a 100% secure place let me know:)
Instead of burying a cd-r with a key on somewhere in the local desert, there is another
solution that is much more practical.

Passphrasing is when you encrypt something using a short text or password as keyfile.
There are two programs you can use to do this. PassPhrase and it's swing version SPassPhrase.
Both require you to enter a passphrase, and two filenames (unless overwriting the original file).
The program will then encrypt the specified file with the given passphrase.

If you want to send someone a secret file, and you have to send it over the internet you can do it
like this:

First obtain a keyfile (wich the reciever must also have)
Encrypt the secret file
passphrase the encrypted file with a passphrase (wich the receiver must also know)
send the encrypted file

The receiver then passphrases the file and uses the key to decrypt it.

NOTE:
You can also use just a passphrase without a keyfile but this is not nearly as secure as using
a big nice keyfile made up of random bytes.
You can also passphrase the secretfile and then encrypt it with the keyfile.

If you want to use PassPhrase from another application, just follow the description in the sourcecode
(PassPhrase.java), look especially in the Inner class for passPhrasing as a Thread.
If you have any problems just mail me at erlend@klogd.net

-End of chapter 4
<- Last Next ->