FishmemDocs

Security model

How Fishmem encrypts your data, what our servers can and can't see, how keys are protected on each device, and the limits of what encryption protects.

This page is for people who want to know exactly what they're trusting. It describes the design as implemented; where something hasn't been done yet, it says so.

Summary

  • Everything is encrypted on your device, with keys that come from a master key only your devices hold.
  • The server stores ciphertext and the minimum metadata needed to sync, share and bill. It can't decrypt anything. As with 1Password, you trust it to hand out the right public keys when you share or invite someone.
  • If you lose every device, every passkey and your Emergency Kit (its recovery code), nobody can recover your data.
  • Fishmem has not yet had an independent security audit. We'll publish the report when it has.

Key hierarchy

master key (256-bit random; the server keeps copies sealed by your passkeys and recovery code)
├── identity keys        X25519 (receiving shares) + Ed25519 (signing)
├── device keys          per device, with a certificate signed by the identity key
├── vault key            seals the vault configuration and its backup
├── bucket wrap key      seals your bucket keys
│   └── bucket key (per key epoch)
│       └── file key (random, per file)  →  content and header keys
└── secrets key          seals each vault's manifest
    └── per-vault key (random, one per vault)  →  that vault's items

Child keys are derived with HKDF-SHA256 using a distinct label for each purpose, or are random and sealed by their parent. Nothing derived from the master key is sent to the server.

Sign-in and opening the vault

  • There's no account password. You sign in with Google, a 6-digit code sent to your email (or the link in the same email), or a passkey.
  • The master key never leaves your devices in the clear. The server keeps copies of it, each sealed with something only you hold:
    • each passkey that can open the vault, sealed with a key from that passkey's WebAuthn PRF output and bound to its credential id. On the web, one Touch ID, Face ID or Windows Hello step signs you in and opens the vault.
    • your recovery code (FMR1-…, on the Emergency Kit), a separate random 256-bit secret. A new code replaces this copy, which cancels the old code. Using it needs you signed in to the account.
  • The server can't open any copy. Only a device that holds the master key can store one, signed with your account identity.
  • A new device can also get the vault from one that has it: a one-time key in a QR code, a short code compared on both screens, and the master key sealed to that one-time key.

Files

Each file is encrypted in the FMv1 format:

  • A random file key, wrapped with the bucket key using XChaCha20-Poly1305. The wrap is bound to the file id, bucket id and key epoch, so ciphertext can't be moved between files or buckets unnoticed.
  • The content is split into 1 MiB chunks, each sealed with ChaCha20-Poly1305 using a counter nonce and a last-chunk flag (the STREAM construction, as in age). Chunks can't be reordered, dropped or truncated without detection, and any range can be decrypted on its own, which is how video seeking works.
  • The header is authenticated with HMAC-SHA256.

File names, albums, dates, sizes and thumbnails live in the bucket's index, which is also encrypted with the bucket key. Every index segment is signed by the device that wrote it, and that device's certificate chains to your identity key. Storage can withhold new segments, but can't forge or alter them.

Secrets

  • Each vault's manifest (its name, its key and the wrap keys of its service tokens) is sealed with a key derived from your master key.
  • Each vault (Personal, shop, shop-prod, …) has its own random key. The authenticated data binds the vault, key id and version, so the server can't swap one vault's ciphertext for another's or replay an old version as new. An item that is in several vaults has a copy in each, encrypted with that vault's key.
  • The server keeps the last 50 encrypted versions of each vault for rollback. Per-item history and the trash are in the manifest, which service tokens can't open.
  • Service tokens (fmst_…) contain a random secret. From it the client derives an auth string, which the server stores only as a hash, and a wrap key, which never leaves the client and unwraps the one vault key kept for that token. A leaked token opens exactly one vault.

Sharing

  • Buckets are shared by sealing the bucket key to the recipient's identity key with HPKE (RFC 9180), in a grant signed by the owner. Recipients get no device certificate, so their writes would be rejected. Unsharing moves the bucket to a new key epoch.
  • Family shared vaults have a family key per generation, sealed to each member with HPKE. The member list is a chain where every version is signed by the family's owner; clients verify it and pin the newest version they've seen, so the server can't add a member or change a confirmed member's key. Removing someone starts a new generation and re-keys every shared vault.
  • Public keys come from the server. Like 1Password, Fishmem trusts it to hand out the right key when you share a bucket or invite someone; there are no numbers to compare. The family's owner still confirms each new member before they get the family key.
  • Share links carry their key after the #, which browsers don't send to servers. An optional password is stretched with Argon2id.

