PyCryption Lab
Specimens, composers, and benchmarks for encryption research
Welcome to the front desk. PyCryption is an encryption research lab built around composers — harnesses that wrap encryption algorithms with automatic metrics collection, so testing an idea costs minutes instead of an afternoon of scaffolding.
The Wings
On-Ramp
The mathematics track is open: modular arithmetic and matrices/Hill cipher chapters with exercises, plus the level-by-level concept tour from XOR to KEMs.
Composer Tutorial
Build, test, and benchmark a prototype algorithm against production AEADs in a few decorated lines.
ML-KEM (Post-Quantum)
ML-KEM-768 + AES-256-GCM hybrid (FIPS 203) — sender/recipient roles and what the per-message KEM tax actually costs.
Benchmarks
Longitudinal, commit-stamped measurements — seeded payloads, machine fingerprints, and throughput trends across runs.
The Specimen Shelf
Production-grade implementations in lib/algorithms, all rideable through the composer:
| Specimen | Class | Notes |
|---|---|---|
| AES-256-GCM | block-cipher AEAD | the workhorse |
| ChaCha20-Poly1305 | stream AEAD (RFC 8439) | Salsa20’s modern descendant |
| ML-KEM-768 + AES-256-GCM | post-quantum KEM-DEM | fresh encapsulation per message |
| PQ-Wrap [AES → ML-KEM] | layered pipeline | classical + PQ defense in depth |
Layering is first-class: MultiEncryption chains any algorithms and reports each layer’s cost, and a pipeline registers in a ComposerSession like any single specimen — benchmarks, quality analysis, and all.
Running the Lab
uv sync # install dependencies
task # list all lab operations
task test # full test suite
task ride # benchmark the specimen shelf in your terminal
task analyze # output quality panel: entropy, avalanche, ECB canary
task bench:save # persist a seeded, commit-stamped benchmark runEvery result table on this site comes from committed notebook outputs or persisted benchmark records — the site build never executes crypto. Outputs refresh deliberately via task nb:exec, so benchmarks are reviewable in git history like any other change.