Security

How Password Managers Protect Your Vault With Zero-Knowledge

Most people assume their password manager company guards the vault the way a bank guards a safe deposit box: behind its own locks, with its own keys. A zero-knowledge password manager works the other way round. The company never holds a key that opens your vault, so its servers store ciphertext it cannot read. The one secret that unlocks everything is a master password that never leaves your device. That design is why a stolen vault database is bad news but not instant game over, and why your master password and the key derivation settings behind it decide how bad the news gets.

Original content from computingforgeeks.com - post 180803

This page explains password manager encryption in the order it happens. It covers how the master key is derived, how vault items are encrypted, how sync moves them, and what a breach hands an attacker, with LastPass and Norton as the real cases. We read a self-hosted Vaultwarden database row by row to see what the server keeps. The behavior described here was checked in October 2026 against Vaultwarden 1.37.4 and Bitwarden CLI 2026.10.1 on a Fedora 45 lab VM.

What zero-knowledge encryption means in a password manager

Zero-knowledge encryption means every key that can decrypt your vault is derived or generated on your device, and the provider’s server only ever receives data that is already encrypted. The term is borrowed loosely from cryptography (it is not a zero-knowledge proof), but the promise is concrete. If the vendor’s database leaks, the vendor is subpoenaed or an employee goes rogue, all they can hand over is ciphertext plus some metadata. The diagram shows where each key lives and what crosses the network.

Zero-knowledge password manager flow diagram: master key, user key and vault items on the device send a login hash, the wrapped akey and ciphertext to Vaultwarden or Bitwarden, which stores them in its database and syncs encrypted blobs to a second device

Everything inside the green zone is plaintext at some point, and none of it is sent as plaintext. The server receives three things: a hash it uses to check your login, your user key wrapped by your master key (Vaultwarden calls this column akey), and the encrypted items. It stores them and hands the same blobs to your next device, which repeats the derivation locally. We used Vaultwarden because it speaks the same protocol as Bitwarden’s clients and keeps everything in one SQLite file you can open, but the mechanism matches the Bitwarden whitepaper and, with different parameters, most cloud password managers.

How the master key is derived from your password

The master key comes from running your master password through a deliberately slow key derivation function (KDF), salted with your account email. In Bitwarden’s design, which Vaultwarden follows, the steps happen in order:

  1. Derive: PBKDF2-HMAC-SHA256 with 600,000 iterations (the default) or Argon2id stretches the password and email into a 256-bit master key.
  2. Stretch: HKDF expands the master key to a 512-bit stretched master key, half for encryption and half for the MAC.
  3. Prove: a further PBKDF2-SHA256 step over the master key, salted with the password, produces the master password hash that is sent at login.
  4. Re-hash: the server hashes that value again with PBKDF2-SHA256, a random salt and 600,000 iterations before storing it.

The split between steps 1 and 3 is the whole trick. The server gets something that proves you know the password without being the key itself, and what it stores is a hash of that hash. Because the KDF runs on your device, the client has to learn the KDF settings before it can log in, so the server answers a public prelogin call with them. We first asked our Vaultwarden instance about an address that doesn’t exist:

curl -sk -X POST https://localhost:8443/identity/accounts/prelogin -H "Content-Type: application/json" -d '{"email":"[email protected]"}'

Instead of an error, the unknown address got a complete, plausible answer, because “no such account” would let anyone test which emails have vaults:

{"kdf":0,"kdfIterations":600000,"kdfMemory":null,"kdfParallelism":null,"kdfSettings":{"iterations":600000,"kdfType":0,"memory":null,"parallelism":null},"salt":null}

A fixed default would still leak once an account moves off it, so we switched ours to Argon2id and probed the real address next to ten made-up ones:

for e in [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]; do printf "%-26s " $e; curl -sk -X POST https://localhost:8443/identity/accounts/prelogin -H "Content-Type: application/json" -d "{\"email\":\"$e\"}" | jq -c "{kdf,kdfIterations,kdfMemory,kdfParallelism}"; done

Only [email protected] exists, yet the fake addresses came back with a spread of real-world settings, and [email protected] matched our Argon2id account exactly:

