Overview:

• Used by British army in World War I • Type of digraph substitution cipher

Layout:

Untitled

• Construct a 5 x 5 matrix. • Insert the English alphabets into the matrix, starting from the rightbottom corner, going upwards in a spiral manner.

Encryption:

  1. Preprocess the plaintext by padding and removing duplicates.
  2. For every pair of characters, substitute it with a pair of characters in the Playfair square according to the three substitution rules.

Plaintext Preprocessing:

Example: Plaintext: Loss Fight Back L O S S F I G H T B A C K L O S X F I G H T B A C K X plaintext: LO SX FI GH TB AC KX

Substitution Rule 1:

For a pair of characters, if they appear on the same row on the play fair square, then get the character to right of each. Wrap around if needed.

Examples:

IG → HF XB → QL UT → TS

Substitution Rule 2:

For a pair of characters, if they appear on the same column on the play fair square, then get the character below each. Wrap around if needed.

FQ → SP UN → VH FS → SR

Substitution Rule 3:

For a pair of characters, if they appear at the corner of a rectangle, select the two characters in the opposite corners of the rectangle.