绘制图形的时候,可能需要有折线,这个简单的应用就可以满足这点,代码逻辑非常简单
\begin{tikzpicture}[
nodex/.style = {draw, minimum width=20mm, minimum height=8mm},
nodey/.style = {draw, minimum width=10mm, minimum height=8mm},
]
\node[nodex] (n1) {msg};
\node[nodex, right = (0mm of n1)] (n2) {01};
\node[nodex, right = (0mm of n2)] (n3) {$ 0\cdots 0 $};
\node[nodex, right = (10mm of n3)] (n4) {rand};
\node[nodey, below of=n3, node distance=15mm] (n5) {H};
\node[minimum width=10mm, minimum height=8mm, below of=n2, node distance=15mm] (n6) {+};
\node[nodey, below of=n5, node distance=15mm] (n7) {G};
\node[minimum width=10mm, minimum height=8mm, right =(20mm of n7), node distance=10mm] (n8) {+};
\node[nodex, below of=n8, node distance=15mm] (n9) {with RSA};
\node[nodex, minimum width=60mm, left =(10mm of n9)] (n10) {plaintext to encrypt};
\draw[->] (n2) -- (n6);
\draw[->] (n4) |- (n5);
\draw[->] (n4) -- (n8);
\draw[->] (n5) -- (n6);
\draw[->] (n6) -- (n10);
\draw[->] (n6) |- (n7);
\draw[->] (n7) -- (n8);
\draw[->] (n8) -- (n9);
\end{tikzpicture}
还可以参考前面一篇博客,也是绘制流程图,可能在调试的时候有些帮助