\begin{tikzpicture}
\node[draw,minimum width=40mm, minimum height=6mm] (m1) {message};
\node[draw,minimum width=10mm, minimum height=6mm, left =(0mm of m1.east)] (m2) {0};
\node[draw, minimum width=30mm, minimum height=6mm, below of = m1, node distance = 13mm] (e1) {$ E(k,\cdot) $};
\node[draw, minimum width=40mm, minimum height=6mm, below of = e1, node distance = 13mm] (c1) {ciphertext};
\draw[->] (m1) -- (e1);
\draw[->] (e1) -- (c1);
\end{tikzpicture}
\hspace{2.5em}
\begin{tikzpicture}
\node[draw,minimum width=40mm, minimum height=6mm] (m1) {ciphertext};
\node[draw, minimum width=30mm, minimum height=6mm, below of = m1, node distance = 13mm] (e1) {$ E(k,\cdot) $};
\node[draw, minimum width=40mm, minimum height=6mm, below of = e1, node distance = 13mm] (c1) {message};
\node[draw,minimum width=10mm, minimum height=6mm, left =(0mm of c1.east)] (m2) {...};
\draw[->] (m1) -- (e1);
\draw[->] (e1) -- (c1);
\end{tikzpicture}
两个tikzpicture之间不能有换行,之间用\hspace{2.5em}添加间隔,这里添加的是2.5个字符间隔
导言区添加包
\usepackage{tikz}
\usetikzlibrary{chains}