thesis/macros.tex
2018-02-14 14:04:36 +01:00

65 lines
2.3 KiB
TeX

\usepackage[asymptotics,mm,notions,adversary]{cryptocode}
% Layout
\newcommand{\scbf}[1]{\noindent\textbf{\textsc{#1}}}
% Abbreviations
%% Algorithms
\newcommand{\TrapGen}{\textsf{TrapGen}\xspace}
\newcommand{\ExtBasis}{\textsf{ExtBasis}\xspace}
\newcommand{\SampleR}{\textsf{SampleRight}\xspace}
\newcommand{\SampleL}{\textsf{SampleLeft}\xspace}
\newcommand{\GPVSample}{\textsf{GPVSample}\xspace}
%% Complexity
\newcommand{\NP}{\textsf{NP}\xspace}
\newcommand{\redto}{\ensuremath{\preceq_P}}
%% Primitives
\newcommand{\ZK}{\textsf{ZK}\xspace}
\newcommand{\NIZK}{\textsf{NIZK}\xspace}
\newcommand{\PKE}{\textsf{PKE}\xspace}
\newcommand{\OT}{\textsf{OT}\xspace}
% Assumptions/Problems
%% Pairings
\newcommand{\DLP}{\textsf{DLP}\xspace}
\newcommand{\DDH}{\textsf{DDH}\xspace}
\newcommand{\SXDH}{\textsf{SXDH}\xspace}
%% Lattices
\newcommand{\SIS}{\textsf{SIS}\xspace}
\newcommand{\LWE}{\textsf{LWE}\xspace}
\newcommand{\SIVP}{\ensuremath{\textsf{SIVP}_\gamma}\xspace}
%% Models
\newcommand{\UC}{\textsf{UC}\xspace}
\newcommand{\ROM}{\textsf{ROM}\xspace}
%% Experience/Games
\newcommand{\Exp}[2]{\ensuremath{\mathsf{Exp}^{#1}_{#2}}\xspace}
\newcommand{\advantage}[2]{\ensuremath{\mathrm{Advt}^{#1}_{#2}}\xspace}
\newcommand{\oracle}[2]{\ensuremath{\mathcal O^{\,\mathsf{#1}(\,#2\,)}_{}}\xspace}
\newcommand{\ensemble}[1]{\ensuremath{\mathcal S_{\mathsf{#1}}^{}}\xspace}
% Operators
\newcommand{\sample}{\xspace\ensuremath{\hookleftarrow}\xspace}
\newcommand{\bigO}{\ensuremath{\mathcal{O}}}
\newcommand{\softO}{\ensuremath{\tilde{\mathcal{O}}}}
\newcommand{\Span}{\ensuremath{\mathrm{span}}\xspace}
% Sets
%% Usual sets
\newcommand{\RR}{\xspace\ensuremath{\mathbb{R}}\xspace}
\newcommand{\ZZ}{\xspace\ensuremath{\mathbb{Z}}\xspace}
\newcommand{\NN}{\xspace\ensuremath{\mathbb{N}}\xspace}
\newcommand{\CC}{\xspace\ensuremath{\mathbb{C}}\xspace}
\newcommand{\QQ}{\xspace\ensuremath{\mathbb{Q}}\xspace}
\newcommand{\Zq}{\xspace\ensuremath{\mathbb{Z}_q}\xspace}
\newcommand{\bit}{\xspace\ensuremath{\{0,1\}}\xspace}
%% Pairings
\newcommand{\Zp}{\xspace\ensuremath{\mathbb{Z}_p}\xspace}
\newcommand{\GG}{\xspace\ensuremath{\mathbb{G}}\xspace}
\newcommand{\Gh}{\xspace\ensuremath{\widehat{\mathbb{G}}}\xspace}
\newcommand{\GT}{\xspace\ensuremath{\mathbb{G}_T}\xspace}
\newcommand{\atob}[2]{\xspace\ensuremath{\{#1,\ldots,\#2\}}}
% Other
\newcommand{\TODO}{\textbf{\textcolor{red}{TODO}}}