Monkeys and Coincidences

Slides:



Advertisements
Similar presentations
Simple Probability and Odds
Advertisements

GOAL: IDENTIFY THE DIFFERENCE BETWEEN A DEPENDENT AND AN INDEPENDENT EVENT. Independent and Dependent Events.
Probability Three basic types of probability: Probability as counting
1 Codes, Ciphers, and Cryptography-Ch 2.3 Michael A. Karls Ball State University.
Spot the Pattern On the next slide is a grid and on each subsequent slide there are 4 pieces of information. Can you work out how the grid should be coloured.
1 Many people debate basic questions of chance in games such as lotteries. The Monty Hall problem is a fun brain teaser that Marilyn vos Savant addressed.
1 Section 5.1 Discrete Probability. 2 LaPlace’s definition of probability Number of successful outcomes divided by the number of possible outcomes This.
CSE331: Introduction to Networks and Security Lecture 17 Fall 2002.
Index of Coincidence Meghan Emilio Professor Ralph Morelli February 18, 2004.
What is the probability that it will snow on Christmas day in Huntingdon?
Probability.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
1 Introduction to Discrete Probability Rosen, Section 6.1 Based on slides by Aaron Bloomfield and …
Week 2 - Wednesday.  What did we talk about last time?  Encryption  Shift ciphers  Transposition ciphers.
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Section 7.1. Section Summary Finite Probability Probabilities of Complements and Unions of Events Probabilistic Reasoning.
Section 2.7: The Friedman and Kasiski Tests Practice HW (not to hand in) From Barr Text p. 1-4, 8.
Symmetric-Key Cryptography
Polyalphabetic CIPHERS Linguistics 484. Summary The idea How to recognize: index of coincidence How many alphabets: Kasiski.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Section 2.5 Polyaphabetic Substitutions
Lesson 4-5 Objectives: To apply ratios to probability.
Compound Events COURSE 2 LESSON 12-5
Introduction to Cryptography Lecture 8. Polyalphabetic Substitutions Definition: Let be different substitution ciphers. Then to encrypt the message apply.
Introduction Lecture 25 Section 6.1 Wed, Mar 22, 2006.
Number of households with a cat Number of households without a cat Totals Number of households with a dog 1015 Number of house holds without a dog 2530.
1 Learning Objectives Bayes’ Formula The student will be able to solve problems involving finding the probability of an earlier event conditioned on the.
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
Section 7.1. Probability of an Event We first define these key terms: An experiment is a procedure that yields one of a given set of possible outcomes.
Middle Tennessee State University ©2013, MTStatPAL.
A die is rolled. What is the probability that the number showing is odd? Select the correct answer
PROBABILITY, EVENTS AND OUTCOMES Yo yo yo welcome back!!!!!!!! Happy NEW YEAR! SWBAT: Define probability, event & outcomes Determine the probability of.
Microsoft produces a New operating system on a disk. There is 0
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Ray Karol 2/26/2013. Let’s Make a Deal Monte Hall Problem Suppose you’re on a game show, and you’re given a choice of three doors: Behind one door is.
Lecture 3 Page 1 CS 236 Online Basic Encryption Methods Substitutions –Monoalphabetic –Polyalphabetic Permutations.
CMSC 414 Computer (and Network) Security Lecture 3 Jonathan Katz.
Vigenère’s Cryptosystem
Substitution Ciphers.
Theoretical Probability
Theoretical Probability
Independent and Dependent Events
Chapter 2 Basic Encryption and Decryption
Playfair, Transpositions, and ADFGVX
Quantifying Uncertainty
Section 2.7 The Friedman and Kasiski Tests
Columnar Transposition
Cryptography and Network Security
Computer and Data Security 4th Class
Basic Encryption Methods
Probability.
Discrete Probability Chapter 7 With Question/Answer Animations
WARMUP Lesson 10.3, For use with pages
WARM - UP The American Red Cross says that about 45% of the US Population has Type O blood, 40% Type A, 11% Type B, and the rest Type AB. a.) Selecting.
PART VII Security.
Probabilities and Proportions
Encryption and Decryption
Theoretical Probability
Microsoft produces a New operating system on a disk. There is 0
Classical Polyalphabetic Ciphers
Probability, Games & Sentiment Analysis
Cryptanalysis of Vigenere Cipher
Traditional Symmetric-Key Ciphers
Probability Rules.
Theoretical Probability
Double Transpositions
Probability of Independent Event
Thursday 05/16 Warm Up 200 people were surveyed about ice cream preferences. 78 people said they prefer chocolate. 65 people said they prefer strawberry.
How likely it is that some events will occur?
Meghan Emilio Professor Ralph Morelli February 18, 2004
Presentation transcript:

Monkeys and Coincidences The Index of Coincidence April 27, 2005 copyright Kevin O'Bryant

