You can't actually encrypt a file without either using a tool (like the ones you mention), writing your own or doing it by hand (with paper and pencil).

## Strong Crypto by hand: Solitare (Pontifex)

An interesting way to start understanding cryptography is to get a deck of playing cards and use Bruce Schneier's "Solitare" encryption method as used in Neal Stevenson in his book Cryptonomicon.

## Other online resources

A good free book that starts with the Caesar Cipher is ftp://ftp.pgpi.org/pub/pgp/6.5/docs/english/IntroToCrypto.pdf

More fun stuff to try the Caesar Cipher
http://www.purdue.edu/discoverypark/gk12/downloads/Cryptography.pdf

A rather mathematical approach to the subject http://math.scu.edu/~eschaefe/crylec.pdf

## Books

Some great books:

- The Code Book by Simon Singh
- Cryptanalysis by Gaines

Update: Here's an extract from Wikipedia:

## Weak Crypto by hand: Caesar Cipher

The transformation can be represented by aligning two alphabets; the cipher alphabet is the plain alphabet rotated left or right by some number of positions. For instance, here is a Caesar cipher using a left rotation of three places (the shift parameter, here 3, is used as the key):

```
Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC
```

When encrypting, a person looks up each letter of the message in the "plain" line and writes down the corresponding letter in the "cipher" line. Deciphering is done in reverse.

```
Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ
Plaintext: the quick brown fox jumps over the lazy dog
```

The encryption can also be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, A = 0, B = 1,..., Z = 25.1 Encryption of a letter x by a shift n can be described mathematically as

Decryption is performed similarly,

(There are different definitions for the modulo operation. In the above, the result is in the range 0...25. I.e., if x+n or x-n are not in the range 0...25, we have to subtract or add 26.)
The replacement remains the same throughout the message, so the cipher is classed as a type of monoalphabetic substitution, as opposed to polyalphabetic substitution.