Add RSA schema
This commit is contained in:
parent
ed5af3a8be
commit
116bb5f0c2
1 changed files with 58 additions and 7 deletions
|
@ -811,14 +811,65 @@
|
|||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\node (a1) at (0,0) {$a$};
|
||||
\node (chiff) at (2,0) {$a^e[n]$};
|
||||
\draw [-latex] (a1) -- (chiff);
|
||||
\node (dechiff) at (6,0) {$(a^e[n])^d[n] = a^{ed}[n]$};
|
||||
\draw [-latex] (chiff) -- (dechiff);
|
||||
\node (a2) at (10,0) {$a$};
|
||||
\draw [-latex] (dechiff) -- (a2);
|
||||
\node[label=below:\parbox{2cm}{\centering \small message \\ en clair}] (a1) at (0,0) {\large $a$};
|
||||
\node[
|
||||
label=below:\parbox{2cm}{\centering \small message \\ chiffré},
|
||||
label=above:{\small $e$ = clé de chiffrement}
|
||||
]
|
||||
(chiff) at (3,0) {\large $a^e[n]$};
|
||||
\draw[-latex] (a1) -- (chiff);
|
||||
\node[label=above:{\small $d$ = clé de déchiffrement}]
|
||||
(dechiff) at (8,0) {\large $(a^e[n])^d[n] = a^{ed}[n]$};
|
||||
\draw[-latex] (chiff) -- (dechiff);
|
||||
\node[label=below:\parbox{2cm}{\centering \small message \\ en clair}] (a2) at (11,0) {\large $a$};
|
||||
\draw[-latex] (dechiff) -- (a2);
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item $(n,e)$ est la clé publique
|
||||
|
||||
\item $(n,d)$ est la clé privée
|
||||
|
||||
\end{itemize}
|
||||
|
||||
Hypothèses~:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item $n = p \times q$ \hfill données publiques
|
||||
|
||||
\item $\pgcd(e, \varphi(n)) = 1$ \hfill \textcolor{red}{données privées}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\node[rectangle,thick, draw] (alice) at (0,0) {
|
||||
\parbox{4cm}{\centering Alice \\ $n_A,e_A,\textcolor{red}{d_A}$}
|
||||
};
|
||||
\node (key) at (5,2) {
|
||||
\parbox{3cm}{$(n_A,e_A)$ \\ \small ``Pour m'envoyer un message, utilisez $(n_A,e_A)$''}
|
||||
};
|
||||
\draw[-latex] (alice) -- (key);
|
||||
\node[rectangle,thick, draw] (bob) at (10,0) {
|
||||
\parbox{4cm}{\centering Bob \\ $c=\textcolor{red}{m}^{e_A}[n_A]$}
|
||||
};
|
||||
\draw[-latex] (bob) -- (alice) node[below,midway]{$c$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
Si je veux intercepter $c$, je connais $c, n_A, e_A$, je sais que $c=m^{e_A}[n_A]$ mais ce n'est pas une équation linéaire.
|
||||
Je ne peux pas trouver $m$ en calcul direct.
|
||||
|
||||
Seule la clé \textcolor{red}{$d_A$} permet de déchiffrer.
|
||||
Pour trouver $d_A$~: c'est le coefficient de Bezout de $e_A$ quand on utilise Bezout en $e_A$ et $\varphi(n_A)$.
|
||||
Je dois donc faire la décomposition en facteurs premiers de $n_A$.
|
||||
\begin{align*}
|
||||
\varphi(n_A) = \varphi(p \times q) &= \varphi(p) \times \varphi(q) \\
|
||||
&= (p-1)(q-1)
|
||||
\end{align*}
|
||||
Donc $d_A$ est calculé à partir de $p$ et $q$.
|
||||
|
||||
\end{document}
|
||||
|
|
Loading…
Reference in a new issue