From ac334954e64b192677de7b5004c21ca2a2cf2844 Mon Sep 17 00:00:00 2001 From: Sascha Tommasone Date: Sat, 25 May 2024 10:20:51 +0200 Subject: [PATCH] [Assignment-4] added protocol scheme for mitm --- .../abgabe.tex | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Assignment 4 - Protokollsicherheit (Praxis)/abgabe.tex b/Assignment 4 - Protokollsicherheit (Praxis)/abgabe.tex index 050f869..1f54af8 100644 --- a/Assignment 4 - Protokollsicherheit (Praxis)/abgabe.tex +++ b/Assignment 4 - Protokollsicherheit (Praxis)/abgabe.tex @@ -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