Verified against the shipped code
Privacy, safety & security
Encryption in OpenPal is opt-in. Set a password and everything the app stores on this device — conversations, projects, generated files, settings — is encrypted at rest. Without a password, the same data is stored in plain text. This page explains the mechanism, the recovery path, and the limits, with links to the source.
The claims on this page describe the code in the public repository. Where a guarantee stops, we say so.
The key chain
A password never encrypts your chats directly. It unlocks a short chain of keys, so the expensive step happens once and each conversation stays independent.
Password → root key
Argon2id, 64 MiB of memory, 3 passes, 1 lane. The salt and KDF parameters travel in the wrap file and are authenticated, so a tampered file fails to decrypt instead of silently weakening the key.
Root key → items key
HKDF-SHA256 splits the root key into purpose-specific subkeys. The items key seals the per-conversation keys; other subkeys cover logs and backups, so unrelated ciphertext never shares a key.
Items key → conversation keys
A separate random AES-256 key is generated for every conversation. The items key wraps it; the conversation content is sealed with it under AES-256-GCM.
The database
The whole app database (app.sqlite — chats, projects, artifacts, settings) is encrypted with SQLCipher, itself AES-256. That is a second layer under the per-conversation envelope, not a replacement for it.
Your way back in
A forgotten password must not be a dead end, and changing one must not mean re-encrypting your life.
The recovery code
At setup, OpenPal shows a 128-bit recovery code — 26 Crockford Base32 characters — exactly once. It is a second wrap of the same items key, not a copy of your password. Store it offline.
Encrypted backups
Automatic backups are a setting. They are sealed under a subkey derived from the items key and carry the recovery wrap with them, so a backup can be restored on a new machine with the recovery code alone.
Changing your password
A password change re-wraps only the root/items-key layer. The items key, every conversation key and every ciphertext stay untouched — your chats are not rewritten.
Staying unlocked
If you choose to stay unlocked on this device, a launch key is kept in the OS keychain and opens the same items key. The password itself is never stored anywhere.
Sync and remote access
Both are optional, and both are off until you turn them on.
Sync key
A 32-byte SyncKey is minted once per sync group and sealed per device under that device's local key hierarchy. Every sync envelope is AES-256-GCM under the SyncKey; the SyncKey never touches app.sqlite.
Pairing
Pairing uses ephemeral X25519 ECDH plus Ed25519 signatures. Both devices display a short fingerprint for a human to compare before the new device receives the key.
Removing a device
Removing a device rotates the SyncKey and re-pairs the surviving devices, so a removed device cannot read what comes next.
The relay
The relay stores and forwards opaque envelopes. It sees HKDF-derived mailbox IDs, envelope sizes and timing — not conversation contents, titles or keys. OpenPal runs a default relay; self-hosting is documented and supported.
Remote access
Off by default. When enabled, the desktop serves inference over TLS with a self-signed certificate, TOFU fingerprint pinning, and a per-device bearer token stored only as a salted hash.
Where encryption stops
These are deliberate limits, not omissions. Knowing them is part of using the product safely.
No password, no encryption. A fresh install without a password stores its database in plain text on this device.
An unlocked app is readable. Encryption protects data at rest; someone with your unlocked session can use the app as you.
Manual export is plaintext. Export produces an open .zip of plain, portable files by design. The encrypted path is automatic backup, which you must enable.
Backups are a setting, and restoring one on a new machine needs the recovery code.
The relay sees metadata: opaque mailbox IDs, envelope sizes and timing. It does not see contents.
Logs are not a blanket claim. Some log streams are encrypted frames under the local key hierarchy; diagnostics you choose to share are handled separately. Do not treat every file in the data directory as encrypted.
The self-hosted relay has no TLS or authentication of its own. Put a reverse proxy in front of it.
What we claim, and what we don't
Every row here is a rule for our own copy, not just for this page.
We say
- Encrypted at rest when you set a password
- Your chats stay on your device (local inference by default)
- End-to-end encrypted sync (optional)
- The relay only sees ciphertext and routing metadata
- AES-256, Argon2id, SQLCipher
- No account, no telemetry
- Automatic encrypted backups you can enable
We never say
- Everything is always encrypted
- Nothing ever leaves your device
- End-to-end encrypted, as a blanket app claim
- Zero-knowledge, without explaining what it means
- Military-grade or unbreakable
- Anonymous
- Your data is backed up (backups are a setting)
Verify it yourself
OpenPal is open source. These are the files behind the claims on this page.
- crates/core/src/crypto/kdf.rsKey derivation (Argon2id)
- crates/core/src/crypto/wrap.rsKey wrapping and authenticated headers
- crates/core/src/crypto/recovery.rsRecovery code
- crates/core/src/crypto/sqlcipher.rsSQLCipher integration
- crates/core/src/syncSync key and relay envelopes
- docs/SYNC_PAIRING_PROTOCOL.mdPairing protocol
- SECURITY.mdSecurity policy and threat model