SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
Introduction
  Le cryptosyst`me RSA
               e
          Diffie Hellman




 Cryptologie asym´trique
                 e

                 License Pro

Renaud Tabary: renaud.tabary@labri.fr


                  2009-2010




            License Pro    Introduction ` la s´curit´ informatique
                                        a     e     e
Introduction
                    Le cryptosyst`me RSA
                                 e
                            Diffie Hellman



Plan
   1 Introduction
       Le principe
       Fonctions ` sens unique
                  a
       Fonction ` sens unique ` brˆche secr`te
                 a            a e          e
   2 Le cryptosyst`me RSA
                  e
       Rappels d’arithm´tique modulaire
                       e
       Le probl`me RSA
                e
       Le cryptosyst`me RSA
                    e
       S´curit´
        e     e
   3 Diffie Hellman
       Le probl`me Diffie-Hellman
                e
       Le cryptosyst`me Diffie Hellman
                    e
       S´curit´
        e     e
                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



Plan


   1 Introduction
       Le principe
       Fonctions ` sens unique
                  a
       Fonction ` sens unique ` brˆche secr`te
                 a            a e          e

   2 Le cryptosyst`me RSA
                  e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



La cryptgraphie ` cl´ secr`te
                a e       e




       Une seule cl´ pour chiffrer/d´chiffrer
                   e               e
       La cl´ est connue des deux intervenants
            e
       Si un attaquant intercepte la cl´, fin de la confidentialit´
                                       e                        e


                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



Limites de la cryptographie ` cl´ secr`te
                            a e       e

       Il faut pouvoir communiquer la cl´ secr`te par un moyen sˆr
                                        e     e                 u
           Lettre, t´l´phone, malette diplomatique
                    ee
           Pas tr`s pratique
                 e
       Nombre de cl´s ` ´changer pour communiquer avec plusieurs
                   e ae
       personnes
                            Nb personnes            Nb cl´s
                                                          e
                                 2                      1
                                 5                     10
                                100                   4450
                                 n                  n(n − 1)
       Plutˆt contraignant
           o


                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



La cryptographie ` cl´ publique
                 a e



       Petite r´volution dans les ann´es 1970 (Diffie Hellman 1976)
               e                     e
       La s´curit´ ne repose d´sormais plus sur :
           e     e             e
           Un secret partag´ (la cl´ secr`te)
                           e       e     e
           Des algorithmes obscurs
       Mais sur :
           Des probl`mes connus de tous (ex : factorisation)
                    e
           Une information connue de tous (la cl´ publique)
                                                e




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



La cryptographie ` cl´ publique
                 a e

       La cryptographie ` cl´ publique ou asym´trique est bas´e sur
                        a e                    e             e
       un concept tr`s diff´rent de la cryptographie sym´trique
                    e     e                            e
       Chaque intervenant poss`de une cl´ publique
                               e          e
           Cette cl´ peut ˆtre connue de tous. Par exemple, disponible
                   e      e
           dans un r´pertoire accessible publiquement, sur internet
                     e
           Toute personne connaissant cette cl´ peut envoyer un message
                                               e
           chiffr´ au propri´taire de cette cl´
                e          e                 e
       Chaque intervenant poss`de une cl´ priv´e
                              e         e     e
           Cette cl´ doit demeurer confidentielle
                   e
           Cette cl´ est li´e (math´matiquement) ` la cl´ publique
                   e       e        e            a      e
           correspondante
           Cette cl´ permet de d´chiffrer tout message chiffr´ avec la cl´
                   e              e                         e          e
           publique correspondante

                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                      Le cryptosyst`me RSA
                                   e           Fonctions ` sens unique
                                                          a
                              Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                         a            a e          e



Le principe du coffre fort

   On peut assimiler la cryptographie ` cl´ publique au protocole
                                      a e
   suivant :
       Bob veut envoyer un message ` Alice de mani`re confidentielle
                                      a              e
       Alice fournit un coffre fort ` Bob, ainsi qu’un cadenas
                                   a
            Alice conserve la cl´ du cadenas
                                e
       Bob met ses documents dans le coffre d’Alice et le cadenasse
            Le cadenas est la cl´ publique d’Alice
                                e
            Il permet de mettre des informations dans le coffre
            Difficile d’ouvrir le coffre juste avec le cadenas
       Alice r´cup`re le coffre, et l’ouvre avec la cl´ du cadenas
              e e                                    e
            C’est la cl´ priv´e d’Alice
                       e     e


                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le principe
          Le cryptosyst`me RSA
                       e           Fonctions ` sens unique
                                              a
                  Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                             a            a e          e



Exemple




                    License Pro    Introduction ` la s´curit´ informatique
                                                a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



Exemple plus r´aliste
              e

   Un exemple plus r´aliste :
                    e
       Bob veut envoyer un message ` Alice de mani`re confidentielle
                                   a              e
       Alice poss`de un couple (cl´ priv´e,cl´ publique)
                 e                e     e e
       Bob r´cup`re la cl´ publique d’Alice (disponible publiquement)
            e e          e




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                      Le cryptosyst`me RSA
                                   e           Fonctions ` sens unique
                                                          a
                              Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                         a            a e          e



Exemple plus r´aliste (2)
              e

       Bob chiffre son message avec la cl´ publique d’Alice
                                        e
       Il l’envoie ` Alice
                   a
       Alice d´chiffre le message avec sa cl´ priv´e
              e                            e     e




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



Avantages


  Avantages :
      Si N intervenants veulent s’´changer des informations sans
                                   e
      l’aide d’un tiers, chaque intervenant doit avoir une cl´
                                                             e
      publique unique connue de tous
            Donc, N cl´s sont suffisantes
                      e
      Les cl´s publiques doivent ˆtre distribu´es de fa¸on
            e                    e            e        c
      authentifi´e, mais non confidentielle
                e
            Seule la cl´ publique est divulg´e
                        e                   e
            Connaˆ la cl´ publique d’un intervenant ne permet pas de
                   ıtre    e
            d´chiffrer ses messages
             e




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



Comment est-ce possible ?




      La cryptographie ` cl´ publique est bas´e sur des probl`mes
                        a e                  e               e
      math´matiques
            e
      Utilisation de fonction ` sens unique ` br`che secr`te
                              a             a e            e
          M´taphore du cadenas
           e
               Facile ` fermer
                      a
               N´cessite une cl´ pour ouvrir
                e              e




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



Plan


   1 Introduction
       Le principe
       Fonctions ` sens unique
                  a
       Fonction ` sens unique ` brˆche secr`te
                 a            a e          e

   2 Le cryptosyst`me RSA
                  e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



Rappel de la complexit´
                      e

   Th´orie de la complexit´ :
     e                    e
       On dira qu’un probl`me est complexe si il appartient ` la
                           e                                a
       classe NP (non-determinist polynomial)
            C’est ` dire que trouver une solution au probl`me se fait en
                   a                                      e
                nk
            O(2 )
            V´rifier la solution se fait en temps polynomial
             e
            n ´tant la longueur de l’entr´e (en bits)
              e                           e
       On dirat qu’un probl`me est facile si il existe un algorithme le
                           e
       r´solvant appartenant ` P
        e                    a
            Trouver une solution se fait en O(nk )
            Facile ... si k reste petit
       Donnez des exemples


                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



