\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \usepackage{amsmath,amssymb} \newcommand{\enc}{\mathcal{E}} \newcommand{\dec}{\mathcal{D}} \newcommand{\perm}{\pmb{\Pi}} \begin{document} \begin{tikzpicture} \path [every node/.style={draw,minimum width=.5cm, minimum height=5cm}] node[label={[minimum size=.5cm]Node 1}] (r1) {} [xshift=2cm] node[label={[minimum size=.5cm]Node 2}](r2) {} [xshift=2.8cm] %node[label={[minimum size=.5cm]Node 3}](r3) {} %[xshift=3cm] node[label={[minimum size=.5cm]Node $n$}](rn) {} [xshift=2.8cm] node[label={[minimum size=.5cm]Node 1}](s1) {} [xshift=3.6cm] node[label={[minimum size=.5cm]Node 2}](s2) {} [xshift=4.6cm] %node[label={[minimum size=.5cm]Node 3}](s3) {} %[xshift=3cm] node[label={[minimum size=.5cm]Node $n$}](sn) {} [xshift=.8cm] node(d)[draw=none,minimum width=0cm] {}; % R step \draw [->] ([yshift=2cm]r1.east) -- node[above] {$\enc_e(r_{1,1})$} ([yshift=2cm]r2.west); \draw [->] ([yshift=1cm]r1.east) -- node[above] {$\enc_e(r_{1,2})$} ([yshift=1cm]r2.west); \draw [dotted] ([yshift=-1.8cm,xshift=1cm]r1.north) -- ([yshift=1.1cm,xshift=1cm]r1.south); \draw [->] ([yshift=-2cm]r1.east) -- node[above] {$\enc_e(r_{1,\beta})$} ([yshift=-2cm]r2.west); \draw [-] ([yshift=2cm]r2.west) -- ([yshift=2cm]r2.east); \draw [-] ([yshift=1cm]r2.west) -- ([yshift=1cm]r2.east); %\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); \draw [-] ([yshift=-2cm]r2.west) -- ([yshift=-2cm]r2.east); \draw [dashed,->] ([yshift=2cm]r2.east) -- node[above] {$\enc_e(r_{1,1} \cdot r_{2,1})$} ([yshift=2cm]rn.west); \draw [dashed,->] ([yshift=1cm]r2.east) -- node[above] {$\enc_e(r_{1,2} \cdot r_{2,2})$} ([yshift=1cm]rn.west); \draw [dotted] ([yshift=-1.8cm,xshift=1.4cm]r2.north) -- ([yshift=1.1cm,xshift=1.4cm]r2.south); \draw [dashed,->] ([yshift=-2cm]r2.east) -- node[above] {$\enc_e(r_{1,\beta} \cdot r_{2,\beta})$} ([yshift=-2cm]rn.west); %\draw [-] ([yshift=2cm]r3.west) -- ([yshift=2cm]r3.east); %\draw [-] ([yshift=1cm]r3.west) -- ([yshift=1cm]r3.east); %%\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); %\draw [-] ([yshift=-2cm]r3.west) -- ([yshift=-2cm]r3.east); %\draw [dashed] ([yshift=2cm]r3.east) -- node[above] {} ([yshift=2cm]rn.west); %\draw [dashed] ([yshift=1cm]r3.east) -- node[above] {} ([yshift=1cm]rn.west); %\draw [dotted] ([yshift=-1.8cm,xshift=1.5cm]r3.north) -- ([yshift=1.1cm,xshift=1.5cm]r3.south); %\draw [dashed] ([yshift=-2cm]r3.east) -- node[above] {} ([yshift=-2cm]rn.west); \draw [-] ([yshift=2cm]rn.west) -- ([yshift=2cm]rn.east); \draw [-] ([yshift=1cm]rn.west) -- ([yshift=1cm]rn.east); %\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); \draw [-] ([yshift=-2cm]rn.west) -- ([yshift=-2cm]rn.east); \draw [->] ([yshift=2cm]rn.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} r_{i,1})$} ([yshift=2cm]s1.west); \draw [->] ([yshift=1cm]rn.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} r_{i,2})$} ([yshift=1cm]s1.west); \draw [dotted] ([yshift=-1.8cm,xshift=1.4cm]rn.north) -- ([yshift=1.1cm,xshift=1.4cm]rn.south); \draw [->] ([yshift=-2cm]rn.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} r_{i,\beta})$} ([yshift=-2cm]s1.west); % S step \draw [-] ([yshift=2cm]s1.west) -- ([yshift=2cm,xshift=.1cm]s1.west) -- ([yshift=-1cm,xshift=-.1cm]s1.east) -- ([yshift=-1cm]s1.east); \draw [-] ([yshift=1cm]s1.west) -- ([yshift=1cm,xshift=.1cm]s1.west) -- ([yshift=0cm,xshift=-.1cm]s1.east) -- ([yshift=0cm]s1.east); %\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); \draw [-] ([yshift=-2cm]s1.west) -- ([yshift=-2cm,xshift=.1cm]s1.west) -- ([yshift=2cm,xshift=-.1cm]s1.east) -- ([yshift=2cm]s1.east); \draw [->] ([yshift=-1cm]s1.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} (r_{i,1}) \cdot s_{1,4})$} ([yshift=-1cm]s2.west); \draw [->] ([yshift=0cm]s1.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} (r_{i,2}) \cdot s_{1,3})$} ([yshift=0cm]s2.west); \draw [dotted] ([yshift=-.7cm,xshift=1.8cm]s1.north) -- ([yshift=3.2cm,xshift=1.8cm]s1.south); \draw [dotted] ([yshift=-3.7cm,xshift=1.8cm]s1.north) -- ([yshift=.5cm,xshift=1.8cm]s1.south); \draw [->] ([yshift=2cm]s1.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} (r_{i,\beta}) \cdot s_{1,1})$} ([yshift=2cm]s2.west); \draw [-] ([yshift=-1cm]s2.west) -- ([yshift=-1cm,xshift=.1cm]s2.west) -- ([yshift=0cm,xshift=-.1cm]s2.east) -- ([yshift=0cm]s2.east); \draw [-] ([yshift=0cm]s2.west) -- ([yshift=0cm,xshift=.1cm]s2.west) -- ([yshift=2cm,xshift=-.1cm]s2.east) -- ([yshift=2cm]s2.east); %\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); \draw [-] ([yshift=2cm]s2.west) -- ([yshift=2cm,xshift=.1cm]s2.west) -- ([yshift=1cm,xshift=-.1cm]s2.east) -- ([yshift=1cm]s2.east); \draw [dashed,->] ([yshift=0cm]s2.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} (r_{i,1}) \cdot s_{1,4} \cdot s_{2,3})$} ([yshift=0cm]sn.west); \draw [dashed,->] ([yshift=2cm]s2.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} (r_{i,2}) \cdot s_{1,3} \cdot s_{2,1})$} ([yshift=2cm]sn.west); \draw [dotted] ([yshift=-2.8cm,xshift=2.5cm]s2.north) -- ([yshift=.5cm,xshift=2.5cm]s2.south); \draw [dashed,->] ([yshift=1cm]s2.east) -- node[above] {$\enc_e(\prod_{i=1}^{n} (r_{i,\beta}) \cdot s_{1,1} \cdot s_{2,2})$} ([yshift=1cm]sn.west); %\draw [-] ([yshift=0cm]sn.west) -- ([yshift=0cm,xshift=.1cm]sn.west) -- ([yshift=1cm,xshift=-.1cm]sn.east) -- ([yshift=1cm]sn.east); %\draw [-] ([yshift=2cm]sn.west) -- ([yshift=2cm,xshift=.1cm]sn.west) -- ([yshift=-1cm,xshift=-.1cm]sn.east) -- ([yshift=-1cm]sn.east); %%\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); %\draw [-] ([yshift=1cm]sn.west) -- ([yshift=1cm,xshift=.1cm]sn.west) -- ([yshift=2cm,xshift=-.1cm]sn.east) -- ([yshift=2cm]sn.east); %\draw [dashed] ([yshift=1cm]s3.east) -- node[above] {} ([yshift=1cm]sn.west); %\draw [dashed] ([yshift=-1cm]s3.east) -- node[above] {} ([yshift=-1cm]sn.west); %\draw [dotted] ([yshift=-1.8cm,xshift=1.5cm]s3.north) -- ([yshift=1.7cm,xshift=1.5cm]s3.south); %\draw [dotted] ([yshift=-3.7cm,xshift=1.5cm]s3.north) -- ([yshift=.5cm,xshift=1.5cm]s3.south); %\draw [dashed] ([yshift=2cm]s3.east) -- node[above] {} ([yshift=2cm]sn.west); \draw [-] ([yshift=1cm]sn.west) -- ([yshift=1cm,xshift=.1cm]sn.west) -- ([yshift=2cm,xshift=-.1cm]sn.east) -- ([yshift=2cm]sn.east); \draw [-] ([yshift=0cm]sn.west) -- ([yshift=0cm,xshift=.1cm]sn.west) -- ([yshift=-2cm,xshift=-.1cm]sn.east) -- ([yshift=-2cm]sn.east); %\draw [dotted] ([yshift=-1.8cm]r2.north) -- ([yshift=1.1cm]r2.south); \draw [-] ([yshift=2cm]sn.west) -- ([yshift=2cm,xshift=.1cm]sn.west) -- ([yshift=1cm,xshift=-.1cm]sn.east) -- ([yshift=1cm]sn.east); \draw [->] ([yshift=2cm]sn.east) -- node[above] {} ([yshift=2cm]d.west); \draw [->] ([yshift=-2cm]sn.east) -- node[above] {} ([yshift=-2cm]d.west); \draw [dotted] ([yshift=-1.8cm,xshift=.5cm]sn.north) -- ([yshift=1.1cm,xshift=.5cm]sn.south); \draw [->] ([yshift=1cm]sn.east) -- node[above] {} ([yshift=1cm]d.west); \end{tikzpicture} \end{document}