WP34: The network stack

State: Landed · Done: 24 of 24 · Design note: docs/wp34-network-stack.md

Stages

  • N1, N2, N3, N5, N6: exported enums and aliases, byte plumbing, clock and entropy and signals, nish:net, constant-time builtins
  • N9: pooled state, a 100,000-session soak flat at 0 bytes
  • K1 to K6: SHA-2, HMAC and HKDF, ChaCha20-Poly1305, AES-GCM, X25519, P-256 ECDSA, DER, PEM and X.509
  • Key-holding structs on nish:secret (#430)
  • T1, T2: the TLS 1.3 server and TLS over TCP
  • H1, H2: the HTTP/1.1 server and WebSocket; HPACK and HTTP/2, h2spec 146 of 146
  • Q1 to Q4: QUIC packets, connections, loss recovery, streams and datagrams, ECN, NAT rebinding followed
  • R1, R2: QPACK and HTTP/3; WebTransport
  • A1: the relay in Nish, examples/relay/, with the loopback suite (#489) and the interop job (#487)
  • K2, K3, K4: the remaining constant-time disassembly (ChaCha rounds, the bitsliced AES fallback, the X25519 ladder) (#1464); AEAD-4 is narrowed: the AES kernels clear the vector registers they used (#1510), and the --cpu flag is recorded as not choosing the kernel path, since no x86-64 level guarantees AES-NI and PCLMULQDQ
  • K5: a safegcd field inversion and a windowed verify (#1469)
  • K5: field arithmetic on 64-bit limbs, a scalar safegcd for verify, and a cached table for G (the scalar arithmetic on 64-bit limbs is a recorded follow-up; #1516, #1518)
  • T1: secp256r1 key shares on the server, direct and through HelloRetryRequest, and the TLS-4 carrier idle timeout (#1449, #1479)
  • T2, H1, H2: curl --http1.1, Autobahn and Chrome over HTTP/1.1 in the interop job (WP39 G1, #1437); the lingering close, the HTTP/2 SETTINGS and idle timeouts and WebTransport's session clock (WP39 G2, #1454); H3-5, an HTTP/3 server clock, and WebTransport's rate cap kept as drop-and-count (WT-2) (#1513)
  • Q3: the interop runner's goodput and crosstraffic cases, both passing for quic-go and ngtcp2 (#1477)
  • A1: QUIC DPLPMTUD, so DATA down is no longer held to 1,164 bytes (#1458)
  • Phase two, N7: atan2, tan, hypot, sign, imul and f32ToBits, and JavaScript's -0 and NaN from Math.round, min and max (#847)
  • Phase two, N8 and the host half of N9: host imports on wasm and a module the page drives every frame, built as WP50
  • Phase two, N9 for the game server: memory reclaimed per match, built as WP46's regions
  • Phase two, N10: sort with a comparator (#1108), and split and toFixed in nish/text (#1361, #1396)
  • Phase two, N11: typed JSON, jsonDecode and jsonEncode over nish/json-tokenizer and JsonWriter (#571, #572, #573)
  • Phase two, N12: spawn, kill, waitPid, availableParallelism and totalMemory in nish:process
  • Phase two, N13: the TLS 1.3 client (#1018), and Postgres over TLS in the carrier (#1446)
  • Phase two, N14: discriminated unions (#682, #716, #798)

Next

Nothing of WP34 is open. The HTTP server's remaining work is WP39's, on its own page.

Not planned

WebTransport over HTTP/2, 0-RTT, client-started migration.

All work packages