CNS Unit-I
CNS Unit-I
Masquerade Replay
Goals:
To introduce basic concepts & terminology of encryption
To prepare students for studying modern cryptography
Basic terminology
Plaintext: original message to be encrypted
Ciphertext: the encrypted message
Enciphering or encryption: the process of converting
plaintext into ciphertext
Encryption algorithm: performs encryption
Two inputs: a plaintext and a secret key
Symmetric Cipher Model
Symmetric Cipher Model
128 2128 = 3.4 1038 2127 µs = 5.4 1024 years 5.4 1018 years
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years
26 characters 26! = 4 1026 2 1026 µs = 6.4 1012 years 6.4 106 years
(permutation)
Cryptanalytic Attacks
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Monoalphabetic Cipher
Security
Use a 5 x 5 matrix.
Fill in letters of the key (w/o duplicates).
Fill the rest of matrix with other letters.
E.g., key = MONARCHY.
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
Encrypting and Decrypting
Vigener Cipher
Security of Vigenère Ciphers
There are multiple ciphertext letters corresponding to
each plaintext letter.
So, letter frequencies are obscured but not totally lost.
To break Vigenere cipher:
1. Try to guess the key length. How?
2. If key length is N, the cipher consists of N Caesar
ciphers. Plaintext letters at positions k, N+k, 2N+k,
3N+k, etc., are encoded by the same cipher.
3. Attack each individual cipher as before.
Key Length
Plaintext words separated by multiples of the key
length are encoded in the same way.
In our example, if plaintext = “…thexxxxxxthe…”
then “the” will be encrypted to the same ciphertext
words.
check the ciphertext for repeated patterns.
E.g. repeated “VTW” in the previous example
suggests a key length of 3 or 9:
ciphertext:
ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Transposition Techniques
Transposition Ciphers
Also called permutation ciphers.
Shuffle the plaintext, without altering the actual letters used.
Example:
Row Transposition Ciphers
Rail Fence Cipher
Row Transposition Ciphers
Character Marking
Invisible Ink
Type Writer Correction Ribbon
Pin Punctures