140 likes | 421 Views
Fundamentals of Computer Security. One-Time Pads Polygraphic Ciphers Transposition Ciphers. Ciphers. Public Key. Symmetric Key. Unkeyed. Classical. Stream. Block. Transposition. Substitution. One-time Pad. Monoalphabetic. Polyalphabetic. Nihilist. Vigenère. Autokey. Polygraphic.
E N D
Fundamentals of Computer Security One-Time Pads Polygraphic Ciphers Transposition Ciphers CSCI 379 Fundamentals of Computer Security
Ciphers Public Key Symmetric Key Unkeyed Classical Stream Block Transposition Substitution One-time Pad Monoalphabetic Polyalphabetic Nihilist Vigenère Autokey Polygraphic Hill Playfair CSCI 379 Fundamentals of Computer Security
One Time Pads practically since humans began writing, they have been writing in code, and ciphers have decided the fates of empires… (p+k) % 26 ciphertext …yllacitcarp …emkrwrasfgh plaintext If each message is encrypted with a key stream built as a nonrepeating set of truly random letters that is used only once, we have a perfect encryption scheme. …wqtriwhgfd dfghwirtqwqqxcmloppgjlqerjimaqcxxnhlorxcqaghikplorrethudaloextgrtewcklpoasejdqqtyredkvythjeukdw… Question: If this is the perfect cryptosystem, why isn’t it used? key stream CSCI 379 Fundamentals of Computer Security
The Nihilist Cipher Take plaintext and convert it to numbers using the square: “stop that” 44 45 41 15 45 32 13 45 key2 plaintext ciphertext Encipherment: Polybius Square key1=example Decipherment: Look up the number in the Polybius square to recover each plaintext symbol. Choose a second key: key2=next 35 11 12 45 Note that the key2 is converted to numbers using the square. CSCI 379 Fundamentals of Computer Security
Polygraphic Ciphers CSCI 379 Fundamentals of Computer Security
The Playfair Cipher First step: Condition the text by replacing all occurrences of “j” with “i”. Second step: Divide the plaintext into pairs. Where there are double letters, separate them with an “x”. Add a “z” to the final text if the last group has a single letter. Example: “LORD GRANVILLE” becomes “ lo rd gr an vi lx le sl et te rz.” Third step: Encipher the plaintext one pair at a time. If the two letters are in the same row or column, replace them by the succeeding letters (“AM” becomes “le”). If the two letters stand at the corners of a rectangle in the table, replace them with the letters at the other two corners (“LO” becomes “mt”). Sir Charles Wheatstone, 1854 Key = palmerston CSCI 379 Fundamentals of Computer Security
The Hill Cipher Works on a block of m plaintext symbols to produce a block of m ciphertext symbols. Say we choose m=3. Encipherment: Decipherment: This only works if the key matrix K has an inverse K-1. CSCI 379 Fundamentals of Computer Security
Transposition Ciphers CSCI 379 Fundamentals of Computer Security
Transposition as a Block Cipher(The Permutation Cipher) plaintext cipher text practica llysince humansbe ganwriti ngtheyha vebeenwr itinginc odeandci phershav edecided thefates ofempire s… patcrcia lyiclsne hmnbuase gnrtawii ntehghya vbeweenr itinginc oencdadi pesahrhv eeiedcdd teaehfts oeprfmie s… permutation 8-letter blocks 8-letter blocks Question: Is there anyone good with anagrams in this class? CSCI 379 Fundamentals of Computer Security
A Simple Transposition Cipher • The “key” information for enciphering and deciphering is: • number of rows • number of columns • write in order • take off order take off (rows) write in (columns) CSCI 379 Fundamentals of Computer Security
The Column Permutation Cipher PLAINTEXT:…EVENTHOSETHATAREBORNINENGLANDBECOME… 7 rows ciphertext: …esrndveeebetbnenhogctarlohtnamoaine… 5 rows • Questions: • Can frequency analysis help one break a transposition cipher? • What is the effect of transposition on the encipherment? CSCI 379 Fundamentals of Computer Security
Breaking Column Permutation The length of ciphertext must be equal to the product of the number of rows and the number of columns. How can we factor the length of the ciphertext? This will give you RxC or CxR rectangles. Each line in the correct rectangle must look like understandable plaintext. Any line of English must have 40% vowels. CSCI 379 Fundamentals of Computer Security
What Makes a “Good” Cipher?(Claude Shannon 1946) • The amount of secrecy determines the amount of labor used for encipherment and decipherment. • The keys should be only as large as they need to be, but not larger. • Encipherment and decipherment should be as simple as possible for the sake of performance (time) and accuracy. • Error propagation should be minimized. • Expansion of the message size should be avoided. CSCI 379 Fundamentals of Computer Security
A Little Experiment (Homework 1) Any one of the ciphers we’ve seen alone is well understood and easy to break (except for the one-time pad, of course). Do you think, though, that you could create a strong cipher by combining different ciphers? How would you do that? • What would be the key space for your cipher? What, if any, would be weak key values? • How would it affect the frequencies of single letters, digrams, trigrams, etc? What kind of evidence would you present to show the strength of your cipher to frequency analysis? • Would the concept of multiple rounds help strengthen your cipher? How would you generate keys for each round from one single key? CSCI 379 Fundamentals of Computer Security