Privacy & Cryptography Specification
CoupleChat is engineered so neither Apple Photos, ad networks, nor cloud relays accumulate your private everyday moments.
1. Zero Accounts, Zero Social Graph
CoupleChat never asks for a phone number, email address, Apple ID, or Contact Book permission. Every space has strictly two partner slots (person1 and person2) authenticated by high-entropy bearer tokens stored inside the iOS Keychain.
2. Quick Start Mode (On-Device E2EE on GCP Cloud Run)
For couples who prefer instant phone-to-phone onboarding without maintaining a home server or VPN:
- Key Generation: Partner 1's iPhone generates a 256-bit symmetric key via Apple
CryptoKitand keeps it in Keychain (optionally backed by end-to-end encrypted iCloud Keychain sync so upgrading phones preserves Saved Vault access). - Out-of-Band Key Transfer: Partner 2 scans an on-screen QR code directly from Partner 1's iPhone—or opens a pairing link carrying the key in the URL
#fragment, which RFC 9110 guarantees is never sent in HTTP requests. - Authenticated Encryption: Every photo, HEVC video, Live Photo companion clip, thumbnail, caption, and emoji reaction is sealed on-device with
ChaChaPoly(unique 96-bit random nonce + 128-bit Poly1305 authentication tag) prior to upload via signed Google Cloud Storage URLs. - Abuse Prevention Without Identity: Space creation verifies an Apple
DCAppAttestServicehardware attestation so bots cannot abuse storage—without linking a space to any personal identity.
3. Self-Hosted Mode (WireGuard over Tailscale)
Couples running couplechatd on a home Mac route traffic directly between their two iPhones and their Mac over mutually authenticated WireGuard tunnels (tailscale serve HTTPS). SQLite WAL databases and media directories (ephemeral/ and saved/) reside exclusively on local Mac storage under 0700 permissions.
4. 7-Day Ephemeral Purge & Bounded iPhone Cache
- Automatic 168-Hour Expiry: Unsaved moments are permanently deleted after 7 days—via the hourly Go janitor on self-hosted Macs or native 7-day object lifecycle deletion in Google Cloud Storage.
- 200 MB iPhone Ceiling: Downloaded moments live strictly inside
Library/Caches/CoupleChatMediawith least-recently-used eviction at 200 MB, leaving your iPhone storage and Apple Photos library untouched. - Metadata-Only Push Alerts: Lock-screen wake notifications sent via HTTP/2 APNs contain zero media URLs or caption plaintext.