Universe

Kangaroo is a Typst package for typesetting cryptography.

The notation and style for game-hopping proofs follow that of The Joy of Cryptography.

Usage

The showcase documents all the available functions.

A pair of indistinguishable libraries that illustrate the definition of IND-CPA security in the real-or-random flavor

#import "@preview/kangaroo:0.1.0": *

#let cpa-real = library(title: lib(subject: $Sigma$)[cpa-real])[
  - $K <<- Sigma\.cal(K)$

  - #proc(subr[cpa.enc], args: $M$)
    - $C #hl[$:= Sigma\.algo("Enc")(K, M)$]$
    - return $C$
]

#let cpa-rand = library(title: lib(subject: $Sigma$)[cpa-rand])[
  - #proc(subr[cpa.enc], args: $M$)
    - $C #hl[$<<- Sigma\.cal(C)(|M|)$]$
    - return $C$
]

#chain(cpa-real, indist.is, cpa-rand)