[email protected]         {"kdf":1,"kdfIterations":6,"kdfMemory":32,"kdfParallelism":4}
[email protected]          {"kdf":0,"kdfIterations":600000,"kdfMemory":null,"kdfParallelism":null}
[email protected]            {"kdf":0,"kdfIterations":100000,"kdfMemory":null,"kdfParallelism":null}
[email protected]          {"kdf":0,"kdfIterations":600000,"kdfMemory":null,"kdfParallelism":null}
[email protected]           {"kdf":1,"kdfIterations":6,"kdfMemory":32,"kdfParallelism":4}
[email protected]           {"kdf":0,"kdfIterations":600000,"kdfMemory":null,"kdfParallelism":null}
[email protected]          {"kdf":1,"kdfIterations":3,"kdfMemory":64,"kdfParallelism":4}
[email protected]          {"kdf":0,"kdfIterations":100000,"kdfMemory":null,"kdfParallelism":null}
[email protected]          {"kdf":0,"kdfIterations":600000,"kdfMemory":null,"kdfParallelism":null}
[email protected]           {"kdf":0,"kdfIterations":100000,"kdfMemory":null,"kdfParallelism":null}
[email protected]           {"kdf":0,"kdfIterations":5000,"kdfMemory":null,"kdfParallelism":null}

Vaultwarden 1.37.4 answers unknown emails with decoys picked from a short list of settings real accounts use, chosen from a keyed hash of the address, so the same email gets the same answer every time. A non-default KDF proves nothing as long as it is one of those common presets, but a custom value outside the list (PBKDF2 at 650,000, say) still marks the address as real. The change arrived in the 1.37.4 accounts code to align with Bitwarden’s own server. It’s a small detail, but it shows the server side has to guard metadata deliberately, because the encryption alone doesn’t hide it.

How vault items are encrypted

Your vault isn’t encrypted with the master key directly. On account creation the client generates a random 512-bit user key, encrypts it with the stretched master key and uploads the result. Each item then gets its own random 64-byte cipher key, wrapped by the user key, and every field is encrypted with AES-256-CBC and authenticated with HMAC-SHA256. This layering matters because it lets you change your master password or KDF without re-encrypting a single item: only the wrapper around the user key changes.