Rappel de la complexit´ (2)
                      e


      Un ordinateur peut r´soudre des probl`mes appartenant ` la
                          e                e                a
      classe P
          Dans la plupart des cas, c’est ` dire si k pas trop grand
                                         a
          Un ordinateur peut difficilement r´soudre des probl`mes
                                            e                  e
          NP-complexes
               D`s que n devient un peu grand, le temps n´cessaire devient
                 e                                        e
               prohibitif
               Exemple : factoriser un nombre de 1024 bits
          Conjecture P = NP ?
               Pas prouv´ !
                         e
               Mais on l’esp`re
                            e




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



Fonction ` sens unique
         a



   Definition
   Une fonction ` sens unique est une fonction f telle que f (x) est
                  a
   facile ` calculer et f −1 (x) est difficile ` calculer
          a                                  a

       Exemple :
            casser un oeuf
            m´langer un pot de peinture rouge et un pot de peinture
              e
            blanche




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



Factorisation



       Quelle est la complexit´ de factorisation ?
                              e
       Trouver les deux facteurs premiers de :
           35 = 5 ∗ 7
           221 = 13 ∗ 17
           50123093 ?
       Comment calculer le dernier exemple ?
       Quelle complexit´ ?
                       e
           ici n =| log2 (50123093) | +1 = 26




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



Plan


   1 Introduction
       Le principe
       Fonctions ` sens unique
                  a
       Fonction ` sens unique ` brˆche secr`te
                 a            a e          e

   2 Le cryptosyst`me RSA
                  e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le principe
                      Le cryptosyst`me RSA
                                   e           Fonctions ` sens unique
                                                          a
                              Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                         a            a e          e



Fonction ` sens unique ` brˆche secr`te
         a             a e          e



   Definition
   Une fonction ` sens unique et ` br`che secr`te est une fonction f
                a                a e          e
   telle que
       f (x) est facile ` calculer
                        a
       f −1 (x) est difficile ` calculer
                            a
       f −1 (x) sachant k est facile ` calculer
                                     a
            k est la brˆche secrˆte
                       e        e




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le principe
                     Le cryptosyst`me RSA
                                  e           Fonctions ` sens unique
                                                         a
                             Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                        a            a e          e



R´capitulatif
 e


       La cryptographie asym´trique : Chaque utilisateur poss`de
                            e                                e
       deux cl´s :
              e
            Une cl´ publique qui permet de chiffrer des messages pour
                    e
            l’utilisateur
            Une cl´ priv´e qui permet ` l’utilisateur de d´chiffrer les
                    e     e            a                  e
            messages chiffr´s avec sa cl´ publique
                            e          e
       La cl´ publique est diffus´e ` tout le monde
            e                   e a
            La connaˆ ne permet pas de d´chiffrer les messages
                    ıtre                e
       La cl´ priv´e est gard´e secr`te par l’utilisateur
            e     e          e      e
            La seule qui permette de d´chiffrer les messages
                                      e




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le principe
                    Le cryptosyst`me RSA
                                 e           Fonctions ` sens unique
                                                        a
                            Diffie Hellman     Fonction ` sens unique ` brˆche secr`te
                                                       a            a e          e



R´capitulatif (2)
 e

       La cryptographie ` cl´ publique est bas´e sur des probl`mes
                        a e                   e               e
       math´matiques difficiles ` r´soudre
            e                   a e
           Factorisation
           Logarithme discret
       De ces probl`mes, on extrait des fonction ` sens unique `
                   e                             a             a
       brˆche secrˆte
         e         e
           Calculer f (x) est facile (f =cl´ publique, x=message)
                                           e
           Calculer f −1 (x) est difficile
           Calculer f −1 (x) sachant k est facile (k=cl´ priv´e)
                                                        e    e
       Les deux probl`mes les plus c´l`bres :
                     e              ee
           Le probl`me RSA
                   e
           Le probl`me Diffie Hellman
                   e


                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e
       Rappels d’arithm´tique modulaire
                       e
       Le probl`me RSA
                e
       Le cryptosyst`me RSA
                    e
       S´curit´
        e     e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


Calcul modulaire

      37 ≡ 2 mod 5 :
          37 = 2 + k ∗ 5
          Reste de la division Euclidienne
      Addition, multiplication, exponentiation modulaire
          Op´rations peu coˆteuses
            e              u
      Zn = ensemble des r´sidus modulo n muni des op´rations
                          e                         e
      modulaires
      Inversion modulaire :
          Trouver b tel que ab ≡ 1 mod n
               Si pgcd(a, n) = 1, une solution unique (algorithme d’Euclide
               ´tendu)
               e
               Sinon pas de solution


                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                              e
                               Introduction
                                              Le probl`me RSA
                                                       e
                     Le cryptosyst`me RSA
                                  e
                                              Le cryptosyst`me RSA
                                                           e
                             Diffie Hellman
                                              S´curit´
                                               e     e


Calcul modulaire (2)


       Petit th´or`me de Fermat :
               e e
   Theorem
   Si m premier, et pgcd(a, m) = 1, am−1 ≡ 1 mod m

       Fonction d’Euler :
   Definition
       ϕ(n) est le nombre de r´sidus premiers avec n
                              e
       Si n est premier, ϕ(n) = n − 1
       Si n = p ∗ q, alors ϕ(n) = (p − 1)(q − 1)



                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Rappels d’arithm´tique modulaire
                                                              e
                               Introduction
                                              Le probl`me RSA
                                                       e
                     Le cryptosyst`me RSA
                                  e
                                              Le cryptosyst`me RSA
                                                           e
                             Diffie Hellman
                                              S´curit´
                                               e     e


Calcul modulaire (3)


       Petit th´or`me de Fermat g´n´ralis´ par Euler :
               e e               e e     e
   Theorem
   Si pgcd(a, n) = 1, aϕ(n) ≡ 1 mod n

       Inverse modulaire :
   Theorem
   Si pgcd(a, n) = 1, l’inverse de a est aϕ(n)−1 mod n




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e
       Rappels d’arithm´tique modulaire
                       e
       Le probl`me RSA
                e
       Le cryptosyst`me RSA
                    e
       S´curit´
        e     e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                              e
                               Introduction
                                              Le probl`me RSA
                                                       e
                     Le cryptosyst`me RSA
                                  e
                                              Le cryptosyst`me RSA
                                                           e
                             Diffie Hellman
                                              S´curit´
                                               e     e


Quelques exemples



   Deux principales fonction ` sens unique et ` brˆche secr`te en
                             a                a e          e
   cryptographie asym´trique :
                       e
        Bas´ sur le probl`me factorisation :
           e             e
            Le probl`me RSA
                    e
       Bas´ sur le probl`me logarithme discret
          e             e
            Le probl`me Diffie Hellman
                    e
       Abordons tout d’abord RSA




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Rappels d’arithm´tique modulaire
                                                               e
                                Introduction
                                               Le probl`me RSA
                                                        e
                      Le cryptosyst`me RSA
                                   e
                                               Le cryptosyst`me RSA
                                                            e
                              Diffie Hellman
                                               S´curit´
                                                e     e


Le probl`me RSA
        e

      Le probl`me factorisation :
              e
          Entr´e : n = p ∗ q produit de deux nombres premiers
              e
          Sortie : p et q
      Fournit une fonction ` sens unique, mais pas de brˆche secr`te
                           a                            e        e
      Le probl`me RacineIemeModulaire ou probl`me RSA :
              e                                    e
          Entr´es :
              e
               Un entier n = p ∗ q produit de deux nombres premiers
               Un entier e > 0 premier avec (p − 1) ∗ (q − 1)
               Un entier c
          Sortie : m tel que c = me modn
      Fonction ` sens unique et ` brˆche secr`te (p, q)
               a                a e          e
      le cryptosyst`me RSA est bas´ sur les probl`mes
                   e              e              e
      RacineIemeModulaire et factorisation

                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e
       Rappels d’arithm´tique modulaire
                       e
       Le probl`me RSA
                e
       Le cryptosyst`me RSA
                    e
       S´curit´
        e     e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


