180 likes | 264 Vues
Classical Monoalphabetic Ciphers. Day 2. Keyword cipher. Select a keyword, if the keyword has any repeated letters, drop all but the first occurrence. Write the keyword below the alphabet and fill in the rest of the space with the remaining letters of the alphabet in their standard order.
E N D
Keyword cipher • Select a keyword, if the keyword has any repeated letters, drop all but the first occurrence. • Write the keyword below the alphabet and fill in the rest of the space with the remaining letters of the alphabet in their standard order. • VBA Code • Modification: Allow the keyword to start anywhere along the alphabet.
Keyword: cryptanalysis • Dictionary attach using a computer. • Every letter of a language has a personality of its own. • Determine the personality of each character in the ciphertext and try to match them with the known personalities of corresponding plain text. • This attach was used as early as the 9th century, by Arab scientist and philosopher al-Kindi.
Frequency analysis • Assignment: • Download “Frequency_Analysis.xls” from the SMA website. • Find a 200-500 word section of common English writing. Copy and format it in Word. • Copy it. • Use it in the Excel spreadsheet to do a single, double, and triple letter frequency count.
Frequency analysis • “r” forms digrams with more different letters more often than any other letter. • The three vowles, “a”, “I”, and “o” avoid each other, except for “io”. • “ea” is the most frequent digram involving vowels. • Eight percent of the letters that procede “n” are vowels. • “h” frequently appears before “e” and almost never after it.
Frequency analysis • Be willing to give up on an assumption and try something else if it appears that you are on the wrong path.
Affine cipher • Each letter is assigned a number. “a” = 0, “b” = 1, “c” = 2, … • The key to an affine cipher is a pair of numbers (a, b). • The greatest common divisor (GCD) of a and 26 must be 1. • Let p be the number of the plaintext letter and c the number of the ciphertext letter. • c = (a p + b) mod 26 • p = (a-1(c – b)) mod 26
Note: a a-1 = 1 (mod n) Affine: example • a = 3, b = 7 • Find the equations for encryption and decryption. • Encrypt the message “the dog” • Decrypt the message “TIVUJWL”
Affine: cryptanalysis • Is an affine cipher easier or harder to break then a keyword cipher? • How would we break an affine cipher?
Multiliteral cipher • It replaces each plaintext letter with a pair of letters. • Choose a 5 letter keyword with no repeating letters. • “i” and “j” occupy the same cell.
Multiliteral: cryptanalysis • Is an multiliteral cipher easier or harder to break then a keyword cipher? • How would we break an multiliteral cipher?
Monoalphabetic cipher history • The Argentis worked for the Pope during the late 1500 and early 1600s. • Probably first to use keyword • Numbers were used instead of letters • Used by the South during the Civil War.
Monoalphabetic cipher history • Middle Ages – nomenclator • Monoalphabetic and some substitutions for words or phrases • Mary, Queen of Scots