The Playfair Cipher is a simple transposition cipher offering a relatively weak method of encryption. It was used by many countries during wartime and extensively by Britain in World War 1, and Germany during World War 2. It is based around a 5x5 matrix, a copy of which is held by both communicating parties, into which 25 of the 26 letters of the alphabet (normally either j and i are represented by the same letter or x is ignored) are placed in a random fashion i.e.

T J A M U
E V G S Q
P Z B W D
I N O F Y
C H L R K

The plaintext message is then created, stripped of any spaces or punctuation, any required substitutions take place (i.e. I for J, eliminating X etc.) and it is then grouped into pairs of letters. These letter pairs then undergo the following encryption techniques

1) If a double letter occurs insert a 'dummy' letter between them
2) If a letter pair are at the corners of a rectangle,substitute the letters at the opposing corners (eg TO -> AI)
3) If a letter pair are in the same row, substitute the letters one to the right (eg MA -> UM)
4) If the letter pair are in the same column, substitute the letters one below (eg EC -> PT)

To decrypt a message divide the ciphertext into letter pairs and follow the following decryption techniques

1) If the letter pair are in the same column then substitute the letters one position above
2) If the letter pair are in the same row then substitute the letters one position to the left.
If there are any dummy letters it should now become obvious

The main weakness in this method is the fixed encryption/decryption table.