RSA



      Chiffrement ` cl´ publique le plus utilis´
                 a e                          e
      Cr´´ en 1977 par Rivest, Shamir et Adleman
         ee
              e                       ´
      Brevet´ par le MIT en 1983 aux Etats-Unis. Le brevet a expir´
                                                                  e
      le 21 septembre 2000
      Utilis´ dans :
            e
          Les banques
          Les cartes ` puce
                     a
          Les site webs commerciaux




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                                e
                                 Introduction
                                                Le probl`me RSA
                                                         e
                       Le cryptosyst`me RSA
                                    e
                                                Le cryptosyst`me RSA
                                                             e
                               Diffie Hellman
                                                S´curit´
                                                 e     e


Protocole



   Trois ´tapes :
         e
     1   Cr´ation d’une cl´ publique et d’une cl´ priv´e pour Bob (la
            e              e                    e     e
         cl´ publique est diffus´e ` tout le monde, par exemple ` Alice)
           e                   e a                             a
     2   A chaque fois qu’Alice veut envoyer un message confidentiel `   a
         Bob, elle utilise la cl´ publique de Bob pour chiffrer le message
                                e
     3   Bob utilise sa cl´ priv´e pour d´chiffrer le message envoy´ par
                          e     e        e                        e
         Alice




                                 License Pro    Introduction ` la s´curit´ informatique
                                                             a     e     e
Rappels d’arithm´tique modulaire
                                                               e
                                Introduction
                                               Le probl`me RSA
                                                        e
                      Le cryptosyst`me RSA
                                   e
                                               Le cryptosyst`me RSA
                                                            e
                              Diffie Hellman
                                               S´curit´
                                                e     e


Cr´ation des cl´s
  e            e



     1   Choisir deux grand nombres p et q premiers
     2   n = p ∗ q et ϕ(n) = (p − 1)(q − 1)
     3   e un entier tel que 1 < e < ϕ(n) et e premier avec ϕ(n)
             i.e pgcd(e, ϕ(n)) = 1
     4   Calculer d tel que ed = 1 mod ϕ(n)
     5   Cl´ publique : (e, n)
           e
     6   Cl´ priv´e : d (ou (p, q))
           e     e




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Rappels d’arithm´tique modulaire
                                                               e
                                Introduction
                                               Le probl`me RSA
                                                        e
                      Le cryptosyst`me RSA
                                   e
                                               Le cryptosyst`me RSA
                                                            e
                              Diffie Hellman
                                               S´curit´
                                                e     e


Chiffrement




    1   Obtenir la cl´ publique (e, n) du destinataire
                     e
    2   Repr´senter le message comme un entier m tel que 1 < m < n
            e
    3   Calculer c = me mod n : texte chiffr´
                                           e
            Relation avec le probl`me RSA ?
                                  e




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Rappels d’arithm´tique modulaire
                                                                   e
                                    Introduction
                                                   Le probl`me RSA
                                                            e
                          Le cryptosyst`me RSA
                                       e
                                                   Le cryptosyst`me RSA
                                                                e
                                  Diffie Hellman
                                                   S´curit´
                                                    e     e


D´chiffrement
 e




    1   A l’aide de la cl´ priv´e d, calculer :
                         e     e

                                          m = c d mod n

    2   Et c’est tout !




                                    License Pro    Introduction ` la s´curit´ informatique
                                                                a     e     e
Rappels d’arithm´tique modulaire
                                                               e
                                Introduction
                                               Le probl`me RSA
                                                        e
                      Le cryptosyst`me RSA
                                   e
                                               Le cryptosyst`me RSA
                                                            e
                              Diffie Hellman
                                               S´curit´
                                                e     e


Exemple



     p = 31 et q = 137
     n = 4247 et ϕ(n) = 4080
     e = 967 (1 < e < ϕ(n) et pgcd(e, ϕ(n)) = 1)
     d = 2983 (1 < d < ϕ(n) et
     ed = 707x4080 + 1 = 1 mod ϕ(n))
     Cl´ publique : (e, n)
       e
     Cl´ priv´e : d
       e     e




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Rappels d’arithm´tique modulaire
                                                              e
                               Introduction
                                              Le probl`me RSA
                                                       e
                     Le cryptosyst`me RSA
                                  e
                                              Le cryptosyst`me RSA
                                                           e
                             Diffie Hellman
                                              S´curit´
                                               e     e


Exemple Chiffrement/D´chiffrement
                    e



      Message en clair m = 3333
      Chiffrement :

              c = me mod n = 3333967 mod 4247 = 3790

      D´chiffrement :
       e

             m = c d mod n = 37902983 mod 4247 = 3333




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Rappels d’arithm´tique modulaire
                                                                 e
                                  Introduction
                                                 Le probl`me RSA
                                                          e
                        Le cryptosyst`me RSA
                                     e
                                                 Le cryptosyst`me RSA
                                                              e
                                Diffie Hellman
                                                 S´curit´
                                                  e     e


Preuve formelle



    1   On rappelle :
                                        m = c d mod n
    2   Exercice :
            D´montrez que c d mod n permet bien de retrouver le message
              e
            en clair. On s’aidera de :
                 Des propri´t´s de l’arithm´tique modulaire
                           ee              e
                 Du petit th´or`me de Fermat
                            e e




                                  License Pro    Introduction ` la s´curit´ informatique
                                                              a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e
       Rappels d’arithm´tique modulaire
                       e
       Le probl`me RSA
                e
       Le cryptosyst`me RSA
                    e
       S´curit´
        e     e

   3 Diffie Hellman




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                             e
                              Introduction
                                             Le probl`me RSA
                                                      e
                    Le cryptosyst`me RSA
                                 e
                                             Le cryptosyst`me RSA
                                                          e
                            Diffie Hellman
                                             S´curit´
                                              e     e


RSA pourquoi ¸a marche ?
             c

      Attaque ` texte chiffr´ : revient ` r´soudre le probl`me RSA
               a           e           a e                e
      qui est difficile
           C’est ` dire difficile de calculer la solution de mani`re efficace
                 a                                             e
           Probl`me suppos´ dans NP
                e           e
           S’assurer quand mˆme que n est grand
                              e
      Retrouver la cl´ priv´e ` partir de la cl´ publique : revient `
                     e     e a                 e                    a
      r´soudre le probl`me factorisation qui est difficile
       e               e
           Op´ration math´matiquement impossible si n est grand
               e            e
           Et heureusement RSA utilise de grand nombres (plus de
           1024bits conseill´)
                             e
           Record actuel : 512bits (Anciennes cartes ` puces : 320bits !)
                                                     a
           Combien de temps cela prendrait-il pour un ordinateur ` 4Ghz
                                                                  a
           si n fait 1024 bits ?


                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Rappels d’arithm´tique modulaire
                                                            e
                             Introduction
                                            Le probl`me RSA
                                                     e
                   Le cryptosyst`me RSA
                                e
                                            Le cryptosyst`me RSA
                                                         e
                           Diffie Hellman
                                            S´curit´
                                             e     e


