forked from YuZhang/cryptography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMAC.tex
20 lines (19 loc) · 817 Bytes
/
CMAC.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\begin{tikzpicture}[scale=0.7, every node/.style={scale=0.7}]
\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 (m\x) [above of=f\x, node distance=2cm] {$m_\x$};
\node (p\x) [above of=f\x, node distance=1.2cm, circle, draw] {};
\draw[-] (p\x.north) -- (p\x.south);
\draw[-] (p\x.east) -- (p\x.west);
\draw[-latex] (m\x) -- (p\x);
\draw[-latex] (p\x) -- (f\x);
}
\foreach \x in {1, 2} {
\draw[-latex] (f\x.south) -- +(0cm,-0.3cm) -| +(1.25cm,1.85cm) -- ($(p\x.west) + (2.5cm,0)$);
}
\node (m) [right of=p3, node distance = 2cm] {$k_1$ or $k_2$};
\draw[-latex] (m) -- (p3);
\node (m) [left of=p1, node distance = 1cm] {$0^n$};
\draw[-latex] (m) -- (p1);
\draw[-latex] (f3.south) |- +(0.5cm,-0.3cm) node [anchor=west] {t};
\end{tikzpicture}