Home  /  Code

Runnable, not pseudocode.

Every implementation chapter ships working code. Browse it in the interactive viewer, or download the files and run them yourself.

01

Volume I — settlement

Ch. 14 · Python

DVP settlement simulation

A complete delivery-versus-payment settlement engine: accounts, instructions, atomic transfers and fails — the mechanics of Chapter 14, executable.

Ch. 15 · Solidity

DVP smart contract

The on-chain counterpart: an atomic DVP contract where securities and cash legs either both complete or both revert.

02

Volume II — post-quantum

Ch. 15 · Python

ML-DSA signing

FIPS 204 lattice signatures in practice — key generation, signing and verification for settlement instructions.

Ch. 15 · Python

ML-KEM key exchange

FIPS 203 key encapsulation demonstrated end to end — the quantum-safe replacement for ECDH channels.

Ch. 15 · Python

Hybrid TLS

The migration bridge: classical + post-quantum key exchange combined, deployable unilaterally today.

Ch. 15 · Python

Post-quantum settlement ledger

A minimal quantum-safe settlement ledger built from scratch — the capstone of Volume II, in one readable file.

Prefer to read it annotated?

The interactive viewer presents every file with syntax highlighting and chapter context.