Confiance dans RSA



     Utilis´ depuis 25 ans
           e
         Quelques d´fauts mineurs ont ´t´ corrig´s
                   e                  ee        e
     La confiance dans la s´curit´ de RSA est calculatoire :
                             e     e
     difficult´ de factoriser un grand nombre en facteurs premiers
            e
     Mais il n’existe pas de d´monstration que RSA ne puisse pas
                              e
     ˆtre un jour pris en d´faut
     e                     e




                             License Pro    Introduction ` la s´curit´ informatique
                                                         a     e     e
Rappels d’arithm´tique modulaire
                                                               e
                                Introduction
                                               Le probl`me RSA
                                                        e
                      Le cryptosyst`me RSA
                                   e
                                               Le cryptosyst`me RSA
                                                            e
                              Diffie Hellman
                                               S´curit´
                                                e     e


Inconv´nients
      e


      RSA est tr`s lent
                e
            1000 fois plus que DES
            Cl´ de grande taille
              e
      Souvent RSA+chiffrement sym´trique :
                                e
        1   D’abord l’exp´diteur d’un message choisit une cl´ secr`te
                           e                                   e     e
            sym´trique
                 e
        2   Il chiffre son message avec cette cl´ secr`te
                                                 e    e
        3   Il envoie au destinataire ce message chiffr´ et ainsi que la cl´
                                                        e                  e
            secr`te chiffr´e avec la cl´ publique du destinataire
                 e        e           e
        4   Le destinataire d´chiffre avec sa cl´ priv´e la cl´ secr`te chiffr´e
                               e                e    e       e     e        e
        5   Avec le cl´ secr`te d´chiffr´e, il d´chiffre le message
                       e     e   e      e      e



                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                      e
                    Le cryptosyst`me RSA
                                 e           Le cryptosyst`me Diffie Hellman
                                                          e
                            Diffie Hellman     S´curit´
                                              e     e



Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e

   3 Diffie Hellman
       Le probl`me Diffie-Hellman
                e
       Le cryptosyst`me Diffie Hellman
                    e
       S´curit´
        e     e




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                        e
                      Le cryptosyst`me RSA
                                   e           Le cryptosyst`me Diffie Hellman
                                                            e
                              Diffie Hellman     S´curit´
                                                e     e



Le probl`me Diffie Hellman
        e

      Le probl`me Logarithme Discret :
              e
                                                            ∗         ∗
          Entr´e : un entier premier p, un g´n´rateur g de Zp et y ∈ Zp
              e                             e e
                                        e
          Sortie : en entier e tel que g mod p = y
      Fournit une fonction ` sens unique, mais pas de brˆche secr`te
                           a                            e        e
      Le probl`me Diffie Hellman :
              e
          Entr´es :
              e
               Un entier premier p
                                   ∗
               Un g´n´rateur g de Zp
                   e e
               Deux entiers g mod p et g b mod p
                             a

          Sortie : l’entier g ab mod p
      Fonction ` sens unique et ` brˆche secr`te (a, b)
               a                a e          e
      Le cryptosyst`me Diffie-Hellman est bas´ sur les probl`mes
                   e                       e              e
      Logarithme Discret et Diffie Hellman

                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                      e
                    Le cryptosyst`me RSA
                                 e           Le cryptosyst`me Diffie Hellman
                                                          e
                            Diffie Hellman     S´curit´
                                              e     e



Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e

   3 Diffie Hellman
       Le probl`me Diffie-Hellman
                e
       Le cryptosyst`me Diffie Hellman
                    e
       S´curit´
        e     e




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                    e
                  Le cryptosyst`me RSA
                               e           Le cryptosyst`me Diffie Hellman
                                                        e
                          Diffie Hellman     S´curit´
                                            e     e



Diffie Hellman



     Pas un protocole de chiffrement, mais un protocole
     d’´change de cl´
       e             e
     Bas´ sur les probl`mes Logarithme Discret et Diffie
        e              e
     Hellman
     Objectif :
         Alice et Bob veulent s’´changer une information connue d’eux
                                e
         seuls




                            License Pro    Introduction ` la s´curit´ informatique
                                                        a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                        e
                      Le cryptosyst`me RSA
                                   e           Le cryptosyst`me Diffie Hellman
                                                            e
                              Diffie Hellman     S´curit´
                                                e     e



Protocole



    1                                           e e           ∗
        Soit p un grand nombre premier et g un g´n´rateur de Zp
    2   Alice et Bob se mettent d’accord sur p et g
    3   Alice choisit un entier a et calcule g a mod p
    4   Alice envoie g a mod p ` Bob
                               a
    5   Bob choisit un entier b et calcule g b mod p
    6   Bob envoie g b mod p ` Alice
                             a




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                     e
                   Le cryptosyst`me RSA
                                e           Le cryptosyst`me Diffie Hellman
                                                         e
                           Diffie Hellman     S´curit´
                                             e     e



Protocole (2)




      Alice calcule (g b mod p)a modp = g ab mod p
      Bob calcule (g a mod p)b modp = g ab mod p
      La cl´ ´chang´e est :
           ee      e

                                   k = g ab mod p




                             License Pro    Introduction ` la s´curit´ informatique
                                                         a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                 e
               Le cryptosyst`me RSA
                            e           Le cryptosyst`me Diffie Hellman
                                                     e
                       Diffie Hellman     S´curit´
                                         e     e



Diffie Hellman




                         License Pro    Introduction ` la s´curit´ informatique
                                                     a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                      e
                    Le cryptosyst`me RSA
                                 e           Le cryptosyst`me Diffie Hellman
                                                          e
                            Diffie Hellman     S´curit´
                                              e     e



Plan


   1 Introduction


   2 Le cryptosyst`me RSA
                  e

   3 Diffie Hellman
       Le probl`me Diffie-Hellman
                e
       Le cryptosyst`me Diffie Hellman
                    e
       S´curit´
        e     e




                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                     e
                   Le cryptosyst`me RSA
                                e           Le cryptosyst`me Diffie Hellman
                                                         e
                           Diffie Hellman     S´curit´
                                             e     e



Diffie Hellman : Pourquoi ¸a marche ?
                        c



      Un attaquant peut observer p, g , g b mod p et g a mod p
      Pour d´terminer k il peut :
            e
          Essayer de d´terminer a ou b
                      e
               Probl`me du Logarithme Discret ⇒ difficle
                    e
          Essayer de d´terminer directement g ab mod p
                      e
               Probl`me dit de Diffie Hellman ⇒ difficle
                    e
      L’algorithme El Gamal est bas´ sur les mˆmes probl`mes
                                   e          e         e




                             License Pro    Introduction ` la s´curit´ informatique
                                                         a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                     e
                   Le cryptosyst`me RSA
                                e           Le cryptosyst`me Diffie Hellman
                                                         e
                           Diffie Hellman     S´curit´
                                             e     e



Inconv´nients
      e




      Comme RSA, tr`s lent
                   e
          Diffie-Hellman+chiffrement sym´trique
                                     e
      Pas d’authentification




                             License Pro    Introduction ` la s´curit´ informatique
                                                         a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                      e
                    Le cryptosyst`me RSA
                                 e           Le cryptosyst`me Diffie Hellman
                                                          e
                            Diffie Hellman     S´curit´
                                              e     e



R´capitulatif
 e

   R´capitulatif :
    e
       Le protocole RSA :
           Protocole de chiffrement
           Le plus utilis´
                         e
           Repose sur factorisation et RacineIemeModulaire (difficiles)
       Le protocole Diffie Hellman :
           Protocole d’´change de cl´s
                       e             e
           Repose sur le probl`me Logarithme Discret (difficile)
                              e
       Bien d’autres protocoles
           El Gamal
           Courbes Elliptiques
           etc


                              License Pro    Introduction ` la s´curit´ informatique
                                                          a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                        e
                      Le cryptosyst`me RSA
                                   e           Le cryptosyst`me Diffie Hellman
                                                            e
                              Diffie Hellman     S´curit´
                                                e     e



O` est utilis´e la cryptographie asym´trique ?
 u           e                       e

   Partout !
       IPSEC
             Authentification du serveur plus ´change de cl´s : Signature
                                             e            e
             RSA, DSA ..
             Chiffrement de la communication (AES, TDES, DES ...)
       SSL/TLS
             Authentification du serveur plus ´change de cl´s : RSA + DH
                                             e            e
             Chiffrement de la communication (AES, TDES, DES ...)
       SSH
             Authentification du serveur plus ´change de cl´s : DH
                                              e           e
             Authentification du client (facultatif)
             Chiffrement de la communication (AES, TDES, DES ...)


                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                       e
                     Le cryptosyst`me RSA
                                  e           Le cryptosyst`me Diffie Hellman
                                                           e
                             Diffie Hellman     S´curit´
                                               e     e



