How it works
Cloud sync is built on two components:-
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. - 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.
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.Passkeys (recommended)
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:- Your passkey derives a key-encryption key on your device using the WebAuthn PRF extension.
- That key wraps (encrypts) your chat encryption key.
- Only the wrapped copy — ciphertext — is stored server-side.
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.
Set up cloud sync
- Web app
- iOS app
Enable cloud sync
- Sign in at chat.tinfoil.sh.
- 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.
- Turn on the Encrypted Cloud Sync toggle.
- 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.
- 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
- Go to Settings → Cloud Sync.
- In the Passkey section, click Add Passkey for seamless sync (or Set Up Passkey on This Device if your other devices already use one).
- Approve the passkey prompt.
View or copy your key
- Go to Settings → Cloud Sync.
- 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
- Sign in and open Settings → Cloud Sync, then turn on cloud sync (or click Set Up Cloud Sync in the sidebar).
- If you have a passkey, click Unlock with Passkey and approve the prompt. Done.
- 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.

