Engineering Notes
In-depth technical articles on how KSP was designed and built.
Designing KSP from Scratch
Why build a protocol from scratch when TLS exists? A walk through the design decisions behind KSP — binary framing, AEAD selection, and the layered architecture.
How the KSP Handshake Works
A deep dive into KSP's 2 round-trip handshake: X25519 ephemeral key exchange, Ed25519 binding signatures, HKDF key derivation, and transcript verification.
Replay Protection: The Sliding Window Algorithm
How KSP's 1024-bit sliding window prevents replay attacks. The algorithm, edge cases, and why we chose a bitmap over a simple counter.
Packet Layout and Binary Framing
Every byte of the KSP 48-byte header explained. Why big-endian, why fixed-width, and how the wire format enables zero-copy parsing.
Benchmark Methodology
How we measure KSP performance with Criterion.rs. Statistical rigor, warmup, outlier rejection, and what throughput numbers actually mean.