O` est utilis´e la cryptographie asym´trique ?
 u           e                       e



       Client mail
           PGP, Outlook
           Signature des mails : RSA, DSA
           Chiffrement des mails RSA + AES, TDES, DES ...
       Essayez !
           GPG : GNU Privacy Guard
           Plugin Thunderbird : Enigmail




                               License Pro    Introduction ` la s´curit´ informatique
                                                           a     e     e
Introduction   Le probl`me Diffie-Hellman
                                                        e
                      Le cryptosyst`me RSA
                                   e           Le cryptosyst`me Diffie Hellman
                                                            e
                              Diffie Hellman     S´curit´
                                                e     e



Conclusion


      La cryptographie est un outil essentiel de la politique de
      s´curit´ de l’entreprise
       e     e
             Confidentialit´
                          e
             Int´grit´
                e    e
             Authenticit´
                        e
      Cryptographie ` cl´ secr`te
                    a e       e
             Rapide, mais comment s’´changer la cl´
                                    e             e
      Cryptographie ` cl´ publique
                    a e
             Plus lente, mais plus pratique
             Permet notamment d’authentifier grˆce aux signatures
                                              a




                                License Pro    Introduction ` la s´curit´ informatique
                                                            a     e     e

Contenu connexe

Dernier

Computer Parts in French - Les parties de l'ordinateur.pptx
Computer Parts in French - Les parties de l'ordinateur.pptxComputer Parts in French - Les parties de l'ordinateur.pptx
Computer Parts in French - Les parties de l'ordinateur.pptxRayane619450
 
Cours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdfCours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdfachrafbrahimi1
 
Boléro. pptx Film français réalisé par une femme.
Boléro.  pptx   Film   français   réalisé  par une  femme.Boléro.  pptx   Film   français   réalisé  par une  femme.
Boléro. pptx Film français réalisé par une femme.Txaruka
 
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdfCOURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdfabatanebureau
 
gestion des conflits dans les entreprises
gestion des  conflits dans les entreprisesgestion des  conflits dans les entreprises
gestion des conflits dans les entreprisesMajdaKtiri2
 
Sidonie au Japon . pptx Un film français
Sidonie    au   Japon  .  pptx  Un film françaisSidonie    au   Japon  .  pptx  Un film français
Sidonie au Japon . pptx Un film françaisTxaruka
 
Bolero. pptx . Film de A nnne Fontaine
Bolero. pptx . Film   de  A nnne FontaineBolero. pptx . Film   de  A nnne Fontaine
Bolero. pptx . Film de A nnne FontaineTxaruka
 
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptxSUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptxssuserbd075f
 
La nouvelle femme . pptx Film français
La   nouvelle   femme  . pptx  Film françaisLa   nouvelle   femme  . pptx  Film français
La nouvelle femme . pptx Film françaisTxaruka
 

Dernier (10)

Computer Parts in French - Les parties de l'ordinateur.pptx
Computer Parts in French - Les parties de l'ordinateur.pptxComputer Parts in French - Les parties de l'ordinateur.pptx
Computer Parts in French - Les parties de l'ordinateur.pptx
 
Cours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdfCours ofppt du Trade-Marketing-Présentation.pdf
Cours ofppt du Trade-Marketing-Présentation.pdf
 
Boléro. pptx Film français réalisé par une femme.
Boléro.  pptx   Film   français   réalisé  par une  femme.Boléro.  pptx   Film   français   réalisé  par une  femme.
Boléro. pptx Film français réalisé par une femme.
 
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdfCOURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
COURS SVT 3 EME ANNEE COLLEGE 2EME SEM.pdf
 
gestion des conflits dans les entreprises
gestion des  conflits dans les entreprisesgestion des  conflits dans les entreprises
gestion des conflits dans les entreprises
 
Sidonie au Japon . pptx Un film français
Sidonie    au   Japon  .  pptx  Un film françaisSidonie    au   Japon  .  pptx  Un film français
Sidonie au Japon . pptx Un film français
 
Bolero. pptx . Film de A nnne Fontaine
Bolero. pptx . Film   de  A nnne FontaineBolero. pptx . Film   de  A nnne Fontaine
Bolero. pptx . Film de A nnne Fontaine
 
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptxSUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
SUPPORT DE SUR COURS_GOUVERNANCE_SI_M2.pptx
 
La nouvelle femme . pptx Film français
La   nouvelle   femme  . pptx  Film françaisLa   nouvelle   femme  . pptx  Film français
La nouvelle femme . pptx Film français
 
Evaluación Alumnos de Ecole Victor Hugo
Evaluación Alumnos de Ecole  Victor HugoEvaluación Alumnos de Ecole  Victor Hugo
Evaluación Alumnos de Ecole Victor Hugo
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Cours3

  • 1. Introduction Le cryptosyst`me RSA e Diffie Hellman Cryptologie asym´trique e License Pro Renaud Tabary: renaud.tabary@labri.fr 2009-2010 License Pro Introduction ` la s´curit´ informatique a e e
  • 2. Introduction Le cryptosyst`me RSA e Diffie Hellman Plan 1 Introduction Le principe Fonctions ` sens unique a Fonction ` sens unique ` brˆche secr`te a a e e 2 Le cryptosyst`me RSA e Rappels d’arithm´tique modulaire e Le probl`me RSA e Le cryptosyst`me RSA e S´curit´ e e 3 Diffie Hellman Le probl`me Diffie-Hellman e Le cryptosyst`me Diffie Hellman e S´curit´ e e License Pro Introduction ` la s´curit´ informatique a e e
  • 3. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Plan 1 Introduction Le principe Fonctions ` sens unique a Fonction ` sens unique ` brˆche secr`te a a e e 2 Le cryptosyst`me RSA e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 4. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e La cryptgraphie ` cl´ secr`te a e e Une seule cl´ pour chiffrer/d´chiffrer e e La cl´ est connue des deux intervenants e Si un attaquant intercepte la cl´, fin de la confidentialit´ e e License Pro Introduction ` la s´curit´ informatique a e e
  • 5. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Limites de la cryptographie ` cl´ secr`te a e e Il faut pouvoir communiquer la cl´ secr`te par un moyen sˆr e e u Lettre, t´l´phone, malette diplomatique ee Pas tr`s pratique e Nombre de cl´s ` ´changer pour communiquer avec plusieurs e ae personnes Nb personnes Nb cl´s e 2 1 5 10 100 4450 n n(n − 1) Plutˆt contraignant o License Pro Introduction ` la s´curit´ informatique a e e
  • 6. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e La cryptographie ` cl´ publique a e Petite r´volution dans les ann´es 1970 (Diffie Hellman 1976) e e La s´curit´ ne repose d´sormais plus sur : e e e Un secret partag´ (la cl´ secr`te) e e e Des algorithmes obscurs Mais sur : Des probl`mes connus de tous (ex : factorisation) e Une information connue de tous (la cl´ publique) e License Pro Introduction ` la s´curit´ informatique a e e
  • 7. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e La cryptographie ` cl´ publique a e La cryptographie ` cl´ publique ou asym´trique est bas´e sur a e e e un concept tr`s diff´rent de la cryptographie sym´trique e e e Chaque intervenant poss`de une cl´ publique e e Cette cl´ peut ˆtre connue de tous. Par exemple, disponible e e dans un r´pertoire accessible publiquement, sur internet e Toute personne connaissant cette cl´ peut envoyer un message e chiffr´ au propri´taire de cette cl´ e e e Chaque intervenant poss`de une cl´ priv´e e e e Cette cl´ doit demeurer confidentielle e Cette cl´ est li´e (math´matiquement) ` la cl´ publique e e e a e correspondante Cette cl´ permet de d´chiffrer tout message chiffr´ avec la cl´ e e e e publique correspondante License Pro Introduction ` la s´curit´ informatique a e e
  • 8. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Le principe du coffre fort On peut assimiler la cryptographie ` cl´ publique au protocole a e suivant : Bob veut envoyer un message ` Alice de mani`re confidentielle a e Alice fournit un coffre fort ` Bob, ainsi qu’un cadenas a Alice conserve la cl´ du cadenas e Bob met ses documents dans le coffre d’Alice et le cadenasse Le cadenas est la cl´ publique d’Alice e Il permet de mettre des informations dans le coffre Difficile d’ouvrir le coffre juste avec le cadenas Alice r´cup`re le coffre, et l’ouvre avec la cl´ du cadenas e e e C’est la cl´ priv´e d’Alice e e License Pro Introduction ` la s´curit´ informatique a e e
  • 9. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Exemple License Pro Introduction ` la s´curit´ informatique a e e
  • 10. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Exemple plus r´aliste e Un exemple plus r´aliste : e Bob veut envoyer un message ` Alice de mani`re confidentielle a e Alice poss`de un couple (cl´ priv´e,cl´ publique) e e e e Bob r´cup`re la cl´ publique d’Alice (disponible publiquement) e e e License Pro Introduction ` la s´curit´ informatique a e e
  • 11. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Exemple plus r´aliste (2) e Bob chiffre son message avec la cl´ publique d’Alice e Il l’envoie ` Alice a Alice d´chiffre le message avec sa cl´ priv´e e e e License Pro Introduction ` la s´curit´ informatique a e e
  • 12. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Avantages Avantages : Si N intervenants veulent s’´changer des informations sans e l’aide d’un tiers, chaque intervenant doit avoir une cl´ e publique unique connue de tous Donc, N cl´s sont suffisantes e Les cl´s publiques doivent ˆtre distribu´es de fa¸on e e e c authentifi´e, mais non confidentielle e Seule la cl´ publique est divulg´e e e Connaˆ la cl´ publique d’un intervenant ne permet pas de ıtre e d´chiffrer ses messages e License Pro Introduction ` la s´curit´ informatique a e e
  • 13. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Comment est-ce possible ? La cryptographie ` cl´ publique est bas´e sur des probl`mes a e e e math´matiques e Utilisation de fonction ` sens unique ` br`che secr`te a a e e M´taphore du cadenas e Facile ` fermer a N´cessite une cl´ pour ouvrir e e License Pro Introduction ` la s´curit´ informatique a e e
  • 14. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Plan 1 Introduction Le principe Fonctions ` sens unique a Fonction ` sens unique ` brˆche secr`te a a e e 2 Le cryptosyst`me RSA e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 15. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Rappel de la complexit´ e Th´orie de la complexit´ : e e On dira qu’un probl`me est complexe si il appartient ` la e a classe NP (non-determinist polynomial) C’est ` dire que trouver une solution au probl`me se fait en a e nk O(2 ) V´rifier la solution se fait en temps polynomial e n ´tant la longueur de l’entr´e (en bits) e e On dirat qu’un probl`me est facile si il existe un algorithme le e r´solvant appartenant ` P e a Trouver une solution se fait en O(nk ) Facile ... si k reste petit Donnez des exemples License Pro Introduction ` la s´curit´ informatique a e e
  • 16. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Rappel de la complexit´ (2) e Un ordinateur peut r´soudre des probl`mes appartenant ` la e e a classe P Dans la plupart des cas, c’est ` dire si k pas trop grand a Un ordinateur peut difficilement r´soudre des probl`mes e e NP-complexes D`s que n devient un peu grand, le temps n´cessaire devient e e prohibitif Exemple : factoriser un nombre de 1024 bits Conjecture P = NP ? Pas prouv´ ! e Mais on l’esp`re e License Pro Introduction ` la s´curit´ informatique a e e
  • 17. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Fonction ` sens unique a Definition Une fonction ` sens unique est une fonction f telle que f (x) est a facile ` calculer et f −1 (x) est difficile ` calculer a a Exemple : casser un oeuf m´langer un pot de peinture rouge et un pot de peinture e blanche License Pro Introduction ` la s´curit´ informatique a e e
  • 18. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Factorisation Quelle est la complexit´ de factorisation ? e Trouver les deux facteurs premiers de : 35 = 5 ∗ 7 221 = 13 ∗ 17 50123093 ? Comment calculer le dernier exemple ? Quelle complexit´ ? e ici n =| log2 (50123093) | +1 = 26 License Pro Introduction ` la s´curit´ informatique a e e
  • 19. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Plan 1 Introduction Le principe Fonctions ` sens unique a Fonction ` sens unique ` brˆche secr`te a a e e 2 Le cryptosyst`me RSA e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 20. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e Fonction ` sens unique ` brˆche secr`te a a e e Definition Une fonction ` sens unique et ` br`che secr`te est une fonction f a a e e telle que f (x) est facile ` calculer a f −1 (x) est difficile ` calculer a f −1 (x) sachant k est facile ` calculer a k est la brˆche secrˆte e e License Pro Introduction ` la s´curit´ informatique a e e
  • 21. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e R´capitulatif e La cryptographie asym´trique : Chaque utilisateur poss`de e e deux cl´s : e Une cl´ publique qui permet de chiffrer des messages pour e l’utilisateur Une cl´ priv´e qui permet ` l’utilisateur de d´chiffrer les e e a e messages chiffr´s avec sa cl´ publique e e La cl´ publique est diffus´e ` tout le monde e e a La connaˆ ne permet pas de d´chiffrer les messages ıtre e La cl´ priv´e est gard´e secr`te par l’utilisateur e e e e La seule qui permette de d´chiffrer les messages e License Pro Introduction ` la s´curit´ informatique a e e
  • 22. Introduction Le principe Le cryptosyst`me RSA e Fonctions ` sens unique a Diffie Hellman Fonction ` sens unique ` brˆche secr`te a a e e R´capitulatif (2) e La cryptographie ` cl´ publique est bas´e sur des probl`mes a e e e math´matiques difficiles ` r´soudre e a e Factorisation Logarithme discret De ces probl`mes, on extrait des fonction ` sens unique ` e a a brˆche secrˆte e e Calculer f (x) est facile (f =cl´ publique, x=message) e Calculer f −1 (x) est difficile Calculer f −1 (x) sachant k est facile (k=cl´ priv´e) e e Les deux probl`mes les plus c´l`bres : e ee Le probl`me RSA e Le probl`me Diffie Hellman e License Pro Introduction ` la s´curit´ informatique a e e
  • 23. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e Rappels d’arithm´tique modulaire e Le probl`me RSA e Le cryptosyst`me RSA e S´curit´ e e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 24. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Calcul modulaire 37 ≡ 2 mod 5 : 37 = 2 + k ∗ 5 Reste de la division Euclidienne Addition, multiplication, exponentiation modulaire Op´rations peu coˆteuses e u Zn = ensemble des r´sidus modulo n muni des op´rations e e modulaires Inversion modulaire : Trouver b tel que ab ≡ 1 mod n Si pgcd(a, n) = 1, une solution unique (algorithme d’Euclide ´tendu) e Sinon pas de solution License Pro Introduction ` la s´curit´ informatique a e e
  • 25. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Calcul modulaire (2) Petit th´or`me de Fermat : e e Theorem Si m premier, et pgcd(a, m) = 1, am−1 ≡ 1 mod m Fonction d’Euler : Definition ϕ(n) est le nombre de r´sidus premiers avec n e Si n est premier, ϕ(n) = n − 1 Si n = p ∗ q, alors ϕ(n) = (p − 1)(q − 1) License Pro Introduction ` la s´curit´ informatique a e e
  • 26. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Calcul modulaire (3) Petit th´or`me de Fermat g´n´ralis´ par Euler : e e e e e Theorem Si pgcd(a, n) = 1, aϕ(n) ≡ 1 mod n Inverse modulaire : Theorem Si pgcd(a, n) = 1, l’inverse de a est aϕ(n)−1 mod n License Pro Introduction ` la s´curit´ informatique a e e
  • 27. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e Rappels d’arithm´tique modulaire e Le probl`me RSA e Le cryptosyst`me RSA e S´curit´ e e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 28. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Quelques exemples Deux principales fonction ` sens unique et ` brˆche secr`te en a a e e cryptographie asym´trique : e Bas´ sur le probl`me factorisation : e e Le probl`me RSA e Bas´ sur le probl`me logarithme discret e e Le probl`me Diffie Hellman e Abordons tout d’abord RSA License Pro Introduction ` la s´curit´ informatique a e e
  • 29. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Le probl`me RSA e Le probl`me factorisation : e Entr´e : n = p ∗ q produit de deux nombres premiers e Sortie : p et q Fournit une fonction ` sens unique, mais pas de brˆche secr`te a e e Le probl`me RacineIemeModulaire ou probl`me RSA : e e Entr´es : e Un entier n = p ∗ q produit de deux nombres premiers Un entier e > 0 premier avec (p − 1) ∗ (q − 1) Un entier c Sortie : m tel que c = me modn Fonction ` sens unique et ` brˆche secr`te (p, q) a a e e le cryptosyst`me RSA est bas´ sur les probl`mes e e e RacineIemeModulaire et factorisation License Pro Introduction ` la s´curit´ informatique a e e
  • 30. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e Rappels d’arithm´tique modulaire e Le probl`me RSA e Le cryptosyst`me RSA e S´curit´ e e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 31. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e RSA Chiffrement ` cl´ publique le plus utilis´ a e e Cr´´ en 1977 par Rivest, Shamir et Adleman ee e ´ Brevet´ par le MIT en 1983 aux Etats-Unis. Le brevet a expir´ e le 21 septembre 2000 Utilis´ dans : e Les banques Les cartes ` puce a Les site webs commerciaux License Pro Introduction ` la s´curit´ informatique a e e
  • 32. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Protocole Trois ´tapes : e 1 Cr´ation d’une cl´ publique et d’une cl´ priv´e pour Bob (la e e e e cl´ publique est diffus´e ` tout le monde, par exemple ` Alice) e e a a 2 A chaque fois qu’Alice veut envoyer un message confidentiel ` a Bob, elle utilise la cl´ publique de Bob pour chiffrer le message e 3 Bob utilise sa cl´ priv´e pour d´chiffrer le message envoy´ par e e e e Alice License Pro Introduction ` la s´curit´ informatique a e e
  • 33. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Cr´ation des cl´s e e 1 Choisir deux grand nombres p et q premiers 2 n = p ∗ q et ϕ(n) = (p − 1)(q − 1) 3 e un entier tel que 1 < e < ϕ(n) et e premier avec ϕ(n) i.e pgcd(e, ϕ(n)) = 1 4 Calculer d tel que ed = 1 mod ϕ(n) 5 Cl´ publique : (e, n) e 6 Cl´ priv´e : d (ou (p, q)) e e License Pro Introduction ` la s´curit´ informatique a e e
  • 34. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Chiffrement 1 Obtenir la cl´ publique (e, n) du destinataire e 2 Repr´senter le message comme un entier m tel que 1 < m < n e 3 Calculer c = me mod n : texte chiffr´ e Relation avec le probl`me RSA ? e License Pro Introduction ` la s´curit´ informatique a e e
  • 35. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e D´chiffrement e 1 A l’aide de la cl´ priv´e d, calculer : e e m = c d mod n 2 Et c’est tout ! License Pro Introduction ` la s´curit´ informatique a e e
  • 36. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Exemple p = 31 et q = 137 n = 4247 et ϕ(n) = 4080 e = 967 (1 < e < ϕ(n) et pgcd(e, ϕ(n)) = 1) d = 2983 (1 < d < ϕ(n) et ed = 707x4080 + 1 = 1 mod ϕ(n)) Cl´ publique : (e, n) e Cl´ priv´e : d e e License Pro Introduction ` la s´curit´ informatique a e e
  • 37. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Exemple Chiffrement/D´chiffrement e Message en clair m = 3333 Chiffrement : c = me mod n = 3333967 mod 4247 = 3790 D´chiffrement : e m = c d mod n = 37902983 mod 4247 = 3333 License Pro Introduction ` la s´curit´ informatique a e e
  • 38. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Preuve formelle 1 On rappelle : m = c d mod n 2 Exercice : D´montrez que c d mod n permet bien de retrouver le message e en clair. On s’aidera de : Des propri´t´s de l’arithm´tique modulaire ee e Du petit th´or`me de Fermat e e License Pro Introduction ` la s´curit´ informatique a e e
  • 39. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e Rappels d’arithm´tique modulaire e Le probl`me RSA e Le cryptosyst`me RSA e S´curit´ e e 3 Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 40. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e RSA pourquoi ¸a marche ? c Attaque ` texte chiffr´ : revient ` r´soudre le probl`me RSA a e a e e qui est difficile C’est ` dire difficile de calculer la solution de mani`re efficace a e Probl`me suppos´ dans NP e e S’assurer quand mˆme que n est grand e Retrouver la cl´ priv´e ` partir de la cl´ publique : revient ` e e a e a r´soudre le probl`me factorisation qui est difficile e e Op´ration math´matiquement impossible si n est grand e e Et heureusement RSA utilise de grand nombres (plus de 1024bits conseill´) e Record actuel : 512bits (Anciennes cartes ` puces : 320bits !) a Combien de temps cela prendrait-il pour un ordinateur ` 4Ghz a si n fait 1024 bits ? License Pro Introduction ` la s´curit´ informatique a e e
  • 41. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Confiance dans RSA Utilis´ depuis 25 ans e Quelques d´fauts mineurs ont ´t´ corrig´s e ee e La confiance dans la s´curit´ de RSA est calculatoire : e e difficult´ de factoriser un grand nombre en facteurs premiers e Mais il n’existe pas de d´monstration que RSA ne puisse pas e ˆtre un jour pris en d´faut e e License Pro Introduction ` la s´curit´ informatique a e e
  • 42. Rappels d’arithm´tique modulaire e Introduction Le probl`me RSA e Le cryptosyst`me RSA e Le cryptosyst`me RSA e Diffie Hellman S´curit´ e e Inconv´nients e RSA est tr`s lent e 1000 fois plus que DES Cl´ de grande taille e Souvent RSA+chiffrement sym´trique : e 1 D’abord l’exp´diteur d’un message choisit une cl´ secr`te e e e sym´trique e 2 Il chiffre son message avec cette cl´ secr`te e e 3 Il envoie au destinataire ce message chiffr´ et ainsi que la cl´ e e secr`te chiffr´e avec la cl´ publique du destinataire e e e 4 Le destinataire d´chiffre avec sa cl´ priv´e la cl´ secr`te chiffr´e e e e e e e 5 Avec le cl´ secr`te d´chiffr´e, il d´chiffre le message e e e e e License Pro Introduction ` la s´curit´ informatique a e e
  • 43. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e 3 Diffie Hellman Le probl`me Diffie-Hellman e Le cryptosyst`me Diffie Hellman e S´curit´ e e License Pro Introduction ` la s´curit´ informatique a e e
  • 44. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Le probl`me Diffie Hellman e Le probl`me Logarithme Discret : e ∗ ∗ Entr´e : un entier premier p, un g´n´rateur g de Zp et y ∈ Zp e e e e Sortie : en entier e tel que g mod p = y Fournit une fonction ` sens unique, mais pas de brˆche secr`te a e e Le probl`me Diffie Hellman : e Entr´es : e Un entier premier p ∗ Un g´n´rateur g de Zp e e Deux entiers g mod p et g b mod p a Sortie : l’entier g ab mod p Fonction ` sens unique et ` brˆche secr`te (a, b) a a e e Le cryptosyst`me Diffie-Hellman est bas´ sur les probl`mes e e e Logarithme Discret et Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 45. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e 3 Diffie Hellman Le probl`me Diffie-Hellman e Le cryptosyst`me Diffie Hellman e S´curit´ e e License Pro Introduction ` la s´curit´ informatique a e e
  • 46. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Diffie Hellman Pas un protocole de chiffrement, mais un protocole d’´change de cl´ e e Bas´ sur les probl`mes Logarithme Discret et Diffie e e Hellman Objectif : Alice et Bob veulent s’´changer une information connue d’eux e seuls License Pro Introduction ` la s´curit´ informatique a e e
  • 47. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Protocole 1 e e ∗ Soit p un grand nombre premier et g un g´n´rateur de Zp 2 Alice et Bob se mettent d’accord sur p et g 3 Alice choisit un entier a et calcule g a mod p 4 Alice envoie g a mod p ` Bob a 5 Bob choisit un entier b et calcule g b mod p 6 Bob envoie g b mod p ` Alice a License Pro Introduction ` la s´curit´ informatique a e e
  • 48. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Protocole (2) Alice calcule (g b mod p)a modp = g ab mod p Bob calcule (g a mod p)b modp = g ab mod p La cl´ ´chang´e est : ee e k = g ab mod p License Pro Introduction ` la s´curit´ informatique a e e
  • 49. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Diffie Hellman License Pro Introduction ` la s´curit´ informatique a e e
  • 50. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Plan 1 Introduction 2 Le cryptosyst`me RSA e 3 Diffie Hellman Le probl`me Diffie-Hellman e Le cryptosyst`me Diffie Hellman e S´curit´ e e License Pro Introduction ` la s´curit´ informatique a e e
  • 51. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Diffie Hellman : Pourquoi ¸a marche ? c Un attaquant peut observer p, g , g b mod p et g a mod p Pour d´terminer k il peut : e Essayer de d´terminer a ou b e Probl`me du Logarithme Discret ⇒ difficle e Essayer de d´terminer directement g ab mod p e Probl`me dit de Diffie Hellman ⇒ difficle e L’algorithme El Gamal est bas´ sur les mˆmes probl`mes e e e License Pro Introduction ` la s´curit´ informatique a e e
  • 52. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Inconv´nients e Comme RSA, tr`s lent e Diffie-Hellman+chiffrement sym´trique e Pas d’authentification License Pro Introduction ` la s´curit´ informatique a e e
  • 53. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e R´capitulatif e R´capitulatif : e Le protocole RSA : Protocole de chiffrement Le plus utilis´ e Repose sur factorisation et RacineIemeModulaire (difficiles) Le protocole Diffie Hellman : Protocole d’´change de cl´s e e Repose sur le probl`me Logarithme Discret (difficile) e Bien d’autres protocoles El Gamal Courbes Elliptiques etc License Pro Introduction ` la s´curit´ informatique a e e
  • 54. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e O` est utilis´e la cryptographie asym´trique ? u e e Partout ! IPSEC Authentification du serveur plus ´change de cl´s : Signature e e RSA, DSA .. Chiffrement de la communication (AES, TDES, DES ...) SSL/TLS Authentification du serveur plus ´change de cl´s : RSA + DH e e Chiffrement de la communication (AES, TDES, DES ...) SSH Authentification du serveur plus ´change de cl´s : DH e e Authentification du client (facultatif) Chiffrement de la communication (AES, TDES, DES ...) License Pro Introduction ` la s´curit´ informatique a e e
  • 55. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e O` est utilis´e la cryptographie asym´trique ? u e e Client mail PGP, Outlook Signature des mails : RSA, DSA Chiffrement des mails RSA + AES, TDES, DES ... Essayez ! GPG : GNU Privacy Guard Plugin Thunderbird : Enigmail License Pro Introduction ` la s´curit´ informatique a e e
  • 56. Introduction Le probl`me Diffie-Hellman e Le cryptosyst`me RSA e Le cryptosyst`me Diffie Hellman e Diffie Hellman S´curit´ e e Conclusion La cryptographie est un outil essentiel de la politique de s´curit´ de l’entreprise e e Confidentialit´ e Int´grit´ e e Authenticit´ e Cryptographie ` cl´ secr`te a e e Rapide, mais comment s’´changer la cl´ e e Cryptographie ` cl´ publique a e Plus lente, mais plus pratique Permet notamment d’authentifier grˆce aux signatures a License Pro Introduction ` la s´curit´ informatique a e e