An Expert System for Solving Simple Cryptograms Carolyn Rucci Dr. Ralph Morelli 1 year project
Overview Goal Background information What is an Expert System My Expert System - CipherExpert How does CipherExpert Work? Extensibility Results from testing Caesar Cipher
What? How? Goal Cryptanalysis techniques
Background Information dqdobvlv dqg ghflskhuph qw ri hqfubswhg phvvdjhv Cryptography Cryptanalysis Analysis and decipherm ent of encrypted messages
What is an Expert System? Reasons! CipherExpert
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
How Does the Expert System Work? Distribution of Letter Frequencies Index of Coincidence
Easily Extensible Ciphers Substitution Simple- CaesarAffine Poly- PlayfairVigenere Transposition Rail FenceNew Cipher Add new classifications to family tree New rules New Cipher New Rules
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
Caesar Cipher abcdefghijklmnopqrstuvwxyz Ocdn dn v ozno oj nzz da ncjmo hznnvbzn rjmf. This is a test to see if short messages work. vwxyzabcdefghijklmnopqrstu Key = shift by 5 decipher
Advantages of an Expert System 1. More Efficient and accurate than other methods Do not have to try all ciphers to find a decryption No false positive decryptions 2. Analysis based on the frequencies of letters in the message Distribution of letter frequencies Index of coincidence
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 Java Main Class
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
Jess: Example of Move to Substitution Rule Test shift <> 0 Search depth - 1 parent - no-parent ic shift - 4 type - unknown last-move - no-move Current_node true Matches node Creates new node Search depth - 2 parent - current_node ic shift - 4 type - unknown last-move - Substitution New_node
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