Secure Chat
Secure Chat encrypts sensitive conversations and files at rest on disk so that private chats remain unreadable even if a server backup or database folder is leaked, stolen, or browsed by a curious server admin.
This page explains why Secure Chat exists, how it works under the hood, and what its security boundaries are.
Why It Exists
Section titled “Why It Exists”By default, chat servers store messages and uploaded files in plain sight on disk. If a server backup is accidentally exposed or someone with access to the host machine browses the /data folder, every private message and photo is readable.
At the same time, traditional end-to-end encryption setups (like Matrix's cross-signed device keys) often lock non-technical friends and family out of their old message history whenever they get a new phone or clear their browser data.
Secure Chat is designed to solve this without the device-verification headaches: each user sets a separate Chat Password (Vault Password) that only they know, and that password unlocks their personal key vault on any device they sign into.
What Gets Encrypted
Section titled “What Gets Encrypted”When encryption is enabled on a channel or direct message, Spokes encrypts:
- Text Messages: Every message body is encrypted with AES-256 before being written to disk.
- Attachments & Media: All uploaded files, images, videos, and generated thumbnails in that channel are encrypted on disk.
- Linked Photo Albums: Any photo albums linked exclusively to encrypted channels are also encrypted on disk.
How It Works
Section titled “How It Works”Secure Chat combines personal RSA-2048 key pairs, AES-256 channel keys, and password-derived vaults:
- Key Generation: When you first set up your Chat Password, an RSA-2048 key pair (Public Key and Private Key) is generated for your account.
- Your Personal Key Vault: Your Private Key is encrypted using an AES-256 Key Encryption Key derived from your Chat Password (using 100,000 iterations of PBKDF2-SHA256). This password is completely separate from your SSO login password.
- Channel Encryption Keys: When a channel is encrypted, a unique 256-bit AES key is generated for that channel and encrypted using the RSA Public Key of each participant:
- Direct Messages & Private Group Chats (Zero Server Escrow): In 1-on-1 DMs and private group chats, all participants must have set up their Chat Password before encryption can be enabled. The channel key is encrypted only with the personal RSA Public Keys of those participants. The server does not hold an escrow key for DMs or private group chats.
- Encrypted Server Channels (With Server Escrow): When an admin enables encryption on a shared server channel, the channel key is encrypted for each member's RSA Public Key and also escrowed with the server's master RSA key (protected by
SPOKES_MASTER_PASSWORD). This allows the server to automatically grant the channel key to new members who join the server or set up their vault later, while still keeping all messages and attachments encrypted on disk and in unencrypted backups.
- Unlocking Your Vault: When you sign in on a phone or computer, you enter your Chat Password once to unlock your vault for that device. You can lock your vault on any device at any time from the chat sidebar or device session settings.
Security Boundaries
Section titled “Security Boundaries”It is important to understand what Secure Chat protects against and what it does not cover.
What It Protects Against
Section titled “What It Protects Against”- Leaked Backups & Disk Theft: If someone steals your
/datafolder or an unencrypted backup archive, encrypted channels, DMs, and their attachments cannot be read on disk. - Curious Server Admins in Private DMs: Because your Chat Password is separate from the SSO system and private DMs have no server escrow key, a server admin browsing the database files or
/datavolume cannot read your encrypted DMs or private group chats.
What It Does Not Protect Against
Section titled “What It Does Not Protect Against”- Active Malicious Server Code: Secure Chat is designed for encryption at rest and server-assisted push notifications, not zero-trust client-only End-to-End Encryption (E2EE). Because the web app is served by the Spokes server and unlocked keys are held in session memory while your vault is unlocked (including to decrypt incoming push notifications for your devices), a malicious server admin who modifies the server binary or container could theoretically intercept keys in memory while a user is actively unlocked.
- Compromised User Devices: If your computer or phone is infected with malware, an attacker can read anything visible on your screen while your vault is unlocked.