One Time Pad Notes


The security of OTP depends on the randomness of the key data and only using
each key once. Never use the same key twice with this program, as that will
seriously affect the security of the encrypted data. 

The key generator supplied with this is not very random, if you really need 
a good random key generator, you best find or write one yourself. The key
generator supplied with this is, however, suitable for most 'household' uses.
I wouldn't reccomend encrypting highly sensitive data using a key made with
the generator I've supplied. The key generator was written to be simple and
to work on (almost) any system, using C's rand() function for the randomness,
there are many key generators and/or random number generators that would be 
much better for highly sensitive keys. 

The source files included here should compile on almost any system with an
ANSI C compiler. To compile with gcc, use "gcc otp.c -o otp", with any other
compiler, RTFM.

Example Usage:

you want to encrypt "secret.txt" a file around 3k in size, first, generate a 
key by running the key generation program. Name the key key.txt (or something)
and set the size at 3 or 4k. Run the otp program using secret.txt as the input
and key.txt as the keyfile, out.txt or something can be your output file.

When you're done encrypting a file, I reccomend deleting the original plaintext
file. I'd also reccomend using other encryption programs such as PGP to encrypt
your key file to ensure the security of the encrypted data.