答案1
简单回答一下:
\documentclass[border=5pt,tikz]{standalone}
\usepackage{yfonts,amsmath,amssymb,amsfonts}
\usetikzlibrary{arrows,positioning,calc}
\begin{document}
\begin{tikzpicture}[>=latex]
\node[draw,inner sep=1.5cm] (a) {$A$};
\node at (-7,0) (pk) {\textfrak{pk}};
\draw[->] (pk) -- (a);
\node[below=.2 of pk] (ms) {$m^*,s^*$};
\draw[<-] (ms) --+ (5.35,0) node[midway,align=center,below,text width=4cm] {Win if \textsf{\textcolor{blue}{Verify$_{\textfrak{pk}}$}$(s^*,m^*)=\mathtt{valid}$ and $m^*\not\in\textcolor{red}{\mathcal{L}}$}};
\node (n) at ([yshift=-.5cm,xshift=.5cm]a) {$m\in\mathbb{P}$};
\draw[->] ($(n)+(1.15,0)$) --+ (2.8,0) node[midway,above] {$\mathcal{O}_{\textsf{Sig}_{\mathfrak{s\!k}}}$};
\node[right] at ($(n)+(3.85,0)$) {$\textcolor{red}{\mathcal{L}}\leftarrow\textcolor{red}{\mathcal{L}}\cup\{m\}$};
\draw[->] (4.4,-1) --+ (-2.75,0);
\node[yshift=-.5cm,right] at ($(n)+(3.85,0)$) {$t\leftarrow\textcolor{red}{\textsf{Sig}_{\textcolor{blue}{\mathfrak{sk}}}}(m)$};
\node[xshift=1.5cm,above=.5 of pk] {$(\textcolor{blue}{\mathfrak{pk}},\textcolor{red}{\mathfrak{sk}})\leftarrow\mathrm{KeyGen()}$};
\node[xshift=11cm,above=.5 of pk] {$\textcolor{red}{\mathcal{L}}\leftarrow\emptyset$};
\end{tikzpicture}
\end{document}
输出如下: