mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
added ECB Mode Decryption
This commit is contained in:
parent
e9f679fcc5
commit
d49c9ff91a
4 changed files with 67 additions and 0 deletions
29
tikz/ECB-Mode-Decryption/ECB-Mode-Decryption.tex
Normal file
29
tikz/ECB-Mode-Decryption/ECB-Mode-Decryption.tex
Normal file
|
@ -0,0 +1,29 @@
|
|||
\documentclass{article}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{calc}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\tikzstyle{vertex}=[draw,fill=black!15,circle,minimum size=20pt,inner sep=0pt]
|
||||
\tikzstyle{encrypt}=[draw,fill=black!15,rectangle,minimum size=20pt,inner sep=0pt]
|
||||
\begin{tikzpicture}
|
||||
\newcommand{\n}{3}
|
||||
\foreach \nr in {1, ..., \n}{
|
||||
\node (M\nr) at (0,{(\n-\nr)*2}) {$C_\nr$};
|
||||
\node (C\nr) at (4,{(\n-\nr)*2}) {$M_\nr$};
|
||||
\node (E\nr)[encrypt] at (2,{(\n-\nr)*2}) {$D$};
|
||||
\node (K\nr) at (2,{(\n-\nr)*2+1}) {$K$};
|
||||
|
||||
\draw[->,very thick] (M\nr) -- (E\nr);
|
||||
\draw[->,very thick] (K\nr) -- (E\nr);
|
||||
\draw[->,very thick] (E\nr) -- (C\nr);
|
||||
}
|
||||
|
||||
\node (Mx) at (0,-1) {$\vdots$};
|
||||
\node (Ex) at (2,-1) {$\vdots$};
|
||||
\node (Cx) at (4,-1) {$\vdots$};
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue