Conversation
Entry 13 has the sender count guesses and ask a human before allowing another, so that being probed is visible. It rested on `meta_ok`, a bare claim made by the party being limited. A guesser who could not open the metadata could say `meta_ok` anyway, and the counter never climbed. Nothing readable ever leaked, but the noticing did not hold. `meta_ok` now carries a key confirmation, a fourth HKDF output only a peer holding the same keys can produce. The sender compares it in constant time, inside `crypto/` so a later `==` cannot creep in at a call site. A missing, malformed or wrong one is a failed attempt like any other. Both carriers run the checkpoint. The relay forwards `meta_ok` rather than refusing it, and over the relay the sender reads past the relay's own `sending` and `progress` narration, which would otherwise count as a failed guess. A failure there ends the transfer, since the relay has already burned the session. `ENVELOPE_VERSION` and `DROP_ALPN` both become 2, and a test ties them together. A 0.3.0 peer or relay is refused, and the relay's error now names both versions. The direct path already shipped in v0.2.0, so this is a wire break; the consent work lands under the same unreleased version. Test peers now run a real handshake through `ScriptedTransport::responding`, since no fixed script can prove it holds keys derived from the sender's fresh half. With the comparison forced true, the claims test fails on a bare meta_ok. Recorded as decisions entry 18. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
meta_okkey confirmation plan, all phases, recorded as decision 18. Wire break, so it needs your review. Stacked on #70.The gap
Decision 13 has the sender count failed guesses and ask a human before allowing another, so that being probed is visible. But the peer's "I opened it" was a bare
meta_ok, sent by the very party being limited. A wrong guesser could send it anyway. The attempt counter never climbed and nobody was asked. No data leaked, but the whole point of the prompt was lost. The plan said to land this before the direct path shipped, and the direct path shipped in v0.2.0.The fix
meta_okcarriesconfirmation: hex of a fourth HKDF output (drop/v1/confirm, 32 bytes). The sender checks it withSessionKeys::confirms, which does a length check and thensubtle::ConstantTimeEq. The check lives incrypto/, so a later==can't slip in at a call site.error, a timeout or a disconnect.meta_okverbatim (bounded byMAX_OPAQUE_FIELD_BYTES) instead of failing the session on it. Over the relay, the sender reads past the relay's ownstatus: sendingandprogressframes; on the direct path, any frame other thanmeta_okis still a failure. A failed check over the relay ends the transfer, because the relay has already burned the session.ENVELOPE_VERSIONandDROP_ALPNmove together, and a test fails if they drift. The relay's mismatch error now names both versions.Compatibility
0.4.0 won't interoperate with 0.3.0 peers or relays on either path. Each side refuses with a version message instead of a confusing wrong-code failure. The consent/cancel/status work comes next under the same unreleased version 2, so users take one break.
Tests (217, up from 210)
meta_okpasses; five unproven claims fail on both carriers; relay narration is read past on the relay but not on the direct path; the retry-with-human tests now use a peer running a real SPAKE2 handshake (newScriptedTransport::responding).meta_okis forwarded verbatim, and an oversized confirmation fails the session.meta_ok.Docs:
protocol.md(key schedule, frame tables, checkpoint, version, plus two stale sections saying the direct path was unreachable),security.md, decision 18, plan and checklist.🤖 Generated with Claude Code
https://claude.ai/code/session_01G7Fy45hUvna94cd79WKG8S