Emergency access

  • What's sealed: your device seals your items key (derived from the master key; it opens your own items and nothing else) to your contact's identity key with HPKE, signs it with your identity key, and gives it to the server. With it goes your files key (also derived; it unwraps only your own buckets' keys) and your buckets' names. Neither is your master key: a contact can't sign as you, open your shares, shared vaults, your own S3 settings or key copies, or change anything. Once access is granted, the server gives them read-only links into your buckets in Fishmem's cloud, even if your subscription has ended.
  • The server can't open it. It holds the sealed key and hands it over only when the wait has run out without a refusal, or you allowed it.
  • But the server keeps the time. A compromised server, together with your contact, could skip the wait or ignore a refusal. Neither can alone. Bitwarden's emergency access makes the same trade-off.
  • Your contact's public key comes from the server, as for every share. A malicious server could hand your device a key of its own and so receive your items key.
  • Ending access can't take back what was seen. The items key doesn't change when access ends, so a contact who kept it can still read copies of your items they already have. Change what matters.
  • A new recovery code, a removed passkey or a reset of either side's keys empties the sealed copies; your next device seals them again.
  • Reminders go to your e-mail: pick a wait in which you'd surely see one.

Travel Mode

  • What it does: turn it on in the Dashboard (Settings › Security) before you cross a border. Only the vaults you marked safe for travel (in each vault's settings) stay on your devices; the others are removed from each phone, computer and browser at its next sync, and come back when you turn it off.
  • Only on the website. The apps can't turn it off, so someone who makes you unlock a device can't bring the other vaults back from it.
  • Removed, not hidden: the device no longer has those vaults at all. A device that hasn't synced since you turned it on still has them, so let each one sync first.
  • The server still keeps their ciphertext, which it can't open, and gives it back when Travel Mode is off. Files, service tokens and emergency contacts aren't affected.

On each device

DeviceWhere the vault key livesWhat unlocks it
iPhoneKeychain item with userPresence, this device onlyFace ID, Touch ID or passcode, enforced by iOS
AndroidKeystore key that requires user authenticationFingerprint, face or screen lock, enforced by Android
Mac (app)Keychain with user presenceTouch ID or Mac password
Windows (app)Sealed with a key derived from a Windows Hello (TPM) signature, or from a passphrase (Argon2id)Windows Hello or passphrase
CLIOS keychain, or a passphrase (Argon2id)Your login session, or the passphrase
BrowserIndexedDB, sealed with a key from your passkey's PRF outputThe passkey (Touch ID, Face ID, Windows Hello or your phone); locks after 15 minutes idle. Without a passkey the vault lives only in that tab

Phones require a screen lock to create a vault, and block screenshots (Android) or hide content in the app switcher (iOS). Desktop apps lock on idle, sleep and screen lock, and hide their windows from screen capture by default.

What the server sees

The server needs some information to work. It sees:

  • Your email address, sign-in method and plan.
  • How many bytes each bucket uses, and the random ids of buckets and objects.
  • Which accounts you share buckets with, and who is in your family.
  • Names of signed-in devices as they report them, and IP addresses and user agents in access logs (kept 90 days).
  • When service tokens read, and when share links are opened.

It never sees: file contents, file names, albums, dates or thumbnails; secret names or values; passwords, 2FA secrets or passkeys; your master key (only copies sealed by your passkeys and recovery code) or your recovery code.

What Fishmem can't protect against

Encryption has limits, and we'd rather you know them:

  • A compromised device. Malware running as you on an unlocked device can read what you can read: keystrokes, the screen, values passed to fishmem run. Keep devices updated, and lock the vault when you're not using it.
  • Anything you've given a process. Once fishmem run sets a variable, the program (and anything it starts) has the value. See Use keys with AI agents.
  • The web app's code. The web app is delivered by our server each time you open it. If that server were compromised, it could serve code that leaks keys. The native apps and CLI don't have this exposure; use them for your most sensitive data.
  • Metadata. The list above: an observer of the server knows how much you store and whom you share with, though not what.
  • Recipients. Anyone you share with can copy what they can see. Unsharing stops future access only.
  • Emergency contacts and the server together. They could skip the waiting period (see Emergency access).
  • Losing every device, passkey and your recovery code. There's no reset. That's the point, and the risk.

Implementation

  • One Rust core (fishmem-core) is used by every app and the CLI, and compiled to WebAssembly for the web app.
  • Primitives come from widely used Rust crates: chacha20poly1305, hpke, x25519-dalek, ed25519-dalek, hkdf, hmac, sha2, argon2, bip39. No custom cryptographic primitives. Key material is zeroised from memory when it's dropped.
  • Test vectors are shared between Rust, the website and the JS SDK, so every implementation decrypts the same bytes.

Reporting a vulnerability

Email security@fishmem.com. Please give us a chance to fix the issue before disclosing it publicly.

Something missing or wrong? Tell us at support@fishmem.com