Professional Documents
Culture Documents
Example 1:
Encryption with key=1
plaintext: defend the east wall of the castle
ciphertext: efgfoe uif fbtu xbmm pg uif dbtumf
Example 2:
Decryption with key=1
plain: abcdefghijklmnopqrstuvwxyz
cipher: bcdefghijklmnopqrstuvwxyza
Caesar Cipher
• Both parties (sender and receiver) have the 'key' for the cipher,
• For the caesar cipher, the key is the number of characters to shift the cipher alphabet.
Example 1:
Encryption with key=1
plaintext: defend the east wall of the castle
ciphertext: efgfoe uif fbtu xbmm pg uif dbtumf
Example 2:
Decryption with key=1
ciphertext: efgfoe uif fbtu xbmm pg uif dbtumf
plaintext: defend the east wall of the castle
Caesar Cipher
Mathematical Description
• First we translate all of our characters to numbers, 'a'=0, 'b'=1, 'c'=2, ... , 'z'=25.
• We can now represent the caesar cipher encryption function, e(x), where x is the character we
are encrypting, as:
YMJHFJXFWHNUMJWNXTSJTKYMJJFWQNJXYPSTBSFSIXNRUQJXYHNUMJWX
Monoalphabetic Cipher
• rather than just shifting the alphabet
• could shuffle (jumble) the letters arbitrarily
• each plaintext letter maps to a different random ciphertext letter
• hence key is 26 letters long
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Monoalphabetic Cipher Security
• now have a total of 26! = 4 x 1026 keys
• with so many keys, might think is secure
• but would be !!!WRONG!!!
• problem is language characteristics
Language characteristics and Cryptanalysis
• in English E is by far the most common letter
• followed by T,R,N,I,O,A,S
• other letters like Z,J,K,Q,X are fairly rare
• have tables of single, double & triple letter frequencies for various
languages
English Letter Frequencies
Use in Cryptanalysis
• key concept - monoalphabetic substitution ciphers do
not change relative letter frequencies
• calculate letter frequencies for ciphertext
• compare counts/plots against known values
Example Cryptanalysis
• given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVP