Computer Security Lecture 3: Classical Encryption Techniques 2
-
Upload
mohamed-loey -
Category
Education
-
view
64 -
download
3
Transcript of Computer Security Lecture 3: Classical Encryption Techniques 2
![Page 1: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/1.jpg)
Classical Encryption Techniques 2
Classical Encryption Techniques 2
![Page 2: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/2.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 3: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/3.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 4: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/4.jpg)
Classical Encryption Techniques 2
A polyalphabetic cipher is any cipher based on substitution, using
multiple substitution alphabets.
polyalphabetic cipher techniques have the following features in common:
A set of related monoalphabetic substitution rules is used.
A key determines which particular rule is chosen for a given
transformation.
![Page 5: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/5.jpg)
Classical Encryption Techniques 2
Assume
Then We set these Rules:
![Page 6: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/6.jpg)
Classical Encryption Techniques 2
Then We set Key as Rules:
1) Shift the first letter three position to the right
2) Shift the second letter five position to the right
3) Shift the third letter seven position to the right
Given Plaintext = security
![Page 7: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/7.jpg)
Classical Encryption Techniques 2
Given Plaintext = security
1) Divide Plaintext to three words
2) P= sec uri ty
3) C= VJJ XWP WD
![Page 8: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/8.jpg)
Classical Encryption Techniques 2
Then We set Key as Rules: (reverse)
1) Shift the first letter three position to the left
2) Shift the second letter five position to the left
3) Shift the third letter seven position to the left
Given Ciphertext = VJJXWPWD
![Page 9: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/9.jpg)
Classical Encryption Techniques 2
Given C= VJJXWPWD
1) Divide Plaintext to three words as your rules number
2) C= VJJ XWP WD
3) C= SEC URI TY
![Page 10: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/10.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 11: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/11.jpg)
Classical Encryption Techniques 2
The Vigenère cipher, was invented by a Frenchman, Blaise
de Vigenère in the 16th century.
Vigenère cipher is a simple polyalphabetic cipher
![Page 12: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/12.jpg)
Classical Encryption Techniques 2
𝐶𝑖 = 𝑃𝑖 + 𝐾 𝑚𝑜𝑑 26
𝑃𝑖 = 𝐶𝑖 − 𝐾 𝑚𝑜𝑑 26
Repeating key
![Page 13: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/13.jpg)
Classical Encryption Techniques 2
𝐾=deceptive
𝑃=we are discovered save yourself
![Page 14: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/14.jpg)
Classical Encryption Techniques 2
![Page 15: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/15.jpg)
Classical Encryption Techniques 2
Result
![Page 16: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/16.jpg)
Classical Encryption Techniques 2
The strength of Vigenère Cipher is that there are
multiple ciphertext letters for each plaintext letter
![Page 17: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/17.jpg)
Classical Encryption Techniques 2
decryption simply works in reverse
𝑃𝑖 = 𝐶𝑖 − 𝐾 𝑚𝑜𝑑 26
![Page 18: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/18.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 19: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/19.jpg)
Classical Encryption Techniques 2
An autokey cipher (also known as the autoclave
cipher) is a cipher which incorporates the
message (the plaintext) into the key.
𝑃 = {𝑝1, 𝑝2, 𝑝3, … , 𝑝𝑛}
𝐾 = {𝑘1, 𝑝1, 𝑝2, 𝑝3, … , 𝑝𝑛−1}
𝐶 = {𝑐1, 𝑐2, 𝑐3, … , 𝑐𝑛}
![Page 20: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/20.jpg)
Classical Encryption Techniques 2
𝐶𝑖 = 𝑃𝑖 + 𝐾𝑖 𝑚𝑜𝑑 26
𝑃𝑖 = 𝐶𝑖 − 𝐾𝑖 𝑚𝑜𝑑 26
![Page 21: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/21.jpg)
Classical Encryption Techniques 2
𝑲=m
𝑷=attack is today
Plaintext a t t a c k i s t o d a y
P Value 0 19 19 0 2 10 8 18 19 14 3 0 24
Key 12 0 19 19 0 2 10 8 18 19 14 3 0
C Value 12 19 12 19 2 12 18 0 11 7 17 3 24
Ciphertext m t m t c m s a l h r d y
![Page 22: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/22.jpg)
Classical Encryption Techniques 2
𝑲=m
𝑪=mtmtcmsalhrdy
Ciphertext m t m t c m s a l h r d y
C Value 12 19 12 19 2 12 18 0 11 7 17 3 24
Key 12 0 19 19 0 2 10 8 18 19 14 3 0
P Value 0 19 19 0 2 10 8 18 19 14 3 0 24
Plaintext a t t a c k i s t o d a y
![Page 23: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/23.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 24: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/24.jpg)
Classical Encryption Techniques 2
Vernam Cipher was introduced by an AT&T engineer named
Gilbert Vernam in 1918.
The ultimate defense against such a cryptanalysis is to choose a
keyword that is as long as the plaintext and has no statistical
relationship to it.
![Page 25: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/25.jpg)
Classical Encryption Techniques 2
![Page 26: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/26.jpg)
Classical Encryption Techniques 2
Encryption
𝐶 = 𝑃 𝑋𝑂𝑅 𝐾
Decryption
𝑃 = 𝐶 𝑋𝑂𝑅 𝐾
![Page 27: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/27.jpg)
Classical Encryption Techniques 2
P=11100011101010101101
K=1001010101
P=11100011101010101101
K=10010101011001010101
C=01110110110011111000
![Page 28: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/28.jpg)
Classical Encryption Techniques 2
C=01110110110011111000
K=10010101011001010101
P=11100011101010101101
![Page 29: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/29.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 30: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/30.jpg)
Classical Encryption Techniques 2
F...K...T...T...A...W.
.L.N.E.S.A.T.A.K.T.A.N
..A...A...T...C...D...
Ciphered Text
3FKTTAW
LNESATAKTAN
AATCD
The clear text message would be
encoded using a key of 3.
1FLANK EAST
ATTACK AT DAWN
Use a rail fence cipher and a
key of 3.
2
The clear text message would
appear as follows.
Clear Text
![Page 31: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/31.jpg)
Classical Encryption Techniques 2
Transposition Techniques performing some sort of
permutation on the plaintext letters (reorder the position of
letters in plaintext).
Types:
Rail Fence Cipher
Row Transposition Cipher
![Page 32: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/32.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 33: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/33.jpg)
Classical Encryption Techniques 2
P= meet me after the toga party
K=2
1) 𝑝 =𝑚 𝑒 𝑚𝑒 𝑡 𝑒
𝑎 𝑡 𝑟𝑓 𝑒 𝑡
ℎ 𝑡 𝑔𝑒 𝑜 𝑎
𝑝 𝑟 𝑦
𝑎 𝑡
2) C=mematrhtgpryetefeteoaat
![Page 34: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/34.jpg)
Classical Encryption Techniques 2
C=mematrhtgpryetefeteoaat
K=2
1) 𝐶 =𝑚 𝑒 𝑚𝑒 𝑡 𝑒
𝑎 𝑡 𝑟𝑓 𝑒 𝑡
ℎ 𝑡 𝑔𝑒 𝑜 𝑎
𝑝 𝑟 𝑦
𝑎 𝑡
2) P= meetmeafterthetogaparty
![Page 35: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/35.jpg)
Classical Encryption Techniques 2
Polyalphabetic Ciphers
Vigenère Cipher
Autokey Cipher
Vernam Cipher
Transposition Techniques
Rail Fence Cipher
Row Transposition Cipher
![Page 36: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/36.jpg)
Classical Encryption Techniques 2
P= attack postponed until two am
K= 4312567
𝐶 =
4 3 1 2 5 6 7𝑎 𝑡 𝑡 𝑎 𝑐 𝑘 𝑝𝑜𝑑𝑤
𝑠𝑢𝑜
𝑡𝑛𝑎
𝑝𝑡𝑚
𝑜𝑖𝑥
𝑛𝑙𝑥
𝑒𝑡𝑥
= 𝑡𝑡𝑛𝑎𝑎𝑝𝑡𝑚𝑡𝑠𝑢𝑜𝑎𝑜𝑑𝑤𝑐𝑜𝑖𝑥𝑘𝑛𝑙𝑥𝑝𝑒𝑡𝑥
![Page 37: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/37.jpg)
Classical Encryption Techniques 2
C= 𝑡𝑡𝑛𝑎𝑎𝑝𝑡𝑚𝑡𝑠𝑢𝑜𝑎𝑜𝑑𝑤𝑐𝑜𝑖𝑥𝑘𝑛𝑙𝑥𝑝𝑒𝑡𝑥 = Len(C)=28
K= 4312567
Each Column have 28/7= 4 letter
𝑃 =
4 3 1 2 5 6 7𝑎 𝑡 𝑡 𝑎 𝑐 𝑘 𝑝𝑜𝑑𝑤
𝑠𝑢𝑜
𝑡𝑛𝑎
𝑝𝑡𝑚
𝑜𝑖𝑥
𝑛𝑙𝑥
𝑒𝑡𝑥
= 𝑎𝑡𝑡𝑎𝑐𝑘𝑝𝑜𝑠𝑡𝑝𝑜𝑛𝑒𝑑𝑢𝑛𝑡𝑖𝑙𝑡𝑤𝑜𝑎𝑚𝑥𝑥𝑥
![Page 38: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/38.jpg)
Classical Encryption Techniques 2
As shown in Figure below, use Multiplicative Cipher to encrypt
“enemy attack tonight” with key = 4.
𝑪 = 𝑷𝒙𝑲 𝒎𝒐𝒅 𝟐𝟔
𝑲
𝑷𝒍𝒂𝒊𝒏𝒕𝒆𝒙𝒕
Sender
Encryption
𝑪
![Page 39: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/39.jpg)
Classical Encryption Techniques 2
As shown in Figure below, use Affine Cipher to encrypt “enemy
attack tonight” with key pair (4,3).
𝑻 = 𝑷𝒙𝑲𝟏 𝒎𝒐𝒅 𝟐𝟔
𝑲𝟏
𝑷𝒍𝒂𝒊𝒏𝒕𝒆𝒙𝒕
𝑪
Sender
Encryption
𝑪 = 𝑻 +𝑲𝟐 𝒎𝒐𝒅 𝟐𝟔
𝑲𝟐
![Page 40: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/40.jpg)
Classical Encryption Techniques 2
Use MS Word
Send me mail to [email protected] with email subject “
Classical Encryption Techniques 2 “
Put your name on Arabic with department and section on word and
email body
Finally, press Send
Deadline Next Lecture
![Page 41: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/41.jpg)
Classical Encryption Techniques 2
facebook.com/mloey
twitter.com/mloey
linkedin.com/in/mloey
mloey.github.io
![Page 42: Computer Security Lecture 3: Classical Encryption Techniques 2](https://reader034.fdocuments.us/reader034/viewer/2022042611/58d19bca1a28ab6f6b8b4ed9/html5/thumbnails/42.jpg)
Classical Encryption Techniques 2
www.YourCompany.com© 2020 Companyname PowerPoint Business Theme. All Rights Reserved.
THANKS FOR YOUR TIME