Mod2 Classical Encryption
Mod2 Classical Encryption
1
Caesar Cipher
Can use any shift from 1 to 25, i.e., replace each letter by a
letter a fixed distance away
ci=E(k,pi)=(pi+k) mod 26;
pi=D(k,ci)=(ci-k) mod 26
Shift cipher
Key = k
Key letter: the letter a plaintext A maps to
e.g. a key letter of F means A maps to F, B to G, …, Y to D, Z
to E
Hence have 26 (25 useful) ciphers
Key space = 26
3
Brute-Force Cryptanalysis of Caesar Cipher
4
Monoalphabetic Cipher
5
Relative Frequency of Letters in English Text
6
Substitution Techniques
9
Polyalphabetic Cipher
10
Vigenère cipher
Best-known polyalphabetic ciphers
Each key letter determines one of 26 Caesar (shift) ciphers
ci = E(pi) = pi + ki mod(key length) mod 26
Example:
Key: deceptivedeceptivedeceptive
Plaintext: wearediscoveredsaveyourself
Cipheretxt: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
11
Vigenère cipher - 2
12
Example:
Encryption
Decryption
13
Vigenère cipher - 3
Key: deceptivewearediscoveredsav
Plaintext: wearediscoveredsaveyourself
Cipheretxt: ZICVTWQNGKZEIIGASXSTSLVVWLA
14
Transposition (Permutation) Techniques
Hide the message by rearranging the letter order without
altering the actual letters used
Rail Fence Cipher
Write message on alternate rows, and read off cipher row by row
Example:
M e m a t r h t g p r y MEMATRHTGPRYETEFETEOAAT
e t e f e t e o a a t
Block (Columnar) Transposition Ciphers
Message is written in rectangle, row by row, but read off column by
column; The order of columns read off is the key
Example:
Key: 4 3 1 2 5 6 7
Plaintext: a t t a c k p
o s t p o n e
d u n t i l t
w o a m x y z
Ciphertext:TTNAAPTMTSUOAODWCOIXKNLYPETZ
15
Steganography
“The art of covered writing”
“Security by obscurity”
Hide messages in other messages
Conceal the existence of message
Conceal what you are communicating (Sending encrypted
messages would make you a spy)
Character marking. Overwrite with a pencil
Invisible ink, - Pin punctures, - First letter of each word
Letter position on page, - Drawings, - Codes
Typewriter correction ribbon
Microdots
Digital steganography
16
Steganography
Steganography - Example
News Eight Weather: Tonight increasing snow. Unexpected precipitation
Smothers Eastern towns. Be extremely cautious and use snowtires especially
heading east. The highways are knowingly slippery. Highway evacuation is
suspected. Police report emergency situations in downtown ending near
Tuesday