Files
fips/docs/reference
Johnathan Corgan b549551828 Never destroy an established session on an unauthenticated setup message
A session setup message naming an already-established peer replaced that
peer's session whenever node.rekey.enabled was false: the handler ran a
fresh responder handshake and overwrote the entry, discarding the live
keys. The message carries no authenticator and its source address is an
envelope field, so anyone able to reach a node could name an established
peer, take that session down, and hold it down by repeating the message.

The established case now always arms the handshake alongside the running
session and adopts the new keys only after a msg3 whose authenticated
static key matches the key the session was opened with, which is the
check the rekey path already applied. A peer that genuinely restarted
still re-establishes, and a forged setup leaves the session carrying
traffic. This changes no wire format and adds no configuration: a node
with rekey disabled already answered such a message, it simply destroyed
the session afterwards.

Two adjacent gates come off the same flag. The drain sweep and the
cut-over that retires an old key epoch now run whether or not periodic
rekey is enabled, since a node with rekey disabled that adopted new keys
otherwise held the superseded ones for the life of the session. And a
rekey armed by a peer's setup message is now abandoned if the matching
msg3 never arrives, rather than persisting for the life of the session; a
stuck one made the node treat a later genuine setup message as a
simultaneous initiation and drop it, which would have turned the fix
above into a lasting block on re-establishment for roughly half of peer
pairs.

Count the forged setups refused and the rekey state abandoned

Refusing to replace an established session, and expiring rekey state a
peer armed and never completed, were both silent. Neither an operator nor
the status pane could see a node being held under a stream of forged setup
messages. Count both, and record the refusal through the existing typed
rejection machinery rather than a new surface.

Expire an abandoned handshake without discarding a completed epoch

The responder-side expiry treated a pending session as stale rekey state
and dropped it. But a responder-side pending exists only because a msg3
carrying the session's authenticated peer key was accepted, and the peer
promotes that epoch on a timer gated on nothing the responder does. So the
keys being dropped are not material the peer abandoned; they are the epoch
the peer has already moved to, after which its frames are undecryptable and
the reverse direction stays dead across repeated rekey attempts.

The defect the expiry was closing lives in the armed-handshake state, not
in the pending keys: a stuck one makes a later genuine setup message read
as a simultaneous initiation and be dropped. So bound the veto rather than
the keys. Only the armed handshake expires now, and it does so without
clearing a completed pending beside it.
2026-08-13 21:24:37 +00:00
..

Reference

Information-oriented technical descriptions for lookup on demand. Reference content describes what is: wire formats, configuration keys, command-line flags, control-socket commands, default values, file paths, exit codes. It is consulted, not read end-to-end.

Reference is austere by design: minimal narrative, no opinions, no guidance on when to use a feature. The "why" lives in design/; the "how do I accomplish X" lives in how-to/.

Available Reference

Document Scope
wire-formats.md All FMP and FSP message byte layouts, encapsulation walkthrough
configuration.md Full YAML configuration reference for the daemon and gateway
security.md nftables baseline, peer ACL, cryptographic primitives, rekey defaults, threat-resistance matrix
nostr-events.md Kind 37195 advert, Kind 21059 traversal signaling, Kind 10050 inbox relays
transports.md Per-transport statistics counter inventory
control-socket.md Line-delimited JSON control protocol for the daemon and gateway
cli-fips.md fips daemon CLI: options, exit codes, environment, files
cli-fipsctl.md fipsctl control-client: subcommands, options, exit codes
cli-fipstop.md fipstop live-status TUI: tabs, keybindings
cli-fips-gateway.md fips-gateway service CLI: options, exit codes, files