forked from YuZhang/cryptography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OFB.tex
25 lines (22 loc) · 912 Bytes
/
OFB.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
\begin{tikzpicture}
\foreach \x in {1, 2, 3} {
\node (f\x) at ($\x*(2.5cm,0)$) [minimum size=1.25cm,rounded corners=1ex,draw] {\Large $F_k$};
\node (c\x) [below of=f\x, node distance=2.5cm] {$c_\x$};
\node (p\x) [below of=f\x, node distance=1.5cm, circle, draw] {};
\node (m\x) [left of=p\x, node distance=1.0cm] {$m_\x$};
\draw[-] (p\x.north) -- (p\x.south);
\draw[-] (p\x.east) -- (p\x.west);
\draw[-latex] (m\x) -- (p\x);
\draw[-latex] (f\x) -- (p\x);
\draw[-latex] (p\x) -- (c\x);
}
\node (iv2) [left of=c1, node distance=1.5cm] {$IV$};
\node (iv) [above of=iv2, node distance=4cm] {$IV$};
\draw[-latex] (iv) -- (iv2);
\draw[-latex] (iv) -| (f1.north);
\foreach \x in {1, 2} {
%\draw[-] ($(p\x) + (0,0.6cm)$) -| +(1.25cm,2.4cm);
%\draw[-latex] ($(p\x) + (1.25,3cm)$) -| ($(f\x.north) + (2.5cm,0)$);
\draw[-latex] ($(p\x) + (0,0.6cm)$) -| +(1.25cm,2.4cm) -| ($(f\x.north) + (2.5cm,0)$);
}
\end{tikzpicture}