Upcoming SlideShare
×

Cryptology

308
-1

Published on

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
308
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
20
0
Likes
0
Embeds 0
No embeds

No notes for slide
• Breaking Code
• KAISISKI TEST IS USED TO BREAK THE CODE
• Pattern Attack is Possible
25! Ways if applying Brute-force attack
• Making Code
• Cryptology

1. 1. Cryptography “ You can’t make something secure if you don’t know how to break it” - Marc Weber Tobias
2. 2. Definition • Cryptography is the science of disguising messages so that only the intended recipient can decipher the received message. • Secret Writing
3. 3. Scenario
4. 4. Terminologies • Plain text • Cipher text • Encryption • Decryption • Cryptanalysis • Cryptology
5. 5. • 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
6. 6. Cryptanalysis • Cryptography is the art and science of creating secret codes. • Cryptanalysis is the art and science of breaking those code.
7. 7. Cryptanalysis Attack Ciphertext Only Brute-Force Statistical Pattern Known Plaintext Chosen- Plaintext Chosen- Ciphertext
8. 8. Crypto- graphy Crypt- analysis Cryptology
9. 9. SymmetricCiphers Substitution Cipher Mono-alphabetic Polyalphabetic Transposition Cipher
10. 10. Mono-alphabetic Cipher • Additive / Caesar / Shift Cipher • Multiplicative Cipher • Affine Cipher
11. 11. Caesar Cipher
12. 12. Representation of Character
13. 13. Shift Cipher • Encryption o C=(P+K1) Mod 26 • Decryption o P=(C-K1) Mod 26 https://www.youtube.com/watch?v=fEULLhEA4Vk
14. 14. • 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 BR X U Q D P H
15. 15. Multiplicative Cipher • Encryption o C=(P * K1) Mod 26 • Decryption o P=(C * K1 -1) Mod 26
16. 16. Affine Cipher • Combination of Additive and Multiplicative • Encryption o C=(P * K1 + K2) Mod 26 • Decryption o P=((C – K2 )* K1 -1) Mod 26
17. 17. 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…).
18. 18. Poly-alphabetic Cipher • Each occurrence of character may have a different substitution. • One to Many • Vigenere Cipher , Play-fair Cipher, Hill Cipher ,Vernam Cipher.
19. 19. 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.
20. 20. Example • Plaintext : SHE IS LISTINING • Key : PASCAL • Cipher text : HHW KS WXSLGNTCG
21. 21. 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
22. 22. 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
23. 23. 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 o Creation of matrix o Encryption
24. 24. Question (10 Marks) Dec -2012
25. 25. 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
26. 26. Solution • SH EI SL IS TI NI NG • SH = QJ H J Q S
27. 27. 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
28. 28. Solution • SH EI SL IS TI NI NG • SL (SAME ROW)= TP L P Q S T
29. 29. 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
30. 30. 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
31. 31. 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
32. 32. Example • Plain text = CAT Encryption CAT = FIN • 𝟐 𝟎 𝟏𝟗 × 𝟗 𝟐𝟒 𝟏 𝟏𝟑 𝟏𝟔 𝟏𝟎 𝟏 𝟏𝟎 𝟏𝟓 = 𝟑𝟏 𝟐𝟏𝟔 𝟐𝟑𝟓 𝑴𝒐𝒅 𝟐𝟔 = 𝟓 𝟖 𝟏𝟑 Decryption FIN = CAT • 𝟓 𝟖 𝟏𝟑 × 𝟖 𝟓 𝟏𝟎 𝟐𝟏 𝟖 𝟐𝟏 𝟐𝟏 𝟏𝟐 𝟖 = 𝑴𝒐𝒅 𝟐𝟔 = 𝟐 𝟎 𝟏𝟗
33. 33. One-Time Pad • Vernam Cipher. • Key used once can not be reused. • Key length is equal to message length. • Book cipher / Running Key cipher
34. 34. 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
35. 35. Book Cipher • Running Key cipher.
36. 36. Cipher Block Cipher Polygram Substitution Stream Cipher Homophonic Substitution
37. 37. Transposition • Permutation of position of Plaintext alphabet. • Rail Fence Technique • Simple Columnar Transposition • Simple Columnar Transposition with Multiple Round
38. 38. Cryptography Encryption Decryption
39. 39. Cryptography Create secret Code • Encryption o CT = Ek (PT) • Decryption o PT=Dk (CT) = Dk (Ek (PT))
40. 40. Cryptography • Input to the process o Algorithm o Key
41. 41. Cryptography Symmetric Key Asymmetric Key
42. 42. Symmetric Key • Same key is used for encryption and decryption of message. • Key Exchange Problem
43. 43. 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
44. 44. 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
45. 45. 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
46. 46. Problem with Algorithm • Man in Middle attack
47. 47. Asymmetric Key
1. A particular slide catching your eye?

Clipping is a handy way to collect important slides you want to go back to later.