%Schriftgröße, Layout, Papierformat, Art des Dokumentes
\documentclass[10pt,oneside,a4paper]{scrartcl}

%Einstellungen der Seitenränder
\usepackage[left=2cm,right=2cm,top=1.5cm,bottom=1.5cm,includeheadfoot]{geometry}

%neue Rechtschreibung
\usepackage[ngerman]{babel}

%Umlaute ermöglichen
\usepackage[utf8]{inputenc}

%Gesamtseitenzahl
\usepackage{lastpage}

% Kopf- und Fußzeile
\usepackage[automark]{scrpage2}

%Quellcode-Listings
\usepackage{listings}

%Hyperlinks
\usepackage{hyperref}

% \text{}
\usepackage{amsmath}

%multi-row
\usepackage{multirow}

\usepackage{array}

%Kopfzeile
\ihead{Netzwerktechnik}
\chead{}
\ohead{https://kohnlehome.de/netz/ipsec.pdf}
\setheadsepline{0.5pt}

%Fußzeile
\setfootsepline{0.5pt}
\ifoot{Franz Kohnle}
\cfoot{Seite \thepage\ von  \pageref{LastPage}}
\ofoot{\today}

\pagestyle{scrheadings}

\begin{document}

% Überschrift 
\begin{center}
    \LARGE % Schriftgröße
    \bfseries % Fettdruck
    \sffamily % Serifenlose Schrift
    IPsec
\end{center}

\subsection*{Security Functions}
\begin{itemize}
    \item IPsec Protocol Encapsulation
          \begin{itemize}
              \item AH (Authentication Header): nur authentication + integrity
              \item ESP (Encapsulation Security Protocol): authentication + integrity + confidentiality
              \item ESP+AH: funktioniert nicht bei NAT
          \end{itemize}
    \item Confidentiality: symmetrische Verschlüsselung
          \begin{itemize}
              \item DES: block-cipher, 56-bit key
              \item 3DES: block-cipher, 3x 56-bit-key
              \item AES: block-cipher, 128, 192, 256-bit-key
              \item SEAL: stream cipher, 160-bit-key
          \end{itemize}
    \item Integrity: Hash-Algorithmen
          \begin{itemize}
              \item MD5 (Message-Digest 5): 128-bit hash
              \item SHA (Secure Hash Algorithm): 160-bit hash
          \end{itemize}
    \item Authentication
          \begin{itemize}
              \item PSK (pre shared key)
              \item RSA (Rivest Shamir Adleman): uses certificates
          \end{itemize}
    \item Diffie-Hellman (DH1, DH2, DH5), DH14, DH15, DH16, DH24 (key-exchange)
          \begin{itemize}
              \item DH1, DH2, DH5: unsicher!
              \item DH14, DH15, DH16: key-size 2048, 3072, 4096 bits, empfohlen bis 2030
              \item DH19, DH20, DH21, DH24: key-size 256, 384, 521, 2048 bits, Elliptical Curve Cryptography (ECC)
          \end{itemize}
\end{itemize}

\subsection*{Original IPv4 Packet}
{\linespread{0.0}\begin{verbatim}
+-------------+------------+------+
| IPv4 Header | TCP Header | Data | 
| Protocol 6  |            |      |
|   => TCP    |            |      |
+-------------+------------+------+
\end{verbatim}}

\subsection*{Transport mode}
Für Verbindung zweier Computer im LAN
    {\linespread{0.0}\begin{verbatim}
+-------------+--------+-----------------------+---------------+------+
| IPv4 Header |  ESP   |  Encrypted IPv4 Data  | ESP Trailer   | ESP  |
|             | Header | +------------+------+ | Next Header 6 | Auth |
| Protocol 50 |        | | TCP Header | Data | |     => TCP    |      |
|   => ESP    |        | +------------+------+ |               |      |
+-------------+--------+-----------------------+---------------+------+
              |        |<------------ encrypted -------------->|
              |<--------------- authenticated ---------------->|
\end{verbatim}}

\subsection*{Tunnel mode}
Für Verbindung zweier Netze über ein unsicheres Netz
    {\linespread{0.0}\begin{verbatim}
+-------------+--------+-------------------------------------+---------------+------+
|  New IPv4   |  ESP   |        Encrypted IPv4 Packet        | ESP Trailer   | ESP  |
|   Header    | Header | +-------------+------------+------+ | Next Header 4 | Auth |
| Protocol 50 |        | | IPv4 Header | TCP Header | Data | |    => IPv4    |      |
|  => ESP     |        | +-------------+------------+------+ |               |      |
+-------------+--------+-------------------------------------+---------------+------+
              |        |<------------------- encrypted --------------------->|
              |<-------------------------- authenticated ------------------->|
\end{verbatim}}






\end{document}
