Professional Documents
Culture Documents
Lecture 3
Lecture Focus
Cryptography
Information Security Cryptography
Cryptography components
Information Security Cryptography
Categories of Cryptography
Information Security Cryptography
Symmetric-key cryptography
Information Security Cryptography
Asymmetric-key cryptography
Information Security Cryptography
Symmetric-key cryptography
Symmetric-key cryptography
Traditional Ciphers
Simple Modern Ciphers
Modern Round Ciphers
Mode of Operation
Information Security Cryptography
Substitution Ciphers
Monoalphabetic cipher
1-1 tion
Su
1 - itut
u
stit
bs
M ion
ub
t
S
1 t di y d
(s ffe iff
a b
am re er
e) nt ent
ch p l a ch
ar ce ar
ac s ac
te is te
r a re rs
Simple Complex
pp p l a .
Substitution Substitution
e a ce
rin d
g
Symmetric-key cryptography Traditional ciphers
Here:
C = E(p) = (p + k) mod (26) p = plaintext
C= Ciphertext
p = D(C) = [(C – k)+26] mod (26) k= key
Possible Remainders: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Symmetric-key cryptography Traditional ciphers
Shift by 3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Example:
Plaintext: we love pakistan
Ciphertext: ZH ORYH SDNLVWDQ
Symmetric-key cryptography Traditional ciphers
Advantages:
Simple
Fast
Disadvantages:
Easy to break
Symmetric-key cryptography Traditional ciphers
26 < 25
25 =32
Symmetric-key cryptography Traditional ciphers
SOLUTION:
3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
To be replaced
with
Symmetric-key cryptography Traditional ciphers
Plaintext: GOOD
Ciphertext: XQQA
Symmetric-key cryptography Traditional ciphers
KEY f
Plaintext A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Ciphertext F E D C B A Z Y X W V U T S R Q P O N M L K J I H G
Plaintext:
GREAT
Ciphertext:
Symmetric-key cryptography Traditional ciphers
Choose a keyword.
Example:
Plaintext:
Keyword:
RIPVANWINKLE
Symmetric-key cryptography Traditional ciphers
Encipher step:
R I P V A N W I N K L E
W H O E V E R H A S M A
D E A V O Y A G E U P T
H E H U D S O N M U S T
R E M E M B E R T H E K
A A T S K I L L M O U N
T A I N S
Plaintext:
Whoever has made a voyage up the Hudson
must remember the Kaatskill mountains.
Keyword: RIPVANWINKLE
Ciphertext:
VBBRF JFBNS ZEOEP AMPWC JQWLK EIBXV IVBQT LAEDR OMSRU DHURI WDQFL XBWRR YIHII
Symmetric-key cryptography Traditional ciphers
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
25 vs 288
Symmetric-key cryptography Traditional ciphers
Plain: a b c d e f g h i j k l m n o p q r s t u v w x y z
Cipher: D K V Q F I B J W P E S C X H T M Y A O U L R G Z N
Example:
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Symmetric-key cryptography Traditional ciphers
Solution:
Use key as follows:
1. Write key (with repeated letters deleted…STARWAR)
2. Then write all remaining letters row by row
3. Then read off by columns to get ciphertext equivalents
S T A R W
B C D E F
G H I/J K L
M N O P Q
U V X Y Z
Symmetric-key cryptography Traditional ciphers
A B C D E F G H I J K L M N O P Q R S T U V W X cY Z
S B G M U T C H N N V A D I/J O X R E K P Y W F L Q Z
Symmetric-key cryptography Traditional ciphers
EXAMPLE: S T A R W
B C D E F
Key = STARWAR G H I/J K L
Plaintext = YOU ARE GOOD M N O P Q
U V X Y Z
What is Ciphertext?.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
S B G M U T C H N N V A D I/J O X R E K P Y W F L Q Z
c
SOLUTION:
QOY SEU COOM
Symmetric-key cryptography Traditional ciphers
Method:
Write the plaintext
Write the keyword repeated above it
Use each key letter as a Caesar cipher key
Encrypt the corresponding plaintext letter
Use these in turn on the rest of the message
Symmetric-key cryptography Traditional ciphers
Example:
Keyword: deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
Symmetric-key cryptography Traditional ciphers
Method:
Key as long as the message
Keyword is prefixed to message as key
Use each key letter as a Caesar cipher key
Encrypt the corresponding plaintext letter
Use these in turn on the rest of the message
Symmetric-key cryptography Traditional ciphers
Example:
Keyword: deceptive
key: deceptivewearediscoveredsav
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGKZEIIGASXSTSLVVWLA
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
Information Security Cryptography
Assignment # 3
Due: Next Lecture
Review Questions:
Assignment #3
Due: Next Lecture
Review Questions: