diff --git a/Lab04/content/bigrams.xlsx b/Lab04/content/bigrams.xlsx deleted file mode 100644 index 4ec8162..0000000 Binary files a/Lab04/content/bigrams.xlsx and /dev/null differ diff --git a/Lab04/content/part2/bigrams.xlsx b/Lab04/content/part2/bigrams.xlsx new file mode 100644 index 0000000..64a92f0 Binary files /dev/null and b/Lab04/content/part2/bigrams.xlsx differ diff --git a/Lab04/content/hashes.txt b/Lab04/content/part4/hashes.txt similarity index 82% rename from Lab04/content/hashes.txt rename to Lab04/content/part4/hashes.txt index 46ad439..8e5abfe 100644 --- a/Lab04/content/hashes.txt +++ b/Lab04/content/part4/hashes.txt @@ -3,3 +3,4 @@ jonas:$1$qPEx/5/4$4T0lDrIo5RnrDFH2rP7In/ pony:$1$q1NwfAWz$5ulIYzhCjsLBsQjQ2CRRN1 hannah:$1$ia1yKsCX$/Xdet.pCmIR3TdKoavIaP/ root:$1$E2ST/4kf$6UnJsquPTK3S2lpLxShE/. +florian:$1$AIi8cXMh$eiuFpI7YUjEvLaoq5mfss. diff --git a/Lab04/documentation/images/part4/john.png b/Lab04/documentation/images/part4/john.png new file mode 100644 index 0000000..20f4b37 Binary files /dev/null and b/Lab04/documentation/images/part4/john.png differ diff --git a/Lab04/documentation/main.tex b/Lab04/documentation/main.tex index 112cfb7..8c3eba7 100644 --- a/Lab04/documentation/main.tex +++ b/Lab04/documentation/main.tex @@ -30,7 +30,7 @@ \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \definecolor{weborange}{rgb}{1,0.65,0} -\usepackage{fancyvrb} +\usepackage{fancyvrb,amsmath} \RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}% {fontsize=\footnotesize, commandchars=\|\(\), % escape character and argument delimiters for @@ -113,6 +113,7 @@ \include{part2/part2} \include{part3/part3} \include{part4/part4} + \include{part5/part5} \printbibliography[title=Literaturverzeichnis] diff --git a/Lab04/documentation/part4/part4.tex b/Lab04/documentation/part4/part4.tex index c5780a5..04fc9eb 100644 --- a/Lab04/documentation/part4/part4.tex +++ b/Lab04/documentation/part4/part4.tex @@ -1,3 +1,25 @@ \section{Part 4: Password Hashing and Cracking} +\subsection{MD5 Hash} +MD5 hash mit password aus Liste: + +\begin{verbatim} +openssl passwd -1 !Florian +\end{verbatim} + +\subsection{John} + +cracking it with john: + +\begin{verbatim} +john --wordlist=crackstation.txt --format=md5crypt hashes.txt --fork=8 +\end{verbatim} + +\begin{figure}[H] + \begin{center} + \includegraphics[width=0.9\textwidth]{part4/john} + \caption{John} + \label{fig:John} + \end{center} +\end{figure} diff --git a/Lab04/documentation/part5/part5.tex b/Lab04/documentation/part5/part5.tex new file mode 100644 index 0000000..117a4c0 --- /dev/null +++ b/Lab04/documentation/part5/part5.tex @@ -0,0 +1,45 @@ +\section{Part 5: Asymmetric Encryption} + +\subsection{Generierte Primzahlen} + +\begin{verbatim} +openssl prime -generate -bits 8 +\end{verbatim} + +\begin{verbatim} +prime1 = 211, prime2 = 223, prime3 = 227, e=11 +\end{verbatim} + +\subsection{Berechnungen} + +\begin{align} +d = e^{-1} mod ((prime1-1)(prime2-1)) \\ +d = 11^{-1} mod ((211-1)(223-1)) = 21191 +\end{align} + +\begin{verbatim} +g = 9, x = 2, y = 3 +\end{verbatim} + +\begin{align} + a = g^{x} (mod\ prime3) = 9^{2} (mod\ 227) = 81 \\ + b = g^{y} (mod\ prime3) = 9^{3} (mod\ 227) = 48 \\ + k_{1} = b^{x}(mod\ prime3) = 48^{2}(mod\ 227) = 34 \\ + k_{2} = a^{y}(mod\ prime3) = 81^{3}(mod\ 227) = 34 \\ + k = k_{1} = k_{2} = 34 +\end{align} + +\subsection{Fragen} + +1. What attack is the Diffie-Hellman key exchange vulnerable to? + +Man in the Middle attacks + +2. What measures can be taken to prevent this type of attack? + +RSA Encryption + +3. For the Diffie-Hellman, a generator g is used. Explain what a generator is and how can it be found + +4. Show why for the primes 61,23 and the public key e=60 no private key d can be found +