Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Expert System for Solving Simple Cryptograms Carolyn Rucci Dr. Ralph Morelli 1 year project.

Similar presentations


Presentation on theme: "An Expert System for Solving Simple Cryptograms Carolyn Rucci Dr. Ralph Morelli 1 year project."— Presentation transcript:

1 An Expert System for Solving Simple Cryptograms Carolyn Rucci Dr. Ralph Morelli 1 year project

2 Goal Cryptanalysis Techniques Advantage: Perform a few quick, simple tests to determine cipher instead of having to try all ciphers. Encrypted text

3 Background Information The Art of Secret Writing. Analysis and decipherm ent of encrypted messages Analysis Decryption

4 What is an Expert System? Reasons about ciphers CipherExpert WWI Cryptographer knowledge Makes informed, intelligent decisions

5 Hcrypto Analyzer classes (Java) Jess Expert System Main Java Class Hcrypto Decryption Classes (Java) Computer Science department libraries Prototype that uses a limited set of historical ciphers: Transposition, Caesar, Affine, Vigenere and Playfair Cipher Expert Expert System Core

6 How Does the Expert System Work? Distribution of Letter FrequenciesIndex of Coincidence Used to determine where to go in tree Creates decision tree with ciphers Measure of how flat the distribution isDistribution based on an English text

7 Easily Extensible Create new rules distinguishing it from other ciphers Want to add new cipher to system: Letter frequency distribution of new cipher

8 Testing Tested CipherExpert 36 times, using 3 texts of varying length Determined CipherDecrypted Text Short Text (36 chars ) 10 / 12 Medium Text (500 chars) 11 / 1210 / 12 Long Text (1500 chars) 12 / 12 Overall 33 / 3632 / 36

9

10 Flow Chart IC = Index of coincidence IC >=.058 Cipher is Vigenere IC<=.0455 false Cipher is Playfair Cipher dist = normal dist true Cipher is transposition Shift freq. = normal truefalse Cipher is Caesar true Same freqs present true Cipher is Affine Error false true Cipher Text

11 Java Main Class IndexOfCoincidence IOC(String) getIOC() : double Cipher Cipher(String) getShift() : int setCipher(String) getCipher() : String wkdwlvkr zlizrunv Text file Originally “unknown” IndexOfCoincidence IOC(String) getIOC() : double Cipher Cipher(String) getShift(): int setCipher(String) getCipher() : String Rete

12 Goal Use cryptanalysis techniques to determine which historical cipher was used to encrypt a text Use that cipher to decrypt the text Advantage: More efficient and accurate than other methods. Easily Extensible

13 Jess: The Jess Path After each new node is created: 1) If type = knownRecognize cipher Return “last-move” of current node to Java 2) Else type unknownFurther solution Attempt to match another node

14 Jess: Getting Started Search depth - 1 parent - no-parent ic - call getIOC() on object shift - call getShift() on object type - unknown last-move - no-move Create a template for initial position Fetch IndexOf Coincidence Object from rete

15 Jess: Example of Move to Substitution Rule Test shift <> 0 Search depth - 1 parent - no-parent ic -.067 shift - 4 type - unknown last-move - no-move Current_node true Matches node Creates new node Search depth - 2 parent - current_node ic -.067 shift - 4 type - unknown last-move - Substitution New_node

16 What is an Expert System Collaboration between a domain expert and an artificial intelligence specialist Rules are based on experts’ knowledge Inference Engine uses rules in knowledge base to “reason” Example: Doctor diagnosing a patient. User User Interface Inference Engine Knowledge Base Patient response asks question about symptoms Sends question or diagnosis Sends answerSends characteristics Sends possible result or asks for more data

17 Summary of Findings Index of Coincidence Frequency Distribution (compared to normal) Transposition~6.68%Same Caesar~6.66%Will match if shifted 3 to right Affine~6.66%Same frequencies present but in different orders Vigenère~4.38%Flat distribution Playfair~4.72%Flat distribution NOTE: These values are for texts of ~2000 characters. Vigenère and Playfair ciphers, keyword must be at least 4 For Vigenère and Playfair ciphers, keyword must be at least 4 letters, toensure these values letters, to ensure these values.

18 Cryptanalysis – Letter Frequencies a b c d e f g h i j k l m n o p q r s t u v w x y z monographic frequency distribution of normal alphabet – Index of Coincidence thisisatestoftheindexofcoincidenceinmessages thisisatestoftheindexofcoincidenceinmessagesthi 5matches / 44letters ~ 11% Uses analytical techniques to decrypt a message Uses analytical techniques to decrypt a message when the key is unknown.

19 Cipher Set Simple Substitution Ciphers  One cipher alphabet 1. Transposition—Flips the message  hello  olleh 2. Caesar—Shifts each letter by 3  Plain alphabet: a b c d e f g h i j k l m n o p q r s t u v w x y z  Caesar alphabet d e f g h i j k l m n o p q r s t u v w x y z a b c 3. Affine  C = (aP + b) mod 26  a & b integer contants, C = cipher letter, P = plain text letter  one-to-one relationship between letters

20 Ciphers (cont.) Vigenère – Many cipher alphabets created based on keyword – Length of keyword = # of alphabets – Cycle through alphabets when encrypting a message Playfair – two letter pairs DBMWI COXGE QYRFS ZAKTP LUHMV Case1: 2corners  replace w/other corners Case2: same row  replace w/letters to right Case3: same column  replace w/letters below


Download ppt "An Expert System for Solving Simple Cryptograms Carolyn Rucci Dr. Ralph Morelli 1 year project."

Similar presentations


Ads by Google