SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
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
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   September 15, 2007.   2 / 22
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Evolution of Cryptography
Polyalphabetic substitution


       Vigenere cipher: polyalphabetic substitution.




  Sujit Prakash Gujar (CSA, IISc)   Cryptography: An Art and Science   September 15, 2007.   6 / 22
Evolution of Cryptography
Polyalphabetic substitution


       Vigenere cipher: polyalphabetic substitution.
       Enigma.




  Sujit Prakash Gujar (CSA, IISc)   Cryptography: An Art and Science   September 15, 2007.   6 / 22
Evolution of Cryptography
Polyalphabetic substitution


       Vigenere cipher: polyalphabetic substitution.
       Enigma.




  Sujit Prakash Gujar (CSA, IISc)   Cryptography: An Art and Science   September 15, 2007.   6 / 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
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
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
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
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
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
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
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
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
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
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
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
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
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
RSA



RSA Cryptosystem consists Three Primitives:
      Key Generation                   Encryption                     Decryption
Key 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
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
RSA Contd...

Let, (e, n) be public key of A and (d, n) corresponding private key.
Message m, is such that 1 ≤ m ≤ n

Encryption                                               Decryption
When B want to send a m to A,                            After receiving c,
he will send                                             A will retrieve message back using
c ≡ 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 have
ax = 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
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
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
Factoring number
Dixton,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
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
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
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
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

Contenu connexe

Plus de degarden

Plus de degarden (20)

Toshiba N300 salessheet english-web_r2
Toshiba N300 salessheet english-web_r2Toshiba N300 salessheet english-web_r2
Toshiba N300 salessheet english-web_r2
 
The 20 maps that will help you understand Spain - The Local
The 20 maps that will help you understand Spain - The LocalThe 20 maps that will help you understand Spain - The Local
The 20 maps that will help you understand Spain - The Local
 
Toshiba X300 Performance Internal Hard Drive
Toshiba X300 Performance Internal Hard DriveToshiba X300 Performance Internal Hard Drive
Toshiba X300 Performance Internal Hard Drive
 
Bronces
BroncesBronces
Bronces
 
Sper Food Safety Thermometer with IR
Sper Food Safety Thermometer with IRSper Food Safety Thermometer with IR
Sper Food Safety Thermometer with IR
 
Plarad Torque and tension systems
Plarad Torque and tension systemsPlarad Torque and tension systems
Plarad Torque and tension systems
 
Plarad Hydraulikaggregate Hydraulic Power Packs
Plarad Hydraulikaggregate Hydraulic Power PacksPlarad Hydraulikaggregate Hydraulic Power Packs
Plarad Hydraulikaggregate Hydraulic Power Packs
 
Hands-Free Profile 1.7
Hands-Free Profile 1.7Hands-Free Profile 1.7
Hands-Free Profile 1.7
 
Fingerprinting Bluetooth-Low-Energy Devices Based on the Generic Attribute Pr...
Fingerprinting Bluetooth-Low-Energy Devices Based on the Generic Attribute Pr...Fingerprinting Bluetooth-Low-Energy Devices Based on the Generic Attribute Pr...
Fingerprinting Bluetooth-Low-Energy Devices Based on the Generic Attribute Pr...
 
Reverse Engineering BLE Devices Documentation
Reverse Engineering BLE Devices DocumentationReverse Engineering BLE Devices Documentation
Reverse Engineering BLE Devices Documentation
 
pWeb: A P2P Web Hosting Framework
pWeb: A P2P Web Hosting FrameworkpWeb: A P2P Web Hosting Framework
pWeb: A P2P Web Hosting Framework
 
¿Qué esconde tu teléfono? Adquisición forense de dispositivos Android
¿Qué esconde tu teléfono? Adquisición forense de dispositivos Android ¿Qué esconde tu teléfono? Adquisición forense de dispositivos Android
¿Qué esconde tu teléfono? Adquisición forense de dispositivos Android
 
Bose NC 700 - User manual English
Bose NC 700 - User manual EnglishBose NC 700 - User manual English
Bose NC 700 - User manual English
 
MICHELIN CrossCLIMATE+
MICHELIN CrossCLIMATE+MICHELIN CrossCLIMATE+
MICHELIN CrossCLIMATE+
 
Catálogo-Producto-Familia-A3-PI_MY17_Medidas-Semana-9_2017
Catálogo-Producto-Familia-A3-PI_MY17_Medidas-Semana-9_2017Catálogo-Producto-Familia-A3-PI_MY17_Medidas-Semana-9_2017
Catálogo-Producto-Familia-A3-PI_MY17_Medidas-Semana-9_2017
 
Catálogo-Producto-Familia-A3_MY19_20195
Catálogo-Producto-Familia-A3_MY19_20195Catálogo-Producto-Familia-A3_MY19_20195
Catálogo-Producto-Familia-A3_MY19_20195
 
FE_A3-A3-SB-MY13-modeificaciones
FE_A3-A3-SB-MY13-modeificacionesFE_A3-A3-SB-MY13-modeificaciones
FE_A3-A3-SB-MY13-modeificaciones
 
Catálogo-Producto-Familia-A3-PI_MY18
Catálogo-Producto-Familia-A3-PI_MY18Catálogo-Producto-Familia-A3-PI_MY18
Catálogo-Producto-Familia-A3-PI_MY18
 
Catálogo-Producto-Familia-A3-PI_MY17
Catálogo-Producto-Familia-A3-PI_MY17Catálogo-Producto-Familia-A3-PI_MY17
Catálogo-Producto-Familia-A3-PI_MY17
 
A3-y-A3-SB-MY16
A3-y-A3-SB-MY16A3-y-A3-SB-MY16
A3-y-A3-SB-MY16
 

Dernier

Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Dernier (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 

Cryptography - An art and science

  • 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. Agenda Motivation Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  • 3. Agenda Motivation Objectives of Cryptography. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 2 / 22
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. Evolution of Cryptography Polyalphabetic substitution Vigenere cipher: polyalphabetic substitution. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 6 / 22
  • 19. Evolution of Cryptography Polyalphabetic substitution Vigenere cipher: polyalphabetic substitution. Enigma. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 6 / 22
  • 20. Evolution of Cryptography Polyalphabetic substitution Vigenere cipher: polyalphabetic substitution. Enigma. Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 6 / 22
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. RSA RSA Cryptosystem consists Three Primitives: Key Generation Encryption Decryption Key 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. 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. RSA Contd... Let, (e, n) be public key of A and (d, n) corresponding private key. Message m, is such that 1 ≤ m ≤ n Encryption Decryption When B want to send a m to A, After receiving c, he will send A will retrieve message back using c ≡ 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 have ax = 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. 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. 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. Factoring number Dixton,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. 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. 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. 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. Questions? Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 21 / 22
  • 45. Thank You!!! Sujit Prakash Gujar (CSA, IISc) Cryptography: An Art and Science September 15, 2007. 22 / 22