ilusm.dev

pqc

Post-quantum cryptography (ML-KEM, ML-DSA, SLH-DSA).

Load with: use pqc

Quick example

use pqc

result = kemkg("value")
prn(result)

Functions

ML-KEM (Kyber)

kemkg(ps)

Performs the operation. Takes ps.

kemen(pk)

Encodes. Takes pk.

kemde(ct, sk)

Decodes. Takes ct, sk.

ML-DSA (Dilithium)

dsakg(ps)

Performs the operation. Takes ps.

dsasi(m, sk)

Performs the operation. Takes m, sk.

dsave(sig, m, pk)

Performs the operation. Takes sig, m, pk.

SLH-DSA (SPHINCS+)

slhkg(ps)

Performs the operation. Takes ps.

slhsi(m, sk)

Performs the operation. Takes m, sk.

slhve(sig, m, pk)

Performs the operation. Takes sig, m, pk.

Hybrid classical-PQC

hybke(ckem, pkem)

Performs the operation. Takes ckem, pkem.

hybsi(csig, psig)

Performs the operation. Takes csig, psig.

hybve(hsig, m, cpk, ppk)

Performs the operation. Takes hsig, m, cpk, ppk.

Migration helpers

migke(ck, ps)

Performs the operation. Takes ck, ps.

Algorithm identifiers

algs()

Performs the operation.

Performance comparison

perfb(it)

Performs the operation. Takes it.

PQC-enabled TLS

tlsne(h, p, en)

Creates a new instance. Takes h, p, en.

XMSS (hash-based signatures)

xmssk(h)

Performs the operation. Takes h.

xmsss(m, sk)

Performs the operation. Takes m, sk.

xmssv(sig, m, pk)

Performs the operation. Takes sig, m, pk.

LMS (Leighton-Micali)

lmskg(lvls)

Performs the operation. Takes lvls.

lmssi(m, sk)

Performs the operation. Takes m, sk.

lmsve(sig, m, pk)

Performs the operation. Takes sig, m, pk.

FrodoKEM (conservative)

frodo()

Performs the operation.

frodo1(pk)

Performs the operation. Takes pk.

frodo2(ct, sk)

Performs the operation. Takes ct, sk.

BIKE/HQC (code-based)

bikek()

Performs the operation.

bikee(pk)

Performs the operation. Takes pk.

biked(ct, sk)

Performs the operation. Takes ct, sk.

Security estimation

secbi(a)

Performs the operation. Takes a.

Notes

  • Post-quantum cryptography - Kyber, Dilithium, SPHINCS+.