Title: An Expert System for Solving Simple Cryptograms
1An Expert System for Solving Simple Cryptograms
- Carolyn Rucci
- Dr. Ralph Morelli
- 1 year project
2Goal
Cryptanalysis Techniques
Cipher?
Encrypted text
Advantage Perform a few quick, simple tests
to determine cipher instead of having to try
all ciphers.
3Background Information
Cryptography
Cryptanalysis
The Art of Secret Writing.
Analysis
Decryption
4What is an Expert System?
Reasons about ciphers
CipherExpert
knowledge
Makes informed, intelligent decisions
5Cipher Expert
- Prototype that uses a limited set of historical
ciphers Transposition, Caesar, Affine, Vigenere
and Playfair
Main Java Class
Expert System Core
Hcrypto Analyzer classes (Java)
Hcrypto Decryption Classes (Java)
Computer Science department libraries
6How Does the Expert System Work?
Creates decision tree with ciphers
Distribution of Letter Frequencies
Index of Coincidence
Used to determine where to go in tree
Measure of how flat the distribution is
Distribution based on an English text
7Easily Extensible
Want to add new cipher to system
Create new rules distinguishing it from other
ciphers
Letter frequency distribution of new cipher
8Testing
- Tested CipherExpert 36 times, using 3 texts of
varying length
9(No Transcript)
10Flow Chart
Cipher Text
IC gt .058
false
true
Cipher dist normal dist
false
IClt.0455
true
false
true
Cipher is Vigenere
Cipher is Playfair
Cipher is transposition
Shift freq. normal
true
Cipher is Caesar
Same freqs present
true
false
Cipher is Affine
Error
11Java Main Class
Text file
12Goal
- 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
13Jess The Jess Path
- After each new node is created
1) If type known
2) Else type unknown
14Jess Getting Started
- Fetch IndexOf Coincidence Object from rete
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
15Jess Example of Move to Substitution Rule
Test shift ltgt 0
16What 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.
Patient response
Sends answer
Sends characteristics
User Interface
Knowledge Base
User
Inference Engine
Sends possible result or asks for more data
asks question about symptoms
Sends question or diagnosis
17Summary of Findings
NOTE These values are for texts of 2000
characters.
For Vigenère and Playfair ciphers, keyword must
be at least 4
letters, to ensure these values.
18Cryptanalysis
- Uses analytical techniques to decrypt a message
- when the key is unknown.
- 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
19Cipher Set
- Simple Substitution Ciphers ? One cipher alphabet
- TranspositionFlips the message
- hello ? olleh
- CaesarShifts 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 - Affine
- C (aP b) mod 26
- a b integer contants, C cipher letter, P
plain text letter - one-to-one relationship between letters
20Ciphers (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
Case1 2corners ? replace w/other corners Case2
same row ? replace w/letters to right Case3 same
column ? replace w/letters below