Sie sind auf Seite 1von 21

Caesar Cipher

Mustafa Kairallah

SPMS, NTU

March 8, 2017

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 1/15 March 8, 2017 1 / 15


Learning Outcomes

By the end of this lesson you should be able to:


1 Use the Caesar cipher to encrypt words.
2 Compare the different security levels of the two versions of the Caesar
cipher; the rotation version and the substitution version.
3 Apply the acquired knowledge to analyse and break an encrypted
message.

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 2/15 March 8, 2017 2 / 15


Outline

Why people needed ciphers?


How does the Caesar Cipher work?
Why is it insecure?
Can we do better?

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 3/15 March 8, 2017 3 / 15


Historical Ways of Long Distance Communications

(a) (b) (c)

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 4/15 March 8, 2017 4 / 15


Problem?!

(d) (e)
Mustafa Kairallah (SPMS, NTU) Caesar Cipher 5/15 March 8, 2017 5 / 15
Caesar Cipher

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 6/15 March 8, 2017 6 / 15


Caesar Cipher

A A
B B
... ...
Z Z
Table: No Encryption

A D
B E
... ...
Z C
Table: Rotation by 3

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 7/15 March 8, 2017 7 / 15


Individual Activity

Encrypt the following word using a rotation-by-3 Caesar cipher

CAESAR

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 8/15 March 8, 2017 8 / 15


Individual Activity - Answer

Encrypt the following word using a rotation-by-3 Caesar cipher

CAESAR
FDHVDU

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 9/15 March 8, 2017 9 / 15


How to break it?

The army intercepted the following message:

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 10/15 March 8, 2017 10 / 15


How to break it?

The army intercepted the following message: nzhj znoy skyygmk ngy
hkkt ktixevzkj ayotm znk igkygx iovnkx dmtap.

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 10/15 March 8, 2017 10 / 15


How to break it?

The army intercepted the following message: nzhj znoy skyygmk ngy
hkkt ktixevzkj ayotm znk igkygx iovnkx dmtap.
We know the message is written in English.

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 10/15 March 8, 2017 10 / 15


How to break it?

The army intercepted the following message: nzhj znoy skyygmk ngy
hkkt ktixevzkj ayotm znk igkygx iovnkx dmtap.
We know the message is written in English.
We know it is encrypted using the Caesar Cipher,

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 10/15 March 8, 2017 10 / 15


How to break it?

The army intercepted the following message: nzhj znoy skyygmk ngy
hkkt ktixevzkj ayotm znk igkygx iovnkx dmtap.
We know the message is written in English.
We know it is encrypted using the Caesar Cipher, but we dont know
the rotational key.
Our task is to find the key and decipher the message

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 10/15 March 8, 2017 10 / 15


How to break it?

The army intercepted the following message: nzhj znoy skyygmk ngy
hkkt ktixevzkj ayotm znk igkygx iovnkx dmtap.
We know the message is written in English.
We know it is encrypted using the Caesar Cipher, but we dont know
the rotational key.
Our task is to find the key and decipher the message (quite
ambitious!).
Any ideas?

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 10/15 March 8, 2017 10 / 15


Brute Force?!

1 mygi 13 amuw 25 oaik


2 lxfh 14 zltv
3 kweg 15 yksu
4 jvdf 16 xjrt
5 iuce 17 wiqs
6 htbd 18 vhpr
7 gsac 19 ugoq
8 frzb 20 tfnp
9 eqya 21 semo
10 dpxz 22 rdln
11 cowy 23 qckm
12 bnvx 24 pbjl
Table: All Possible Decoding of the First Message Word

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 11/15 March 8, 2017 11 / 15


Group Activity

We went to our friend who is a renowned code breaker. He gave us a hint.


If you pick any English book and count how many times each alphabetical
letter appears, you will get roughly the same frequencies. We can use the
frequency chart he gave us to break the Caesar cipher in a very short time.

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 12/15 March 8, 2017 12 / 15


Group Activity

We went to our friend who is a renowned code breaker. He gave us a hint.


If you pick any English book and count how many times each alphabetical
letter appears, you will get roughly the same frequencies. We can use the
frequency chart he gave us to break the Caesar cipher in a very short time.
Task - Using the English language letter frequency chart you have been
given, decode the message.
The message is: nzhj znoy skyygmk ngy hkkt ktixevzkj ayotm znk igkygx
iovnkx dmtap

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 12/15 March 8, 2017 12 / 15


Letter Frequency Analysis

Figure: English Letter Frequency


Mustafa Kairallah (SPMS, NTU) Caesar Cipher 13/15 March 8, 2017 13 / 15
Substitution Cipher

A M L K W Z
B H M U X V
C Q N D Y S
D L O P Z O
E J P B
F Y Q E
G X R C
H F S I
I T T N
J R U W
K A V G
Table: An Example Substitution Cipher

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 14/15 March 8, 2017 14 / 15


Questions

Mustafa Kairallah (SPMS, NTU) Caesar Cipher 15/15 March 8, 2017 15 / 15

Das könnte Ihnen auch gefallen