This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
swb6-it-sec/Lab04/documentation/part5/part5.tex
2022-05-30 20:56:15 +02:00

45 lines
1 KiB
TeX

\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