CS Unplugged
The Playfair cipher, invented by Sir Charles Wheatstone in 1854, is one of the earliest known examples of a digraph substitution cipher. It was named after its promoter, Lord Lyon Playfair. The cipher gained popularity during the 19th century and was widely used by military and diplomatic organizations due to its enhanced security compared to other classical ciphers of the time.
The Playfair cipher operates on pairs of letters, or digraphs, instead of individual letters. It employs a 5x5 grid, known as the Playfair square, which contains all 26 letters of the English alphabet (combining I and J into one slot). The key to the cipher is a keyword or phrase that determines the arrangement of the letters in the square. The encryption process involves locating each pair of letters in the square and applying a set of rules to determine the corresponding ciphertext. The Playfair cipher remained in use for several decades until more advanced encryption techniques, such as rotor machines and modern computer-based algorithms, emerged in the 20th century. Nonetheless, its contribution to the field of cryptography paved the way for further developments in the science of secure communication.
The Playfair cipher operates on pairs of letters, or digraphs, instead of individual letters. It employs a 5x5 grid, known as the Playfair square, which contains all 26 letters of the English alphabet (combining I and J into one slot). The key to the cipher is a keyword or phrase that determines the arrangement of the letters in the square. The encryption process involves locating each pair of letters in the square and applying a set of rules to determine the corresponding ciphertext. The Playfair cipher remained in use for several decades until more advanced encryption techniques, such as rotor machines and modern computer-based algorithms, emerged in the 20th century. Nonetheless, its contribution to the field of cryptography paved the way for further developments in the science of secure communication.
|
|
CREATING THE DIGRAPH
1. Choose a code word with no repeating letters. (pick a 5 letter word) Example: MAGIS 2. Create a 5 x 5 matrix, writing the code word in the first row. 3. Write the remaining letters alphabetically removing the letter 'J' 4. Choose your ciphertext (text to be encrypted) separating letters into pairs ignoring any spaces. Any double letters are separated by the letter X. In our example let's encrypt "men for others" ME NF OR OT HE RS |
ENCYPTING A MESSAGE
Rule 1: Two ciphertext letters in the same row of the matrix are each replaced by the letter to the left, with the last element of the row circularly following the first.
Rule 2: Two ciphertext letters that fall in the same column of the matrix are replaced by the letters above, with the bottom element of the column circularly following the top.
Rule 3: Otherwise, each ciphertext letter in a pair is replaced by the letter that lies in its own row and the column occupied by the other ciphertext letter.
Following these rules our coded message becomes: IBOELUNUNBUG
Rule 1: Two ciphertext letters in the same row of the matrix are each replaced by the letter to the left, with the last element of the row circularly following the first.
Rule 2: Two ciphertext letters that fall in the same column of the matrix are replaced by the letters above, with the bottom element of the column circularly following the top.
Rule 3: Otherwise, each ciphertext letter in a pair is replaced by the letter that lies in its own row and the column occupied by the other ciphertext letter.
Following these rules our coded message becomes: IBOELUNUNBUG
DECRYPTING A MESSAGE
To decrypt a message, do the opposite of the rules outlined above
To decrypt a message, do the opposite of the rules outlined above