\phi(n) := |\{a\in\mathbb{N}: 1\leq a\leq n \gcd(a,n) = 1\}|.
$$
Let us characterize $\phi(n)$.
-\begin{lem}
+\begin{lem}\label{lem:eulerfermat}
Let $k,m,n\in\mathbb{N}$, $p,p_1,p_2$ be prime.
\begin{itemize}
\item $\phi(p) = p-1$;
\subsection{The RSA cryptosystem}
-TODO
+At the RSA cryptosystem, named after its authors Rivest, Shamir and Adleman, the two
+protagonists \textbf{A}lice and \textbf{B}ob want to exchange secret messages. To that
+end, Alice generates two primes $p$ and $q$ which are approximately of the same size.
+Then, Alice calculates the product $n=pq$ and $\phi(n) = (p-1)(q-1)$, and proceeds by
+choosing $1<e<\phi(n)$ such that $\gcd(e,\phi(n)) = 1$. With the help of the Euclidean
+algorithm, Alice calculates $1<d<\phi(n)$ such that
+$$
+ed \equiv 1 \pmod {\phi(n)}.
+$$
+We call the pair $(n,e)$ the \emph{public key} of Alice and $d$ the \emph{private key}.
+If Bob now wants to transmit a secret message to Alice, Bob uses the public key $(n,e)$
+of Alice. He represents his (secret) message $m$ by digits $\{0,1,\ldots,n-1\}$, and
+computes the encrypted message $c\equiv m^e\pmod n$ by repeated squaring. When he is
+finished, Bob transmits the encrypted message $c$ to Alice.\\
+
+Alice, on her side, uses her private key $d$ to compute $c^d \pmod n$ which obviously gives
+$$
+c^d \equiv (m^e)^d \equiv m^{(ed)} = m^1 \mod n,
+$$
+by Euler-/Fermat's Theorem Lemma \ref{lem:eulerfermat},
+and translates the message $m$ back into their agreed alphabet.
\subsection{The Diffie-Hellmann cryptosystem}
TODO