Download - Cryptology
![Page 1: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/1.jpg)
Cryptography
“ You can’t make something secure if you don’t know how to break it”
- Marc Weber Tobias
![Page 2: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/2.jpg)
Definition• Cryptography is the science of
disguising messages so that only
the intended recipient can
decipher the received message.
• Secret Writing
![Page 3: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/3.jpg)
Scenario
![Page 4: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/4.jpg)
Terminologies • Plain text
• Cipher text
• Encryption
• Decryption
• Cryptanalysis
• Cryptology
![Page 5: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/5.jpg)
![Page 6: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/6.jpg)
![Page 7: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/7.jpg)
• Encryption: c = Ee(p)
• Decryption: p = Dd(c)
• Here p is a block of plaintext,
c is a block of ciphertext,
E is the encryption function, e is the encryption key,
D is the decryption function and d is the decryption key.
Cryptography
![Page 8: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/8.jpg)
Cryptanalysis
• Cryptography is the art and
science of creating secret codes.
• Cryptanalysis is the art and
science of breaking those code.
![Page 9: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/9.jpg)
Cryptanalysis Attack
Ciphertext Only
Brute-Force
Statistical
Pattern Known Plaintext
Chosen-Plaintext
Chosen-Ciphertext
![Page 10: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/10.jpg)
Crypto-
graphy
Crypt-analys
is
Cryptology
![Page 11: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/11.jpg)
Sym
metr
ic
Cip
hers
SubstitutionCipher
Mono-alphabetic
Polyalphabetic
TranspositionCipher
![Page 12: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/12.jpg)
Mono-alphabetic Cipher
• Additive / Caesar / Shift Cipher
• Multiplicative Cipher
• Affine Cipher
![Page 13: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/13.jpg)
Caesar Cipher
![Page 14: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/14.jpg)
Representation of Character
![Page 15: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/15.jpg)
Shift Cipher
• Encryptiono C=(P+K1) Mod 26
• Decryptiono P=(C-K1) Mod 26
https://www.youtube.com/watch?
v=fEULLhEA4Vk
![Page 16: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/16.jpg)
• The Additive cipher replaces each
alphabet in a text by the alphabet k
positions away (in the modulo 26
sense).
• For k = 3
W H A T I S Y O U R N A M E
becomes
Z K D W L V B R X U Q D P H
![Page 17: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/17.jpg)
Multiplicative Cipher
• Encryptiono C=(P * K1) Mod 26
• Decryptiono P=(C * K1
-1) Mod 26
![Page 18: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/18.jpg)
Affine Cipher
• Combination of Additive and
Multiplicative
• Encryptiono C=(P * K1 + K2) Mod 26
• Decryptiono P=((C – K2 )* K1
-1) Mod 26
![Page 19: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/19.jpg)
Cryptanalysis
• Brute-Force Attack
• Statistical Attack
• Frequency of Occurrence of letters.
(E,T,A,O,I,N,S,H,R,D……)
• Grouping of Di-gram (HE,IN,AN,IS...)
and Tri-grams (THE,ING,AND,HER…).
![Page 20: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/20.jpg)
Poly-alphabetic Cipher
• Each occurrence of character may
have a different substitution.
• One to Many
• Vigenere Cipher , Play-fair Cipher,
Hill Cipher ,Vernam Cipher.
![Page 21: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/21.jpg)
Vigenere Cipher
• Blaise de Vigenere, Mathematician
• Secret Key of length m (K1,K2.......,Km)
is required
• Key stream Not depend on plaintext
character.
• Encryption depends on the position of
character in the plaintext.
![Page 22: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/22.jpg)
![Page 23: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/23.jpg)
Example
• Plaintext : SHE IS LISTINING
• Key : PASCAL
• Cipher text : HHW KS
WXSLGNTCG
![Page 24: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/24.jpg)
Plaintext S H E I S L I S T I N I N G
P Values 18 07 04 08 18 11 08 18 19 04 13 08 13 06
K Values 15 00 18 02 00 11 15 05 08 02 00 11 05 00
C Values 07 07 22 10 18 22 23 23 11 06 13 19 02 06
Cipher text H H W K S W X X L G N T C G
![Page 25: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/25.jpg)
Plaintext S H E I S L I S T I N I N G
P Values 18 07 04 08 18 11 08 18 19 04 13 08 13 06
K Values 15 00 18 02 00 11 15 00 08 02 00 11 05 00
C Values 07 07 22 10 18 22 23 18 11 06 13 19 02 06
Cipher text H H W K S W X S L G N T C G
![Page 26: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/26.jpg)
Play-fair Cipher
• Used by British army during World war
I
• Secret key made of 25 alphabet
arranged in 5*5 Matrix.
• Two step process
oCreation of matrix
o Encryption
![Page 27: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/27.jpg)
Question (10 Marks)Dec -2012
![Page 28: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/28.jpg)
Solution• Plaintext : SHE IS LISTINING • Key : MORNING
M O R N I
G A B C D
E F H J K
L P Q S T
U V W X YZ
![Page 29: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/29.jpg)
Solution• SH EI SL IS TI NI NG • SH = QJ
H J
Q S
![Page 30: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/30.jpg)
Solution• SH EI SL IS TI NI NG • EI = KM
M O R N I
G A B C D
E F H J K
![Page 31: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/31.jpg)
Solution• SH EI SL IS TI NI NG • SL (SAME ROW)= TP
L P Q S T
![Page 32: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/32.jpg)
Solution• SH EI SL IS TI NI NG • IS = NT• TI(SAME COLUMN) = YD
M O R N I
G A B C D
E F H J K
L P Q S T
U V W X YZ
![Page 33: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/33.jpg)
Solution• SH EI SL IS TI NI NG • NI(SAME ROW) = IM• NG = MC
M O R N I
G A B C D
E F H J K
L P Q S T
U V W X YZ
![Page 34: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/34.jpg)
Hill Cipher
• Lester S. Hill
• Block Cipher
• Key is square matrix of order m*m
• Key Matrix need to have
multiplicative inverse.
• Difficult to break
![Page 35: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/35.jpg)
Example• Plain text = CATEncryption CAT = FIN
Decryption FIN = CAT
![Page 36: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/36.jpg)
One-Time Pad• Vernam Cipher.
• Key used once can not be reused.
• Key length is equal to message
length.
• Book cipher / Running Key cipher
![Page 37: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/37.jpg)
Plaintext V E R N E M C I P H E R
Numeric Code 21 04 17 13 00 12 02 08 15 07 04 17
Key 76 48 06 82 44 03 58 11 60 05 48 88
Sum 97 52 33 95 44 15 60 19 75 12 52 105
Mod 26 19 00 07 17 18 15 08 19 23 12 00 01
Ciphertext T A H R S P I T X M A B
![Page 38: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/38.jpg)
Book Cipher• Running Key cipher.
![Page 39: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/39.jpg)
Cipher
Block Cipher
Polygram Substitutio
n
Stream Cipher
Homophonic
Substitution
![Page 40: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/40.jpg)
Transposition
• Permutation of position of
Plaintext alphabet.
• Rail Fence Technique
• Simple Columnar Transposition
• Simple Columnar Transposition
with Multiple Round
![Page 41: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/41.jpg)
Cryptography
Encryption
Decryption
![Page 42: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/42.jpg)
CryptographyCreate secret Code
• Encryption
o CT = Ek (PT)
• Decryption
o PT=Dk (CT) = Dk (Ek (PT))
![Page 43: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/43.jpg)
Cryptography
• Input to the process o Algorithm
o Key
![Page 44: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/44.jpg)
Cryptography
Symmetric Key
Asymmetric Key
![Page 45: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/45.jpg)
![Page 46: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/46.jpg)
Symmetric Key
• Same key is used for encryption
and decryption of message.
• Key Exchange Problem
![Page 47: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/47.jpg)
![Page 48: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/48.jpg)
Diffie-Hellman Algorithm
1. Pick random, secret x
2. Compute A = gx mod n
3. Send A to Bob
4. K1 = Bx Mod n
1. Pick random, secret y
2. Compute B = gy mod n
3. Send B to Alice
4. K2 = Ay Mod n
Alice and Bob agree on two
prime number n and g
![Page 49: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/49.jpg)
Diffie – Hellman
K1 = (gx mod n)y = gxy mod n
K2 = (gy mod n)x = gxy mod n
• Let n = 11 and g = 7
• Let x = 3 and compute A
• Let y = 6 and compute B
• Calculate K1 and K2
![Page 50: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/50.jpg)
Solution
1. N = 11 , g = 7
2. x = 3 then A = 73 Mod 11 = 2
3. y = 6 then B = 76 Mod 11 = 4
4. K1 = 43 Mod 11 = 9
5. K2 = 26 Mod 11 = 9
![Page 51: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/51.jpg)
Problem with Algorithm
• Man in Middle attack
![Page 52: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/52.jpg)
Asymmetric Key
![Page 53: Cryptology](https://reader033.vdocuments.mx/reader033/viewer/2022052907/558fc6891a28ab7a4e8b4664/html5/thumbnails/53.jpg)