Multigravity Multigravity

Multigravity Security & Zero-Knowledge E2EE Architecture

Updated November 25, 2026  ·  Threat Model, mgy-e2ee-v1 Cryptographic Spec & Auditable MIT Source Map

Security Summary: Multigravity is a self-hosted local companion for your official Google Antigravity IDE/CLI. It never extracts Google OAuth tokens, never proxies Google APIs, and stores zero source code or chat history on developer servers. When you connect outside your local network, relay traffic is protected by zero-knowledge end-to-end encryption (mgy-e2ee-v1: ECDH P-256 + HKDF-SHA256 + AES-256-GCM), and unencrypted relay requests are hard-rejected with HTTP 426 Upgrade Required.

1. Zero Token Extraction & Official Harness Boundary

A common concern with third-party AI tools is whether they intercept vendor authentication tokens or imitate official API clients. Multigravity avoids that entire attack surface by design:

iPhone / iPad / Android / Web PWA
   ──[LAN Wi-Fi | Tailscale | E2EE Relay (mgy-e2ee-v1) | Cloudflare HTTPS]──▶
Local Go Gateway (`mgy` running on your macOS / Linux / Windows machine)
   ──▶ Local Official Google Antigravity IDE / CLI (`language_server`)

2. Transport Paths & Trust Boundaries

Multigravity concurrently probes available routes and automatically selects the lowest-latency path. You can remain strictly on LAN/Tailscale or combine direct routes with the zero-knowledge relay pool:

Data flow, encryption, and trust boundaries across Multigravity transport paths
Transport Path What Traverses It Encryption Layer Who Can Read Payloads
LAN Wi-Fi / Tailscale Direct HTTP + WebSocket between phone and local mgy Local network / WireGuard (Tailscale) + device auth token Only your phone and your local computer
Multi-Region E2EE Relay Opaque encrypted HTTP envelopes & WebSocket frames TLS + mandatory mgy-e2ee-v1 (ECDH P-256 + HKDF-SHA256 + AES-256-GCM) Only your phone and your local computer (relays cannot decrypt; plaintext rejected with HTTP 426)
Bring-Your-Own Cloudflare Tunnel Gateway traffic via mgy cloudflare Cloudflare TLS + device authentication Controlled under your own Cloudflare account
Stateless APNs Worker (push.jiuge.space) Short push alerts (approval prompts, Live Activity step progress) HTTPS + Apple APNs TLS; ES256 JWT cached in memory only (45 min) Stateless pass-through with zero DB and zero logs; self-hostable on free Cloudflare Workers

3. Inside mgy-e2ee-v1 (Auditable Source Reference)

Instead of trusting relay operators with TLS termination, Multigravity wraps both HTTP API payloads and streaming WebSocket frames in application-layer authenticated encryption:

4. Device Credentials, Android Signing & Instant Revocation

5. Frequently Asked Questions

Is Multigravity safe to use on company or private codebases?

Yes — especially when paired over LAN Wi-Fi or your organization's Tailscale / VPN tailnet, where zero traffic touches any external relay. When remote relay mode is enabled, payloads remain end-to-end encrypted with mgy-e2ee-v1 and can be independently audited in internal/e2ee/ on GitHub.

Can I self-host the APNs notification relay on my own Cloudflare account?

Yes. The exact worker code lives in scripts/cloudflare-apns-worker/ and runs on Cloudflare Workers' free tier (100,000 requests/day) with zero database or log storage.

What happens if I lose my phone?

Run mgy clear all on your desktop machine to immediately invalidate all paired device tokens and E2EE session keys. Because no repository files or Google credentials are stored on the phone, revoking the pairing key cuts off access instantly.