Skip to content

Port the QUIC layer to noq-proto - #25

Merged
lann merged 1 commit into
mainfrom
port-noq-proto
Aug 6, 2026
Merged

Port the QUIC layer to noq-proto#25
lann merged 1 commit into
mainfrom
port-noq-proto

Conversation

@lann

@lann lann commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Executes the noq migration for this repository (the iroh-side port follows at the next pin bump; see polymorph-iroh#14 for the evaluation this implements).

Why noq-proto deletes code here. noq-proto's rustls feature is provider-agnostic — initial_suite_from_provider reads the initial suite (and its quic slot, which our suites.rs fills) from the config's own provider, and the retry integrity tag is computed with RustCrypto aes-gcm — so the 518-line session.rs we re-hosted from quinn-proto's ring/aws-lc-gated module is deleted outright; QuicClientConfig/QuicServerConfig/HandshakeData re-export from upstream. This resolves the "provider-agnostic glue" half of #11 by adoption; the packet-protection upstreaming half (to rustls-rustcrypto) stands.

What's new in-tree. noq routes every packet through rustls's multipath _for_path methods (default impls fail), so packet.rs now implements the draft-ietf-quic-multipath-11 nonce — IV XOR (path_id ‖ pn), reducing exactly to RFC 9001 at path 0 — pinned to picoquic's multipath_aead_test vector (the same KAT rustls's own providers pin) plus path-0 equivalence and cross-path rejection tests. TokenKey moves to the reshaped HandshakeTokenKey trait (seal/open under a u128 token nonce), mirroring noq's ring backend construction. Pump call sites track the endpoint API (Endpoint::new 3-arg, FourTuple, NonZeroUsize).

Timing posture. Unchanged by review and by gate: packet/header protection classes are as before; the retry tag is secret-free and now upstream's aes-gcm (0.10/aes 0.8, fixsliced) — the audit scan covers it in the release artifact.

Gates: just check (workspace tests incl. the new multipath KATs), just smoke-quic, just audit (no AES table constants, 2.97 MB scanned), just interop-quic (against quic-go over real UDP, both directions). just bench not re-captured; the committed results predate the port and say so in their provenance stamps.

noq-proto (iroh 1.0's quinn fork, crates.io 1.1) ships the one thing the
quinn lineage made us re-host: its rustls feature is provider-agnostic —
the initial suite comes from the config's provider and the retry tag
uses RustCrypto aes-gcm — so session.rs (518 lines adapted from
quinn-proto's feature-gated glue) is deleted and QuicClientConfig,
QuicServerConfig, and HandshakeData are re-exported from upstream.

What changes in-tree:

- packet.rs implements the multipath _for_path methods
  (draft-ietf-quic-multipath-11 nonce: IV XOR path_id||pn; path 0 is
  RFC 9001), which noq routes every packet through; pinned to
  picoquic's multipath_aead_test vector, the same KAT rustls's
  providers pin.
- keys.rs: TokenKey moves to the reshaped HandshakeTokenKey trait
  (seal/open under a u128 token nonce), mirroring noq's ring backend.
  ResetKey is unchanged.
- The pumps (handshake tests, quic-loopback driver, quic-native-bench)
  track the endpoint API: Endpoint::new lost its rng-seed parameter,
  handle() takes a FourTuple, poll_transmit takes NonZeroUsize.
- timing-lab's token surface follows the new trait; docs and recipe
  comments say noq where they mean the implementation and QUIC where
  they mean the function.

Gates: just check (RFC 9001 + picoquic multipath vectors, profile
pinning), smoke-quic, audit (no AES tables — noq's retry-tag aes-gcm
included in the scan), and interop-quic against quic-go over real UDP
in both directions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant