syn001.md

3.0 KB · raw

rendered · source

SYN-001

Summary

SYN-001 is the Peach Sync blocker.

Peach Sync's native Rust host uses Noise NK for peer authentication, but the responder side currently creates its static private key with an all-zero placeholder:

That means every Peach install would present the same responder identity. Noise NK depends on the responder static key being real and device-specific, so with [0u8; 32] authentication is effectively broken and impersonation becomes trivial.

Why It Matters

Sync is a high-trust path. It can move encrypted vault state between devices and depends on device identity being meaningful.

If every responder uses the same static private key:

Why It Has Not Been Resolved Yet

It is not just a one-line replacement. A proper fix needs a small dedicated sync sprint:

  1. Make native/peach-sync-host compile cleanly.
  2. Generate a per-install X25519 keypair.
  3. Persist the private key in the appropriate platform store or a clearly scoped native-host config file.
  4. Advertise only the public key through mDNS.
  5. Bind pairing and trusted-device records to the real public key.
  6. Define key rotation and recovery behavior.
  7. Add handshake tests for distinct identities, impersonation rejection, and paired-device acceptance.
  8. Re-audit the native host before re-enabling any live code path.

Current project rules keep sync dormant until that work is done:

Current State

The risky path is not shipped:

Suggested Fix Plan

Treat SYN-001 as its own unit of work:

  1. Create a Koh checkpoint before touching native/.
  2. Fix the native host compile errors without changing protocol behavior.
  3. Add persisted per-install Noise identity.
  4. Wire the identity into advertise, discover, connect, and accept paths.
  5. Add Rust tests around key generation, persistence, handshake success, and impersonation failure.
  6. Add extension-side tests for sync gating.
  7. Re-enable nativeMessaging only after the audit passes.

Until then, sync should remain dormant.