Add more elgamal
This commit is contained in:
parent
a0b68de290
commit
4b81f8123c
1 changed files with 89 additions and 1 deletions
|
@ -1020,8 +1020,9 @@
|
|||
\forall\, p \text{ premier } > 3, (\mathbb{F}_p^*, \otimes) \text{ est un groupe cyclique}
|
||||
\end{equation*}
|
||||
|
||||
\subsection{Application}
|
||||
\subsection{Génération des clés}
|
||||
|
||||
Ici encore, $e$ sera la clé publique et $d$ la clé privée.
|
||||
Dans $\mathbb{F}_p^*$, on calcule modulo $p$.
|
||||
Pour choisir des clés pour ElGamal~:
|
||||
|
||||
|
@ -1037,4 +1038,91 @@
|
|||
|
||||
\end{itemize}
|
||||
|
||||
Exemple dans $(\mathbb{F}_{11}^*)$ (on note sans les ``barres'')~:
|
||||
|
||||
\begin{center}
|
||||
\begin{tabularx}{0.7\linewidth}{cXc}
|
||||
\toprule
|
||||
élément & puissances & taille de la ``famille'' \\
|
||||
\midrule
|
||||
1 & 1 & 1 \\
|
||||
\midrule
|
||||
10 & 10, 1 & 1 \\
|
||||
\midrule
|
||||
2 & 2, 4, 8, 5, 10, 9, 7, 3, 6, 1 & 10 \\
|
||||
\midrule
|
||||
3 & 3, 9, 5, 4, 1 & 5 \\
|
||||
\midrule
|
||||
4 & 4, 5, 9, 3, 1 & 5 \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\end{center}
|
||||
|
||||
Domaine public~: $(\mathbb{F}_{11}^*), g = 2$
|
||||
|
||||
\begin{align*}
|
||||
\boxed{d=7} \quad &e = g^d[p] = 2^7[11] = 7 \\
|
||||
\boxed{d=5} \quad &e = g^d[p] = 2^5[11] = 10 \\
|
||||
\end{align*}
|
||||
|
||||
\subsection{Chiffrement}
|
||||
|
||||
Pour envoyer un message à A qui a publié $\boxed{p, g, e_A}$~:
|
||||
|
||||
Soit $x$ le message à chiffrer.
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item L'émetteur du message choisit en secret une clé privée jetable $k$ tel que $(1<k<p-1)$.
|
||||
|
||||
\item Il calcule deux valeurs~:
|
||||
\begin{align*}
|
||||
\left\{
|
||||
\begin{array}{l}
|
||||
r = g^k[p] \\
|
||||
y = x\cdot e_A^k[p] \\
|
||||
\end{array}
|
||||
\right.
|
||||
\end{align*}
|
||||
|
||||
\item Le message chiffré est $(r, y)$.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Déchiffrement}
|
||||
|
||||
A reçoit $(r, y)$.
|
||||
Il connaît $d_A$ mais pas $k$.
|
||||
|
||||
\begin{equation*}
|
||||
x = y \otimes (r^{d_A})^{-1}[p]
|
||||
\end{equation*}
|
||||
|
||||
\subsection{Démonstration}
|
||||
|
||||
\begin{align*}
|
||||
r^{d_A}[p] &= (g^k[p])^{d_A}[p] \\
|
||||
&= g^{(kd_A)}[p] \\
|
||||
(r^{d_A}[p])^{-1} &= (g^{(kd_A)}[p])^{-1} \\ \\
|
||||
y &= x \otimes e_A^k[p] \quad \text{or}\quad e_A = g^{d_A}[p] \\
|
||||
y &= x \otimes (g^{d_A}[p])^k[p] \\
|
||||
&= x \otimes (g^{kd_A}[p]) \\ \\
|
||||
x &= y \otimes (r^{d_A})^{-1}[p] \\
|
||||
&= x \otimes (g^{kd_A}[p]) \otimes (g^{(kd_A)}[p])^{-1} \\
|
||||
&= x \otimes 1 \\
|
||||
&= x
|
||||
\end{align*}
|
||||
|
||||
\subsection{Échange de clés}
|
||||
|
||||
\begin{tabularx}{\linewidth}{YYYY}
|
||||
\toprule
|
||||
A & \multicolumn{2}{c}{$p,g,e_A$} & B \\
|
||||
\textcolor{red}{connu de A seul} & \multicolumn{2}{c}{\textcolor{green}{public}} & \textcolor{blue}{connu de B seul} \\
|
||||
\midrule
|
||||
\textcolor{red}{$d_A$} & $\rightarrow e_A = g^{\textcolor{red}{d_A}}$ & $r = g^{\textcolor{blue}{k}}\leftarrow$ & \textcolor{blue}{$k$} \\
|
||||
& \multicolumn{2}{c}{C} & \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
|
||||
\end{document}
|
||||
|
|
Loading…
Reference in a new issue