Public: anyone can read this; the crew can change it.

Post-quantum: the game agent's channel uses a hybrid key exchange #18074

opened this in answer to

Merged 9h 21m ago, live in production

New game boxes now boot on Ubuntu 26.04 and report the TLS group they negotiate with the forge. I did not run agent.sh and cloud-init on a real 26.04 box, so the "done when" check is not met. The new tests use a stub openssl, and the agent tests ran locally.

Notes

opened this

New game boxes now boot on Ubuntu 26.04 and report the TLS group they negotiate with the forge. I did not run agent.sh and cloud-init on a real 26.04 box, so the "done when" check is not met. The new tests use a stub openssl, and the agent tests ran locally. The forge's full check hasn't returned a verdict yet.

What changed

  • Image choice. I chose the image over a helper. OpenSSL 3.5 on 26.04 offers X25519MLKEM768 to the forge, and the image gives that with no new code or dependency on the box. DigitalOcean (ubuntu-26-04-x64), Hetzner (ubuntu-26.04) and OVH (Ubuntu 26.04) use it only for rows with boots: "game". Forge machines stay on 24.04, and the live mc box is untouched. If OVH lists no 26.04 image, creating the box fails with that message instead of falling back.
  • Agent check-in. src/games/agent.sh runs tls_group, which reads the negotiated group with openssl s_client against the forge's host. It caches the result for an hour in .tls.group and logs TLS key exchange with the forge: <group>. The result goes out as diag.tlsGroup in every sync.
  • Where the forge shows it. src/games/diag.ts adds "Key exchange with the forge" to boxTails. A group containing MLKEM or Kyber reads "(post-quantum hybrid)", and any other reads "(classical)". The page and the terminal both read boxTails, so both show it. A box that cannot read its group, or an older agent, shows no line, and nothing is refused.
  • Docs. docs/features/game-box.md has the image change and a "Key exchange" section.

Tests

  • test/game-diag.test.ts covers the hybrid word, the classical word, and an unreadable group.
  • test/pinned-harden.test.ts checks the image for a game box and for a forge on DigitalOcean and Hetzner. OVH has no test.
  • bun x tsc --noEmit and the gate are clean.

Not done

  • Provider slugs. I could not check the 26.04 slugs against the providers from here. If a provider has a different slug, box creation will fail loudly. Check them first.
  • OpenSSL 3.0 reads classical. On 24.04 the probe reads the "Server Temp Key" line and reports X25519.
  • Edge case. The probe uses openssl, while the agent's curl does the real syncs. They share the box's OpenSSL, so they should negotiate the same group.
  • Moving the live mc box is out of scope, as the issue says.

To try

  • Make a new game box and open /games/<box>. Under the run log, "Key exchange with the forge" should read X25519MLKEM768 (post-quantum hybrid).
  • In the terminal, open Games, pick the box, and press b.

I added no commit line with a Looks: path or No look: reason (the gate did not ask), and no review block (no src/web change).

Closes #18032

2 earlier comments
commented

New game boxes now boot on Ubuntu 26.04 and report the TLS group they negotiate with the forge. I did not run agent.sh and cloud-init on a real 26.04 box, so the "done when" check is not met. The new tests use a stub openssl, and the agent tests ran locally. The forge's full check hasn't returned a verdict yet.

What changed

  • Image choice. I chose the image over a helper. OpenSSL 3.5 on 26.04 offers X25519MLKEM768 to the forge, and the image gives that with no new code or dependency on the box. DigitalOcean (ubuntu-26-04-x64), Hetzner (ubuntu-26.04) and OVH (Ubuntu 26.04) use it only for rows with boots: "game". Forge machines stay on 24.04, and the live mc box is untouched. If OVH lists no 26.04 image, creating the box fails with that message instead of falling back.
  • Agent check-in. src/games/agent.sh runs tls_group, which reads the negotiated group with openssl s_client against the forge's host. It caches the result for an hour in .tls.group and logs TLS key exchange with the forge: <group>. The result goes out as diag.tlsGroup in every sync.
  • Where the forge shows it. src/games/diag.ts adds "Key exchange with the forge" to boxTails. A group containing MLKEM or Kyber reads "(post-quantum hybrid)", and any other reads "(classical)". The page and the terminal both read boxTails, so both show it. A box that cannot read its group, or an older agent, shows no line, and nothing is refused.
  • Docs. docs/features/game-box.md has the image change and a "Key exchange" section.

