0

I made this lines in tkiz to make 3 adjacent parallel lines

        \node (A) at (-8.5,+1){};
        \node (B) at (-8.5,-15){};
        \draw[-] (A)--(B);
        \node[right=-10.3 of A] (b) (russell) at (1.8,0)
        {\includegraphics[width=1.2cm]{Figures/c2}};

        \node (C) at (-7.1,+1){};
        \node (D) at (-7.1,-15){};
        \draw[-] (C)--(D);

        \node (A) at (-7.8,-1.3){};
        \node (B) at (-7.8,-15){};
        \draw[->,green] (A)--(B);

How to add the, to the left of the picture to the following wme to be like the image attached !]1. ( The answer is from that question: How to increase font using Tikz for the following dense protocol?):

  \documentclass{article}
      \usepackage[landscape,margin=15mm]{geometry}
    \usepackage{tikz}
      \usetikzlibrary{arrows.meta, positioning}

      \usepackage{array, arydshln}
  \newcommand\ppbb{path picture bounding box}
    \usepackage{mathtools}
      \usepackage{enumitem}

      \begin{document}

        \begingroup
          \large
       \setlist[itemize]{nosep,label=,leftmargin=*,before=\vspace      {1ex},after=\vspace{-2ex}}
       \tikzset{base/.style = {text=black, inner xsep=3mm, inner ysep=2mm},
     boxA/.style = {name=A,
                    base,path picture={%
                    \draw[semithick,cyan,-{Straight Barb[length=0pt 3]}]
                    ([yshift=1mm]\ppbb.south west) -- ([yshift=1mm]       \ppbb.south east);
                                    }
                    },
     boxB/.style = {base,text=black, inner xsep=2mm,
                    path picture={%
                    \draw[semithick,cyan,-{Straight Barb[length=0pt 3]}]
                    ([yshift=-1mm]\ppbb.north east) -- ([yshift=-1mm]\ppbb.north west);
                                    },
                    below=of A},
   node distance = -1mm
     }
\centering
\setlength\tabcolsep{3pt}
    \begin{tabular}{@{} m{64mm} >{\centering}m{80mm} >{$}c<{$} m{94mm} @{}}
         \textcolor{red}{$v_1$ generate a temporary key pair list}
