9a follow-up: relay-path session rekey (relay-only sessions get no forward-secrecy rotation) #91
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/yip#91
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Milestone 9a (#9, PR #90) rotates each peer's Noise-IK session ~every 120s, but relay-reached peers are deliberately gated out of rekey scheduling (
drive_rekey_schedulereturns early onrelay).Why they're gated out
Task 4 wired rekey completion only into the direct handshake handlers (
handle_handshake_resp/handle_handshake_init), not the relay ones (relayed_handshake_init/relayed_handshake_resp). If relay peers were scheduled for rekey, the handshake would never complete → abandon afterHANDSHAKE_TOTAL_MS→ immediately restart (epoch still past the age threshold) → a continuous ~1 Hz[HandshakeInit]stream forever = wasted relay bandwidth + a constant-cadence DPI fingerprint. Gating relay peers out is the correct minimal fix; it leaves relay-only sessions without forward-secrecy rotation.The work
Wire relay-path rekey completion so relay-reached peers rotate too:
relayed_handshake_init(Established arm) →accept_rekey_initgate +EpochSet::install_next(mirroring the directhandle_rekey_init, incl. the idempotent ephemeral-keyed cached-resp resend added in the 9a Critical fix — relay reordering makes idempotency more important here).relayed_handshake_resp(currently drops anything against a non-Handshakingpeer) →EpochSet::promote_from_rekeyfor an Established peer with a rekey in flight.drive_rekey_scheduleonce completion is wired.dst-placeholder (server_addr()) + reordering semantics that differ from the direct path.Deferred from 9a to keep that milestone focused on the direct/punched path (the common case). See PR #90.