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

Lecture 6

Uploaded by

shaistaimtiaz077
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)
8 views24 pages

Lecture 6

Uploaded by

shaistaimtiaz077
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

Information Security

Delivered By: Dr. Ahthasham Sajid


Dated: 7th Oct 2024
Agenda

• Polyalphabetic Vigenère Ciphers

• One Time Padding

2
Security of the 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)
• And correspondingly more ciphertext

3
Security of the Playfair Cipher

• Was widely used for many years (eg. US & British


military in WW1)
• It can be broken, given a few hundred letters
• Since still has much of plaintext structure

4
Polyalphabetic Ciphers
• Another approach to improving security is to use multiple
cipher alphabets
• Makes 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

5
Vigenère Cipher
• Simplest polyalphabetic substitution cipher is the Vigenère Cipher
• Effectively multiple Caesar ciphers
• Key is multiple letters long K = k1 k2 ... kd
• ith letter specifies ith alphabet to use

6
Vigenère Cipher
• Use each alphabet in turn
• Repeat from start after d letters in message
• Decryption simply works in reverse

7
Example
• Write the plaintext out
• Write the keyword repeated above it
• Use each key letter as a Caesar cipher key
• Encrypt the corresponding plaintext letter
• e.g. using keyword deceptive

key: deceptivedeceptivedeceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ

9
Modern Vigenère Tableau

10
Formula for Vigenère Cipher
Practice

• For this example, let us use the phrase ALL IS WELL and the keyword

as CAKE. Perform Encryption and Decryption using Vigenère Cipher.


Solution
Encryption

Decryption
One-Time Pad
• If a truly random key as long as the message is used, the
cipher will be secure called a One-Time pad
• Is unbreakable since ciphertext bears no statistical
relationship to the plaintext
• The key must be at least as long as the plaintext
• The key must never be reused
• The key must be kept completely secret to the outside world yet
shared by both parties
• The key must have a uniform distribution that is independent of
the plaintext

14
• The Ceaser Cipher is a great example of a cipher that is not perfectly
secure or practically secure. As we demonstrated earlier, when given access to
the ciphertext of a Caesar cipher, an attacker can see the positions and patterns
of characters in the plaintext.

15
16
Example(One Time Pad)
• Input: HELLO
• Key: MONEY
• Output: TSYPM
• Part 1: Plain text to Ciphertext
• Plain text — H E L L O (7 4 11 11 14 )
• Key — M O N E Y (12 14 13 4 24 )
• Plain text + key 19 18 24 15 38
• Cipher Text (T S Y P M)
• Part 2: Ciphertext to Message
Cipher Text - Key
19 18 24 15 12 – 12 14 13 4 24
Plain Text 7 4 11 11 14
HELLO
17
Issue:

• How to get cipher text letter if the plain text letter and
key letter after adding become greater then # 26?
Solution:
• We have to find solution by following formula:
• Dividend / Divisor = Quotient
• In this case 38 is the Dividend, 26 is the Divisor, and the answer is
called the Quotient which is 12.
• 38 ÷ 26 = 12
Practice

Perform Encryption and Decryption using One Time Pad.

1. Plain text “Enigma” and use “keyword” as key.

2. Plain text “cyber security” with Key” Best”.


Solution

1
15

Cipher Text: ORCCNP


Solution
• https://www.boxentriq.com/code-breaking/one-time-pad

• Use the Link Above to practice One time Pad Example

24

You might also like