Repository navigation
SendBeam v1.5 — Trusted Device Mesh & Automation
SendBeam v1.5 — Release Gate
The v1.5 milestone (Trusted Device Mesh & Automation: persistent pairwise device identity, mutual SPAKE2-authenticated pairing, forward-secret sendbeam/2 trusted session protocol, epoch-rotated privacy-preserving presence & LAN discovery, automated CLI/desktop transfer operations, scoped auto-accept policy containment, and browser IndexedDB participation with 9-vector adversarial attack matrix containment) gates release on the checks below, each verified against merged main.
Evidence is a deterministic unit/integration test, a verified cross-language vector fixture, or a cryptographic testbed; every transfer across the matrix terminates with an authenticated session transcript and cryptographically verified whole-file SHA-256 digest comparison.
1. Gate Checks
| # | Requirement | Result | Evidence |
|---|---|---|---|
| 1 | One-Time Authenticated Pairing Ceremony Pair once through an authenticated SPAKE2 ceremony with domain-separated Ed25519 signatures, canonical public key ordering, and mutually confirmed pair credentials ( k_pair). |
PASS | Go wire codec and handshake engine in packages/wire/pairing.go, pairing_test.go, and packages/engine/trust/pairing_coordinator.go (TestPairingCoordinator_InitiatorResponderHandshake, TestPairingCoordinator_SignatureVerificationFailureFailsClosed, TestPairingCoordinator_DeviceIDMismatchRejects). TypeScript in packages/protocol/src/pairing.ts and pairing.test.ts. Deterministic cross-language test vectors in packages/wire/testdata/pairing-vectors.json. |
| 2 | Repeat Cryptographic Connection Without Human Code (sendbeam/2)Repeat connections between paired devices authenticate cryptographically via forward-secret ephemeral ECDH ( SessionMaster, k_i2r, k_r2i) and domain-separated challenges with replay and clock skew protection. |
PASS | Go wire protocol and session coordinator in packages/wire/trusted_auth.go, trusted_auth_test.go, and packages/engine/trust/trusted_session.go (TestTrustedSession_InitiatorResponderMutualAuth, TestTrustedSession_ClockSkewRejection, TestTrustedSession_ReplayProtection, TestTrustedSession_RevokedPeerRefusal). TypeScript in packages/protocol/src/trusted-auth.ts and trusted-auth.test.ts. Deterministic vectors in packages/wire/testdata/trusted-session-vectors.json. |
| 3 | CLI Automation & Background Receiver Daemonsendbeam send <paths...> @<device> enables single-command sending to paired devices; sendbeam listen runs an automated background daemon with safe auto-accept policy enforcement; sendbeam devices, pair, and unpair manage mesh state with stable --json output. |
PASS | CLI commands in apps/cli/cmd/sendbeam (devices.go, pair.go, unpair.go, transfers.go, listen.go, trust_config.go). Suite coverage in devices_test.go, pair_test.go, unpair_test.go, transfers_test.go, listen_test.go, and trust_config_test.go (TestListen_AutoAcceptEnforcesDestDirContainment, TestPair_InteractiveAndNonTTY, TestDevices_JsonOutputFormat). Documented in docs/trust-model.md Section 9. |
| 4 | Privacy-Preserving Remote Presence & Blinded LAN Discovery Devices discover paired peers across the Internet via 15-minute epoch-rotated blind rendezvous handles (`HMAC(k_pair, "sendbeam/2 rendezvous-handle:" |
epoch)`), and on local subnets via blinded UDP multicast beacons without leaking device identity or IP addresses. | |
| 5 | Native Desktop Device Manager & System Integration Desktop UI provides honest online/offline/unknown presence tracking, pairing ceremony flow, device rename, unpair/purge controls, and scoped auto-accept policy management backed strictly by the Go engine. |
PASS | Desktop Go DeviceService in apps/desktop/internal/engine/device_service.go and device_service_test.go (TestDeviceService_ListDevices, TestDeviceService_UpdatePolicy, TestDeviceService_RevokeAndPurge). Desktop UI in apps/web/src/lib/trust/DevicesModal.svelte, IncomingTransferModal.svelte, and TypeScript bridge apps/web/src/lib/trust/devices.ts. Trust store and private keys remain strictly in Go host memory (0600 permissions), never exposed to WebView state. |
| 6 | Persistent Browser Trust & Origin Isolation Supported browsers participate in persistent device trust using origin-scoped IndexedDB storage ( sendbeam-trust, sendbeam-secrets, sendbeam-identity) and WebCrypto subtle; unsupported browsers are cleanly capability-gated. |
PASS | Browser stores in packages/protocol/src (capability.ts, indexeddb-trust-store.ts, indexeddb-secret-store.ts, browser-identity.ts). Storage operations and capability gating verified in packages/protocol/src/indexeddb-stores.test.ts (TestIndexedDBTrustStore_CRUD, TestIndexedDBSecretStore_ResolveAndPurge, TestCapability_Gating). Clearing browser site data predictably resets local trust state without polluting other origins. |
| 7 | 9-Vector Adversarial Attack Matrix Containment System withstands 9 distinct adversarial attack vectors with zero security bypass or trust leakage. |
PASS | Complete 9-vector security testbeds in Go (packages/wire/attack_matrix_test.go, packages/engine/trust/attack_matrix_test.go) and TypeScript (packages/protocol/src/attack-matrix.test.ts):1. Stolen trust DB vs stolen key: Public key mismatch vs Device ID fails closed. 2. Replay attack & cloned profile: Nonce uniqueness, timestamp freshness window, and transcript binding reject replays. 3. Malicious server MITM: Ephemeral key substitution fails mutual signature verification. 4. Presence beacon replay: Stale epoch rejection after 15-min window. 5. Display name / label spoofing: Local aliases strictly isolated from cryptographic verification. 6. Downgrade attack: Capability stripping fails closed to abort, never unauthenticated transfer. 7. Stale / revoked pair credential: Revoked pair keys fail auth handshake immediately. 8. Auto-accept path escape: Traversal ( ..) and absolute path escapes are contained within target directory.9. One-time transfer isolation: Standard room transfers never pollute persistent trust stores. |
| 8 | Opt-In, Path-Contained, Disk-Safe Auto-Accept Policy Automatic file acceptance is strictly opt-in per trusted device, requiring an absolute destination directory, rejecting root ( /), enforcing file size caps, and validating disk space prior to reception. |
PASS | Policy models and validation in packages/wire/trust_record.go (TrustPolicy.Validate(), NormalizeTransferPath()), packages/engine/trust/attack_matrix_test.go (TestAttackMatrix_Engine/Vector 3), and CLI listen_test.go. Receiver verifies path containment strictly before creating files. |
| 9 | Full Backward Compatibility with One-Time Transfers Standard ephemeral one-time room-code transfers ( sendbeam/1) continue to work seamlessly without accounts, device pairing, or persistent state. |
PASS | Ephemeral SPAKE2 transfers pass across the entire matrix (apps/web/src/App.test.ts, packages/engine/transfer/driver_test.go, packages/wire/transfer_loopback_test.go). UI clearly delineates between one-time room transfers and paired device operations. |
2. Differentiation Analysis: How SendBeam v1.5 Leads
| Dimension | SendBeam v1.5 | PairDrop / Snapdrop (WebRTC Rooms) | Syncthing / Local Mesh Tools | Cloud File Sharing (WeTransfer, Google Drive) |
|---|---|---|---|---|
| Identity & Trust Model | Persistent Ed25519 Device ID (sb-dev-...) with Base32 human-verifiable fingerprints and domain-separated signing. |
Ephemeral browser session IDs or temporary local storage tokens; vulnerable to origin wipes and spoofing. | Cryptographic device IDs, but requires complex clustering and mutual manual configuration. | Account-based (OAuth, email, passwords); bound to centralized identity providers. |
| Pairing Ceremony | SPAKE2 room-bound mutual key exchange deriving cryptographically isolated pair credentials (k_pair). Zero cleartext key exposure. |
Unauthenticated or basic WebRTC signaling room join; prone to server MITM key swap. | Manual device ID exchange or QR code scan; no single-command CLI ceremony. | Centralized account linkage via cloud servers. |
| Transfer Initiation | Direct command line & UI (sendbeam send photo.jpg @macbook) or one-click desktop send. Zero room codes on repeat transfers. |
Requires opening active browser tabs simultaneously on both devices and clicking ephemeral icons. | Background sync daemon; not optimized for explicit ad-hoc file transfers. | Requires uploading file to cloud storage, generating web link, and sending link over external messenger. |
| Privacy & Presence | 15-minute epoch-rotated blind handles and blinded UDP beacons. Signaling server learns zero device identities, IPs, or device pairings. | Signaling server sees room associations, public IP addresses, and active browser session IDs in plain text. | Discovery broadcast discloses device IDs and network addresses to local subnets and discovery servers. | Server logs every file transfer, device identity, IP address, and transfer timestamp. |
| Transfer Performance & Durability | High-speed direct WebRTC DataChannel with fallback encrypted relay and block-granular crash/reload resumption (resume-auth-v1). |
WebRTC DataChannel without persistent block-granular crash resumption across process/browser restarts. | Block-level sync with database journaling; higher CPU and continuous disk overhead. | Upload then download (2x latency and bandwidth consumption); bounded by cloud quota. |
| Platform Reach | First-class CLI, Native Desktop (macOS, Windows, Linux), and Evergreen Browsers. | Browser-only (Web UI / PWA). | Native daemon only; no lightweight zero-install browser recipient. | Web and apps, but requires cloud storage accounts and uploads. |
3. Persistent Trust & Mesh Compatibility Matrix
| Feature / Client Host | CLI (sendbeam) |
Desktop (Wails v3) | Modern Browser (Chromium / Firefox / Safari) |
|---|---|---|---|
| Persistent Device Identity | ✅ ~/.config/sendbeam/identity.key (0600) |
✅ Shared Go Engine / OS keychain | ✅ IndexedDB (sendbeam-identity) + WebCrypto |
| SPAKE2 Pairing Ceremony | ✅ sendbeam pair [code] |
✅ Desktop Devices UI | ✅ Web UI Devices Modal |
Repeat Cryptographic Auth (sendbeam/2) |
✅ Full Initiator & Responder | ✅ Full Initiator & Responder | ✅ Full Initiator & Responder |
Targeted Sending (@device) |
✅ sendbeam send <file> @device |
✅ Desktop Quick-Send Flow | ✅ Web UI Devices Send Dialog |
| Automated Listener Daemon | ✅ sendbeam listen |
✅ Background presence listener | |
| Opt-In Auto-Accept Policy | ✅ Absolute dest dir, size caps | ✅ UI policy config with dir picker | |
| LAN Blinded Beacon Discovery | ✅ UDP Multicast 224.0.0.251:5354 | ✅ UDP Multicast 224.0.0.251:5354 | |
One-Time Transfer Interop (sendbeam/1) |
✅ Full Support | ✅ Full Support | ✅ Full Support |
4. Security Invariants & Attack Matrix Verification
All security properties are strictly maintained across the entire codebase:
- Strict Identity Binding: Display names and local labels are purely cosmetic and local; all cryptographic authorization is bound strictly to canonical
DeviceID(sb-dev-...) derived from the Ed25519 public key. - Transcript Freshness & Anti-Replay: Every
sendbeam/2trusted session incorporates fresh 256-bit initiator and responder nonces, session timestamps with a strict ±5 minute tolerance window, and ephemeral ECDH keys. - Fail-Closed Revocation: Unpairing or revoking a device purges the pairwise credential (
k_pair) locally. Any future connection attempts from that device fail closed immediately withErrUntrustedPeer. - Auto-Accept Path Confinement: Auto-accept destinations must be absolute paths (root
/rejected). All inbound file paths are sanitized viawire.NormalizeTransferPath(); paths with parent directory traversal (..) or absolute references fail closed and cannot escape the destination boundary. - One-Time Isolation: Standard one-time transfers execute under isolated SPAKE2 credentials and never write to or read from the persistent trust database.
- Origin-Scoped Browser Storage: Browser trust records and pairwise secrets reside in origin-isolated IndexedDB databases. Clearing site data predictably revokes all local browser credentials without leaking key material across origins.
5. Milestone Sign-Off Checklist
- All 8 milestone PRs (V15-PR01 through V15-PR08) implemented and verified.
- 100% green CI across all 21 verification gates (Go tests with
-race, TypeScript checks, ESLint, Prettier, e2e Playwright tests, cross-platform distribution builds). - Zero brand regressions or stale naming leaks.
- Comprehensive documentation in
docs/trust-model.md,docs/threat-model.md,docs/compat-matrix.md,docs/protocol.md, andREADME.md. - Release gate signed off and verified against merged
main.