Why “AES-256” tells you almost nothing
When a password manager is breached—as LastPass was in 2022 when attackers exfiltrated encrypted customer vault backups—no attacker tries to break AES-256 directly. A brute-force search over a uniformly random 256-bit key requires 2256 operations, a number beyond physical reality. Instead, attackers target the weakest link in the cryptographic chain surrounding AES:
- Weak key derivation that lets GPU clusters test billions of master-password guesses per second offline.
- Low-entropy human master passwords unprotected by a high-entropy device secret or hardware factor.
- Unauthenticated or misconfigured cipher modes vulnerable to tampering, ciphertext swapping, or nonce reuse.
- Unencrypted metadata—especially website URLs, folder names, and account identifiers—that reveals sensitive targets even if passwords stay encrypted.
If you want a high-level overview before diving into the cryptographic primitives, start with our companion explainer on how password managers work. Below, we dissect each cryptographic layer in engineering detail.
Key derivation: PBKDF2 vs scrypt vs Argon2id
A symmetric cipher like AES-256 requires a fixed-length, uniformly random 256-bit key. Humans cannot memorize 256 random bits, so password managers feed a variable-length master password and a unique salt into a Key Derivation Function (KDF). The KDF has two jobs: stretch a human secret into a cryptographic key, and deliberately slow down every offline guess if an encrypted vault leaks.
The security gap between KDF families comes down to memory hardness—whether computing one guess requires substantial RAM in addition to CPU cycles.
| KDF | Hardness class | Tunable parameters | GPU / ASIC resistance | Password manager usage |
|---|---|---|---|---|
| PBKDF2-HMAC-SHA256 | CPU-bound (not memory-hard) | Iterations (e.g., 600,000–650,000) | Low — negligible RAM allows thousands of parallel SHA-256 lanes per GPU/ASIC | 1Password (paired with 128-bit Secret Key), Bitwarden legacy/FIPS default |
| scrypt | Memory-hard | N (CPU/memory cost), r (block size), p (parallelism) | High — requires large sequential memory buffers per guess | Legacy/embedded tools, crypto wallets, some SSH key formats |
| Argon2id | Memory-hard hybrid (Argon2i + Argon2d) | m (memory, e.g., 64 MiB), t (iterations, e.g., 3), p (parallelism, e.g., 4) | Very high — saturates VRAM bandwidth and resists cache-timing side channels | Bitwarden (recommended), KeePassXC (default KDBX 4), Dashlane (Argon2d) |
| bcrypt (OpenPGP / S2K) | Blowfish key-schedule (4 KiB state) | Cost factor (2^cost rounds) | Moderate — resists GPUs better than PBKDF2, weaker than Argon2id against FPGAs | Proton account user-key derivation (paired with SRP-6a and OpenPGP/AES-GCM) |
Why GPUs and ASICs crush PBKDF2
PBKDF2-HMAC-SHA256 computes HMAC-SHA256 repeatedly in a tight loop. Each iteration requires only a few hundred bytes of state—small enough to live entirely inside GPU registers. A modern consumer GPU contains thousands of shader cores executing SHA-256 in lockstep, and custom Bitcoin-style SHA-256 ASICs are orders of magnitude faster still. Even at OWASP's baseline of 600,000 iterations, an eight-GPU cracking rig can test tens of millions of PBKDF2 candidates per hour. If a user picked a reused or dictionary-based master password with 35–40 bits of real entropy, PBKDF2 alone will not save a leaked vault.
How Argon2id changes the attacker's economics
Argon2id (standardized in RFC 9106 and winner of the Password Hashing Competition) exposes three orthogonal tuning knobs:
- Memory cost (
m): Total RAM allocated during derivation, typically64 MiB (65,536 KiB) in modern password managers like Bitwarden and KeePassXC (OWASP recommends at least 19 MiB witht=2, or 46 MiB witht=1, for interactive logins, and higher for offline vault unlock). - Time cost (
t): Number of passes over the memory array (commonlyt = 3). Increasingtscales compute linearly without raising peak memory. - Parallelism (
p): Number of independent compute lanes (commonlyp = 4), matching multi-core phones and laptops while forcing an attacker to provision proportional bandwidth.
Argon2id is a deliberate hybrid: it runs Argon2i (data-independent memory indexing, resistant to cache-timing side channels) on the first half of the first pass, then switches to Argon2d (data-dependent indexing, resistant to GPU time-memory trade-off attacks) for the remaining passes. Because each concurrent guess needs 64 MiB of high-bandwidth RAM, a 24 GB GPU can run at most a few hundred guesses simultaneously instead of tens of thousands—collapsing GPU cracking throughput by orders of magnitude.
Want to see the exact difference in real crack times between PBKDF2, bcrypt, Argon2id, and 2SKD against your password length? Model it directly in our KDF Crack Time Calculator, or inspect bcrypt cost factors with our bcrypt generator.
Two-Secret Key Derivation (2SKD) and 128-bit Secret Keys
Memory-hard KDFs buy you a multiplicative slowdown—perhaps 1,000x to 100,000x harder per guess than PBKDF2. Adding a high-entropy device secret buys you an exponential wall.
This is the core idea behind Two-Secret Key Derivation (2SKD), popularized by 1Password. When you create an account, your device generates a random 128-bit Secret Key using a CSPRNG (formatted in Base32-like groups such asA3-XXXXXX-XXXXXX-XXXXX-XXXXX-XXXXX-XXXXX). Your device stores this Secret Key locally and prints it onto your Emergency Kit, but never uploads it to the server.
To derive the Account Unlock Key (AUK), the client runs PBKDF2-HMAC-SHA256 on the master password using a salt combined with the Secret Key's domain parameters, then mixes the output with the raw 128-bit Secret Key via HKDF-SHA256:
- Cloud-only breach scenario: An attacker steals the encrypted vault from the vendor's servers, but does not have your Secret Key. Even if your master password were literally
password123, the attacker must still brute-force 128 bits of pure randomness (3.4 × 1038 candidates). No GPU cluster or nation-state can crack a cloud dump missing the Secret Key. - Local device theft scenario: If malware or a forensic attacker steals the local vault cache and the stored Secret Key from your laptop, 2SKD collapses back to the strength of your master password and KDF (650,000 PBKDF2 iterations in 1Password). This is why you still need a strong 5–6 word master passphrase—generate one with our EFF Diceware generator or master password generator.
- The operational trade-off: If you lose every signed-in device and your Secret Key, your vault is permanently unrecoverable. Read our Emergency Kit & recovery guide before relying on a 2SKD vault.
Compare 1Password's 2SKD vs Bitwarden's Argon2id →
Authenticated encryption: AES-GCM vs XChaCha20 vs CBC+HMAC
Encryption alone (confidentiality) is broken in practice. Without an integrity check, an active attacker or malicious server can flip bits in a ciphertext to alter decrypted fields, swap an encrypted record from one vault into another, or exploit padding-oracle side channels to decrypt data byte by byte.
Modern vaults therefore mandate Authenticated Encryption with Associated Data (AEAD) or strict Encrypt-then-MAC. AEAD produces both ciphertext and an authentication tag computed over the ciphertext and unencrypted Associated Data (AAD) such as the vault UUID, item UUID, and schema version.
# AEAD encryption binds plaintext AND associated metadata (AAD)
# SECURE: tampering with vault_id or item_uuid breaks the authentication tag
ciphertext, tag = AEAD_Encrypt(
key = vault_or_item_key, // 256-bit random symmetric key
nonce = random_nonce, // 96-bit (GCM) or 192-bit (XChaCha20)
plain = serialized_login_json, // username, password, URLs, notes, TOTP seed
aad = vault_id || item_uuid || schema_version
)| Construction | Integrity mechanism | Nonce / IV size | Performance profile | Primary implementation risk |
|---|---|---|---|---|
| AES-256-GCM | Built-in AEAD (GHASH) | 96-bit (12 bytes) | Fast with AES-NI / ARMv8 Crypto | Catastrophic on nonce reuse: leaks XOR of plaintexts and exposes GHASH authentication key H |
| XChaCha20-Poly1305 | Built-in AEAD (Poly1305) | 192-bit (24 bytes) | Fast & constant-time in pure software | Large 192-bit nonce makes random collision probability negligible (~2^96 birthday bound) |
| AES-256-CBC + HMAC-SHA256 | Encrypt-then-MAC (separate MAC key) | 128-bit random IV | Fast with AES-NI; two-pass | Must strictly verify HMAC in constant time before decrypting to prevent padding-oracle attacks |
The nonce reuse hazard in AES-256-GCM
AES-256-GCM is fast and FIPS-validated, making it the default in 1Password, Proton Pass, and Apple's iCloud Keychain. Its Achilles' heel is its 96-bit (12-byte) nonce. Because GCM is built on counter mode (CTR) plus GHASH polynomial authentication:
- If two messages are encrypted with the same key and the same 96-bit nonce, XORing the two ciphertexts cancels the keystream and reveals the XOR of the two plaintexts.
- Worse, a single nonce collision allows an attacker to solve a polynomial equation over
GF(2^128)and recover the secret GHASH authentication keyH, permanently breaking integrity for that key. - With purely random 96-bit nonces under one static key, NIST SP 800-38D caps usage at 232 (~4.3 billion) encryptions to keep collision probability below 2−32.
Well-engineered managers avoid this limit by generating fresh 256-bit random per-item keys (Proton Pass), rotating keys, or using XChaCha20-Poly1305, whose 192-bit nonce extends the random-nonce birthday bound to 296 encryptions while running constant-time in pure software without needing AES-NI hardware acceleration.
Bitwarden takes the classic AES-256-CBC + HMAC-SHA256 (Encrypt-then-MAC) route, deriving separate 256-bit encryption and 256-bit MAC keys via HKDF. Provided the client strictly verifies the HMAC tag in constant time before invoking AES-CBC decryption, Encrypt-then-MAC provides IND-CCA2 security equivalent to native AEAD without GCM's 96-bit nonce fragility.
Vault key hierarchies and zero-knowledge sharing
Newcomers often assume a password manager encrypts their vault directly with the key derived from their master password. Almost no modern password manager does that. Instead, they useenvelope encryption—a layered tree of random symmetric and asymmetric keys.
# Envelope encryption hierarchy in a modern zero-knowledge vault
Master Password (+ optional 128-bit Secret Key)
└─▶ KDF (Argon2id or PBKDF2 + HKDF) ──▶ Master Key (KEK, never leaves device)
├─▶ Derives separate Auth Proof (SRP-6a verifier or double-hashed auth key)
└─▶ Unwraps Encrypted Account / User Symmetric Key (256-bit random)
├─▶ Unwraps Private Asymmetric Key (RSA-OAEP or X25519 / OpenPGP)
│ └─▶ Unwraps Shared Family / Team Vault Keys
└─▶ Unwraps Personal Vault Key(s) (256-bit random)
└─▶ Encrypts / Unwraps Per-Item Keys & AEAD Record CiphertextsThis indirection solves three hard engineering problems cleanly:
- Instant master-password rotation: When you change your master password or upgrade KDF parameters (for example, switching Bitwarden from PBKDF2 to Argon2id), the client re-encrypts only a single 64-byte encrypted Account/User Key—not thousands of vault records and file attachments.
- Zero-knowledge sharing without revealing master passwords: Each user holds an asymmetric keypair (such as RSA-OAEP-2048 or X25519/OpenPGP) whose private key is encrypted under their Account Key. To share a family or engineering vault with a teammate, your client fetches their verified public key, encrypts the shared 256-bit Vault Key to them, and uploads the wrapped key. The server routes the blob without ever seeing the plaintext Vault Key.
- Per-item key isolation and rotation: Architectures like Proton Pass generate a fresh 256-bit random Item Key for every single login, wrapped by the Vault Key. This eliminates AES-GCM nonce wear-out on long-lived vaults and lets items move between vaults by re-wrapping only their 32-byte Item Key.
Zero-knowledge authentication: SRP-6a vs hashed auth keys
Before a client can download your encrypted vault, it must prove to the server that you own the account. Naive designs send the master password over TLS—terrible, because a single server bug, proxy log, or compromised load balancer would expose the exact secret that decrypts the vault. Production managers use one of two zero-knowledge authentication designs:
1. SRP-6a (Secure Remote Password)
Used by 1Password and Proton Pass, SRP-6a (RFC 5054) is an augmented Password-Authenticated Key Exchange (PAKE). During account creation, the client derives an authentication secret x (derived separately from—or with domain separation from—the vault decryption key) and uploads a verifier v = g^x mod N over a large safe prime N.
On sign-in, client and server exchange ephemeral public values (A = g^a mod N andB = kv + g^b mod N) and independently compute a shared session key K. Neither side sends the password or the verifier across the network. Even if TLS were terminated by a malicious reverse proxy or corporate MitM appliance, an attacker cannot replay the handshake or extract the client's secret without breaking the discrete logarithm problem or running an offline dictionary attack against the transcript (which 1Password further defeats because the SRP secret incorporates the 128-bit Secret Key).
2. Domain-separated hashed authentication keys
Used by Bitwarden, the client first runs the full KDF (Argon2id or PBKDF2) to produce the Master Key. It then splits duties cryptographically:
- For vault decryption: The
Master Keyis expanded via HKDF into theStretched Master Key, which unwraps the user's encrypted symmetric key locally and never leaves the device. - For server authentication: The client runs one additional PBKDF2-SHA256 round over
(Master Key, Master Password)to produce aMaster Password Hash, transmitted over TLS. The server re-hashes that value with a server-side salt and PBKDF2 iterations before storing it.
Because the authentication hash is a one-way function of the Master Key, a leaked authentication database cannot directly decrypt vaults. However, unlike SRP, the client does transmit a reusable bearer proof over TLS—making TLS certificate validation, strong MFA (FIDO2 security keys), and phishing resistance essential.
Metadata leakage: what hosted servers still observe
“Zero-knowledge” is frequently misunderstood to mean “the server knows nothing about me.” In reality, every cloud-synced password manager must process operational metadata to route sync traffic, bill subscriptions, enforce rate limits, and manage shared vaults. The critical security distinction is whether content metadata(especially website URLs, item titles, and notes) is encrypted inside the AEAD payload.
| Metadata category | Server visibility | Security & privacy impact | How modern designs minimize it |
|---|---|---|---|
| Account email, billing, IP & login timestamps | Visible to hosted provider | Links your real identity, device count, and sign-in cadence to the vault account. | Use email aliases, privacy-preserving billing, or local-first KeePassXC vaults. |
| Vault count, item count & modification timestamps | Usually visible to hosted provider | Reveals vault size, sync activity, and when specific encrypted blobs were edited. | Inherent to per-item cloud sync; only full-blob sync (like KDBX files) hides per-item counts. |
| Website URLs, titles, usernames & folder names | Encrypted in modern designs (exposed in legacy designs) | Unencrypted URLs reveal banking, medical, political, and employer accounts if servers are breached. | Verify URLs and titles sit inside the AEAD payload (1Password, Bitwarden, Proton Pass all encrypt URLs). |
| Website icons (favicons) | Can leak domains if fetched directly or via vendor proxy | Fetching favicons exposes the exact domains stored in your vault to either the website or vendor servers. | Disable automatic website icons or verify that icon fetches are proxied without account identifiers. |
| Sharing graph (who shares which vault) | Visible to hosted provider | Server must route encrypted vault keys to authorized team or family members. | Standard for hosted collaboration; item contents remain encrypted under shared vault keys. |
Today, 1Password, Bitwarden, Proton Pass, Apple Passwords, and KeePassXC all encrypt website URLs, titles, usernames, notes, and TOTP secrets. If you also want to eliminate server-side sync timestamps and account graphs entirely, a local-first database like KeePassXC is the only model that removes the vendor server from the architecture—see our Bitwarden vs KeePassXC comparison and Proton Pass vs Bitwarden breakdown.
Cryptographic architecture matrix (2026)
The matrix below compares the documented cryptographic primitives of five widely vetted password managers based on their published security whitepapers and technical documentation.
| Product | KDF & secret inputs | Cipher / AEAD | Key hierarchy | Auth protocol | Metadata posture |
|---|---|---|---|---|---|
| 1Password | PBKDF2-HMAC-SHA256 (650k iterations) + 2SKD with 128-bit Secret Key (HKDF) | AES-256-GCM (JWE/JSON authenticated payloads) | Account Unlock Key → Master/Account Key → RSA-OAEP-2048 keyset → Vault Keys | SRP-6a (3072-bit prime group) | Item titles, URLs, notes & fields encrypted; vault structure/timestamps visible to server |
| Bitwarden | PBKDF2-SHA256 (600k default) or Argon2id (64 MiB, t=3, p=4 recommended) | AES-256-CBC + HMAC-SHA256 (Encrypt-then-MAC) | Master Key → Stretched Master Key (HKDF) → User Symmetric Key → RSA-2048 Org Keys | Client-side Master Password Hash (re-hashed server-side with PBKDF2) | URLs, names, usernames, notes & TOTP seeds encrypted; item counts/timestamps visible |
| Proton Pass | bcrypt-derived key for Proton User Key + HKDF key expansion | AES-256-GCM with distinct Vault Keys & per-Item Keys (OpenPGP wrapped) | User Key (OpenPGP) → Signed/Encrypted Vault Key → Random 256-bit Item Key per entry | SRP-6a (2048-bit modulus) | All item fields including URLs, titles, and custom fields encrypted; minimal operational metadata |
| Apple Passwords | Device passcode / Secure Enclave + iCloud Keychain escrow (HSM rate-limited) | AES-256-GCM (end-to-end encrypted CloudKit / iCloud Keychain records) | Trusted device circle keys + per-class keychain keys wrapped by Secure Enclave | Apple Account SRP + device-circle cryptographic trust | Credentials & URLs end-to-end encrypted; iCloud account & sync timestamps visible to Apple |
| KeePassXC | Argon2id (default in KDBX 4) or Argon2d / AES-KDF; optional key file & YubiKey HMAC-SHA1 | AES-256-CBC, ChaCha20, or Twofish + HMAC-SHA256 header & stream authentication | Composite Master Key → KDF → 256-bit Master Key + ChaCha20 in-memory protected stream | None (local encrypted .kdbx file; no hosted server) | Zero server-side vault metadata; file size & modification time visible only to chosen file host |
For head-to-head operational comparisons built on this cryptographic foundation, explore our detailed evaluations: 1Password vs Bitwarden, Apple Passwords vs 1Password, 1Password vs Proton Pass, and 1Password vs Dashlane.
Primary sources and specifications
- RFC 9106 — Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications
- NIST SP 800-38D — Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM)
- RFC 5054 — Using the Secure Remote Password (SRP) Protocol for TLS Authentication
- OWASP Password Storage Cheat Sheet
- 1Password Security Design White Paper
- Bitwarden Security Whitepaper
- Proton Pass Security Model
- Apple Platform Security — iCloud Keychain Overview
- KeePassXC User Guide & KDBX 4 Format
Frequently asked questions
Why is Argon2id preferred over PBKDF2 for password manager vaults?
PBKDF2 uses almost no RAM, allowing attackers with GPUs or ASICs to run hundreds of millions of guesses per second in parallel against a stolen encrypted vault. Argon2id requires configurable RAM (typically 64 MiB or more per guess), saturating GPU memory bandwidth and dramatically raising the hardware cost of offline cracking.
Does 1Password using PBKDF2 make it weaker than Bitwarden using Argon2id?
No, provided the attacker only steals the encrypted cloud database. 1Password combines the master password with a device-generated 128-bit Secret Key via Two-Secret Key Derivation (2SKD). Without that Secret Key, an attacker faces 2128 possibilities regardless of KDF speed. However, if an attacker obtains a local device copy containing the Secret Key, KDF strength and master password entropy determine offline cracking resistance.
Why is nonce reuse catastrophic in AES-256-GCM?
AES-GCM derives its keystream from the key and a 96-bit nonce. Reusing a nonce with the same key exposes the XOR of both plaintexts and lets an attacker algebraically recover the internal GHASH authentication key, enabling forged ciphertexts for any future message under that key. Modern implementations use random per-item keys, deterministic counters, or XChaCha20-Poly1305 with 192-bit nonces.
What metadata can a zero-knowledge password manager server still see?
Even when every password, username, note, and URL is encrypted client-side, a hosted server typically observes your account email, billing details, IP addresses, device logins, vault count, encrypted item counts, sync timestamps, and who shares which vaults. Older architectures also left website URLs unencrypted, which modern managers avoid by placing URLs inside the authenticated ciphertext.
How does SRP-6a authenticate you without sending your master password?
Secure Remote Password (SRP-6a) is a password-authenticated key exchange protocol. At registration, your device computes a mathematical verifier from your credentials and uploads only the verifier. On login, client and server exchange ephemeral Diffie-Hellman values and prove mutual knowledge of the secret without ever transmitting the password or a reusable authentication hash over the wire.