LaTeX macros

All pseudocode and math on this site uses custom LaTeX macros for common cryptographic notation. You can copy them below to use in your own LaTeX documents or KaTeX/MathJax configurations.

Macro reference

Caligraphic letters

MacroRenders as
\calA\calZ

Complexity classes

MacroRenders as
\classP
\classNP
\classcoNP
\classBPP
\classRP
\classZPP
\classPSPACE
\classSZK
\classCZK

Common algorithms

MacroRenders as
\Gen
\Enc
\Dec
\Setup
\Query
\Eval
\Invert

Key names

MacroRenders as
\sk
\pk
\vk

Number sets

MacroRenders as
\NN
\ZZ
\FF
\GG

Simulators and state

MacroRenders as
\Sim
\st
\stA
\stB
\stS

Crypto shorthand

MacroRenders as
\bits
\negl
\poly
\PPT
\secpar
\getsr
\Funcs

Advantages and games

MacroRenders as
\Adv
\Expt
\Game
\indcpa
\indcca
\eucma
\sufcma

Primitives

MacroRenders as
\PRF
\RO
\PRG
\PRP
\OT
\SKE
\PKE