Classical Polygraphic Ciphers Day 10
Playfair cipher Named after Lord Playfair. Invented by Wheatstone in 1854. Encrypts digrams Used in Second Boer War, WWI, WWII Solution to breaking the cipher was in 1914.
Playfair cipher Encryption Choose a keyword and write in a 5 x 5 square then fill in remaining, omitting “j” for “i”
Playfair cipher encryption If both letters are the same (or only one letter is left), add an "X" after the first letter. Encrypt the new pair and continue. Some variants of Playfair use "Q" instead of "X", but any uncommon monograph will do. If the letters appear on the same row of your table, replace them with the letters to their immediate right respectively (wrapping around to the left side of the row if a letter in the original pair was on the right side of the row). If the letters appear on the same column of your table, replace them with the letters immediately below respectively (wrapping around to the top side of the column if a letter in the original pair was on the bottom side of the column). If the letters are not on the same row or column, replace them with the letters on the same row respectively but at the other pair of corners of the rectangle defined by the original pair. The order is important – the first encrypted letter of the pair is the one that lies on the same row as the first plaintext letter. http://en.wikipedia.org/wiki/Playfair_cipher
Playfair cipher decryption To decrypt, use the inverse of these 4 rules (dropping any extra "X"s (or "Q"s) that don't make sense in the final message when you finish). http://en.wikipedia.org/wiki/Playfair_cipher
Playfair example Plaintext:_______________________________________________ Keyword:________________________
Playfair cryptanalysis For very large ciphertext samples, vulnerable to frequency analysis. Vulnerable to know plaintext attach.
Hill cipher Invented by Lester S. Hill in 1929 Able to encrypt digrams, trigrams, tetragrams, etc. Uses elementary linear algebra Patent 1,845,947 in 1929 for a 6 x 6 implementation
Hill cipher encryption Each letter is treated as a letter in base 26: A = 0, B = 1,… The key is a random invertible matrix a in Place blocks of n letters of the plaintext into a vector v Multiply the key matrix by the vector (a.v)
Hill cipher decryption Each letter is treated as a letter in base 26: A = 0, B = 1,… Multiply the inverse of key matrix by the vector (a-1.v)
Hill cipher cryptanalysis Each letter is treated as a letter in base 26: A = 0, B = 1,… Multiply the inverse of key matrix by the vector (a-1.v)
Hill cipher assignment