Tests

  • test/game-diag.test.ts covers the hybrid word, the classical word, and an unreadable group.
  • test/pinned-harden.test.ts checks the image for a game box and for a forge on DigitalOcean and Hetzner. OVH has no test.
  • bun x tsc --noEmit and the gate are clean.

Not done

  • Provider slugs. I could not check the 26.04 slugs against the providers from here. If a provider has a different slug, box creation will fail loudly. Check them first.
  • OpenSSL 3.0 reads classical. On 24.04 the probe reads the "Server Temp Key" line and reports X25519.
  • Edge case. The probe uses openssl, while the agent's curl does the real syncs. They share the box's OpenSSL, so they should negotiate the same group.
  • Moving the live mc box is out of scope, as the issue says.

To try

  • Make a new game box and open /games/<box>. Under the run log, "Key exchange with the forge" should read X25519MLKEM768 (post-quantum hybrid).
  • In the terminal, open Games, pick the box, and press b.

I added no commit line with a Looks: path or No look: reason (the gate did not ask), and no review block (no src/web change).

commented

Items 3, 4 and 5 are fixed and pushed. Items 1 and 2 are not done: I can't run a real box or query a provider's image list from this sandbox.

Changed

  • TLS probe (3): I ran OpenSSL 3.5.9 s_client -brief against local s_server instances. The output was not what the sed assumed:
    • A hybrid group prints Negotiated TLS1.3 group: X25519MLKEM768.
    • A classical group prints Peer Temp Key: X25519, 253 bits, not Server Temp Key. Forcing P-256 prints Peer Temp Key: ECDH, prime256v1, 256 bits.
    • tls_group in src/games/agent.sh now reads Negotiated…, Peer Temp Key and Server Temp Key. It drops the , N bits suffix, so a classical box shows X25519 (classical) or ECDH-prime256v1 (classical). If -brief prints none of these, it retries without -brief and reads the same lines.
    • test/game-diag.test.ts now feeds those real lines.
  • OVH test (4): test/pinned-harden.test.ts has an OVH case. A forge picks Ubuntu 24.04 and a game box picks Ubuntu 26.04. When only 24.04 is listed, it throws "OVHcloud lists no Ubuntu 26.04 image in …" and creates nothing.
  • Docs (5): docs/features/game-box.md now says a game box needs a 26.04 image and fails when the provider lists none.
  • Checks: The two touched test files pass (80 tests). tsc and the gate are clean, and the commit carries No door: because no page, action, route or tool changed.

Not done

  • OpenSSL 3.0: Only 3.5 exists here. The Server Temp Key label for 3.0 comes from my knowledge of its output, not from a run, so the retry without -brief is the safety net.
  • Real 26.04 box (1): This sandbox has no cloud credentials or network to any provider. Please run a game box on 26.04 and confirm the following:
    • the boot reaches the agent
    • Docker, compose and jq install from Ubuntu's packages
    • the first sync arrives
    • the box shows X25519MLKEM768 (post-quantum hybrid)
  • Provider slugs (2): I haven't checked ubuntu-26-04-x64 (DigitalOcean), ubuntu-26.04 (Hetzner) or Ubuntu 26.04 (OVH) against the providers' image lists. They are still unconfirmed. A wrong one fails every new game box on that provider, so please check them against the lists.
  • Test run: I didn't run the whole suite. The forge's check does that.
commented

Left #18032 open: 1 unticked item remain (agent.sh and cloud-init are run end to end on that image before merging (the repository's rule for box scripts), and the agent logs the group it negotiated at check-in, so the forge shows it per box.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs