k

kangaroo

@preview

Cryptographic notation and game-hopping proofs in the style of The Joy of Cryptography.

v0.1.0
MIT

Package Information

Last Updated
Minimum Typst Version
0.13.0
Categories
components
Disciplines
computer-sciencemathematics

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/kangaroo:0.1.0

2. Import in your Typst file

Add this to your .typ file:

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

Version History

0.1.00.13.0
0aae4b46e9bb...

Kangaroo

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)