\usepackage{url}
\usepackage{amsfonts}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage{lgrind}
\usepackage{pstricks,pst-node}
\usepackage{epsfig}
%\usepackage[mathcal,text-hat-accent]{euler}


\usepackage{epic}
\usepackage{eepic}


\usepackage{amsthm} %%% Theorem environments with `amsthm' %%%eprint

\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{fact}{Fact}[section]
\newtheorem*{claim}{Claim}
%\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{assumption}{Assumption}[section]
\theoremstyle{remark}
\newtheorem{example}{Example}[section]
\newtheorem*{remark}{Remark}
%\newtheorem{protocol}{Protocol}[section]
%\newtheorem{protocol}{Protocol} 
\newlength{\protocolwidth}
\setlength{\protocolwidth}{\textwidth}

\newcommand{\pprotocol}[5]{
{\begin{figure}[#4]
\begin{center}
\fbox{
        \small
        \hbox{\quad
        \begin{minipage}{0.92\textwidth}
    \begin{center}
    {\bf #1}
    \end{center}
        #5
        \caption{\label{#3} #2}
        \end{minipage}
        \quad}
        }
\end{center}
\end{figure}
} }
\newcommand{\newprotocol}[5]{
{\begin{figure}[#4]
\begin{center}
\fbox{  \small
        \hbox{\quad
        \begin{minipage}{0.9\textwidth}
%        \begin{minipage}{0.92\textwidth}
        #5
        \vspace{-.2in}
        \caption{\label{#3} #2}
        \end{minipage}
        \quad}
        }
\end{center}
\end{figure}
} }
\newcommand{\protocol}[4]{
\pprotocol{#1}{#2}{#3}{htbp}{#4}
}
\newcommand{\smallprotocol}[4]{
\pprotocol{#1}{#2}{#3}{ht}{#4}
}
\newcommand{\smallnewprotocol}[4]{
\newprotocol{#1}{#2}{#3}{ht}{#4}
}

\newcommand{\VtoP}{{P \longleftarrow V}}
\newcommand{\PtoV}{{P \longrightarrow V}}
\newcommand{\PwithV}{{P \longleftrightarrow V}}

\newcommand{\UtoS}{{U \longrightarrow S}}
\newcommand{\StoU}{{U \longleftarrow S}}
\newcommand{\UwithS}{{U \longleftrightarrow S}}
\newcommand{\UwithV}{{U \longleftrightarrow V}}



\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\DeclareMathSymbol{\F}{\mathalpha}{AMSb}{"46}
\DeclareMathSymbol{\N}{\mathalpha}{AMSb}{"4E}
\DeclareMathSymbol{\R}{\mathalpha}{AMSb}{"52}
\DeclareMathSymbol{\X}{\mathalpha}{AMSb}{"58}
\DeclareMathSymbol{\Zz}{\mathalpha}{AMSb}{"5A}
\newcommand{\Z}[1]{{\ensuremath{\Zz_{#1}} }}
\newcommand{\Zs}[1]{\ensuremath{\Zz^{\ast}_{#1}}}
\newcommand{\Zn}{\Z{n}}
\newcommand{\Zns}{\Zs{n}}
\newcommand{\Zps}{\Zs{p}}
\newcommand{\Zq}{{\Z{q}}}
%\newcommand{\QR}{\mathop{\mathrm{QR}}\nolimits}
\newcommand{\ord}[1]{\mathop{\mathrm{ord}}({#1})}
\newcommand{\QR}[1]{\ensuremath{\textit{QR}_{#1}}}
\newcommand{\becomes}{:=}
\newcommand{\rem}[1]{\ensuremath{\ \operatorname{rem} #1}}  
\newcommand{\U}{{\mathcal{U}}}
\newcommand{\floor}[1]{\ensuremath{\lfloor{#1}\rfloor}}
\newcommand{\de}[1]{\ensuremath{\Delta{#1}}}
\newcommand{\js}[2]{\left( \frac{#1}{#2} \right)}


\newcommand{\greq}[1]{\stackrel{#1}{=}}
\newcommand{\hash}{\ensuremath{\mathcal{H}}}
\newcommand{\negl}{{\tt neg}}
\newcommand{\cindist}{\stackrel{c}{\approx}}
\newcommand{\A}{{\mathcal{A}}}
\newcommand{\B}{{\mathcal{B}}}
\newcommand{\C}{{\mathcal{C}}}
\renewcommand{\S}{{\mathcal{S}}}
\newcommand{\work}[1]{ 
    {\fontfamily{cmss}\selectfont #1}
    \marginpar{\sf $\leftarrow\!\!$w$\!\!\rightarrow$}
     }

\newcommand{\id}{{\textit ID}}
\newcommand{\pk}{{\textit PK}}
\newcommand{\sk}{{\textit SK}}
\newcommand{\eval}{{\tt Eval}}
\newcommand{\prove}{{\tt Prove}}
\newcommand{\sign}{{\tt Sign}}
\newcommand{\verify}{{\tt Verify}}
\newcommand{\comm}{{\tt Commit}}
\newcommand{\state}{{\tt state}}
\newcommand{\bbar}{{\stackrel{\blacksquare}{\rightarrow}}}
\newcommand{\bbal}{{\stackrel{\blacksquare}{\leftarrow}}}

\newcommand{\init}{{\tt Init}}
\newcommand{\is}{{\mbox{\cal IS}}}
\newcommand{\cs}{{\mbox{\cal CS}}}

\newcommand{\bit}{{\{0,1\}}}

\newcommand{\poly}{{\mbox{poly}}}

\renewcommand{\O}{{\mathcal{O}}}

\newcommand{\notation}[1]{\medskip \noindent {\bf Notation:} #1}

\newcommand{\ver}{\mathit{Verify}}
\newcommand{\sig}{\mathit{Sign}}

\newcommand{\RSA}{\mathit{RSA}}
\newcommand{\RSApk}{\mathtt{RSApk}}
\newcommand{\RSAmod}{\mathtt{RSAmodulus}}

\newcommand{\Eve}{{\mbox{Eve}}}

\newcommand{\DDH}{\mathit DDH}

\newcommand{\indist}{\stackrel{\rm c}{\equiv}}
\newcommand{\gen}{{\mathcal{G}}}
\newcommand{\commit}{\comm}
\newcommand{\view}{\mathit{VIEW}}
\newcommand{\out}{\mathit{OUT}}
\newcommand{\tk}{\mathit{TK}}
\newcommand{\M}{{\mathcal{M}}}
\newcommand{\alter}{\mathsf{Alter}}