Monty Hall (host knows) Inner wheel: where the car is Middle wheel: door that you choose Outer wheel: door that Monty opens Green: switching wins Red: staying wins P[red] = 1/3 P[green] = 2/3 April 27, 2005 copyright Kevin O'Bryant

Monty Hall (host doesn’t know) Inner wheel: where the car is Middle wheel: door that you choose Outer wheel: door that Monty opens Green: switching wins Red: staying wins White: didn’t happen P[green | red or green] = (6/18)/(12/18)=1/2 P[red | red or green] = (6/18)/(12/18) = 1/2 April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Monkey Words We used letter frequencies to recognize English. Allowed Eve to get key one letter at a time. 26 choices for e 25 choices for t … 26+25+24+…+2+1 options to inspect = 27¢13 = 351 not 26 ¢ 25 ¢ 24  2 ¢ 1 keys = 26! Stirling’s Formula: April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Monkey Words The monkey can do better with roulette wheels http://www.math.ucsd.edu/~crypto April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence a n i m l r d v k April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence text had 14 characters. Grid has 14¢13 nondiagonal places. text had 5 “a”s, which caused 5¢4 nondiagonal blue squares text had 2 “r”s, which caused 2¢1 nondiagonal red squares text had 1 “n”, which caused 1¢0 nondiagonal colored squares text had 0 “j”s, which caused 0¢(-1) nondiagonal colored squares Probability that a nondiagonal square is colored: 22/182=12.09% April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index Of Coincidence How does the table change if we replace each letter with the one after it (Caesar shift)? How does the table change if we use monoalphabetic substitution? How does the table change if we use Vigenere encryption? How does the table change if we use Rectangular Transposition? How does the table change if we use Playfair encryption? How does the table change if we use ADFGVX? April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence If we make a “plaintext” of N characters by spinning a 26-slot roulette wheel (all slots the same size), what is the probability that two randomly chosen characters are the same letter? There are approximately N/26 letters “A”, so there are ways to choose an “A” and then choose another one, and the same number of ways to choose a pair of “B”-s, …, and the same number of ways to choose a pair of “Z”-s. That is, there are ways to choose an ordered pair of characters which are the same letter. There are ways to choose two characters. April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence The probability of getting the same letter twice is This should make sense. Whatever the first letter we picked turned out to be, the second one had probability 1/26 of being the same. Note that 1/26 is about 3.85%. April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence Fine for random text, but what about actual text? Suppose that our text has length N, with N0 “A”-s, N1 “B”-s, …, N25 “Z”-s. The probability of getting the same letter twice is April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence We can compute this using only the ciphertext! For unencrypted text, we can go further. The front page of the New York Times yields the frequency table April 27, 2005 copyright Kevin O'Bryant

Frequency Table for Front Page of New York Times, April 16, 2004 8.41 J 0.15 S 6.66 B 1.56 K 0.68 T 8.98 C 3.66 L 4.06 U 2.28 D 3.61 M 2.60 V 0.96 E 12.84 N 7.64 W 1.72 F 2.05 O 7.04 X 0.24 G 1.99 P Y 1.54 H 4.63 Q Z 0.11 I 7.79 R 6.36 These are the percentages of the 24580 characters in the news articles which the website describes as “front page news”. April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Index of Coincidence These frequencies are roughly the same for any text written in English, unless the author is deliberately trying to screw them up. Thus, in a plaintext of N characters, roughly 0.0841 N of them will be “A”, 0.1284 N of them will be “E”, etc. The sum N02+N12+ + N252 will be roughly 0.06686 N2. The probability of choosing the same letter twice is April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Variation in the IOC The IOC varies much less than single letter frequencies. The Void (book written without the letter “e”) has IOC 7.72%. I have 18 standard plaintexts. Here are the IOCs: April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Two-Letter Vigenère Let c0,c1, …, cn-1 be a message encrypted with Vigenère with a 2-letter keyword. Let E be the event that ci=cj, with i,j chosen uniformly but not equal. P[E]=P[E | i,j both even] P[i,j both even] +P[E | i odd, j even] P[i odd, j even] +P[E | i even, j odd] P[i even, j odd] +P[E | i odd, j odd] P[i odd, j odd] P[E]=0.06686 (1/4) +(1/26) (1/4) +0.06686 (1/4) =5.27% April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Two-letter Vigenère Here are the indices of coincidence of my 18 plaintexts, after encryption with a two letter keyword. April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant 20-letter Vigenère Here are the indices of coincidence of my 18 plaintexts after Vigenère encryption with a random 20-letter keyword. April 27, 2005 copyright Kevin O'Bryant

copyright Kevin O'Bryant Summary Goats and cars paradox is not paradoxical Index of coincidence is around 3.85% for random text IOC for English is around 6.69% Frequency analysis depends on high IOC Can use this to distinguish between cryptosystems April 27, 2005 copyright Kevin O'Bryant