[Assignment-4] added protocol scheme for mitm

This commit is contained in:
Sascha Tommasone 2024-05-25 10:20:51 +02:00
parent a44b6998f3
commit ac334954e6
Signed by: saschato
GPG key ID: 751068A86FCAA217

View file

@ -11,6 +11,7 @@
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{xifthen}
\usepackage{xcolor}
\usepackage[a4paper,lmargin={2cm},rmargin={2cm},tmargin={2.5cm},bmargin = {2.5cm},headheight = {4cm}]{geometry}
\usepackage{amsmath,amssymb,amstext,amsthm}
\usepackage[shortlabels]{enumitem}
@ -22,6 +23,7 @@
\usetikzlibrary{shapes, arrows, calc, automata, arrows.meta, positioning,decorations.pathmorphing,backgrounds,decorations.markings,decorations.pathreplacing, graphs}
\usetikzlibrary{matrix,shapes,arrows,positioning,chains, calc}
\usetikzlibrary{arrows.meta,matrix,shapes,arrows,positioning,chains, calc}
\tikzset{%
initial text={},
@ -44,6 +46,24 @@
\newenvironment{subsubexercises}{\begin{enumerate}[i), font=\bfseries, wide, labelindent=0pt]}{\end{enumerate}}
% Makros
% MACRO for whole diagram
% #1: total width of diagram
% #2: total height of diagram
% #3: nodes, paths, ...
\newcommand\protocolflow[3]{
\begin{center}
\begin{tikzpicture}[x=#1cm,y=#2cm]
#3
\end{tikzpicture}
\end{center}
}
% MACRO for path line shortening
% #1: start coordinate
% #2: target coordinate
% #3: text above arrow
\newcommand{\package}[3]{
\path[*-{latex[width=5pt, length=5pt]}] (#1) edge node [above] {#3} (#2);
}
% Anpassen --> %
\author{Benjamin Haschka\\Sascha Tommasone\\Paul Zinselmeyer}
@ -52,7 +72,17 @@
\begin{document}
\begin{exercise}[Warm Up]{2.1.}
\protocolflow{1.5}{0.75}{
\node[] (A) at (0,0) {\textbf{Alice}};
\node[] (E) at (3,0) {\textbf{Eve}};
\node[] (S) at (7,0) {\textbf{Server}};
\node[] (B) at (10,0) {\textbf{Bob}};
\package{0,-1}{3,-1}{$Alice, Bob$}
\package{3,-2}{7,-2}{$Alice, \textcolor{red}{Eve}$}
\package{7,-3}{0,-3}{$\{ K \}_{K_{AT}}, \{ K \}_{\textcolor{red}{K_{ET}}}$}
\package{0,-4}{3,-4}{$Trent, Alice, \{ K \}_{\textcolor{red}{K_{ET}}}$}
\package{3,-5}{0,-5}{$\{ Hello Alice! \}_K$}
}
\end{exercise}
\newpage