finished vigenere cryptoanalysis
This commit is contained in:
parent
29e5383700
commit
9a3c67e159
BIN
presentation.pdf
Normal file
BIN
presentation.pdf
Normal file
Binary file not shown.
166
presentation.tex
166
presentation.tex
|
@ -261,31 +261,32 @@ wird zu\\
|
||||||
\includegraphics[scale=0.3]{images/hobbit-plain-freq.png}
|
\includegraphics[scale=0.3]{images/hobbit-plain-freq.png}
|
||||||
}
|
}
|
||||||
\end{center}
|
\end{center}
|
||||||
|
\vspace{-0.2cm}
|
||||||
\begin{tabular}{r|l}
|
\begin{tabular}{r|l}
|
||||||
Ciphertext alphabet & \texttt{ABCDEFGHIJKLMNOPQRSTUVWXYZ} \\ \hline
|
Ciphertext Alphabet & \texttt{ABCDEFGHIJKLMNOPQRSTUVWXYZ} \\ \hline
|
||||||
\only<2>{Plaintext alphabet &
|
\only<2>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ E\ \ \ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ E\ \ \ \ \ \ \ \ }}
|
||||||
\only<3>{Plaintext alphabet &
|
\only<3>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ \ N\ \ \ \ \ \ \ \ \ \ \ E\ \ \ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ \ N\ \ \ \ \ \ \ \ \ \ \ E\ \ \ \ \ \ \ \ }}
|
||||||
\only<4>{Plaintext alphabet &
|
\only<4>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ \ N\ \ \ \ \ \ \ \ \ \ \ EI\ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ \ N\ \ \ \ \ \ \ \ \ \ \ EI\ \ \ \ \ \ }}
|
||||||
\only<5>{Plaintext alphabet &
|
\only<5>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ MN\ \ \ \ \ \ \ \ \ \ \ EI\ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ MN\ \ \ \ \ \ \ \ \ \ \ EI\ \ \ \ \ \ }}
|
||||||
\only<6>{Plaintext alphabet &
|
\only<6>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ MN\ \ \ \ \ A\ \ \ \ \ EI\ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ MN\ \ \ \ \ A\ \ \ \ \ EI\ \ \ \ \ \ }}
|
||||||
\only<7>{Plaintext alphabet &
|
\only<7>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ MN\ \ \ \ \ AD\ \ \ UEI\ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ MN\ \ \ \ \ AD\ \ \ UEI\ \ \ \ \ \ }}
|
||||||
\only<8>{Plaintext alphabet &
|
\only<8>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ MN\ \ \ \ \ AD\ S\ UEI\ \ \ \ \ \ }}
|
\texttt{\ \ \ \ \ MN\ \ \ \ \ AD\ S\ UEI\ \ \ \ \ \ }}
|
||||||
\only<9>{Plaintext alphabet &
|
\only<9>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ MN\ \ \ \ \ AD\ S\ UEI\ \ \ \ Z\ }}
|
\texttt{\ \ \ \ \ MN\ \ \ \ \ AD\ S\ UEI\ \ \ \ Z\ }}
|
||||||
\only<10>{Plaintext alphabet &
|
\only<10>{Plaintext Alphabet &
|
||||||
\texttt{\ \ \ \ \ MN\ \ \ \ \ ADRS\ UEI\ \ \ \ Z\ }}
|
\texttt{\ \ \ \ \ MN\ \ \ \ \ ADRS\ UEI\ \ \ \ Z\ }}
|
||||||
\only<11>{Plaintext alphabet &
|
\only<11>{Plaintext Alphabet &
|
||||||
\texttt{H\ \ \ \ MN\ \ \ \ \ ADRSTUEI\ \ \ \ Z\ }}
|
\texttt{H\ \ \ \ MN\ \ \ \ \ ADRSTUEI\ \ \ \ Z\ }}
|
||||||
\only<12>{Plaintext alphabet &
|
\only<12>{Plaintext Alphabet &
|
||||||
\texttt{HK\ \ \ MNGCO\ \ ADRSTUEI\ \ \ \ Z\ }}
|
\texttt{HK\ \ \ MNGCO\ \ ADRSTUEI\ \ \ \ Z\ }}
|
||||||
\only<13>{Plaintext alphabet &
|
\only<13>{Plaintext Alphabet &
|
||||||
\texttt{HKFLBMNGCOP\ ADRSTUEIVW\ \ Z\ }}
|
\texttt{HKFLBMNGCOP\ ADRSTUEIVW\ \ Z\ }}
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\end{overlayarea}
|
\end{overlayarea}
|
||||||
|
@ -317,13 +318,142 @@ $\rightarrow$ Gleiche Buchstaben werden nicht immer gleich verschlüsselt
|
||||||
\end{center}
|
\end{center}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}{Vigenère-Chiffre Kryptoanalyse}
|
\begin{frame}{Vigenère Kryptoanalyse: Kasiski test}
|
||||||
|
\begin{overlayarea}{\textwidth}{\textheight}
|
||||||
content...
|
\begin{footnotesize}
|
||||||
|
\begin{itemize}
|
||||||
|
\item Schwachstelle der Vigenère-Chiffre: wiederholender Schlüssel
|
||||||
|
\item<2-> Angenommen wir kennen die Schlüssellänge $K$:
|
||||||
|
\begin{itemize}
|
||||||
|
\item<3-> Text in $K$ Blöcke aufteilen (Beispiel: $K=3$)
|
||||||
|
\only<3>{
|
||||||
|
\texttt{PPKAMJELQHPIAHLWYPKDDNBGPMJELQHPIAHZWUYJH...}
|
||||||
|
}
|
||||||
|
\only<4->{
|
||||||
|
\texttt{
|
||||||
|
\textcolor{red}{P}\textcolor{blue}{P}\textcolor{darkgreen}{K}\textcolor{red}{A}\textcolor{blue}{M}\textcolor{darkgreen}{J}\textcolor{red}{E}\textcolor{blue}{L}\textcolor{darkgreen}{Q}\textcolor{red}{H}\textcolor{blue}{P}\textcolor{darkgreen}{I}\textcolor{red}{A}\textcolor{blue}{H}\textcolor{darkgreen}{L}\textcolor{red}{W}\textcolor{blue}{Y}\textcolor{darkgreen}{P}\textcolor{red}{K}\textcolor{blue}{D}\textcolor{darkgreen}{D}\textcolor{red}{N}\textcolor{blue}{B}\textcolor{darkgreen}{G}\textcolor{red}{P}\textcolor{blue}{M}\textcolor{darkgreen}{J}\textcolor{red}{E}\textcolor{blue}{L}\textcolor{darkgreen}{Q}\textcolor{red}{H}\textcolor{blue}{P}\textcolor{darkgreen}{I}\textcolor{red}{A}\textcolor{blue}{H}\textcolor{darkgreen}{Z}\textcolor{red}{W}\textcolor{blue}{U}\textcolor{darkgreen}{Y}\textcolor{red}{J}\textcolor{blue}{H}...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
\item<5-> Auf jedem Block eigene Häufigkeitsanalyse:
|
||||||
|
\only<5->{
|
||||||
|
\begin{tabular}{c|c|c}
|
||||||
|
\texttt{\textcolor{red}{PAEHAWKNPEHAWJ}} & \texttt{\textcolor{blue}{PMLPHYDBMLPHUH}} & \texttt{\textcolor{darkgreen}{KJQILPDGJQIZY}}
|
||||||
|
\end{tabular}
|
||||||
|
}
|
||||||
|
\end{itemize}
|
||||||
|
\item<6-> Problem: Wie findet man die Schlüssellänge?\\
|
||||||
|
\only<7->{\textbf{Kasiski Test:}\\
|
||||||
|
\only<7>{
|
||||||
|
\texttt{PPKAMJELQHPIAHLWYPKDDNBGPMJELQHPIAHZWUYJH...}
|
||||||
|
}
|
||||||
|
\only<8->{
|
||||||
|
\texttt{PPKA\textcolor{red}{MJELQHPIAH}LWYPKDDNBGP\textcolor{red}{MJELQHPIAH}ZWUYJH...}\\
|
||||||
|
}
|
||||||
|
\onslide<9->{
|
||||||
|
\hspace{0.9cm}index = $4$ \hspace{2.4cm} index = $25$
|
||||||
|
}
|
||||||
|
\begin{itemize}
|
||||||
|
\item<7-> Suche nach wiederholenden Buchstabengruppen ($N$-Gramme)
|
||||||
|
\item<9-> Bestimme Abstand zwischen den Wiederholungen \\
|
||||||
|
(hier: $d = 25 - 4 = 21$)
|
||||||
|
\item<10-> Schlüssellänge Teiler des Abstands:
|
||||||
|
$d = 3 \cdot 7$ $\rightarrow$ $K=3$ oder $7$
|
||||||
|
\end{itemize}
|
||||||
|
}
|
||||||
|
\item<11->Grund: Gleiche Wörter (oder Teile davon) manchmal gleich verschlüsselt
|
||||||
|
\begin{tabular}{rl}
|
||||||
|
Klartext&\texttt{TIME\textcolor{blue}{FLIESLIKEA}NARROWFRUIT\textcolor{red}{FLIESLIKEA}BANANA}\\
|
||||||
|
Schlüssel&\texttt{WHYWHYWHYWHYWHYWHYWHYWHYWHYWHYWHYWHYWHYWH}\\
|
||||||
|
Geheimtext&\texttt{PPKA\textcolor{blue}{MJELQHPIAH}LWYPKDDNBGP\textcolor{red}{MJELQHPIAH}ZWUYJH...}
|
||||||
|
\end{tabular}
|
||||||
|
\end{itemize}
|
||||||
|
\end{footnotesize}
|
||||||
|
\end{overlayarea}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}{Kasiski test}
|
\begin{frame}{Vigenère Kryptoanalyse: Friedman Test}
|
||||||
content...
|
\begin{overlayarea}{\textwidth}{\textheight}
|
||||||
|
\begin{itemize}
|
||||||
|
\item Statistischer Test zur Bestimmung der Schlüssellänge:
|
||||||
|
\begin{tabular}{c|l}
|
||||||
|
$\kappa_p$ & Wahrscheinlichkeit, dass zwei zufällig gewählte Buchstaben \\
|
||||||
|
& eines Textes gleich sind \\
|
||||||
|
\hline
|
||||||
|
$\kappa_r$ & Wahrscheinlichkeit, dass zwei Buchstaben eines zufälligen\\ & gleichverteilten Textes übereinstimmen
|
||||||
|
\end{tabular}
|
||||||
|
\item Im Englischen (monocase, 26 Buchstaben)):
|
||||||
|
\begin{equation*}
|
||||||
|
\kappa_p = 0.067 \hspace{1cm} \kappa_r = \frac{1}{26} = 0.0385
|
||||||
|
\end{equation*}
|
||||||
|
\item Abschätzung der Schlüssellänge:
|
||||||
|
\begin{equation*}
|
||||||
|
K \approx \frac{\kappa_p - \kappa_r}{\kappa_o - \kappa_r}
|
||||||
|
\end{equation*}
|
||||||
|
mit der beobachteten Koinzidenzrate
|
||||||
|
\begin{equation*}
|
||||||
|
\kappa_o = \frac{\sum_{i=1}^{26} n_i(n_i - 1)}{N (N-1)}
|
||||||
|
\end{equation*}
|
||||||
|
\begin{tabular}{c|l}
|
||||||
|
$N$ & Länge des Texts\\
|
||||||
|
\hline
|
||||||
|
$n_i$ & Vorkommen des Buchstabens im Text
|
||||||
|
\end{tabular}
|
||||||
|
\end{itemize}
|
||||||
|
\end{overlayarea}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}{Friedman Test: Anwendung}
|
||||||
|
\begin{tiny}
|
||||||
|
\hspace{-0.8cm}
|
||||||
|
\begin{minipage}[t][3cm]{\textwidth}
|
||||||
|
\only<1>{
|
||||||
|
\input{vigenere/friedman_0.tex}
|
||||||
|
}
|
||||||
|
\only<2-4>{
|
||||||
|
\input{vigenere/friedman_4.tex}
|
||||||
|
}
|
||||||
|
\only<5->{
|
||||||
|
\input{vigenere/friedman_5.tex}
|
||||||
|
}
|
||||||
|
\end{minipage}
|
||||||
|
\only<3-4>{
|
||||||
|
\begin{minipage}[b][1.4cm]{0.22\textwidth}
|
||||||
|
\input{vigenere/friedman_4_red.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.22\textwidth}
|
||||||
|
\input{vigenere/friedman_4_blue.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.22\textwidth}
|
||||||
|
\input{vigenere/friedman_4_darkgreen.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.22\textwidth}
|
||||||
|
\input{vigenere/friedman_4_orange.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
}
|
||||||
|
\only<5->{
|
||||||
|
\begin{minipage}[b][1.6cm]{0.18\textwidth}
|
||||||
|
\input{vigenere/friedman_5_red.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.18\textwidth}
|
||||||
|
\input{vigenere/friedman_5_blue.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.18\textwidth}
|
||||||
|
\input{vigenere/friedman_5_darkgreen.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.18\textwidth}
|
||||||
|
\input{vigenere/friedman_5_orange.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
\begin{minipage}[b][0cm]{0.18\textwidth}
|
||||||
|
\input{vigenere/friedman_5_black.tex}\\
|
||||||
|
\end{minipage}
|
||||||
|
}
|
||||||
|
\end{tiny}
|
||||||
|
\begin{itemize}
|
||||||
|
\item<1-> Rateversuch: Schlüssellänge \only<1-4>{$K = 4$}\only<5->{$K = 5$}
|
||||||
|
\item<2-> Teile Text in \only<1-4>{$4$}\only<5->{$5$} Blöcke auf
|
||||||
|
\item<3-> Bestimme Koinzidenzindex für jeden Block \\
|
||||||
|
\onslide<4->{Erinnerung: $$\kappa_p = 0.067 \text{ (englisch)}, \;\;\;\kappa_r = 0.0385 \text{ (zufällig)}$$}
|
||||||
|
\end{itemize}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}
|
\begin{frame}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user