Fix verified status to not depend on DTLS fingerprint hash matching
hello's fingerprint-bound signature was the actual gate for `verified` on both the CLI and PWA, and dtlsFP() only ever parses sha-256 fingerprints. Different WebRTC stacks report the DTLS cert hash under different algorithms (WebKit: sha-512, pion/Chromium: sha-256), so a legitimate cross-stack peer could never produce a verifiable hello — degrading to permanently "unverified", or on the Go side, never sending hello at all. Matches an interop gotcha waste-go's yaw2 docs recently called out explicitly. Real authentication already happens over the sealed signaling channel during the ekey exchange (crypto.Verify), same as waste-go. Added peerAuthed to the Go session (mirroring the PWA's existing field), set once a sealed box from the peer opens successfully, and gate `verified` on peerAuthed + hello.id matching instead. The fingerprint signature is still sent/checked when both sides have a parseable fingerprint, but only logged on mismatch — never blocking. No behavior change for today's pion<->Chromium pairings (both sha-256). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,9 +53,9 @@ Each device generates an **Ed25519 keypair** on first run. The hex-encoded publi
|
||||
|
||||
Pairing uses [yaw/2.1](PROTOCOL.md) forward-secret signaling, trimmed for flit's 1:1 ephemeral use case:
|
||||
|
||||
1. Connecting peers exchange **ephemeral X25519 keys** (`ekey`) signed with their Ed25519 identity keys — providing forward secrecy for the signaling channel.
|
||||
2. Once the WebRTC data channel opens, each side sends a **`hello`** message containing their identity and a signature over a known prefix. This binds the WebRTC DTLS fingerprint to the Ed25519 identity, confirming "the device on the other end is who the QR said it was."
|
||||
3. File data flows over the WebRTC data channel — encrypted by DTLS, with the identity-confirmed binding from step 2.
|
||||
1. Connecting peers exchange **ephemeral X25519 keys** (`ekey`) signed with their Ed25519 identity keys over the sealed signaling channel — this is what actually authenticates "the device on the other end is who the QR said it was."
|
||||
2. Once the WebRTC data channel opens, each side sends a **`hello`** message confirming its identity, plus a best-effort signature binding it to the session's DTLS fingerprint when both sides report that fingerprint under a hash algorithm flit can parse. `verified` status rests on step 1 (the authenticated sealed exchange) and `hello.id` matching it — not on the fingerprint signature, which different WebRTC stacks may report under different hash algorithms (WebKit: sha-512, Chromium/pion: sha-256) and so can't be relied on to match even between two legitimate peers.
|
||||
3. File data flows over the WebRTC data channel — encrypted by DTLS, with the identity already confirmed by step 1.
|
||||
|
||||
The anchor never sees plaintext message content — it only routes sealed (encrypted) blobs by peer id and hashed room name.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user