Secrets

How it works

Key pair

Every user has a key pair: a public key that may be shared and a private key that never leaves the browser unencrypted. The private key is encrypted with your vault password before it is stored.

Project file (STSV3)

A project is a file in the STSV3 format. It contains the values, encrypted with a data key, and for each recipient a copy of that data key, encrypted with their public key. Whoever holds their private key obtains the data key and can read the values. This is called envelope encryption. If an entry has a note, the file is saved as STSV4: built the same way, with the notes inside the encrypted part next to the values. secrets-tool reads such files from 0.9.1.45; without notes it stays STSV3.

What the server stores

The server stores only ciphertext. It knows neither your vault password nor your private key nor a single plaintext value. It knows who belongs to which team or tenant and who may open which project. A database leak gives an attacker nothing usable.

Signing in

Two kinds of accounts. A Secrets account signs in with email and sign-in password plus a code from an authenticator app or a passkey (two-factor sign-in) – or without a password using a passkey; of the password the server stores only an Argon2id hash, of a passkey only the public key. A sareba account is verified by sareba's identity platform, as with all sareba products; Secrets does not store the sareba password. If sareba is briefly unavailable you can keep signing in for up to 24 hours, unless your account uses two-factor authentication. The operator decides whether Secrets appears connected with sareba. If the connection is off, connected accounts also sign in directly with Secrets, using the Secrets sign-in password and two-factor sign-in (see Account).

Same code in browser and CLI

Encryption runs in the browser as WebAssembly, built from exactly the same code as the command-line tool. Files from the web app and from the CLI are therefore interchangeable 1:1.

Technical details for auditors

Key pair X25519. Data key 32 random bytes, fresh on every save. Content with ChaCha20-Poly1305; the recipient list is bound as additional authenticated data, a smuggled-in recipient breaks the tag. Data key per recipient: X25519 ECDH with ephemeral key, HKDF-SHA256, ChaCha20-Poly1305. Private key: Argon2id (64 MiB, 3 iterations, 4 threads) with ChaCha20-Poly1305. Sign-in: Secrets accounts with an Argon2id hash of the sign-in password (64 MiB) on the server, one-time links stored only as SHA-256 hashes, second factor TOTP per RFC 6238 (HMAC-SHA1, 6 digits, 30 seconds, ±1 step, each step only once; secret encrypted with AES-256-GCM using the server's settings key), recovery codes (60 bits) only as SHA-256 hashes; passkeys per WebAuthn (RP ID is the host of the address, user verification required, ES256, EdDSA or RS256, attestation not evaluated, 32-byte challenge held in memory only and valid once, signature counter checked; only the public key is stored); vault via passkey through the WebAuthn extension PRF (32-byte input per passkey, HKDF-SHA256 with the public vault key as info, AES-256-GCM over the private key with the public one as additional data, all in the browser; the server stores only the ciphertext and releases it only after a verified passkey signature, it never sees the PRF result); sareba accounts via the sareba identity platform (argon2id, optional TOTP) with a local mirror of the hash for the offline case. Sessions via HttpOnly cookie, SameSite=Strict, HTTPS only. Unlocking in the CLI: unlock agent as a separate process, the private key is held in memory only; access on Windows via a named pipe open only to your own account, on Linux and macOS via a socket in a private directory (0700) with a check of the process on the other end; the agent only opens data keys and never hands out the private key. Server address in the CLI HTTPS only, plain HTTP exclusively to localhost, 127.0.0.1 and ::1. Nonce lengths in a file are checked before decryption. Share via link: HKDF-SHA256 from a 32-byte link key and PIN, AES-256-GCM in the browser, the server stores only the ciphertext and SHA-256(link key, PIN) as check value. Error codes E-AP-58001 to 58060 in the sareba scheme.