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. Synced content is encrypted under your personal encryption key before it reaches persistent storage. Storage sees ciphertext and limited operational metadata, not your content.

How it works

Cloud sync is built on two components:
  1. Your encryption key. A 256-bit AES content-encryption key (CEK) generated on your device when you first enable cloud sync. It is displayed as a string starting with key_ followed by 64 lowercase characters. The raw key is stored only on your devices.
  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 before data is sent. The enclave seals your content under your key and hands ciphertext plus limited sync metadata to storage.
Because the sync enclave runs attested, publicly auditable code, your raw key is used only on your devices and transiently inside verified secure hardware. It is never persisted or logged by the enclave. Background work such as imports and search-index rebuilds can keep it in enclave memory for the life of the job. The raw key is persisted only on your devices (browser storage on web, the Keychain on iOS); passkey recovery stores only a wrapped copy server-side.
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 synced content is encrypted under your key. Local-only and temporary chats follow the separate behavior shown below. Chat titles and content are encrypted. Tinfoil stores limited operational metadata needed to sync encrypted data between devices. On the web, local chats and local caches of cloud data are not additionally encrypted by the app; rely on your browser and device protections.
Chat search is also private. The sync enclave maintains a per-user keyword and semantic index sealed under a key derived from your encryption key, so search works across 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 on the device.
  3. Only the wrapped copy — never the raw key — is stored server-side.
On a new device, approving one passkey prompt unwraps your key locally and cloud sync resumes. A passkey created in the browser can unlock 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. Cloud Sync settings list these under Registered platforms on web and Recovery methods on iOS. Recovery methods with a remove action can be removed; read-only entries cannot. Removing a recovery method from Tinfoil does not delete the passkey from the operating system.

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