An encryption key stored next to the encrypted data is not automatically pointless. It depends on who can read the key file and who could read the data before. Mosaic's first vault did exactly this, on purpose: the data key sat in a 0600 file beside the store. That stopped the two attacks we had measured on our own disk, and it did not protect a full copy of the folder. We wrote that limit into the code's own header, and closed it in two later steps.

The two attacks we had measured

On 14 September 2026 we pointed one command at a real profile on the development Mac. Our engine launches with --use-mock-keychain, and under that flag Chromium encrypts cookies with a password that is a public constant in its own source. The command found the password, mock_password, and printed a live session cookie in about a second. Beside it, mosaic.json, the file holding every profile, was readable by any user on the machine and carried every proxy password in plain text.

So there were two problems with one cause: nothing in the data directory had a secret of its own. Chromium's mock keychain has the full measurement and why the flag is there.

Your profiles, cookies and proxies stay on your computerIn Mosaic: Local first. Profiles, cookies and proxies stay on your computer. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

How it works: Local first

An encryption key stored next to the data, readable only by you

The fix was one random data key, with everything sensitive sealed under it. mosaic.json is encrypted as a whole, proxy credentials included, and each profile's cookies get their own password derived from the data key and the profile's id, handed to the engine through a switch our engine adds (one key per profile's cookies covers that change).

That leaves the question every design like this has: where does the data key live? The default answer was vault.json, a 0600 file in the same folder. 0600 means read and write for the owner only. Another user account on the Mac cannot open it, and neither can anything that is handed mosaic.json or a Cookies file on its own. The app opens with no prompt and nothing that can go wrong at launch.

What it does not do is protect a copy of the whole folder. Copy the data directory to another machine and the key goes with it. The header of vault.ts says this in so many words: the default does not claim that a full copy of the data folder is safe on another machine, because the key travels with the folder.

Why the key was not in the keychain

The obvious home for a key on a Mac is the keychain, and that is where the first version put it, through Electron's safeStorage. It made a copied folder useless, and it broke the app.

safeStorage grants access by the app's code signature. The build we ran then was ad-hoc signed, so every rebuild and every update was an identity the keychain had never seen, and the "Mosaic wants to use your confidential information" prompt came back after every update. Worse, the decrypt is synchronous. The main thread waited for the prompt, and a blocked main thread cannot draw the prompt it is waiting for, so the app hung. The keychain is now out of the app entirely, on every platform. Why the app's secrets left the macOS keychain is that story in full.

A key in a file was the honest step back: it fixed what we had measured, and its limit was printed where the next person to touch the code would read it.

What covered the copied folder

The first answer was app lock, in Settings › Security. With it on, the data key is not stored as itself. It is wrapped by scrypt over a password that only the operator has, with N set to 2^16 and r to 8, which costs about 64 MB of memory and a fifth of a second on our machine. That is unnoticeable once at unlock and expensive for someone guessing offline. Until the password is typed nothing decrypts, so a copied disk is ciphertext on any machine.

The second answer came with accounts, on 2 November 2026. In a build with an account server, a library's data key is wrapped under a key derived from two things: a secret the account server keeps for that account and hands only to a signed-in session on a computer it has bound, and, if app lock is on, the password as well. Nothing on the disk is enough on its own. A copied folder does not open for a different account, or for nobody signed in, and the same account can still open its own library on another of its computers, so a backup restored on a new Mac works.

Our server never has your profiles. It holds one random key per account, which opens nothing without the files on your computer. Deleting your Mosaic account deletes that key, so every library it made can never be opened again, by anyone.

Two rules that made it usable

The data key never changes when its wrapping does. Turning app lock on or off, or adopting an old library into an account, rewraps one key and rewrites nothing sealed under it, so every cookie jar still opens. A security control whose failure mode is data loss does not get turned on.

And a failed decrypt throws an error. It never falls back to an empty store, because a wrong key that looks like a first run would show you a library with no profiles in it and invite you to start over. The longer case for keeping all of this on your own machine is on local-first.