0% found this document useful (0 votes)
3 views24 pages

CIS Lecture

This lecture help you understanding.....see more

Uploaded by

Sabeer Junaid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views24 pages

CIS Lecture

This lecture help you understanding.....see more

Uploaded by

Sabeer Junaid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Computer and

Information
Security
Saifullah Adnan
Review previous lecture

• Monoalphabetic Cipher
Learning Outcome

• Understand the operation of a polyalphabetic and playfair

substitution cipher.
Topics to be covered in this lecture

• Polyalphabetic Cipher

• Playfair Cipher
Playfair Cipher

• Not even the large number of keys in a monoalphabetic cipher


provides security

• One approach to improving security was to encrypt multiple letters

• The Playfair Cipher is an example

• Invented by Charles Wheatstone in 1854, but named after his friend


Baron Playfair
Playfair Key Matrix
• Manual Symmetric Key technique
• The first literal digram substitution cipher
• a 5X5 matrix of letters based on a keyword
• fill in letters of keyword
• fill rest of matrix with other letters
• eg. using the keyword 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

• Plaintext is encrypted two letters at a time


1. If a pair is a repeated letter, insert filler like 'X’

2. if both letters fall in the same row, replace each with letter to right (wrapping back to
start from end)

3. if both letters fall in the same column, replace each with the letter below it (again
wrapping to top from bottom)

4. Otherwise each letter is replaced by the letter in the same row and in the column of
the other letter of the pair
Security of Playfair Cipher

• Security much improved over monoalphabetic


• Since have 26 x 26 = 676 digrams
• would need a 676 entry frequency table to analyse (verses 26 for a
monoalphabetic)
• Correspondingly more ciphertext
• was widely used for many years
• eg. by US & British military in WW1
• it can be broken, given a few hundred letters
• since still has much of plaintext structure
Polyalphabetic Ciphers
• polyalphabetic substitution ciphers
• improve security using multiple cipher alphabets
• make cryptanalysis harder with more alphabets to guess and flatter
frequency distribution
• use a key to select which alphabet is used for each letter of the
message
• use each alphabet in turn
• repeat from start after end of key is reached
Vigenère Cipher
• simplest polyalphabetic substitution cipher
• effectively multiple caesar ciphers
• key is multiple letters long K = k1 k2 ... kd
• ith letter specifies ith alphabet to use
• use each alphabet in turn
• repeat from start after d letters in message
• decryption simply works in reverse
Example of Vigenère Cipher
• write the plaintext out
• write the keyword repeated above it
• use each key letter as a caesar cipher key
• encrypt the corresponding plaintext letter
• eg using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Some Rules for Encryption
• First We chose plain text which we want to convert into cipher text.
• We can chose random key.
• Key length is always equal to length of cipher text.
• After adding plain text and keys. If num is ≥26 then we subtract 26
from cipher text in Encryption.
• Keys have two copies One for sender and one for receiver.
• Keys is discarded after one time use.
Encryption Example
Decryption
Another Example “same message”
but now this time key is different.
Encyption
H E L L O
7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message

+ 23 (X) 12 (M) 2 (C) 10 (K) 11 (L) key

= 30 16 13 21 25 message + key

= 4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z) (message +


key)

E Q N V Z → ciphertext
Decryptio
n:
E Q N V Z cipher-text

4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z) cipher-text

- 23 (X) 12 (M) 2 (C) 10 (K) 11 (L)

key = -19 4 11 11 14

For negative value we add 26 for make it positive

7 (H) 4 (E) 11 (L) 11 (L) 14 (O) cipher-text – key

H E L L O → message
• This cipher is unbreakable in a very strong sense. The intuition is that any
message can be transformed into any cipher (of the same length) by a
pad, and all transformations are equally likely
Fundamental difficulties

• The practical problem of making large quantities of random keys


• Key distribution and protection
Modern use of the Vernam
Cipher
• The Vernam Cipher can also be implemented with modern computer
technology.
Why OTP is secure?
• The security depends on the randomness of the key.
Drawback in OTP
• Key-stream should be as long as plain-text.
• Key distribution & Management difficult.
References

1. Computer Security: Principles and Practice, 4th Edition By


William Stallings, Lawrie Brown, Published Aug 4, 2017.
2. Cryptography and Network Security: Principles and Practice,
7th edition by William Stallings, 2017.
3. Principles of Information Security, 6th edition by M. Whitman
and H. Mattord.

You might also like