Hardware.ChiMesh/rfc/0001-secured-channel-psk
RFC 0001 — Secured channel-0 PSK across the mesh
Problem
provision-node.ps1 writes channel-0 name (ChiMeshTest) but leaves the PSK at the Meshtastic default. A default-PSK channel is effectively open: anyone within RF range running stock Meshtastic on the same name/region can read and inject traffic. For a throwaway proof run this is acceptable; for any node left deployed it is not. We need a way to generate one PSK and apply it identically to all proof nodes.
Options compared
- Per-node manual
--ch-set psk— flexible, but error-prone: a single mistyped/mismatched PSK silently partitions the mesh (nodes hear each other but can't decrypt). - Generate once, distribute via the channel URL/QR — Meshtastic's native sharing; copy the Primary channel URL from node A and import it on B and C. Low typo risk, app-driven.
- Scripted: generate a random PSK once, loop
provision-node.ps1with a-Pskparameter — repeatable, scriptable for ≥3 nodes, fits the existing idempotent-provisioner pattern.
Decision
Adopt Option 3 as the default, with Option 2 documented as the manual fallback. Add an optional -Psk parameter to provision-node.ps1 (generate one with meshtastic --ch-set psk random on the first node, read it back, then pass the same value to the rest). Keep the default-PSK behavior only behind an explicit -Insecure / test flag so a forgotten PSK can't silently ship.
What NOT to do
- Do NOT hard-code or commit a PSK — see HOUSE-LAW-3.
- Do NOT set different PSKs per node and expect a mesh — mismatched PSKs partition silently.
- Do NOT change the channel name as a security measure; name is not a secret.
Phased plan (with risk)
- Add
-Psk(optional) +-Insecure(explicit) params toprovision-node.ps1; default refuses to leave the default PSK unless-Insecure. (Risk: behavior change for existing test scripts — gate behind the flag.) — touches app tooling; out of scope for the Codex docs pass. - Document the generate-once-distribute flow in
README.md§05. - Verify with
healthcheck-mesh.ps1that all nodes share a non-default channel and still peer.
Graduates into
- BIBLE §7 Active frontier (already pointed here) and a new law if PSK becomes mandatory.
- USER_STORIES: a new Epic B story "provision a secured channel", citing the healthcheck.