Skip to content

fix(crypto): real Noise ee+es+se key agreement (forward secrecy) — part 1 of N3#65

Draft
gHashTag wants to merge 1 commit into
feat/pipeline-guard-2026-07-10from
feat/crypto-handshake-es-se
Draft

fix(crypto): real Noise ee+es+se key agreement (forward secrecy) — part 1 of N3#65
gHashTag wants to merge 1 commit into
feat/pipeline-guard-2026-07-10from
feat/crypto-handshake-es-se

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Based on #60 (pipeline-guard). First verifiable slice of the crypto fix (RFC #63): the handshake did ee+ss with ss as both es/se (no forward secrecy); now real ee/es/se. Verified honest parties still agree (handshake_and_roundtrip green), 103 tests pass. Identity auth (allow-list), N4, N5 still open per #63. Draft, needs crypto review. phi^2 + phi^-2 = 3

…rt 1 of N3

The handshake computed only ee + ss and passed `ss` in BOTH the es and se slots,
so it had no forward secrecy and did not bind ephemerals into the session.

Fix: NoiseXX.ephemeral becomes a reusable StaticSecret (EphemeralSecret is
consumed by its first diffie_hellman; we need two), and complete_initiator/
responder compute the real ee/es/se so both sides derive the same key. Verified:
handshake_and_roundtrip + independent_handshakes pass, full suite 103 passed.

SCOPE: forward-secrecy half of N3 only. Identity auth (allow-list gating -> the
actual MITM defense), N4 (HELLO MAC), N5 (keystore) remain open per RFC #63 and
need owner sign-off. Based on the pipeline-guard branch (needs #60's build fix).
Draft — needs crypto review. Refs #58, #63.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

phi^2 + phi^-2 = 3
@gHashTag

Copy link
Copy Markdown
Owner Author

Triage — KEEP (stacked on #60)

Verdict: KEEP as legitimate stacked PR.

Cascade dependency: blocks on same regen as docs PRs. build + test (-sim baseline) CI red is due to committed gen/rust/ regressions from t27c optimizer scan bugs (see t27#1461 + t27#1462, tri-net#80).

Merge order: after #60 merges, this can retarget base to main or be squash-merged onto whatever main becomes post-#60. Watch stacked-PR-after-squash-check discipline — if #60 gets squash-merged, this PR needs base retarget or cherry-pick before merge (mirrors earlier #48/#49 lesson).

No action here until #60 lands and CI baseline is green.

phi^2 + phi^-2 = 3

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.

2 participants