&   \tikz[baseline]{
    \node [boxA] {$M_{x^1_{v_1}}$};
    \node [boxB] {$\mathcal{T}_1= M_1\| Z_{H_1}(M_{1})$};
                    }
    &   H_1
        &   \begin{itemize}
            \item   Generates $M_1=\bigl\{M x^1_{v_1},(t_1,Max_{H_1}\bigr\}$
            \item   Determine $\mathrm{Sh}_{H_1}(M_1)$
            \end{itemize}\\
\hdashline
     \textcolor{red}{Execute the algorithm to get $(G_{T_1})$}\newline
    $\begin{multlined}[0.9\linewidth]
        L_{H_1} = (\mathcal{T}_1 \| G_{\mathcal{T}_{1}}\| Mx^2_{v_1})\| \\
        \sigma_{Pr^1_{v_1}}(\mathcal{T}_1, G_{\mathcal{T}_1}, Mx^2_{v_1})
     \end{multlined}$
      &   \tikz[baseline]{
     \node [boxA] {$\mathrm{L}_{H_1}$};
    \node [boxB] {$\mathcal{T}_2= M_2\| Z_{H_2}(M_{1})\| Z_{H_2}(M_2)$};
                    }
    &   H_2
        &   \begin{itemize}
            \item   Verifies $\mathrm{L}_{H_1}$
            \item   Verifies $G_{\mathcal{T}_1}$
            \item   Generates $M_2=\bigl\{Mx^2_{v_1} \| (t_{1}, Max_{H_   {1}}) \| (t_{2}, Max_{H_{2}})\bigr\}$
            \item   Determine $Z_{H_{2}}(M_{1})$
            \item   Determine $Z_{H_{2}}(M_{2})$
            \end{itemize}\\
\hdashline
  \textcolor{red}{Execute the algorithm to get ($G_{\mathcal{T}_{2}})$}        \newline
          $\begin{multlined}[0.9\linewidth]
  L_{H_2}=(\mathcal{T}_2\|G_{\mathcal{T}_2}\| Mx^3_{v_1}) \|  \\
    \sigma_{SK^1_{v_1}}(\mathcal{T}_2, G_{\mathcal{T}_2}, Mx^3_{v_1})
       \end{multlined}$
&   \tikz[baseline]{
    \node [boxA] {$\mathrm{L}_{H_2}$};
    \node [boxB] {$\mathcal{T}_3= M_1\| \sigma(M_1)\| M_3\|
                  Z_{H_3}(M_2)\| Z_{H_3}(M_3)$};
                    }
    &   H_3
        &   \begin{itemize}
            \item   Verifies $\mathrm{L}_{H_2}$ and execution
            \item   Verifies $G_{\mathcal{T}_2}$
            \item   Determine $Z_{H_{3}}(M_1)$
            \item   Determine $\sigma(M_1)$
            \item   Generates
            $\begin{multlined}[t]
            M_{3}=\bigl\{Mx^{3}_{v_1}\| (t_1, Max_{H_1})\|   \\
            (t_2, Max_{H_2}\| (t_3, Max_{H_3})\bigr\}
             \end{multlined}$
            \item   Determine $Z_{H_3}(M_2)$
            \item   Determine $Z_{H_3}(M_3)$
            \end{itemize}\\
\hdashline
    \textcolor{red}{execute the algorithm to get ($G_{\mathcal{T}_3}$)} \newline
           $\begin{multlined}[0.9\linewidth]
   L_{H_3}=(\mathcal{T}_{3}\|G_{\mathcal{T}_3}\| Mx^4_{v_1})\| \\ \sigma_  {SK^3_{v_1}}(\mathcal{T}_3, G_{\mathcal{T}_3}, Mx^4_{v_1})
   \end{multlined}$
&   \tikz[baseline]{
    \node [boxA] {$\mathrm{L}_{H_3}$};
    \node [boxB] {$\mathcal{T}_4=M_2\| \sigma(M_2)\|
                  M_4\|Z_{H_4}(M_3)\| Z_{H_4}(M_4)$};
                    }
    &   H_4
        &   \begin{itemize}
            \item   Verifies $\mathrm{L}_{H_3}$ and execution
            \item   Verifies $G_{\mathcal{T}_{3}}$
            \item   Determine $Z_{H_{4}}(M_{2})$
            \item   Determine $\sigma({M_{{2}}})$
            \item   Generates
            $\begin{multlined}[t]
            M_4=\bigl\{Mx^4_{v_1}\|(t_1, Max_{H_1})\| \\
                (t_2, Max_{H_2})\| (t_3, Max_{H_3})\| (t_4, Max_{H_4}) \bigr\}
             \end{multlined}$
            \item   Determine $Z_{H_4}(M_3)$
            \item   Determine $Z_{H_4}(M_4)$
            \end{itemize}\\
      \hdashline
      \end{tabular}
      \endgroup
       \end{document}

1 Answer 1

2

Yes, you can add a column. Here is a minimal damage version that represents a very limited attempt to clean up. (But I could not resist and corrected Max when making space for the column, as well as unified the length of those arrows.)

\documentclass{article}
\usepackage[landscape,margin=15mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning}
\usepackage{array, arydshln,multirow}
\newcommand\ppbb{path picture bounding box}
\usepackage{mathtools}
\usepackage{enumitem}
\newsavebox{\picbox}
\begin{document}
\savebox\picbox{\begin{tikzpicture}
\node (russell) {\includegraphics[width=1.2cm]{example-image-duck}};
\draw ([xshift=-3pt,yshift=1cm]russell.north west) -- ++ (0,-14) coordinate(aux);
\draw ([xshift=3pt,yshift=1cm]russell.north east) -- ++ (0,-14);
\draw[green,->] ([yshift=-1cm]russell.south) -- (russell.south|-aux);
\end{tikzpicture}}
 \begingroup
   \large
\setlist[itemize]{nosep,label=,leftmargin=*,before=\vspace      {1ex},after=\vspace{-2ex}}
\tikzset{base/.style = {text=black, inner xsep=3mm, inner ysep=2mm},
boxA/.style = {name=A,minimum width=74mm,
             base,path picture={%
             \draw[semithick,cyan,-{Straight Barb[length=0pt 3]}]
             ([yshift=1mm]\ppbb.south west) -- ([yshift=1mm]       \ppbb.south east);
                             }
             },
boxB/.style = {base,text=black, inner xsep=2mm,minimum width=70mm,
             path picture={%
             \draw[semithick,cyan,-{Straight Barb[length=0pt 3]}]
             ([yshift=-1mm]\ppbb.north east) -- ([yshift=-1mm]\ppbb.north west);
                             },
             below=of A},
node distance = -1mm
}
\centering
\setlength\tabcolsep{3pt}
\begin{tabular}{@{} m{20mm} @{} m{64mm} >{\centering}m{80mm} >{$}c<{$} m{75mm} @{}}
\multirow{4}{*}{\usebox\picbox}
&  \textcolor{red}{$v_1$ generate a temporary key pair list}
&   \tikz[baseline]{
\node [boxA] {$M_{x^1_{v_1}}$};
\node [boxB] {$\mathcal{T}_1= M_1\| Z_{H_1}(M_{1})$};
             }
&   H_1
 &   \begin{itemize}
     \item   Generates $M_1=\bigl\{M x^1_{v_1},(t_1,\max_{H_1}\bigr\}$
     \item   Determine $\mathrm{Sh}_{H_1}(M_1)$
     \end{itemize}\\
\cdashline{2-5}
& \textcolor{red}{Execute the algorithm to get $(G_{T_1})$}\newline
$\begin{multlined}[0.9\linewidth]
 L_{H_1} = (\mathcal{T}_1 \| G_{\mathcal{T}_{1}}\| Mx^2_{v_1})\| \\
 \sigma_{Pr^1_{v_1}}(\mathcal{T}_1, G_{\mathcal{T}_1}, Mx^2_{v_1})
\end{multlined}$
&   \tikz[baseline]{
\node [boxA] {$\mathrm{L}_{H_1}$};
\node [boxB] {$\mathcal{T}_2= M_2\| Z_{H_2}(M_{1})\| Z_{H_2}(M_2)$};
             }
&   H_2
 &   \begin{itemize}
     \item   Verifies $\mathrm{L}_{H_1}$
     \item   Verifies $G_{\mathcal{T}_1}$
     \item   Generates $\begin{multlined}[t]
     \textstyle M_2=\bigl\{Mx^2_{v_1} \| (t_{1}, \max_{H_   {1}}) \|\\
     \textstyle  (t_{2}, \max_{H_{2}})\bigr\}\end{multlined}$
     \item   Determine $Z_{H_{2}}(M_{1})$
     \item   Determine $Z_{H_{2}}(M_{2})$
     \end{itemize}\\
\cdashline{2-5}
& \textcolor{red}{Execute the algorithm to get ($G_{\mathcal{T}_{2}})$}        \newline
   $\begin{multlined}[0.9\linewidth]
L_{H_2}=(\mathcal{T}_2\|G_{\mathcal{T}_2}\| Mx^3_{v_1}) \|  \\
\sigma_{SK^1_{v_1}}(\mathcal{T}_2, G_{\mathcal{T}_2}, Mx^3_{v_1})
\end{multlined}$
&   \tikz[baseline]{
\node [boxA] {$\mathrm{L}_{H_2}$};
\node [boxB] {$\mathcal{T}_3= M_1\| \sigma(M_1)\| M_3\|
           Z_{H_3}(M_2)\| Z_{H_3}(M_3)$};
             }
&   H_3
 &   \begin{itemize}
     \item   Verifies $\mathrm{L}_{H_2}$ and execution
     \item   Verifies $G_{\mathcal{T}_2}$
     \item   Determine $Z_{H_{3}}(M_1)$
     \item   Determine $\sigma(M_1)$
     \item   Generates
     $\begin{multlined}[t]
      \textstyle M_{3}=\bigl\{Mx^{3}_{v_1}\| (t_1,\max_{H_1})\|   \\
     \textstyle (t_2, \max_{H_2}\| (t_3, \max_{H_3})\bigr\}
      \end{multlined}$
     \item   Determine $Z_{H_3}(M_2)$
     \item   Determine $Z_{H_3}(M_3)$
     \end{itemize}\\
\cdashline{2-5}
& \textcolor{red}{execute the algorithm to get ($G_{\mathcal{T}_3}$)} \newline
    $\begin{multlined}[0.9\linewidth]
L_{H_3}=(\mathcal{T}_{3}\|G_{\mathcal{T}_3}\| Mx^4_{v_1})\| \\ \sigma_  {SK^3_{v_1}}(\mathcal{T}_3, G_{\mathcal{T}_3}, Mx^4_{v_1})
\end{multlined}$
&   \tikz[baseline]{
\node [boxA] {$\mathrm{L}_{H_3}$};
\node [boxB] {$\mathcal{T}_4=M_2\| \sigma(M_2)\|
           M_4\|Z_{H_4}(M_3)\| Z_{H_4}(M_4)$};
             }
&   H_4
 &   \begin{itemize}
     \item   Verifies $\mathrm{L}_{H_3}$ and execution
     \item   Verifies $G_{\mathcal{T}_{3}}$
     \item   Determine $Z_{H_{4}}(M_{2})$
     \item   Determine $\sigma({M_{{2}}})$
     \item   Generates
     $\begin{multlined}[t]
    \textstyle M_4=\bigl\{Mx^4_{v_1}\|(t_1,\max_{H_1})\| \\
        \textstyle (t_2, \max_{H_2})\| (t_3, \max_{H_3})\| \\
         \textstyle (t_4, \max_{H_4}) \bigr\}
      \end{multlined}$
     \item   Determine $Z_{H_4}(M_3)$
     \item   Determine $Z_{H_4}(M_4)$
     \end{itemize}\\
\cdashline{2-5}
\end{tabular}
\endgroup
\end{document}

enter image description here

3
  • (i) table is slightly wider than text width :-) (ii) black vertical lines can be vertical lines from table (this probably is not exactly what op wish to have, but is simpler to draw them (just my 2 cents)
    – Zarko
    Dec 30, 2018 at 0:42
  • @marmot: thanks a lot. How to set the position of "russell" >>" the picture you added" to the top of the page Dec 30, 2018 at 1:32
  • @HebaMohsen Just replace \draw ([xshift=-3pt,yshift=1cm]russell.north west) -- ++ (0,-14) coordinate(aux); \draw ([xshift=3pt,yshift=1cm]russell.north east) -- ++ (0,-14); by \draw ([xshift=-3pt]russell.north west) -- ++ (0,-14) coordinate(aux); \draw ([xshift=3pt]russell.north east) -- ++ (0,-14);. And you're welcome.
    – user121799
    Dec 30, 2018 at 1:37

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.