Mathématiques et serets
NiolasBillerey
LaboratoiredeMathématiques
UniversitéBlaisePasalClermont-Ferrand2
Fêtede lasiene 2012
Les deux protagonistes : Alie et Bob
Alice Bob
?
Sommaire
1
Laryptographieàléserète
2
Laryptographieàlépublique
3
Interlude: hirern'estpasoder
4
Aller-retourdansl'histoiredesmaths
5
Pourallerplusloin...
Permutation sur l'alphabet
Chaque lettrede l'alphabet est remplaéeparuneautre.
Permutation sur l'alphabet
Chaque lettrede l'alphabet est remplaéeparuneautre.
Deuxlettres diérentesne peuvent êtreremplaéesparla
même.
Permutation sur l'alphabet
Chaque lettrede l'alphabet est remplaéeparuneautre.
Deuxlettres diérentesne peuvent êtreremplaéesparla
même.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
CE QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
Chirement
CE QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
Le textelair esthiréen remplaçant haque lettreparsonimage
sous lapermutation.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
CE QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZE QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZE QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZT QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZT QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZT OUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZT OUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZT OAE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Chirement
ZT OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Déhirement
ZT OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
Déhirement
ZT OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Déhirement
ZT OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
Le textehiréest déhiré
enremplaanthaquelettreparsonantéédentsouslapermutation.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Déhirement
CT OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Déhirement
CT OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Déhirement
CE OAT P'RQ ZRQZREU CETQ F'TQRQZT ZPKESTBTQU, TU PTF
BRUF NRAS PT HEST KSSEXTQU KEFTBTQU.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
Déhirement
CE QUE L'ON CONCOIT BIEN S'ENONCE CLAIREMENT, ET LES
MOTS POUR LE DIRE ARRIVENT AISEMENT.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
K C Z H T D I J E L M P B Q R N O S F U A X V W Y G
1
Alie etBob onviennent serètementd'unelé.
échange sécurisé de clé
Alice Bob
2
Alie hiresonmessageavelalé etl'envoieàBob.
Alice Bob
3
Avelalé serèteBobdéhire le messagereçu.
Bob
Alice
Cryptosystème à lé serète
On appelle ryptosystèmel'ensembleforméparles algorithmes
fournissant laléainsi quelaméthode de hirement etde
déhirement.
Cryptosystème à lé serète
On appelle ryptosystèmel'ensembleforméparles algorithmes
fournissant laléainsi quelaméthode de hirement etde
déhirement.
Un ryptosystèmeà léserèteest unryptosystèmeoù lalé
est...serète!
Et si...
...Alieet Bob ne se renontraientjamais?
Et si...
...Alieet Bob ne se renontraientjamais?
...une personne malintentionnéeespionnaiten permanene
leur ommuniation?
Et si...
...Alieet Bob ne se renontraientjamais?
...une personne malintentionnéeespionnaiten permanene
leur ommuniation?
...Alieet Bob n'étaienten faitque deuxordinateurs?
Et si...
...Alieet Bob ne se renontraientjamais?
...une personne malintentionnéeespionnaiten permanene
leur ommuniation?
...Alieet Bob n'étaienten faitque deuxordinateurs?
Commentferaient-ils?
Et maintenant l'espionne!
Alice Bob
Eve
?
L'intuition de Die et Hellman
L'intuition de Die et Hellman
W.Die M.Hellman
L'intuition de Die et Hellman
W.Die M.Hellman
Wideningappliationsofteleproessinghavegivenriseto
aneed fornew typesof ryptographisystems,whih
minimize theneed forseurekeydistributionhannels
and supply the equivalent ofawritten signature.
Ce qu'ils expliquent dans leur artile et les onséquenes
Les ryptosystèmesà lé serètene sontpas les seuls!
Ce qu'ils expliquent dans leur artile et les onséquenes
Les ryptosystèmesà lé serètene sontpas les seuls!
Alie etBob peuvent ommuniquerserètementmême en
présene d'un espion.
Ce qu'ils expliquent dans leur artile et les onséquenes
Les ryptosystèmesà lé serètene sontpas les seuls!
Alie etBob peuvent ommuniquerserètementmême en
présene d'un espion.
Ces ryptosystèmesorentles mêmesgarantiesquele ourrier
papier :ondentialitéetauthentiité.
Sommaire
1
Laryptographieàléserète
2
Laryptographieàlépublique
3
Interlude: hirern'estpasoder
4
Aller-retourdansl'histoiredesmaths
5
Pourallerplusloin...
Le fontionnement
1
Bob disposede deux algorithmes :l'unde hirement C et
l'autre de déhirementD.
Le fontionnement
1
Bob disposede deux algorithmes :l'unde hirement C et
l'autre de déhirementD.
2
Étantdonné untextelair m,le hirerpuisle déhirer
revientàne rien faire:
(
D◦
C)(
m) =
m.Le fontionnement
1
Bob disposede deux algorithmes :l'unde hirement C et
l'autre de déhirementD.
2
Étantdonné untextelair m,le hirerpuisle déhirer
revientàne rien faire:
(
D◦
C)(
m) =
m.3
Étantdonné untextehiréM,ledéhirerpuisle(re)hirer
revientàne rien faire:
(
C◦
D)(
M) =
M.Le fontionnement
1
Bob disposede deux algorithmes :l'unde hirement C et
l'autre de déhirementD.
2
Étantdonné untextelair m,le hirerpuisle déhirer
revientàne rien faire:
(
D◦
C)(
m) =
m.3
Étantdonné untextehiréM,ledéhirerpuisle(re)hirer
revientàne rien faire:
(
C◦
D)(
M) =
M.4
Bob rend C publi, maisgarde pourluiD.
Le fontionnement
1
Bob disposede deux algorithmes :l'unde hirement C et
l'autre de déhirementD.
2
Étantdonné untextelair m,le hirerpuisle déhirer
revientàne rien faire:
(
D◦
C)(
m) =
m.3
Étantdonné untextehiréM,ledéhirerpuisle(re)hirer
revientàne rien faire:
(
C◦
D)(
M) =
M.4
Bob rend C publi, maisgarde pourluiD.
5
Les algorithmes C etD sontfailes àexéuter, maisà partir
de laonnaissane deC,ilest extrêmementdiilede
La pratique
Alice Bob
Eve
1
Bob rend publiquesalé de hirement.
Alice Bob
Eve
C
D
C
C
2
Alie hiresonmessageàl'aidede lalé de hirementde
Bob et l'envoieàBob.
Alice Bob
Eve
C
D
C
3
Àl'aidedesa léde déhirementD,Bob déhirelemessage
envoyé parAlie.Et'est leseulàpouvoir le faire!
Alice Bob
Eve
C
D
C
Commentpeut-on réaliserunryptosystèmeà lépublique?
Sommaire
1
Laryptographieàléserète
2
Laryptographieàlépublique
3
Interlude: hirern'estpasoder
4
Aller-retourdansl'histoiredesmaths
5
Pourallerplusloin...
Dénition
Un odage désigne unproédé, onnu de tous,parlequelon
transformehaque élémentd'un jeude aratèresd'un système
d'ériture donné enune représentationnumérique.
Dénition
Un odage désigne unproédé, onnu de tous,parlequelon
transformehaque élémentd'un jeude aratèresd'un système
d'ériture donné enune représentationnumérique.
Le ode Morse :A(
.−
),B(−...
),C (−. − .
),et.Dénition
Un odage désigne unproédé, onnu de tous,parlequelon
transformehaque élémentd'un jeude aratèresd'un système
d'ériture donné enune représentationnumérique.
Le ode Morse :A(
.−
),B(−...
),C (−. − .
),et.Le ode ASCII(AmerianStandard Code forInformation
Interhange) :
aratère ode ASCII aratère ode ASCII
A 1000001 ' 0100111
B 1000010 ! 0100001
C 1000011
xy
0100000Moralité
Chirerunmessagerevientàhirer unnombre!
Sommaire
1
Laryptographieàléserète
2
Laryptographieàlépublique
3
Interlude: hirern'estpasoder
4
Aller-retourdansl'histoiredesmaths
5
Pourallerplusloin...
Les réateurs de l'arithmétique modulaire
Fermat (début 17 ème
1665) Euler(17071783) Gauss (17771855)
Le prinipe
Soit N
≥
1 unentierxé.Le prinipe
Soit N
≥
1 unentierxé.Dénition
On dit quedeux entiers aet b sontongrusmoduloN eton érit
a
≡
b[
N]
si ladiérene a−
b est unmultiplede N.Le prinipe
Soit N
≥
1 unentierxé.Dénition
On dit quedeux entiers aet b sontongrusmoduloN eton érit
a
≡
b[
N]
si ladiérene a−
b est unmultiplede N.Parexemple,45
≡
11[
17]
ar45−
11=
34=
2×
17.Le prinipe
Soit N
≥
1 unentierxé.Dénition
On dit quedeux entiers aet b sontongrusmoduloN eton érit
a
≡
b[
N]
si ladiérene a−
b est unmultiplede N.Parexemple,45
≡
11[
17]
ar45−
11=
34=
2×
17.Propriété
Pour tout entiera , ilexisteununique entier b
∈ {
0, . . . ,
N−
1}
telque a
≡
b[
N]
.N
=
31 0
2
87654567
≡ ? [
3]
.N
=
31 0
2
87654567
=
29218189×
387654567
≡
0[
3]
N
=
150 1
2
3
4
5
6 7 8
9 10 11
12 13
14
N
=
150 1
2
3
4
5
6 7 8
9 10 11
12 13
14
On alule
7
2
[
15],
73[
15], . . .
N
=
150 1
2
3
4
5
6 7 8
9 10 11
12 13
14
7
2
=
49=
15×
3+
47
2
≡
4[
15]
N
=
150 1
2
3
4
5
6 7 8
9 10 11
12 13
14
7
2
≡
4[
15]
7
3
=
72×
7≡
7×
4≡
13[
15]
N
=
150 1
2
3
4
5
6 7 8
9 10 11
12 13
14
7
3
≡
13[
15]
7
4
=
73×
7≡
13×
4≡
1[
15]
Le théorème d'Euler-Fermat
On supposequeN
=
p×
q avep,q nombres premiers(parex.N
=
77=
7×
11).Le théorème d'Euler-Fermat
On supposequeN
=
p×
q avep,q nombres premiers(parex.N
=
77=
7×
11).Théorème
Soit unentierm
≥
1et e,
d deux entiers tels queed
≡
1[(
p−
1) × (
q−
1)]
.Alorsm
ed
≡
m[
N].
Etalors?Àquoiça sert?
The eraofeletroni mail may soon beupon us;we
must ensurethat twoimportant propertiesof theurrent
paper mail system arepreserved:(a) messagesare
private, and (b)messages anbe signed.We
demonstratein this paper how to buildtheseapabilities
into aneletronimailsystem.
Données du ryptosystème à lé publique RSA
1
Bob hoisitdeux trèsgrands nombres premiersp etq puis
formeleurproduit N
=
p×
q.Données du ryptosystème à lé publique RSA
1
Bob hoisitdeux trèsgrands nombres premiersp etq puis
formeleurproduit N
=
p×
q.2
Bob alule
(
p−
1) × (
q−
1)
et hoisitunentiereonvenable(=tel quepgd
(
e, (
p−
1) × (
q−
1)) =
1).Données du ryptosystème à lé publique RSA
1
Bob hoisitdeux trèsgrands nombres premiersp etq puis
formeleurproduit N
=
p×
q.2
Bob alule
(
p−
1) × (
q−
1)
et hoisitunentiereonvenable(=tel quepgd
(
e, (
p−
1) × (
q−
1)) =
1).3
Il aluleunentier d telque ed
≡
1[(
p−
1) × (
q−
1)]
(çaexiste!).
Données du ryptosystème à lé publique RSA
1
Bob hoisitdeux trèsgrands nombres premiersp etq puis
formeleurproduit N
=
p×
q.2
Bob alule
(
p−
1) × (
q−
1)
et hoisitunentiereonvenable(=tel quepgd
(
e, (
p−
1) × (
q−
1)) =
1).3
Il aluleunentier d telque ed
≡
1[(
p−
1) × (
q−
1)]
(çaexiste!).
4
Il rend publile ouple
(
N,
e)
etgardeseret leouple((
p−
1) × (
q−
1),
d)
.Desription des algorithmes de hirement/déhirement
1
Lafontion de hirementde Bob (publique)est
C
:
x7−→
xe[
N].
Desription des algorithmes de hirement/déhirement
1
Lafontion de hirementde Bob (publique)est
C
:
x7−→
xe[
N].
2
Lafontion de déhirementde Bob(privée)est
D
:
x7−→
xd[
N].
Desription des algorithmes de hirement/déhirement
1
Lafontion de hirementde Bob (publique)est
C
:
x7−→
xe[
N].
2
Lafontion de déhirementde Bob(privée)est
D
:
x7−→
xd[
N].
3
Par lethéorèmed'Euler-Fermat esdeux fontionssont
réiproques l'unede l'autre :
(
C◦
D)(
m) =
m et(
D◦
C)(
M) =
MDesription des algorithmes de hirement/déhirement
1
Lafontion de hirementde Bob (publique)est
C
:
x7−→
xe[
N].
2
Lafontion de déhirementde Bob(privée)est
D
:
x7−→
xd[
N].
3
Par lethéorèmed'Euler-Fermat esdeux fontionssont
réiproques l'unede l'autre :
(
C◦
D)(
m) =
m et(
D◦
C)(
M) =
M4
L'une etl'autre sonttrèsfailes àaluler maisilest
Sommaire
1
Laryptographieàléserète
2
Laryptographieàlépublique
3
Interlude: hirern'estpasoder
4
Aller-retourdansl'histoiredesmaths
5
Pourallerplusloin...
F. Bayart,LaCryptogrphie expliquée,
www.bibmath.net/rypto/
J. Stern, LaSienedu seret,Odile Jaob,1979.
S.Singh, Histoiredes odes serets,Le livrede Pohe, 2001
(TradutiondeThe Code Book:The SieneofSereyfrom
AnientEgypttoQuantumCryptography,AnhorEd.,2000).
Le sitede lasoiétéRSA :www.em.om/domains/rsa/
Le sitede l'ANSSI (Agene Nationalede laSéurité des
Systèmes d'Information):www.ssi.gouv.fr/
Bonne triche!
Sur le hirement par substitution
Combien y a-t-ilde permutations de l'alphabet?
Sur le hirement par substitution
Combien y a-t-ilde permutations de l'alphabet?
Commentproéder pour asser unhirementpar
substitution?
Sur le hirement par substitution
Combien y a-t-ilde permutations de l'alphabet?
Commentproéder pour asser unhirementpar
substitution?
Le hirementparsubstitutionest-ilsûr?
Sur le fontionnement d'un ryptosystème à lé publique
CommentAlie peut-ellesignersonmessage?
Sur le fontionnement d'un ryptosystème à lé publique
CommentAlie peut-ellesignersonmessage?
Le hirementparsubstitutionpeut-ilonstituerun
ryptosystèmeà lépublique?
Sur le système RSA
Existe-t-ilune innitéde nombres premiers?
Sur le système RSA
Existe-t-ilune innitéde nombres premiers?
Est-il failede onstruire desgrands nombrespremiers?
Sur le système RSA
Existe-t-ilune innitéde nombres premiers?
Est-il failede onstruire desgrands nombrespremiers?
Lesnombrespremiersp etq peuvent-ilsêtrehoisisauhasard?
Sur le système RSA
Existe-t-ilune innitéde nombres premiers?
Est-il failede onstruire desgrands nombrespremiers?
Lesnombrespremiersp etq peuvent-ilsêtrehoisisauhasard?
CommentAlie peut-ellesigner sonmessage?
Sur le système RSA
Existe-t-ilune innitéde nombres premiers?
Est-il failede onstruire desgrands nombrespremiers?
Lesnombrespremiersp etq peuvent-ilsêtrehoisisauhasard?
CommentAlie peut-ellesigner sonmessage?
Peut-onasserlesystèmeRSAautrementqu'enfatorisantN?
Sur le système RSA
Existe-t-ilune innitéde nombres premiers?
Est-il failede onstruire desgrands nombrespremiers?
Lesnombrespremiersp etq peuvent-ilsêtrehoisisauhasard?
CommentAlie peut-ellesigner sonmessage?
Peut-onasserlesystèmeRSAautrementqu'enfatorisantN?
Lafatorisationdesgrands nombres est-elleunetâhe aisée?