We created one login with the Bitwarden CLI (name “GitHub admin”, a username, a password, the URI https://github.com/login and a note), then read the row the server stored:

sudo sqlite3 -line /srv/vw-data/db.sqlite3 "SELECT atype, name, data, key FROM ciphers;"

Every human-readable value is gone, including the URI:

atype: 1
 name: 2.+OKiNDYtCdzHwR8M/mmiFQ==|z8+RU25Z7qZsDhY1EMxIIg==|avp8vbEuU32qBY69uCWSDBLzeyx+zD92LMobnSpgpDg=
 data: {"password":"2.Onw6S2ya6BWmW8bp9tqKMA==|TCKOOHPJel9+QEQZxMztNxeGWk4zZiMdTfm1v70rFEk=|ZPQh1xXEzb11yVgNZ9UQ4fmZDDmLgVv7GUcCMIgWsOI=","passwordRevisionDate":null,"totp":null,"uris":[{"match":null,"uri":"2.JRATQ50tIA5orsXGHX2xjA==|JRpTd4KWgeSjLDbaW5jP1sagPn3+s9AaFAbDjkGmhhw=|tGu7q2XPJ0vGDgfKyycOEjyaCqXkXqAgaNdD4Lad2WY=","uriChecksum":"2.R1/7l6R12Ei0yLpHyZlwHg==|8CMAAKqLFsiohSUpoQ8fGFJf4A1nPLhoduMBq+YIjUEEqyd3nVVLob+2Lb2tWbAr|ofGVIrkOXOP17s3LoKsJIEYB77MGaHRSqUUF8PiLecw="}],"username":"2.JXPx0dLkDdZMtjr0+WUm8w==|w56guhjuLCTFrKh3Y1fIHQ==|50U0YVavz5WGW/km4FdlmkNAM47nVBMuU7V6OKPIH9w="}
  key: 2.IhMtopTMncZ9MJNpi8QY1w==|Oww5rPq0IF49JKzNfC/EkW0FNgQtBKFDTJE5FYbefPaT1nJMN2LBzP7GonvLbpuZf0wL0ZgyYSc9vNwGg0XWIe/2wYPMcLqRd5yQGGFUx3E=|r3UH61evhXIHAxNsFzDMUNYBxoEctq0kA99GuS7w0K0=

Each value follows the same shape: a type prefix (2.), then IV, ciphertext and MAC in base64, separated by pipes. When we later decrypted these fields offline, they parsed exactly that way, as AES-CBC with an HMAC over IV and ciphertext. Notice what is left in clear text, though. atype: 1 says this is a login rather than a card or note, and the JSON keys reveal that the item has a URI and no TOTP. The timestamps in other columns show when you created and edited it. The secrets are sealed, but the shape of your vault is not.

What the server stores, column by column

Reading the users, ciphers, folders and devices tables gave us a precise answer to “what does the provider know”. The table below is what a full dump of our Vaultwarden database would hand an attacker, and it is the same inventory a breach notice should give you.

Stored valueForm on the serverWhat it reveals
Account email and display namePlaintextWho you are, and the PBKDF2 salt
KDF type, iterations, memory, parallelismPlaintextExactly how expensive each guess will be
Login hash (password_hash, 32 bytes, 64-byte salt)PBKDF2 at 600,000 iterations over the client hashA second, slower target for guessing
User key (akey)Encrypted with the stretched master keyNothing without the master password, and a perfect check for each guess
Item names, usernames, passwords, URIs, notesEncrypted, each with a per-item keyNothing
Folder namesEncryptedNothing
Item type, created and updated timesPlaintextVault size, item mix, activity timeline
Device types and namesPlaintext (linux, type 25 for our CLI)Which platforms you use

The URI row is the one to compare against older designs. LastPass kept website URLs unencrypted, so its 2022 breach told attackers which sites each customer used and which vaults were worth the cracking time. In the Bitwarden format the URI is a ciphertext like any other field. If you’re choosing between products, “are URLs encrypted?” is a sharper question than “is it zero-knowledge?”, because almost every vendor now says yes to the second.

Why changing the KDF doesn’t re-encrypt the vault

Changing your KDF re-derives the master key and re-wraps the user key, but it leaves every encrypted item untouched. Bitwarden’s KDF documentation says so, and we confirmed it on the server. In the Vaultwarden web vault the setting sits under Settings, Security, Keys:

Vaultwarden web vault Keys tab with Argon2id selected and the default KDF memory 32, iterations 6 and parallelism 4
  1. 1Key derivation function
  2. 2RAM each guess must fill
  3. 3Passes over that memory
  4. 4Lanes computed per derivation
  5. 5Re-wraps the user key, not the vault

Each control maps to one part of the derivation:

  1. Key derivation function: PBKDF2 SHA-256 or Argon2id. Picking Argon2id reveals the three memory-hard settings.
  2. RAM each guess must fill: 32 MB by default, which is what makes GPU and ASIC cracking expensive.
  3. Passes over that memory: 6 iterations by default; time grows linearly with this value.
  4. Lanes computed per derivation: parallelism 4, so a multi-core phone or laptop finishes faster without lowering the attacker’s total cost.
  5. Re-wraps the user key, not the vault: the button logs you out of all active sessions and rewrites only the account’s key material, which is why the page suggests exporting the vault first.

We fingerprinted the database before and after switching from PBKDF2 to Argon2id. The SHA-256 of the cipher rows stayed at e9ec211b..., while the akey and the stored login hash both changed, and client_kdf_type went from 0 to 1 with memory 32 and parallelism 4. The consequence cuts both ways: a stronger KDF protects you from the next breach immediately, but it does nothing for a copy of the database an attacker took last year, because that copy still has the old wrapper. If you suspect a past leak, the fix is a new master password with the “Also rotate my account’s encryption key” box ticked, which really does re-encrypt every item. Log out of every other client and replace any account-restricted export with a password-protected one first, because Bitwarden warns that edits from a session still holding the old key corrupt data beyond recovery.

How sync moves the vault between devices

Sync in a zero-knowledge design is plain storage: the server keeps the latest encrypted blobs and hands them to any device that authenticates. Our second client was the Bitwarden CLI on the lab VM. It fetched the KDF settings, derived the same master key from the password, unwrapped the akey, and decrypted the item locally, which is how bw get item printed the password while the server never saw it. Conflict handling, offline copies and the browser extension’s autofill all work on decrypted data in the client, so the risk shifts to the device. Malware on an unlocked laptop reads the vault the same way you do, which is why a zero-knowledge server cannot save an infected endpoint.

That’s also why the self-hosted route is mostly about where the blobs live, not about stronger cryptography. Running Vaultwarden yourself, as in our Vaultwarden with Nginx and Let’s Encrypt guide or the Ubuntu 26.04 install, removes the vendor as a breach target and puts the database on your disk, with your backups and your patching schedule. Vaultwarden’s own wiki is clear that the web vault needs HTTPS, because browsers only expose the Web Crypto APIs the client relies on in a secure context.

What a password manager breach exposes

A breach of a zero-knowledge server exposes the encrypted vaults plus the metadata in the table above, and it turns every master password into an offline guessing target with no rate limit and no lockout. To see what that looks like, we copied the SQLite file with .backup, the way an attacker with server access would, and ran a short Python script that knows only the public Bitwarden format. It derives a key from each guess with the KDF settings stored in the row, tries to unwrap akey, and stops on the first guess whose MAC verifies:

python3 offline-guess.py stolen.sqlite3 "password123" "Summer2026!" "Correct-Horse-Lab-2026!"

Two wrong guesses fail cleanly, and the right one opens the user key and then the item:

'password123'                MAC check failed, wrong master password
'Summer2026!'                MAC check failed, wrong master password
'Correct-Horse-Lab-2026!'    user key unwrapped (64 bytes), item name = 'GitHub admin'

The MAC is what makes this an oracle. The attacker never needs your login hash or the server; the wrapped key tells them with certainty when they’ve found the password. So the only thing between a stolen database and your vault is the cost of each guess times the number of guesses your password needs. We measured that cost on one core of the lab VM for the settings real users have had:

Chart of master password guesses per second on one CPU core: PBKDF2 at 500 iterations 10,761, at 5,000 1,146, at 100,100 59.9, at 600,000 9.4, Argon2id 32 MiB t=6 p=4 7.6

The spread is the story. An old LastPass account left at 500 iterations falls to the same hardware about 1,100 times faster than a Bitwarden account on the 600,000 default, and LastPass did not reliably upgrade existing accounts when it raised its default. A single CPU core is the slowest attacker you’ll meet, and GPU rigs run PBKDF2 far faster. That’s where Argon2id earns its place, since every guess has to fill 32 MiB of memory, which limits how many guesses a card can run side by side. Our numbers show relative cost, not a cracking time. Hashcat ships dedicated modes for both formats (23400 for Bitwarden, 6800 for LastPass), and our Hashcat and John the Ripper walkthrough shows how those tools run attacks in general.

The incidents on record line up with that model. In each case the encryption itself held, and the damage came from metadata, weak or reused passwords, or code running on the user’s side:

IncidentWhat attackers gotWhat stayed encryptedReported outcome
LastPass, 2022Backup of customer vaults, with website URLs and some file paths unencryptedUsernames, passwords, secure notes, form-fill dataResearchers tied more than $35 million in crypto theft from over 150 victims to cracked vaults (2023); a 2025 US forfeiture traced $23.6 million from a $150 million theft that “may have” involved keys from a cracked vault; the complaint does not name LastPass, and LastPass says it has no conclusive evidence of a link
Norton Password Manager, Dec 2022Credential stuffing with passwords reused from other breachesGen said its own systems were not compromised; vaults were most at risk where the master password matched the reused account passwordGen secured 925,000 accounts that may have been targeted
@bitwarden/cli on npm, Apr 2026A malicious 2026.4.0 package, live for about 90 minutes, that stole developer tokens and keys from machines that installed itBitwarden reported no evidence that vault data was accessedLinked by Bitwarden to the Checkmarx supply-chain attack

Read across the rows and the defensive priorities fall out on their own. A long, unique master password defeats the LastPass scenario, a second factor defeats the Norton one, and pinning or verifying client packages addresses the npm one. A hardware key adds the strongest second factor; our YubiKey and FIDO2 guide covers the keys themselves.

Where the zero-knowledge model breaks down

The model assumes the server is honest about what it sends the client, and that assumption was tested hard in 2026. Researchers at ETH Zurich and USI modelled a fully malicious server and published 12 distinct attacks against Bitwarden, 7 against LastPass, 6 against Dashlane and 6 against 1Password, most of which allow password recovery. They range from integrity violations against a targeted vault to the complete compromise of every vault in an organisation, and the authors trace them to a handful of shared design anti-patterns where the client trusts something the server sends. Bitwarden said seven of the issues it was shown were resolved or in active remediation and accepted the remaining three as intentional design decisions.

None of that makes the design pointless, because a passive database leak (the common case) is still only an offline guessing problem. It does mean “zero-knowledge” describes data at rest, not a guarantee that a compromised provider can’t attack you. Four limits are worth carrying into any vendor evaluation:

  • The master password is the key: any KDF is just a multiplier on its strength, so a guessable password loses no matter the iteration count.
  • Metadata is out of scope: item counts, types, timestamps, device names and, on some products, URLs stay readable.
  • The client is trusted completely: a poisoned extension, CLI or web vault sees everything you decrypt.
  • Old copies keep old settings: raising the KDF later does not protect a backup taken before the change.

For teams, the same reasoning carries over to shared vaults, where the extra moving parts (organization keys, invitations, admin recovery) sit behind the worst outcome in the ETH paper, the compromise of a whole organisation’s vaults. A team product built on public-key sharing from the start, such as Passbolt on Ubuntu, is a different design worth comparing rather than a drop-in substitute.

Tools in this space

These products all encrypt on the client; they differ in where the vault lives and how the key is protected. The notes below come from each vendor’s own documentation, not from our ranking:

  • Bitwarden: open-source clients and server, PBKDF2 at 600,000 iterations by default with Argon2id as an option.
  • 1Password: mixes a 128-bit Secret Key into key derivation (two-secret key derivation, PBKDF2-HMAC-SHA256 with 650,000 iterations), so server data alone is not enough to start guessing the master password offline.
  • Proton Pass: an end-to-end encrypted password manager from the company behind Proton Mail.
  • KeePassXC: free, GPLv3 desktop app that keeps the vault in an offline encrypted file, with no vendor server at all.
  • Vaultwarden: a self-hosted server compatible with Bitwarden clients, the one we inspected here.
  • Passbolt: open-source, end-to-end encrypted credential platform for IT teams, built on public-private key sharing.
  • Keeper: describes itself as zero-knowledge, using AES-256 and elliptic-curve cryptography.

1Password’s Secret Key is the one design here that changes the breach math rather than the KDF cost. An attacker holding only the server data has 128 random bits to guess before the master password even comes into play. KeePassXC removes the server from the picture entirely and moves the whole problem to your file backups.

Sources

Lab figures (database rows, prelogin responses, KDF timings and the offline guess run) come from our Vaultwarden 1.37.4 test on a Fedora 45 VM. Everything else is from these sources:

SourceWhat it supports here
Bitwarden security whitepaperMaster key, HKDF stretching, master password hash, server re-hash at 600,000 iterations, 512-bit user key, per-item cipher keys
Bitwarden encryption key derivationPBKDF2 default of 600,000; Argon2id defaults of 32 MiB, 6 iterations and 4 threads; KDF changes do not re-encrypt vault data
Bitwarden encryption key rotationRotation re-encrypts all vault data; log out clients and replace account-restricted exports first
Vaultwarden 1.37.4 accounts codeDecoy KDF settings for unknown emails, the same six-entry list as upstream
Bitwarden encryption usedAES256-CBC-HMAC-SHA256
OWASP Password Storage Cheat SheetPBKDF2-HMAC-SHA256 at 600,000 iterations or more
1Password security design white paper128-bit Secret Key, 2SKD, PBKDF2-HMAC-SHA256 with 650,000 iterations
LastPass incident notice and March 2023 updateUnencrypted URLs and file paths, encrypted credential fields, 100,100 iterations
Krebs on Security, Sept 2023Legacy LastPass iteration counts of 1 to 500, 5,000 by 2013, 100,100 from 2018, existing accounts not upgraded
Krebs on Security, Sept 2023 (thefts)More than $35 million in crypto stolen from over 150 victims
Security Affairs, March 2025$23,604,815.09 traced in a US forfeiture tied to a $150 million theft
BleepingComputer on Norton Password ManagerCredential stuffing, 925,000 accounts secured, Gen’s systems not compromised
BleepingComputer on the Bitwarden CLI npm compromiseVersion 2026.4.0 on April 22, 2026, no evidence of vault data access
IACR ePrint 2026/058 and Bitwarden’s response12, 7, 6 and 6 malicious-server attacks; seven issues resolved or in remediation, three accepted as design decisions
Hashcat example hashesModes 23400 (Bitwarden) and 6800 (LastPass)
Vaultwarden wiki, Enabling HTTPSThe web vault needs a secure context for Web Crypto

Vendor product facts in the tools section were checked on each vendor’s site in October 2026.

Keep reading

Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs Security Java4Shell (CVE-2026-114938): Find and Patch Vulnerable JVMs UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 Security UFW Firewall Commands with Examples on Ubuntu 26.04 / 24.04 nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch Security nginx HTTP/2 RCE CVE-2026-123007: Check, Disable HTTP/2, Patch agent-framework PyPI Malware: Check 1.26.1/1.26.2 and Rotate Keys AI agent-framework PyPI Malware: Check 1.26.1/1.26.2 and Rotate Keys Drupal SA-CORE-2026-019 (CVE-2026-136716): Check and Patch Security Drupal SA-CORE-2026-019 (CVE-2026-136716): Check and Patch Detect Malicious traffic in your Network using Maltrail Email Detect Malicious traffic in your Network using Maltrail

Leave a Comment

Press ESC to close