Skip to content

Security model

This page says plainly what hytte protects and where the limits are. If anything here is unclear or looks wrong, please report it.

Everything people write in hytte is end-to-end encrypted, always: every channel, private channel, DM and group conversation, with every edit, reaction, file and link preview. There is no switch, no opt-out and no “unencrypted” state. Encryption and decryption happen in the browser. The server stores and forwards ciphertext and never has the keys. People never type a passphrase: the login password unlocks their keys, and the server never sees the password.

  • Identities, like Signal. Each account has an identity key pair, created in the browser when the account is set up: X25519 for key agreement and Ed25519 for signatures. The server stores the private keys only wrapped (encrypted) with a key that the browser derives from the password with Argon2id. Login uses a separate key derived from the same password (the split Bitwarden uses), so the server can check the password without learning it or the wrapping key.
  • History, like Matrix/Element. Each conversation has random channel keys, wrapped for each member’s public key. New members receive the keys from a member who is online and can read the full history. When someone leaves, the remaining members switch to a new key.
  • Signed messages. Each message is signed by its author’s Ed25519 key, and the signature is checked when it’s shown.
  • Safety numbers. Two people can compare a number derived from both their keys, to rule out a server that hands out fake keys. Unverified keys are trusted on first use, and hytte warns when someone’s key changes. See Safety numbers.

The details, with algorithms and formats, are in How the encryption works.

Anyone who can read hytte’s data or traffic but doesn’t control the code that runs in the browser:

  • a leaked or stolen database, or a backup of it;
  • server admins and whoever hosts the machine, as long as they only look;
  • logs;
  • the tunnel provider (Cloudflare, localhost.run) or a reverse proxy, which terminate TLS with --tunnel and similar setups;
  • anyone on the network.
  • The server controls membership and the key directory. A malicious server can add someone to a conversation, or claim that a member has a new key. That’s exactly what a legitimate password reset looks like. Members’ browsers then share the conversation keys, including the history, automatically. You notice this in the Members list of a private conversation and in the “security key changed” warning, but only after the fact. Compare safety numbers with the people who matter, and take a key-change warning seriously.
  • No forward secrecy. History stays on the server and has to be readable on new devices. So whoever gets a user’s private key (or their password) and the stored ciphertext can read that user’s history. Element works this way too. Signal doesn’t, but Signal doesn’t keep history on the server.
  • Passwords can be guessed offline. A leaked database lets an attacker try passwords against the wrapped keys. Argon2id (64 MiB, 3 passes) and a minimum length of 10 characters make each guess expensive, but a weak password can still be found. Use a long one, ideally from a password manager.
  • Lose the password and the recovery key, and you get new keys. Other members’ browsers share the conversation keys with your new key again, so you get back the history of conversations that still have other members. What only you could decrypt is gone, and nobody can recover it, not even the admin. See Recovery key.
  • Devices are trusted. Keys are kept in the browser (as non-exportable keys) until you log out. Malware on your device, or a browser extension with access to the page, can read what you read. Tick Public computer on machines you don’t control.

What the server (and anyone in the middle) sees

Section titled “What the server (and anyone in the middle) sees”

Metadata isn’t encrypted. The server knows:

  • accounts: usernames, profiles (full name, nickname, picture), roles, when accounts were created, and two-factor settings;
  • conversations: channel names and topics, who is a member of what, who created what;
  • activity: who sent a message to which conversation and when, message sizes, edits and deletions, which messages are thread replies to which, how many reactions of the same (unknown) kind a message has, presence and typing, read positions;
  • files: sizes and upload times, but not names or types;
  • link previews: the URLs whose previews someone requested, and who asked (details);
  • GIFs: /giphy search terms;
  • network: IP addresses and user agents;
  • push: that a device was woken for a conversation (the push itself has no content).

Admins act on this metadata. They can delete messages and channels without reading them, and they see message content only when a member reports a message, which sends its text.

Message text, file contents and names, reactions (which emoji), link preview contents, your notification keywords, your search index, which people you have verified, and your private keys. The server stores the keywords and private keys only in encrypted form.