1

The attacker in protocol, how to draw the following picture using TiKZ in latex ? The attacker in protocol, how to draw the attacker picture using TiKZ in latex ? Alice Bob and Eva ?

  • 11
    Welcome to the site. Generally, questions are expected to provide a minimum working example of code that demonstrates the problem or at least one's attempt at addressing the problem, if unsuccessful. The "do this for me" type questions are generally frowned upon. Perhaps you could edit your question to include code for what you have tried to this point. – Steven B. Segletes Nov 3 '16 at 16:27
  • 3
    As Steven said, there is nothing holding you back from downloading that image and adding it to your tikz image inside a node. – daleif Nov 3 '16 at 16:38
  • Come on, downvoters, -1 makes the point; our site is filled with this kind of thing – cmhughes Nov 3 '16 at 19:09
  • 1
    @daleif doesn't need to be an image it could be picture mode – David Carlisle Nov 3 '16 at 21:16
  • 1
    To answer @cfr's comment: Alice and Bob are the two ends of a secure communication channel. Eve is an eavesdropper. – Chris H Nov 10 '16 at 10:18
15

I don't know too much about security protocols but tikzpeople package has been designed by its author Nils Fleischhacker with this intention:

The package was originally written to provide me with shapes of people to depict parties in cryptographic protocols and security definitions on beamer slides.

There's no devil figure, but there exist evil option which can provide funny results:

\documentclass[tikz,border=2mm]{standalone} 
\usetikzlibrary{positioning}
\usepackage{tikzpeople}

\begin{document}
\begin{tikzpicture}[every node/.style={minimum width=1.5cm}]
\node[alice] (alice) {};
\node[bob, right= 4cm of alice, mirrored] (bob) {};
\draw[->, thick] (alice) -- coordinate[near start] (aux) (bob);
\node[priest, evil, mirrored, above right=-5mm and 1cm of alice] (priest) {};
\draw[->,red, ultra thick] (priest)--(aux);
\end{tikzpicture}
\end{document}

enter image description here

  • I feel like the people could do with their initials on lapel badges. To make it clearer who's who – Chris H Nov 10 '16 at 10:20
  • 2
    @ChrisH \node[bob, label=bob, ..., \node[alice, label=alice,.... You can see the result in this example – Ignasi Nov 10 '16 at 10:43
  • I was having trouble with CTAN mirrors when I posted that so couldn't RTFM and didn't find the old Q. But now I want to contribute to tikzpeople, despite not having the skills! – Chris H Nov 10 '16 at 10:44
  • @ChrisH Or, even easier: \node[bob]{Bob}. Node contents is shown below the figure – Ignasi Nov 10 '16 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.