Presentation is loading. Please wait.

Presentation is loading. Please wait.

Announcements: Homework 1 coming Monday… Homework 1 coming Monday… Practical quiz during week 4 on putting your code to work Practical quiz during week.

Similar presentations


Presentation on theme: "Announcements: Homework 1 coming Monday… Homework 1 coming Monday… Practical quiz during week 4 on putting your code to work Practical quiz during week."— Presentation transcript:

1 Announcements: Homework 1 coming Monday… Homework 1 coming Monday… Practical quiz during week 4 on putting your code to work Practical quiz during week 4 on putting your code to workQuestions?Today: Wrap up LFSR ciphers Wrap up LFSR ciphers Substitution, Playfair, and ADFGX ciphers Substitution, Playfair, and ADFGX ciphers DTTF/NB479: DszquphsbqizDay 8

2 LFSR Demo Determine key length by computing determinants Use the key length to solve for the recurrence. Verify your solution by using the solution to generate the whole key

3 Substitution ciphers Each letter in the alphabet is replaced by another one. Which ciphers have we seen are substitution ciphers? Which ciphers have we seen are substitution ciphers? Which aren’t and why? Which aren’t and why? Breaking ciphertext only uses linguistic structure. Frequencies of: Single letters Single letters Digrams (2-letter combinations) Digrams (2-letter combinations) Trigrams Trigrams Where do T&W get their rules like “80% of letters preceding n are vowels”? (p. 26) Where do T&W get their rules like “80% of letters preceding n are vowels”? (p. 26) See http://keithbriggs.info/documents/english_latin.pdf http://keithbriggs.info/documents/english_latin.pdf Lots of trial and error when done by hand. Could automate with a dictionary.

4 Playfair ciphers Matrix-based block cipher used in WWI In a 5x5 matrix, write the letters of the word “playfair” (for example) without dups, and fill in with other letters of the alphabet, except I,J used interchangeably.

5 Playfair encryption 1.Break plaintext into letter pairs If a pair would contain double letters, split with x Pad end with x hellothere becomes… he lx lo th er ex 2.For each pair, If they are in the same row, replace each with the letter to its right (mod 5) he  KG If they are in the same column, replace each with the letter below it (mod 5) lo  RV Otherwise, replace each with letter we’d get if we swapped their column indices lx  YV He lx lo th er ex KG YV RV QM GI KU To decrypt, just reverse!

6 Weaknesses P is unknown, but structure of its bottom is predictable Can break using digram frequencies Example: If a digram and its reverse both appear often, it’s probably ER and RE. Each plaintext letter maps to how many possible ciphertext letters? He lx lo th er ex KG YV RV QM GI KU

7 Playfair ciphers Used in Dorothy L. Sayers’ 1932 mystery novel Have His Carcase Marketing beats technology? Invented by Charles Wheatstone Invented by Charles Wheatstone Lyon Playfair, a Scottish Baron, promoted it Lyon Playfair, a Scottish Baron, promoted it Who got the glory? Who got the glory?

8 ADFGX ciphers Why ADFGX? Morse code for these are very different Combined cryptography with error-correction Matrix 1: 25 letters (i and j merged again) randomly placed Each plaintext letter replaced by its row and column labels hello there  XA FA AA AA FF DG XA FA DF FA ADFGX Alkpbq Dmvrtz Fefodg Gxciyn Xhuwas

9 ADFGX ciphers (2) XA FA AA AA FF DG XA FA DF FA Matrix 2: pick a random keyword and write the previous result under it in scanline order. Shuffle the columns into alphabetical order Then read down the columns CRYPTU XAFAAA AAFFDG XAFADF FA

10 ADFGX ciphers (3) XA FA AA AA DG FF XA FA DF FA Matrix 2: pick a random keyword and write the previous result under it in scanline order. Shuffle the columns into alphabetical order Then read down the columns to get ciphertext: XAXFAFAAAAAADDAGFFFF CPRTUY XAAAAF AFADGF XAADFF FA

11 ADFGX Decryption easy… …if you know the original matrix and the keyword. Example? Example? Read about decryption ideas in text Variation: ADFGVX cipher allows 26 letters + 10 digits


Download ppt "Announcements: Homework 1 coming Monday… Homework 1 coming Monday… Practical quiz during week 4 on putting your code to work Practical quiz during week."

Similar presentations


Ads by Google