Files
quicproquo/docs/src/protocol-layers/overview.md
Christian Nennemann 2e081ead8e chore: rename quicproquo → quicprochat in docs, Docker, CI, and packaging
Rename all project references from quicproquo/qpq to quicprochat/qpc
across documentation, Docker configuration, CI workflows, packaging
scripts, operational configs, and build tooling.

- Docker: crate paths, binary names, user/group, data dirs, env vars
- CI: workflow crate references, binary names, artifact names
- Docs: all markdown files under docs/, SDK READMEs, book.toml
- Packaging: OpenWrt Makefile, init script, UCI config (file renames)
- Scripts: justfile, dev-shell, screenshot, cross-compile, ai_team
- Operations: Prometheus config, alert rules, Grafana dashboard
- Config: .env.example (QPQ_* → QPC_*), CODEOWNERS paths
- Top-level: README, CONTRIBUTING, ROADMAP, CLAUDE.md
2026-03-21 19:14:06 +01:00

5.0 KiB

Protocol Layers Overview

quicprochat composes four distinct protocol layers into a single security stack. Each layer addresses a specific class of threat and delegates everything else to the layers above or below it. No single layer is sufficient on its own; the composition is what delivers end-to-end confidentiality, server authentication, forward secrecy, post-compromise security, and post-quantum resistance.

This page provides a high-level comparison and a suggested reading order. The deep-dive pages that follow contain implementation details drawn directly from the source code.

Layer comparison

Layer Standard / Spec Crate(s) Security Properties
QUIC + TLS 1.3 RFC 9000, RFC 9001 quinn 0.11, rustls 0.23 Transport confidentiality, server authentication, 0-RTT resumption
Protobuf framing Custom binary header + Protocol Buffers quicprochat-rpc, prost 0.13 Typed length-prefixed frames, method dispatch, push events, status codes
MLS RFC 9420 openmls 0.5 Group key agreement, forward secrecy, post-compromise security (PCS)
Hybrid KEM draft-ietf-tls-hybrid-design ml-kem 0.2, x25519-dalek 2 Post-quantum resistance via ML-KEM-768 combined with X25519

How the layers compose

Data flows through the stack from top to bottom on send and from bottom to top on receive:

Application plaintext
       |
       v
  +-----------+
  |    MLS    |   RFC 9420 group encryption (PrivateMessage)
  +-----------+
       |
       v
  +-----------+
  | Protobuf  |   Typed serialisation into Protobuf messages
  | framing   |   + binary header [method_id/event_type][req_id][len]
  +-----------+
       |
       v
  +-----------+
  | QUIC+TLS  |   QUIC transport encryption (TLS 1.3)
  +-----------+
       |
       v
    Network

The Hybrid KEM layer operates orthogonally: it wraps MLS payloads in an outer post-quantum encryption envelope before they enter the transport layer. It is implemented and tested but not yet integrated into the MLS ciphersuite (planned for a future milestone).

Suggested reading order

The pages in this section are ordered to build understanding incrementally:

  1. QUIC + TLS 1.3 -- Start here. This is the transport layer that every client-server connection uses. Understanding QUIC stream multiplexing and the TLS 1.3 handshake is prerequisite to understanding how the Protobuf framing protocol rides on top.

  2. MLS (RFC 9420) -- The core cryptographic innovation. MLS provides the group key agreement that makes quicprochat an E2E encrypted group messenger rather than just a transport-encrypted relay. This is the longest and most detailed page.

  3. Protobuf Framing -- The framing and RPC layer that bridges MLS application data with the transport. Understanding the three frame types (Request, Response, Push), the method ID dispatch table, and status codes is essential for reading the server and client source code.

  4. Hybrid KEM: X25519 + ML-KEM-768 -- The post-quantum encryption layer. Read this last because it builds on concepts from all other layers: key encapsulation (from MLS), wire format conventions (from Protobuf framing), and AEAD encryption.

Cross-cutting concerns

Several topics span multiple layers and have their own dedicated pages elsewhere in this book:

Crate mapping

Each protocol layer maps to one or more workspace crates:

Layer Primary Crate Source File(s)
QUIC + TLS 1.3 quicprochat-server, quicprochat-client Server and client entry points
Protobuf framing quicprochat-rpc src/framing.rs, src/server.rs, src/client.rs
Protobuf types + method IDs quicprochat-proto src/lib.rs (method_ids), proto/qpc/v1/*.proto
MLS quicprochat-core src/group.rs, src/keystore.rs
Hybrid KEM quicprochat-core src/hybrid_kem.rs

For a full crate responsibility breakdown, see Crate Responsibilities.