Sign in

How KeyShifter protects your API keys

KeyShifter is built so that a copy of its database is useless to an attacker. This page explains what runs on your device, what runs on the server, and what the server can and cannot see.

Your master password stays on your device

  • Argon2id (64 MiB of memory, 3 passes) runs in your browser and turns your master password into two keys: a login key and an encryption key.
  • The server receives only the login key and stores a peppered scrypt hash of it. The encryption key never leaves your browser.
  • Nobody can reset your master password for you, including us. When you sign up you get a one-time recovery key instead.

Every API key is encrypted before upload

  • A random 256-bit vault key encrypts each API key with AES-256-GCM. Each ciphertext is bound to its record, so encrypted keys can’t be swapped between records.
  • The vault key itself is encrypted with the key derived from your master password. The server stores ciphertext only.
  • The vault locks itself after 30 minutes without activity.

Tokens carry their own decryption key

To call a provider for you, the proxy needs the real key. KeyShifter does this without keeping a readable copy:

  • Each connection token wraps its own copy of the vault key with a key derived (HKDF) from the token’s secret.
  • The database stores only a SHA-256 hash of that secret, so the database alone can’t decrypt anything.
  • When a request comes in, the API key is decrypted in memory for that request only. Plaintext keys are never written to disk.

To be clear about the trade-off: while it forwards a request, the server does hold that key in memory, as any API proxy must. What it never has is a stored copy it can read on its own.

If the database leaked

An attacker would get account emails, encrypted keys, token hashes and usage logs. They would not get master passwords, vault keys or any API key in plaintext. A separate server secret, kept outside the database, seals the password-wrapped vault keys and peppers the login hashes, so a stolen database can’t even be brute-forced offline.

AI agents get tools, not keys

Over MCP, an agent can list your pools, create a project token, read usage and ask for a Cloudflare sync that you approve. None of these tools return a key. A reveal_active_key tool exists for programs that can’t use a proxy, and it is only available on a connection where you switch it on.

Sign-in and sessions

  • Session cookies are HttpOnly and SameSite=Strict, every API call needs a CSRF header, and a strict Content Security Policy blocks third-party scripts.
  • Sign-in attempts are rate limited, with a lockout after repeated failures.
  • “Continue with Google” uses the authorization code flow with PKCE and checks the signature on Google’s ID token. Google confirms who you are. Your master password still unlocks the vault.
  • Custom provider URLs are checked so the proxy can’t be pointed at private network addresses.

Where it runs

keyshifter.app runs on Cloudflare Workers, with data in a Cloudflare Durable Object. It is served only over HTTPS, with HSTS.