Skip to main content
Cloud sync backs up your chats, documents, projects, and settings so they follow you across the web app and the iOS app. Everything is encrypted under your personal encryption key before it reaches persistent storage, so Tinfoil cannot read any of it.

How it works

Cloud sync is built on two components:
  1. Your encryption key. A 256-bit AES key generated on your device when you first enable cloud sync. It is displayed as a string starting with key_ followed by 64 lowercase characters. This key encrypts all of your synced content.
  2. The sync enclave. All sync traffic goes through a dedicated secure enclave — hardware-isolated compute whose code is open source and verified through remote attestation on every app launch, before any data is sent. The enclave seals your data under your key and hands the resulting ciphertext to storage. Tinfoil’s storage infrastructure only ever sees ciphertext.
Because the sync enclave runs attested, publicly auditable code, your key is protected the same way your prompts are protected during inference: it is used inside verified secure hardware and is never stored, logged, or visible to Tinfoil. Your key is persisted only on your own devices (browser storage on web, the Keychain on iOS).
If you lose access to your key, your data is unrecoverable — by design. Tinfoil has no master key, no recovery backdoor, and no way to decrypt your data for you. Set up at least one backup option before relying on cloud sync.

What gets encrypted and synced

Every category of saved content is encrypted under your key: A small amount of sync metadata is not encrypted because the storage layer needs it to order and reconcile records: record IDs, timestamps, version counters, and per-chat message counts. Chat titles and all content are encrypted.
Chat search is also private. The sync enclave maintains a per-user search index sealed under a key derived from your encryption key, so search works across your encrypted chats without exposing their contents.

Key backup options

Your key can be protected in two ways. You can use both at once. A passkey — the credential behind Face ID, Touch ID, or your browser’s passkey prompt — can protect your encryption key so you never have to handle it manually. Tinfoil Chat uses the open-source Passkey Kit library for this:
  1. Your passkey derives a key-encryption key on your device using the WebAuthn PRF extension.
  2. That key wraps (encrypts) your chat encryption key.
  3. Only the wrapped copy — ciphertext — is stored server-side.
On a new device, approving one passkey prompt unwraps your key locally and cloud sync resumes. Because web and iOS use the same passkey configuration, a passkey created in the browser unlocks the iOS app and vice versa, as long as your passkey provider (such as iCloud Keychain) syncs it between devices. You can register multiple passkeys — one per device or platform — that all protect the same key. The Cloud Sync settings show a “Registered platforms” list where you can review and remove them.

Manual key backup

If you prefer not to use passkeys, save a copy of the key itself. Tinfoil Chat offers three formats:
  • Copy the key string (key_...) to a password manager or other secure location.
  • Download a PEM file (tinfoil-chat-key-<date>.pem) and store it somewhere safe.
  • Show a QR code on one device (web) and scan it from the iOS app.
To restore on another device, paste the key string, upload the PEM file, or scan the QR code during setup.
Do not share your key with anyone, and only store it in a secure location. Anyone with your key and access to your account data can decrypt your chats.

Set up cloud sync

Enable cloud sync

  1. Sign in at chat.tinfoil.sh.
  2. Open Settings (gear icon in the sidebar) and select the Cloud Sync tab. You can also navigate directly to chat.tinfoil.sh/#settings/cloud-sync.
  3. Turn on the Encrypted Cloud Sync toggle.
  4. In the setup dialog, click Continue. If your browser supports passkeys, you’ll be prompted to create one — this generates your encryption key and protects it with the passkey in one step.
  5. Without a passkey, choose Generate Encryption Key instead, then save the displayed key using Download (PEM file) or Copy before clicking Let’s go!.

Set up a passkey later

  1. Go to Settings → Cloud Sync.
  2. In the Passkey section, click Add Passkey for seamless sync (or Set Up Passkey on This Device if your other devices already use one).
  3. Approve the passkey prompt.

View or copy your key

  1. Go to Settings → Cloud Sync.
  2. Under Your Personal Encryption Key, use the eye icon to reveal the key, click the key to copy it, or use the QR code and Download buttons.

Restore your key on a new browser

  1. Sign in and open Settings → Cloud Sync, then turn on cloud sync (or click Set Up Cloud Sync in the sidebar).
  2. If you have a passkey, click Unlock with Passkey and approve the prompt. Done.
  3. Otherwise, choose Restore Encryption Key, then paste your key_... string or upload your PEM file, and click Restore Key.

If you lose your key

If you lose both your key backup and all passkeys, your encrypted data cannot be recovered. The apps offer a Start Fresh option that generates a new key so you can keep using cloud sync — but data encrypted under the old key is lost. The confirmation screen states this explicitly before you proceed. To avoid this situation:
  • Set up a passkey on at least one device with a synced passkey provider (such as iCloud Keychain).
  • Keep a copy of the key string or PEM file in a password manager.
  • Both together give you two independent recovery paths.

Next steps

Data controls & deletion

Local-only chats, temporary chats, exporting, and deletion behavior.

Passkey Kit

The open-source library behind Tinfoil Chat’s passkey-protected keys.