Compare commits

..

No commits in common. "55516ffdd51c072fc71a0aa59d562b4682f9303f" and "60aed213d69d8296553ddd548362d33887b80fb9" have entirely different histories.

2 changed files with 29 additions and 57 deletions

View file

@ -6,35 +6,11 @@
xmlns:svg="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg8" id="svg8"
version="1.1" version="1.1"
viewBox="0 0 435.13284 144.2607" viewBox="0 0 435.13284 144.2607"
height="144.2607mm" height="144.2607mm"
width="435.13284mm" width="435.13284mm">
sodipodi:docname="pagging.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3180"
inkscape:window-height="1700"
id="namedview931"
showgrid="false"
inkscape:zoom="1.3589959"
inkscape:cx="822.29829"
inkscape:cy="272.61864"
inkscape:window-x="6"
inkscape:window-y="90"
inkscape:window-maximized="0"
inkscape:current-layer="svg8" />
<title <title
id="title1517">CBC Padding</title> id="title1517">CBC Padding</title>
<defs <defs
@ -746,28 +722,30 @@
cx="59.710625" cx="59.710625"
cy="128.40491" cy="128.40491"
r="10.326617" /> r="10.326617" />
<g <text
aria-label="1" id="text3898"
y="133.70311"
x="55.019024"
style="font-style:normal;font-weight:normal;font-size:15.35711765px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.38392791" style="font-style:normal;font-weight:normal;font-size:15.35711765px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.38392791"
id="text3898"> xml:space="preserve"><tspan
<path
d="m 61.039014,132.35168 v -9.24498 h -1.520355 l -3.255709,1.99642 0.737142,1.19786 2.334282,-1.42821 v 7.47891 h -2.579996 v 1.35143 h 6.403918 v -1.35143 z"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-family:'Fira Code';-inkscape-font-specification:'Fira Code Medium';fill:#4d4d4d;fill-opacity:1;stroke-width:0.38392791" style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-family:'Fira Code';-inkscape-font-specification:'Fira Code Medium';fill:#4d4d4d;fill-opacity:1;stroke-width:0.38392791"
id="path933" /> y="133.70311"
</g> x="55.019024"
id="tspan3896">1</tspan></text>
<circle <circle
r="10.326617" r="10.326617"
cy="128.40491" cy="128.40491"
cx="242.00858" cx="242.00858"
id="circle3900" id="circle3900"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#de6a66;stroke-width:1.0583334;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#de6a66;stroke-width:1.0583334;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g <text
aria-label="2" xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15.35711765px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.38392791" style="font-style:normal;font-weight:normal;font-size:15.35711765px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:0.38392791"
id="text3904"> x="237.31699"
<path y="133.70311"
d="m 241.49412,122.8917 c -1.53571,0 -2.56464,0.58357 -3.37856,1.62785 l 1.10571,0.86 c 0.62964,-0.76785 1.19785,-1.10571 2.15,-1.10571 1.07499,0 1.71999,0.66036 1.71999,1.72 0,1.55107 -0.9675,2.74892 -4.7607,6.40391 v 1.30536 h 6.5882 l 0.18428,-1.38214 h -4.80677 c 3.39392,-3.07142 4.56106,-4.57642 4.56106,-6.43463 0,-1.65857 -1.21321,-2.99464 -3.36321,-2.99464 z" id="text3904"><tspan
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-family:'Fira Code';-inkscape-font-specification:'Fira Code Medium';fill:#4d4d4d;fill-opacity:1;stroke-width:0.38392791" id="tspan3902"
id="path936" /> x="237.31699"
</g> y="133.70311"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-family:'Fira Code';-inkscape-font-specification:'Fira Code Medium';fill:#4d4d4d;fill-opacity:1;stroke-width:0.38392791">2</tspan></text>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

View file

