Cryptography: An Art and Science                                         Sujit Prakash Gujar                              ...
Agenda      Motivation Sujit Prakash Gujar (CSA, IISc)   Cryptography: An Art and Science   September 15, 2007.   2 / 22
Agenda      Motivation      Objectives of Cryptography. Sujit Prakash Gujar (CSA, IISc)   Cryptography: An Art and Science...
Agenda      Motivation      Objectives of Cryptography.      Evolution: Need for Mathematical tools in cryptography. Sujit...
Agenda      Motivation      Objectives of Cryptography.      Evolution: Need for Mathematical tools in cryptography.      ...
Agenda      Motivation      Objectives of Cryptography.      Evolution: Need for Mathematical tools in cryptography.      ...
Agenda      Motivation      Objectives of Cryptography.      Evolution: Need for Mathematical tools in cryptography.      ...
Agenda      Motivation      Objectives of Cryptography.      Evolution: Need for Mathematical tools in cryptography.      ...
Motivation      Colonel wants to convey some military plan of action to Lieutenant      Colonel. Sujit Prakash Gujar (CSA,...
Motivation      Colonel wants to convey some military plan of action to Lieutenant      Colonel.      World War I: Zimmerm...
Motivation      Colonel wants to convey some military plan of action to Lieutenant      Colonel.      World War I: Zimmerm...
Motivation      Colonel wants to convey some military plan of action to Lieutenant      Colonel.      World War I: Zimmerm...
Objectives of Cryptography      Privacy: Ciphers      Authentication: Digital Signatures.      Data Integrity: Message Dig...
Evolution of Cryptography      Steganography: art and science of writing hidden messages. Sujit Prakash Gujar (CSA, IISc) ...
Evolution of Cryptography      Steganography: art and science of writing hidden messages.      Demeratus: Wooden Tablet. (...
Evolution of Cryptography      Steganography: art and science of writing hidden messages.      Demeratus: Wooden Tablet. (...
Evolution of Cryptography      Steganography: art and science of writing hidden messages.      Demeratus: Wooden Tablet. (...
Evolution of CryptographyPolyalphabetic substitution       Vigenere cipher: polyalphabetic substitution.  Sujit Prakash Gu...
Evolution of CryptographyPolyalphabetic substitution       Vigenere cipher: polyalphabetic substitution.       Enigma.  Su...
Evolution of CryptographyPolyalphabetic substitution       Vigenere cipher: polyalphabetic substitution.       Enigma.  Su...
Evolution of Cryptography      Use of Keys.      Secret Algorithms vs. Secret Key Algorithms.      Distribution of keys? S...
Evolution of Cryptography      Use of Keys.      Secret Algorithms vs. Secret Key Algorithms.      Distribution of keys? S...
Evolution of Cryptography      Use of Keys.      Secret Algorithms vs. Secret Key Algorithms.      Distribution of keys? S...
Cipher: Art and Science      Cipher: an encryption and decryption algorithm.      Encryption: Scrambles message data based...
Some Standard Ciphers      Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Sujit Prakash Gujar (CSA, IISc)   Cryptograph...
Some Standard Ciphers      Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m.      Symmetric key cryptosystems, i.e. ke = k...
Some Standard Ciphers      Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m.      Symmetric key cryptosystems, i.e. ke = k...
Some Standard Ciphers      Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m.      Symmetric key cryptosystems, i.e. ke = k...
Some Standard Ciphers      Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m.      Symmetric key cryptosystems, i.e. ke = k...
Some Standard Ciphers      Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m.      Symmetric key cryptosystems, i.e. ke = k...
Preliminaries      We say, a ≡ b mod (n), when n divides (a − b).      It is basically a remainder function.      84 ≡ 75 ...
Hard Problems      Integer Factorization Problem: (IFP)      Given an integer n = p ∗ q, product of two prime numbers, find...
Hard Problems      Integer Factorization Problem: (IFP)      Given an integer n = p ∗ q, product of two prime numbers, find...
Hard Problems      Integer Factorization Problem: (IFP)      Given an integer n = p ∗ q, product of two prime numbers, find...
RSARSA Cryptosystem consists Three Primitives:      Key Generation                   Encryption                     Decryp...
RSA: Key Generation      If g.c.d of a and b is 1, there exists unique x and y such that                                  ...
RSA Contd...Let, (e, n) be public key of A and (d, n) corresponding private key.Message m, is such that 1 ≤ m ≤ nEncryptio...
Cracking RSA      Look at Key generation. If somebody solves IFP, he can easily deduce      decryption key.      Note: But...
Factoring number                                                            √      Naive algorithm: Try all numbers 1 to  ...
Factoring numberDixton,quadratic sieving,number field sieving       Choose B, set of known prime numbers.       Choose rand...
Elliptic curve cryptosystems      y 2 = x 3 + ax + b.      Consider, set of all integer pair (x,y) s.t.                   ...
Conclusions      Need of Mathematical functions in cryptography.      Hard Problems.      RSA Cryptosystem      Integer Fa...
References      “Applied Cryptography”, (2nd Ed.) by Bruce Schneier.      “Handbook of Applied Cryptography”, by Alfred Me...
Questions?Sujit Prakash Gujar (CSA, IISc)   Cryptography: An Art and Science   September 15, 2007.   21 / 22
Thank You!!!Sujit Prakash Gujar (CSA, IISc)     Cryptography: An Art and Science   September 15, 2007.   22 / 22
Upcoming SlideShare
Loading in …5
×

Cryptography - An art and science

894 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
894
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Cryptography - An art and science

  1. 1. Cryptography: An Art and Science Sujit Prakash Gujar sujit@csa.iisc.ernet.in Indian Institute of Science, Bangalore-12 September 15, 2007.Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 1 / 22
  2. 2. Agenda Motivation Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  3. 3. Agenda Motivation Objectives of Cryptography. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  4. 4. Agenda Motivation Objectives of Cryptography. Evolution: Need for Mathematical tools in cryptography. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  5. 5. Agenda Motivation Objectives of Cryptography. Evolution: Need for Mathematical tools in cryptography. Encryption/Decryption: Art and Science. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  6. 6. Agenda Motivation Objectives of Cryptography. Evolution: Need for Mathematical tools in cryptography. Encryption/Decryption: Art and Science. Hard Problems. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  7. 7. Agenda Motivation Objectives of Cryptography. Evolution: Need for Mathematical tools in cryptography. Encryption/Decryption: Art and Science. Hard Problems. RSA: Integer Factorization. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  8. 8. Agenda Motivation Objectives of Cryptography. Evolution: Need for Mathematical tools in cryptography. Encryption/Decryption: Art and Science. Hard Problems. RSA: Integer Factorization. Conclusions. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  9. 9. Motivation Colonel wants to convey some military plan of action to Lieutenant Colonel. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 3 / 22
  10. 10. Motivation Colonel wants to convey some military plan of action to Lieutenant Colonel. World War I: Zimmermann Telegram. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 3 / 22
  11. 11. Motivation Colonel wants to convey some military plan of action to Lieutenant Colonel. World War I: Zimmermann Telegram. World War II:Famous for cipher breaking. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 3 / 22
  12. 12. Motivation Colonel wants to convey some military plan of action to Lieutenant Colonel. World War I: Zimmermann Telegram. World War II:Famous for cipher breaking. On-line banking. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 3 / 22
  13. 13. Objectives of Cryptography Privacy: Ciphers Authentication: Digital Signatures. Data Integrity: Message Digest Non-repudiation: Digital Signatures. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 4 / 22
  14. 14. Evolution of Cryptography Steganography: art and science of writing hidden messages. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 5 / 22
  15. 15. Evolution of Cryptography Steganography: art and science of writing hidden messages. Demeratus: Wooden Tablet. (440 BC) Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 5 / 22
  16. 16. Evolution of Cryptography Steganography: art and science of writing hidden messages. Demeratus: Wooden Tablet. (440 BC) Substitution Ciphers. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 5 / 22
  17. 17. Evolution of Cryptography Steganography: art and science of writing hidden messages. Demeratus: Wooden Tablet. (440 BC) Substitution Ciphers. Statistical Analysis. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 5 / 22
  18. 18. Evolution of CryptographyPolyalphabetic substitution Vigenere cipher: polyalphabetic substitution. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 6 / 22
  19. 19. Evolution of CryptographyPolyalphabetic substitution Vigenere cipher: polyalphabetic substitution. Enigma. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 6 / 22
  20. 20. Evolution of CryptographyPolyalphabetic substitution Vigenere cipher: polyalphabetic substitution. Enigma. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 6 / 22
  21. 21. Evolution of Cryptography Use of Keys. Secret Algorithms vs. Secret Key Algorithms. Distribution of keys? Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 7 / 22
  22. 22. Evolution of Cryptography Use of Keys. Secret Algorithms vs. Secret Key Algorithms. Distribution of keys? Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 7 / 22
  23. 23. Evolution of Cryptography Use of Keys. Secret Algorithms vs. Secret Key Algorithms. Distribution of keys? Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 7 / 22
  24. 24. Cipher: Art and Science Cipher: an encryption and decryption algorithm. Encryption: Scrambles message data based on key. Mathematically, E :M ×K →C E (m, ke ) = c Decryption: recovers message data,only when provided correct key. Mathematically, D :C ×K →M D(c, kd ) = m Desirable properties: Easy to encrypt. Difficult to invert without key. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 8 / 22
  25. 25. Some Standard Ciphers Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 9 / 22
  26. 26. Some Standard Ciphers Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Symmetric key cryptosystems, i.e. ke = kd Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 9 / 22
  27. 27. Some Standard Ciphers Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Symmetric key cryptosystems, i.e. ke = kd – Block ciphers: AES,DES,IDEA Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 9 / 22
  28. 28. Some Standard Ciphers Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Symmetric key cryptosystems, i.e. ke = kd – Block ciphers: AES,DES,IDEA – Stream ciphers: RC4,FISH,SEAL Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 9 / 22
  29. 29. Some Standard Ciphers Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Symmetric key cryptosystems, i.e. ke = kd – Block ciphers: AES,DES,IDEA – Stream ciphers: RC4,FISH,SEAL Public key cryptosystems, i.e. ke = kd RSA,Rabbin,ECC. (Elliptic Curve Cryptosystem) Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 9 / 22
  30. 30. Some Standard Ciphers Simple way, c = m ⊕ k, m = c ⊕ k = m ⊕ k ⊕ k = m. Symmetric key cryptosystems, i.e. ke = kd – Block ciphers: AES,DES,IDEA – Stream ciphers: RC4,FISH,SEAL Public key cryptosystems, i.e. ke = kd RSA,Rabbin,ECC. (Elliptic Curve Cryptosystem) Need of Mathematical Tools, i.e functions which are easy to compute and difficult to invert. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 9 / 22
  31. 31. Preliminaries We say, a ≡ b mod (n), when n divides (a − b). It is basically a remainder function. 84 ≡ 75 mod (9), but in general, we will say 84 ≡ 3 mod (9) When n = p, some prime, p,Let, Z× = {1, 2, . . . , p − 1}. p (Z× , ×p ): Multiplicative group. p g ∈ Z× such that, {g , g 2 , . . . , g p−1 } = Z× , then we say g is p p generator. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 10 / 22
  32. 32. Hard Problems Integer Factorization Problem: (IFP) Given an integer n = p ∗ q, product of two prime numbers, find prime factors, p, q. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 11 / 22
  33. 33. Hard Problems Integer Factorization Problem: (IFP) Given an integer n = p ∗ q, product of two prime numbers, find prime factors, p, q. Discrete Logarithm Problem (DLP) Let p be the prime number and g be the generator of (Zp )× . If, a = g x mod (p), x is called as discrete logarithm of a. DLP is, given ‘a’ find discrete logarithm of ‘a’ in (Zp )× i.e. find x s.t. g x mod (p) = a. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 11 / 22
  34. 34. Hard Problems Integer Factorization Problem: (IFP) Given an integer n = p ∗ q, product of two prime numbers, find prime factors, p, q. Discrete Logarithm Problem (DLP) Let p be the prime number and g be the generator of (Zp )× . If, a = g x mod (p), x is called as discrete logarithm of a. DLP is, given ‘a’ find discrete logarithm of ‘a’ in (Zp )× i.e. find x s.t. g x mod (p) = a. Diffie-Hellman Problem: (DHP) Let p be the prime number and g be the generator of (Zp )× . Given g a mod (p),g b mod (p), find g ab mod (p) Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 11 / 22
  35. 35. RSARSA Cryptosystem consists Three Primitives: Key Generation Encryption DecryptionKey Generation 1 Choose, p and q, two large primes. 2 Calculate: n = p ∗ q. φ(n) = (p − 1) ∗ (q − 1). 3 Choose e such that g.c.d of e and φ(n) is 1. 4 Calculate d such that ed ≡ 1 mod (φ(n)). Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 12 / 22
  36. 36. RSA: Key Generation If g.c.d of a and b is 1, there exists unique x and y such that ax + by = 1. Let, a = e, b = φ(n). Then, x will be required d. And this can be calculated using Extended Euclidian Algorithm. (e, n) is called public key or encryption key. (d, n) is called private key or decryption key. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 13 / 22
  37. 37. RSA Contd...Let, (e, n) be public key of A and (d, n) corresponding private key.Message m, is such that 1 ≤ m ≤ nEncryption DecryptionWhen B want to send a m to A, After receiving c,he will send A will retrieve message back usingc ≡ me mod (n) m ≡ c d mod(n) m ≡ cd ≡ (me )d mod (n) ≡ m(ed) mod (n)When, n = p ∗ q, from Number Theory, we haveax = a(x+φ(n)−1) mod (n)m ≡ m mod (n). Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 14 / 22
  38. 38. Cracking RSA Look at Key generation. If somebody solves IFP, he can easily deduce decryption key. Note: But, given public key, if someboy can deduce private key doesn’t implay he can factor n. i.e. Solving IFP ⇒ Cracking RSA Reverse may not be true. Rabin Cryptosystem: As hard as IFP. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 15 / 22
  39. 39. Factoring number √ Naive algorithm: Try all numbers 1 to n. √ Time complexity: O( n) Suppose, x 2 ≡ y 2 mod n and x ≡ ±y mod (n) ⇒ n divides (x 2 − y 2 ) i.e. either (x + y ) or (x − y ). Who will give such x and y ? Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 16 / 22
  40. 40. Factoring numberDixton,quadratic sieving,number field sieving Choose B, set of known prime numbers. Choose randomly, x1 , x2 , . . . , xk , s.t. p(xi ) ≡ xi2 mod (n) factors completely using primes in B. Find {y1 . . . , yl } ⊆ {x1 , x2 , . . . , xk }, such that l l yi2 ≡ p(yi ) mod (n) i=1 i=1 and, RHS of the above equation is square. √ √ Quadratic Sieving. Time Complexity: O exp(2 2 log n log log n) . Number Field Sieving. Time Complexity: O exp(c ∗ (log n)1/3 (log log n)2/3 ) . Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 17 / 22
  41. 41. Elliptic curve cryptosystems y 2 = x 3 + ax + b. Consider, set of all integer pair (x,y) s.t. y 2 = x 3 + ax + b mod (p), where p is prime. Group. We can use DLP. Till date, Time complexity: O exp(c(log n)1/2 (log log n)1/2 ) . 1024 bit RSA security ≡ 168 bit ECC security. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 18 / 22
  42. 42. Conclusions Need of Mathematical functions in cryptography. Hard Problems. RSA Cryptosystem Integer Factoring. Elliptic Curve Cryptosystems. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 19 / 22
  43. 43. References “Applied Cryptography”, (2nd Ed.) by Bruce Schneier. “Handbook of Applied Cryptography”, by Alfred Menezes, Paul van Oorschot and Scott Vanstone. “The Code Book”, by Simon Singh. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 20 / 22
  44. 44. Questions?Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 21 / 22
  45. 45. Thank You!!!Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 22 / 22

×