Security specReviewed 2026-11-29OpenMLS 0.9.2

What we encrypt, what we can see, and what isn't done.

Every claim maps to a file in our monorepo. Pick a depth.

Depth
00

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.

01

The boundary

Keys live on your devices. The server signs you in, orders messages, and relays packets it can't open.

Client-to-server cryptographic boundary Plaintext is encrypted by gg-crypto on your device, where all keys stay. The server accepts only MLS PrivateMessage ciphertext, stores ciphertext in Postgres and the blob store, and keeps Radar ciphertext in RAM. Other members' devices decrypt with their own keys and verify each file's SHA-256 digest. A removed device can't derive the next epoch. E2EE BOUNDARY E2EE BOUNDARY 01 · YOUR DEVICE 02 · GROUPGATHER SERVER 03 · OTHER MEMBERS Plaintextmessage · photo · location · list gg-crypto · OpenMLS 0.9.2encrypt · sign · ratchet Keys that never leave Ed25519 device signing keyMLS epoch secretsPer-file AES-256 keysRadar exporter keyRecovery Key GGK1-… API accept PrivateMessage onlyepoch compare-and-swappause sends while removal pending Postgresciphertext · membership · titles Blob storeencrypted files · byte size · expiry Redis · RAM onlyRadar ciphertext, TTL ≤ end timeno disk, no Postgres Decryptwith each device's own leaf keys Verify, then openSHA-256 from MLS media_meta Removed device can't derive epoch n+1gets nothing sent afterthe host's Remove commit CIPHERTEXT ONLY FAN-OUT Client-to-server cryptographic boundary 01 · YOUR DEVICE Plaintextmessage · photo · location · list gg-crypto · OpenMLS 0.9.2encrypt · sign · ratchet Keys that never leave Ed25519 device key · epoch secretsper-file AES-256 keysRadar exporter keyRecovery Key GGK1-… E2EE BOUNDARY CIPHERTEXT ONLY 02 · SERVER API accept PrivateMessage onlyepoch compare-and-swappause sends while removal pending Postgresciphertext · membership · titles Blob storeencrypted files · size · expiry Redis · RAM onlyRadar ciphertext, TTL ≤ end time E2EE BOUNDARY FAN-OUT 03 · OTHER MEMBERS Decryptwith each device's own leaf keys Verify, then openSHA-256 from MLS media_meta Removed devicecan't derive epoch n+1gets nothing sent after the Remove

What the server sees

Encryption hides what you say. It doesn't hide that you said something.

What the server sees versus what stays encrypted end to end
DataServer seesEncrypted end to end
ChatThat a message was posted: space, time, sending device, size. MLS group ID, epoch, content type, unpadded length.Text, reactions, topic and channel names
Info cardThe space's title, start and end timeAddress, gate code, Wi-Fi, parking, schedule
Photos, filesEncrypted blob, byte size, uploader, upload time, expiryThe file and its key. Web and iOS strip EXIF/GPS from photos first
RadarThat you're sharing, update cadence, packet size. RAM onlyCoordinates, ETA, arrival status
Lists, RSVPsThat a change was posted, and whenItems, claims, RSVP answers, notes
AccountSign-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
MembershipWho's in which space, display names, avatar colors, roles, join mode and timesNothing. Known limit
NotificationsThat one was sent. Web Push is empty (60 s TTL). Native pushes can carry the update kind and space titleWhat anyone said or shared
02

Group messages

Shipped

Every 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_crypto 0.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_POLICY on create and join. Server rejects anything but PrivateMessage carrying 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, expectedEpoch compare-and-swap, header epoch check on every post. Retries are idempotent on clientEventId; a different payload under the same ID gets 409
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
03

Media vault and capsule

Shipped

Every 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_meta message 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
/messages closes 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.

04

Sign-in and devices

Partly shipped

Signing 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, an https:// *.groupgather.com origin, or loopback. Any other Origin gets 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), shown XXX-XXX and as QR groupgather://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-devices groups 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-referrer keeps it out of Referer
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.

05

Recovery Key

Shipped

Your 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, maps O→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) and per-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 kSecAttrSynchronizable Keychain 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.

06

Radar

Shipped

Four 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 to off. Only pin renders 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 Gone after 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.

07

Delivery and headers

Shipped

HTTPS 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.

08

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.
09

Source map

Paths for reviewers. to see them.

Where each property lives in the GroupGather monorepo
PropertyPath
Ciphersuite, wire policy, frame checkscore/gg-crypto/src/wire.rs, device.rs
Add, Remove, Welcome, Radar exporter + v2 AAD, fingerprintcore/gg-crypto/src/device.rs
Media encryption, digest checkcore/gg-crypto/src/blob.rs
Join proofcore/gg-crypto/src/join_proof.rs
EXIF/GPS strippingapps/web/src/lib/media.ts, apps/ios/GroupGather/Store/AppModel.swift
Email code, magic link, sessionsservices/api/src/session.rs
Passkeys (WebAuthn ES256)services/api/src/passkeys.rs, apps/web/src/lib/passkeys.ts
QR / code device linkingservices/api/src/device_link.rs, apps/desktop/src/app/device_link.rs
TOTP and backup codesservices/api/src/totp.rs
Recovery Key format, KDF, AEADapps/web/src/lib/recoveryCrypto.ts, apps/ios/GroupGather/Crypto/RecoveryCrypto.swift, apps/desktop/src/recovery.rs
Atomic /claim, pending-device approvalservices/api/src/recovery.rs, delivery.rs
Radar TTL and storageservices/api/src/radar.rs, infra/poc/docker-compose.yml
Media retention, cleanupservices/api/src/blobs.rs
HTTP headers per hostinfra/poc/Caddyfile
Findings and statusdocs/E2EE_SECURITY_AUDIT.md

Read the code, then try it.