@ -1,10 +1,10 @@
--- ---
title: Authentification par smartcard et PKI title: Authentification par smartcard et PKI
documentclass: scrartcl documentclass: scrbook
author: author:
- Luc Lauriou - Luc Lauriou
- Yorick Barbanneau - Yorick Barbanneau
fontsize: 13pt fontsize: 12pt
mainfont: DejaVu Serif mainfont: DejaVu Serif
geometry: [top=1.5cm, bottom=3cm, left=3cm, right=3cm] geometry: [top=1.5cm, bottom=3cm, left=3cm, right=3cm]
header-includes: header-includes:
@ -312,34 +312,28 @@ de `cleartext[n]` en modifiant `cblock[n-1]`, ou tout simplement en le
forgeant à notre convenance. forgeant à notre convenance.
Prenons `X` comme bloc de chiffrement forgé pour l'occasion, et `cblock[n]` Prenons `X` comme bloc de chiffrement forgé pour l'occasion, et `cblock[n]`
bloc de chiffrement à attaquer et `cleartexthack` le résultat du déchiffrement bloc de chiffrement à attaquer, nous pouvons écrire :
de `cblock[n]` avec notre `X` en vecteur d'initialisation, nous pouvons écrire :
$$ $$
cleartexthack = decrypt(cblock[n]) \oplus X cleartexthack[n] = decrypt(cblock[n]) \oplus X
$$ $$
Nous savons aussi que : Nous savons aussi que :
$$ $$
cblock[n] = encrypt(cleartext[n] \oplus cblock[n-1]) cblock[a] = encrypt(cleartextr[n] \oplus cblock[n-1])
$$ $$
Donc on peut écrire : Donc on peut écrire :
$$ $$
cleartexthack = decrypt(encrypt(cleartext[n] \oplus cblock[n-1])) \oplus X cleartexthack = decrypt(encrypt(txt_clair[n] \oplus cblock[n-1])) \oplus X
$$ $$
En simplifiant : En simplifiant :
$$ $$
cleartexthack = cleartext[n] \oplus cblock[n-1] \oplus X cleartext = cleartext[a] \oplus cblock[n-1] \oplus X
$$
Que l'on peut aussi écrire
$$
cleartext[n] = cleartexthack \oplus cblock[n-1] \oplus X
$$ $$
Cette équation se compose de deux éléments que nous avons en notre possession : Cette équation se compose de deux éléments que nous avons en notre possession :
@ -355,10 +349,10 @@ toutes les valeurs du dernier octet de `X` jusqu'à obtenir un padding correct
(`0x01`). Dans le cadre de notre block de 16 octets : (`0x01`). Dans le cadre de notre block de 16 octets :
$$ $$
cleartext[n][15] = 0x01 \oplus cblock[n-1][15] \oplus X[15] 0x01 = cleartext[n][15] \oplus cblock[n-1][15] \oplus X[15]
$$ $$
Il ne nous reste plus qu'une inconnue `cleartext[n][15]`, nous pouvons résoudre Il ne nous reste plus qu'une inconnue `cleartext[15]`, nous pouvons résoudre
l'équation. l'équation.
Il suffit de procéder ainsi pour les 16 octets de notre bloc pour le déchiffrer Il suffit de procéder ainsi pour les 16 octets de notre bloc pour le déchiffrer
@ -397,12 +391,12 @@ sont résistante à l'ouverture par la force, une attaque ciblée couplée à de
l'ingénierie sociale bien menée pour retrouver le code PIN reste possible. l'ingénierie sociale bien menée pour retrouver le code PIN reste possible.
[^n_infra]:Google a publié le 23 février 2017 un article annonçant la première [^n_infra]:Google a publié le 23 février 2017 un article annonçant la première
collision sur du SHA1. [source](https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html) collision sur du SHA1. https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html)
[^n_yubikey]:La Yubikey 4, et d'autre périphériques cryptographiques sont [^n_yubikey]:La Yubikey 4, et d'autre périphériques cryptographiques sont
touchés par ROCAT, une faille touchant des librairies utilisées par des puces touchés par ROCAT, une faille touchant des librairies utilisées par des puces
de la marque Infineon Technologies AG et permettant de prédire la clé privée de la marque Infineon Technologies AG et permettant de prédire la clé privée
grâce à la clé publique - CVE-2017-15361. [source](https://crocs.fi.muni.cz/public/papers/rsa_ccs17) grâce à la clé publique - CVE-2017-15361. https://crocs.fi.muni.cz/public/papers/rsa_ccs17
## Bibliographie ## Bibliographie