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
\classIP
\classAM
\classMA
\classcoAM
\classcoRP
\classFP
\classPP
\classPpoly
\classEXP
\classTFNP
\classsharpP
\classBQP
\classQMA
\classQCMA
\classQIP
\classQSZK

Common algorithms

MacroRenders as
\KeyGen
\Gen
\GrGen
\Enc
\Dec
\Encap
\Decap
\Combine
\Setup
\Query
\Eval
\Invert
\Sign
\Vrfy
\Prove
\Com
\Open
\Share
\Recon
\Tag
\Answer
\Decode
\Extract
\Delegate
\KeyAgg
\Agg
\AggVrfy
\PopProve
\PopVrfy
\Acc
\Out
\GData
\GProg
\GInput
\GEval

Key names

MacroRenders as
\sk
\pk
\vk
\msk
\mpk
\pp
\crs
\td

Number sets

MacroRenders as
\NN
\ZZ
\FF
\GG

Named sets

MacroRenders asNotes
\QRSet of quadratic residues (QR assumption)
\JJacobi set (elements with Jacobi symbol 1)
\KSpKey space of an oblivious RAM
\StSpState space of an oblivious RAM
\RdOpsRead operations on an array (oblivious RAM)
\WrOpsWrite operations on an array (oblivious RAM)
\OpsRead and write operations (oblivious RAM)

Simulators and state

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

Crypto shorthand

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

Advantages and games

MacroRenders as
\Adv
\Expt
\Game
\indcpa
\indcca
\ufcma
\eufcma
\sufcma

Primitives

MacroRenders as
\PRF
\RO
\PRG
\PRP
\OT
\SKE
\PKE
\DS
\MAC
\PIR
\hash
\IBE
\HIBE
\ABE