What we encrypt, what we can see, and what isn't done.
Every claim maps to a file in our monorepo. Pick a depth.
Short answers
Can you read my messages or photos?
No. They're encrypted on your device before they leave it, and only devices in that space hold the keys. We store ciphertext.
PrivateMessage only (PURE_CIPHERTEXT_WIRE_FORMAT_POLICY). Media: AES-256-GCM, per-file key carried in an MLS message. Envelope metadata is visible: full list.
Who sees my email?
Our sign-in system, to send your code. Nobody in any space sees it, and nobody can search for it.
Rosters return per-space display names, never emails. send_code takes the same path for known and unknown addresses, so it can't confirm an account exists.
What happens when someone is removed?
New messages and locations pause until a host's device rotates the keys. After that, the removed person can't read anything new.
The API refuses application messages and Radar posts while a removal is pending. The host commits an MLS Remove with a path update; removed leaves can't derive the next epoch.
Is my location tracked?
Only if you turn Radar on, only for that space, only until it ends. Our server holds it encrypted, in memory, never on disk.
Exporter-keyed AES-256-GCM. SET … EX ttl with ttl ≤ time left; Redis on tmpfs with --save "" and --appendonly no. Clients cache decrypted state locally.
I lost my phone.
Sign in on a new device and enter your Recovery Key. Your spaces come back and the lost phone is signed out. Without the key, old history is gone. We don't have a copy.
160-bit GGK1-… key; backup sealed client-side. /claim moves your session and revokes the lost device's sessions in one transaction.
Someone got into my email.
They can't read your spaces. A new device starts empty until one of yours approves it. Without two-step verification they can still sign in and delete or replace your backup. Turn it on.
Without TOTP, an email code yields a full session, so backup delete/replace and /claim are reachable. Only an existing member can create a Welcome.
The boundary
Keys live on your devices. The server signs you in, orders messages, and relays packets it can't open.
What the server sees
Encryption hides what you say. It doesn't hide that you said something.
| Data | Server sees | Encrypted end to end |
|---|---|---|
| Chat | That a message was posted: space, time, sending device, size. MLS group ID, epoch, content type, unpadded length. | Text, reactions, topic and channel names |
| Info card | The space's title, start and end time | Address, gate code, Wi-Fi, parking, schedule |
| Photos, files | Encrypted blob, byte size, uploader, upload time, expiry | The file and its key. Web and iOS strip EXIF/GPS from photos first |
| Radar | That you're sharing, update cadence, packet size. RAM only | Coordinates, ETA, arrival status |
| Lists, RSVPs | That a change was posted, and when | Items, claims, RSVP answers, notes |
| Account | Sign-in email, device names and platforms, IPs, notification settings, passkey public keys, backup metadata (version, format, roomCount, deviceId, updatedAt) | Recovery Key, MLS private keys, message history |
| Membership | Who's in which space, display names, avatar colors, roles, join mode and times | Nothing. Known limit |
| Notifications | That one was sent. Web Push is empty (60 s TTL). Native pushes can carry the update kind and space title | What anyone said or shared |
Group messages
ShippedEvery Group and Gathering is its own MLS group. MLS is the IETF standard for encrypted group chat.
- Each phone, laptop and browser has its own keys. Losing one doesn't expose the others.
- Keys rotate when someone joins or is removed.
- Message keys are deleted after use.
- Library
- OpenMLS 0.9.2,
openmls_rust_crypto0.6. One Rust crate,core/gg-crypto: WASM on web, C ABI static lib on iOS, JNI on Android - Protocol
- MLS 1.0, RFC 9420
- Suite
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519(0x0001)- Wire format
PURE_CIPHERTEXT_WIRE_FORMAT_POLICYon create and join. Server rejects anything butPrivateMessagecarrying Application or Commit- Credential
BasicCredential= device UUID. Server checks a KeyPackage's credential matches the authenticated device that uploaded it- Epochs
- Server-sequenced and monotonic: one row lock per space,
expectedEpochcompare-and-swap, header epoch check on every post. Retries are idempotent onclientEventId; a different payload under the same ID gets409 - Removal
- Remove commit with path update. Until it lands, the API refuses application messages and Radar packets for that space
- Sender
- Web attributes each message to the MLS-authenticated sender (
decrypt_with_sender), not the server's device label - FS / PCS
- Secret-tree keys deleted after use. PCS via path updates on commits; scheduled member self-updates not yet shipped
- Welcome
- A rejected Welcome restores the previous store, so it can't burn the device's KeyPackage
// core/gg-crypto/src/wire.rs: checked without decrypting WireHeader { group_id, epoch: u64, kind: Application | Commit } reject unless wire_format == PrivateMessage reject unless content_type ∈ { Application, Commit } reject unless group_id is a canonical lowercase UUID reject unless bytes parse exactly // no trailing data
Media vault and capsule
ShippedEvery file gets a fresh key on your device. We store a sealed file and can't open it.
- Web and iPhone re-save photos before encrypting, which drops location and camera data. GIFs, videos, other files and Android uploads keep theirs, still encrypted.
- Gatherings: photos go up while it's open, stay viewable for 30 days after it ends, then get deleted.
- Groups keep a long-lived archive. Late joiners see what's shared after they join.
- A tampered file won't open.
- Cipher
- AES-256-GCM. Fresh 256-bit key and 96-bit nonce per file from the OS CSPRNG (
getrandom) - Integrity
- SHA-256 over the ciphertext, carried in the MLS-authenticated
media_metamessage and checked before decryption. Also covers GCM's lack of key commitment - Key delivery
{ blobId, key, nonce, sha256 }inside an MLS application message, so only that epoch's members get the key- Metadata
- Web (canvas) and iOS (
UIGraphicsImageRenderer) re-encode JPEG, PNG, WebP, HEIC, dropping EXIF/GPS. GIF, SVG, video, other files and Android gallery uploads pass through byte-for-byte inside the E2EE envelope - Access
- Bytes stream only to active members, only before the retention deadline
- Retention
/messagescloses at the end time (blob upload has a 24 h grace window). Reads until end + 30 days. Cleanup runs every 5 min, purging up to 500 expired files per pass- History
- Recurring Gatherings roll forward on the same room. Late joiners start at their join sequence
// core/gg-crypto/src/blob.rs encrypt_blob(pt): key, nonce ← getrandom(32), getrandom(12) ct ← AES-256-GCM.seal(key, nonce, pt) return { ct, key, nonce, sha256: SHA-256(ct) } decrypt_blob(ct, key, nonce, sha256): require SHA-256(ct) == sha256 // before the key is used return AES-256-GCM.open(key, nonce, ct)
Open Exact ciphertext sizes are visible (plaintext + 16 bytes; size buckets planned). The blob AEAD doesn't yet bind a version or media kind as associated data.
Sign-in and devices
Partly shippedSigning in doesn't unlock your spaces. A device you already have has to approve the new one.
- Email code: 8 digits. On the web, the email also has a one-tap link.
- Passkeys: Face ID, Touch ID or a security key. With two-step on, a verified passkey counts for both steps.
- Link a device: the new device shows a QR and a 6-character code. Scan or type it on a signed-in device. The new one is signed in and added to your spaces.
- Two-step: any authenticator app, plus 8 single-use backup codes.
- Invites: use a PIN or "Ask me first" for private spaces. A forwarded link alone works for whoever holds it.
- Email code
- 8 digits, 10 min expiry, 5 attempts, 5 codes per address per 10 min. Stored as a MAC keyed by the challenge token. Same response path for registered and unregistered addresses
- Magic link
- Web sign-ins only. Built for
GG_PUBLIC_URL, anhttps://*.groupgather.comorigin, or loopback. Any otherOrigingets no link - Passkeys
- WebAuthn, ES256 (P-256, COSE
-7) only,attestation: "none". With TOTP on, an assertion without the UV flag is sent to a TOTP challenge. 30 logins per 10 min per IP - Device link
- 6 symbols from a 30-symbol alphabet (no
0 O 1 I L), shownXXX-XXXand as QRgroupgather://link?code=…. Hashed at rest, valid 5 min. 15 starts per 10 min per IP; 15 lookups per 10 min per account - Pickup
- On approval the server mints the device and session; the new device's poll claims them exactly once (row locked and cleared in one transaction), within 2 min. The approving client then sends an MLS Add + Welcome for that device in each space
- Approval
- A new device of an existing member is flagged
requires_same_account_approval; its Welcome is accepted only from an active device on the same account.GET /api/account/pending-devicesgroups requests so one tap approves every space - Guest joins
- Invite + PIN can waive the server-side same-account check. Clients still skip auto-approval if the joining account already has active devices
- Invite link
app.groupgather.com/?g=…#invite=<token>. The fragment never hits the request line;Referrer-Policy: no-referrerkeeps it out ofReferer- Join proof
- HMAC-SHA256 keyed by the invite token over a domain-separated, length-prefixed tuple; constant-time compare
- Join PIN
- Salted PBKDF2-HMAC-SHA256, 100,000 iterations.
/join: 10 per 10 min per account+room, 30 per 10 min per IP - TOTP
- RFC 6238 (SHA-1, 6 digits, 30 s). Reused steps rejected; 15 min lock after 5 failures. Secret sealed with AES-256-GCM bound to the account ID. 8 backup codes, stored hashed
- Sessions
- 244-bit random tokens, stored hashed, 30-day expiry.
HttpOnly,SameSite=Strict,Secure
// core/gg-crypto/src/join_proof.rs
proof = HMAC-SHA256(
key = invite_token,
msg = "groupgather-join-proof-v1"
‖ u64be(len room) ‖ room_id
‖ u64be(len device) ‖ device_id
‖ u64be(len package) ‖ key_package )
Open The client also sends the invite token in the /join body, and hosts accept a missing proof. The proof binds a KeyPackage to a link holder but doesn't yet stop a malicious server. Planned: HKDF-split invite secret so the server sees only a lookup ID, and fail closed.
Recovery Key
ShippedYour device encrypts a backup with a key only you hold, and sends us the sealed box. We can't open it, reset it, or recover it.
GGK1-7H3Q-M2XA-9KTD-4RWB-PN6C-Z8EF-1VJY-5QGS
- Restoring signs the lost device out right away. Anything already stored on it stays there.
- iPhone and desktop backups restore anywhere. Browser backups restore in a browser, which can then approve your other devices.
- On iPhone you can sync the key through iCloud Keychain. It's off unless you turn it on.
- Key
- 20 random bytes (160 bits) → 32 Crockford Base32 chars, shown as
GGK1-+ 8×4. Parser ignores separators, mapsO→0,I/L→1 - KDF
K = SHA-256(key ‖ salt ‖ aad), 16-byte random salt. One hash is enough: the input is 160 bits of CSPRNG output, not a password- AEAD
- AES-256-GCM, 12-byte nonce, AAD
gg-recovery-v1:<accountId>:<deviceId>(lowercase). A backup can't be replayed onto another account or device - Formats
unified(iOS, desktop → anywhere) andper-space(web → browsers). Same key format, KDF and envelope on every client- Payload
- Versioned JSON: MLS state and per-room cursors. Web restore resumes from the saved cursor
- Server
- Shape checks only: base64, 16-byte salt, 12-byte nonce, ≤ 8 MiB. Never receives the key
- iCloud
- Opt-in
kSecAttrSynchronizableKeychain item on iOS
// services/api/src/recovery.rs // POST /api/account/recovery-backup/claim BEGIN 1 lock recovery backup row FOR UPDATE; require device match 2 already the backup device? → COMMIT 3 lock both devices in UUID order; both must be this account's 4 DELETE every session on the backup device // lost phone: 401 5 move caller's session onto the backup device 6 rotate browser_hash; clear push tokens 7 cancel the temp device's orphaned pending joins COMMIT
Note Fixed lock order makes concurrent claims serialize instead of deadlock. Rotating browser_hash stops the old browser from reclaiming the device. History cached on the old device stays there.
Radar
ShippedFour levels. Always starts at Off.
- OffNothing is sent.
- Status"On the way" or "Arrived".
- ETAMinutes away, computed on your phone.
- Live pinA dot on the map until the end time.
- In a Group, sharing runs on a timer you pick: 1 hour, 4 hours, or until you stop.
- Devices taking part keep the latest view in local storage until the app or device clears it.
- Web map tiles come from ArcGIS, which sees your IP and the area you're viewing.
- Tiers
off | status | eta | pin. The pre-entry gate defaults tooff. Onlypinrenders on the map- Key
MLS-Exporter("groupgather-radar-v1", roomId, 32)per epoch. Rotates on every commit. Never touches the chat ratchet- Cipher
- AES-256-GCM, random 96-bit nonce. AAD
v2:{roomId}:{epoch}:{senderDeviceId}binds the sender. All clients send v2; legacy v1 (roomId:epoch) still decodes - Server
- Redis
SET … EX ttl, ttl = min(requested, seconds until the space ends).--save "",--appendonly no, tmpfs. No coordinates in Postgres or on disk - Policy
- Refused on stale epoch or pending removal.
410 Goneafter the space ends - Client
- Decrypted state cached locally: IndexedDB on web, the encrypted vault on iOS
- Tiles
server.arcgisonline.com. No Radar data in tile requests
Open v1 AAD doesn't bind the sender. Packets aren't padded; cadence is visible. In Groups, the client timer is what bounds sharing.
Delivery and headers
ShippedHTTPS everywhere. Other sites can't frame our pages, scripts only load from us, and links don't leak where you came from.
One limit applies to every encrypted web app: the browser loads its code from our server each visit, so a compromised server could ship altered code. The native apps don't. They're the stronger option.
# groupgather.com (this site, static) · infra/poc/Caddyfile Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none' Permissions-Policy: camera=(), microphone=(), geolocation=() X-Content-Type-Options: nosniff X-Frame-Options: DENY Referrer-Policy: no-referrer # app.groupgather.com (web app + API) Content-Security-Policy: default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' blob: data: https://server.arcgisonline.com; media-src 'self' blob:; frame-src 'self' blob:; connect-src 'self' ws: wss:; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none' Permissions-Policy: camera=(self), microphone=(), geolocation=(self) # + HSTS, nosniff, DENY, no-referrer as above; Server and X-Powered-By stripped # API: Cache-Control: no-store; same-origin checks on writes and WebSocket upgrades
Note 'wasm-unsafe-eval' exists only to run the MLS core as WebAssembly. Web keys live in browser storage, protected by your OS account, not a separate passcode.
Threat model
From our internal E2EE audit (2026-11-26) and its follow-up. Items move columns as fixes ship.
Protected
- Database leak. Only sealed content.MLS ciphertext; tokens hashed; PINs PBKDF2; TOTP secrets sealed.
- Stolen photo storage. Files are sealed; keys aren't stored with them.Per-file AES-256-GCM; keys only in MLS messages.
- Network observers. HTTPS, with E2EE inside.TLS + HSTS.
- Curious operator. We can't read messages, photos, lists or locations.No server-held content keys for MLS, media or Radar.
- Removed members. Can't open anything sent after removal.Remove + path update; sends blocked until committed.
- Inbox-only attacker reading spaces. New devices need approval; backups need the Recovery Key.Same-account approval; member-only Welcome; 160-bit recovery secret.
Not yet, or by design
- Malicious server. We're trusted to say which device belongs to whom.No account identity key; hosts trust server-listed pending joins; join proof fails open.
- Who talks to whom. Titles, names, membership and timing are visible to us.Plaintext rows; MLS messages unpadded.
- Linking personas. Someone in two of your spaces can tell it's you.Stable account/device IDs in rosters; credential is the device UUID.
- Inbox-only sign-in. Without two-step, email is enough to sign in and delete or replace your backup.Email code → full session without TOTP.
- Forwarded invites. Anyone with the link can ask to join.Trust on first use; use PIN or approval.
- Per-person verification. No "is this really Sam" check yet.12-digit per-epoch group fingerprint on web only.
- Scheduled rekey. Keys rotate on joins and removals only.Only the host commits; self-updates planned.
- Quantum. Not resistant today.Suite 0x0001 is classical; hybrid PQ once OpenMLS ships it.
- Third-party metadata. ArcGIS sees map views; native pushes can show a space title.APNs/FCM payloads may carry kind and title.
- Abuse reports. A report can't be proven authentic.No message franking.
Source map
Paths for reviewers. to see them.
| Property | Path |
|---|---|
| Ciphersuite, wire policy, frame checks | core/gg-crypto/src/wire.rs, device.rs |
| Add, Remove, Welcome, Radar exporter + v2 AAD, fingerprint | core/gg-crypto/src/device.rs |
| Media encryption, digest check | core/gg-crypto/src/blob.rs |
| Join proof | core/gg-crypto/src/join_proof.rs |
| EXIF/GPS stripping | apps/web/src/lib/media.ts, apps/ios/GroupGather/Store/AppModel.swift |
| Email code, magic link, sessions | services/api/src/session.rs |
| Passkeys (WebAuthn ES256) | services/api/src/passkeys.rs, apps/web/src/lib/passkeys.ts |
| QR / code device linking | services/api/src/device_link.rs, apps/desktop/src/app/device_link.rs |
| TOTP and backup codes | services/api/src/totp.rs |
| Recovery Key format, KDF, AEAD | apps/web/src/lib/recoveryCrypto.ts, apps/ios/GroupGather/Crypto/RecoveryCrypto.swift, apps/desktop/src/recovery.rs |
Atomic /claim, pending-device approval | services/api/src/recovery.rs, delivery.rs |
| Radar TTL and storage | services/api/src/radar.rs, infra/poc/docker-compose.yml |
| Media retention, cleanup | services/api/src/blobs.rs |
| HTTP headers per host | infra/poc/Caddyfile |
| Findings and status | docs/E2EE_SECURITY_AUDIT.md |
Read the code, then try it.