“Zero-knowledge” labels three technically distinct things: zero-knowledge proof systems, augmented password-authenticated key exchange (aPAKE) protocols such as OPAQUE and SRP, and the vendor term “zero-knowledge encryption”, which in practice means client-side (end-to-end) encryption with no provider-held decryption key. This lesson gives the precise guarantees of each, the threat models under which they hold, what recent malicious-server research found in deployed products, and the engineering choices that close the gaps. It includes a small, tested client-side check against key-derivation downgrade.
Three constructions, three threat models
| Term | Guarantee | Adversary it addresses | Not addressed |
|---|---|---|---|
| Zero-knowledge proof | Verifier learns only that a statement is true | A curious or malicious verifier | Storage, encryption, endpoint security |
| aPAKE (OPAQUE, SRP) | Server authenticates the client without learning the password | Server compromise, network attackers, TLS failures | Offline guessing on stolen records; online guessing |
| “Zero-knowledge encryption” | Server stores ciphertext and holds no key that decrypts it | Honest-but-curious or breached storage; ideally a fully malicious server | Metadata, client code integrity, weak passwords, recovery paths, unlocked endpoints |
Scarlata, Torrisi, Backendal and Paterson note that the third term “has no strict technical meaning”, though vendors’ claims imply it should hold “even if the server is fully malicious” [1]. That gap between implied and delivered threat model is where most of the problems in this lesson live.
Zero-knowledge proofs
Definitions
Goldwasser, Micali and Rackoff introduced the concept in 1985 (journal version 1989), defining zero-knowledge proofs as “those proofs that convey no additional knowledge other than the correctness of the proposition in question” [2]. The ZKProof Community Reference, a 2022 standardisation draft, states the three required properties [3]:
- Completeness: “If the statement is true and both prover and verifier follow the protocol; the verifier will accept.”
- Soundness: “If the statement is false, and the verifier follows the protocol; the verifier will not be convinced.”
- Zero-knowledge: the verifier learns nothing beyond the statement’s truth. Formally, zero knowledge “is defined through the specification of an efficient simulator that can generate kosher looking proofs without access to the witness” [3]. If a simulator that does not know the secret (the witness) can produce transcripts indistinguishable from real ones, the real transcripts cannot be leaking the witness.
The reference also distinguishes proofs of knowledge, where soundness is strengthened so that a successful prover must “know” a witness, defined by the ability “to extract the witness from a successful prover” in a simulation [3].
Interactive and non-interactive
GMR-style proofs are interactive: multiple challenge-response rounds. A proof system is non-interactive “if the interaction consists of a single message from the prover to the verifier” [3]. Non-interactive systems usually need a setup; if it is public, this is the common reference string model, and proofs become transferable: anyone with the setup can verify them [3]. Many interactive protocols can be made non-interactive with the Fiat-Shamir transformation, which computes the verifier’s challenge from a hash instead of a live verifier. The reference notes that this lets the prover “retry many attempts until obtaining a challenge for which it can produce a response”, which has to be accounted for in parameter choice [3].
A SNARK is “a succinct non-interactive argument of knowledge” [3]; a zk-SNARK adds zero knowledge. “Argument” signals computational rather than unconditional soundness. Many constructions rely on a trusted setup; for those, the reference says “it should be clearly stated what kind of trust is placed in” it [3]. That is as far as this lesson goes: zk-SNARK deployments are mostly in specialised systems, and nothing here is financial or investment advice.
Relevance to password managers
Almost none. A vault product that says “zero-knowledge” is rarely running a ZK proof system. The closest real link is in authentication: 1Password describes its SRP-based login as a “zero-knowledge authentication scheme” [4], in the informal sense that the server does not learn the password.
Augmented PAKE: keeping the password off the server
The problem
Conventional login sends the password to the server over TLS, where it is checked against a salted hash. RFC 9807 lists why this is fragile: plaintext passwords end up in logs and databases, and TLS “may fail, including PKI attacks, certificate mishandling, termination outside the security perimeter, visibility to TLS-terminating intermediaries, and more” [5].
OPAQUE (RFC 9807)
OPAQUE was introduced by Jarecki, Krawczyk and Xu at EUROCRYPT 2018 [6] and published by the IRTF’s Crypto Forum Research Group as RFC 9807 in July 2025 (Informational) [5]. Key properties, quoting the RFC:
- It is “secure against pre-computation attacks”, provides “forward secrecy with respect to password leakage”, and hides “the password from the server, even during password registration” [5].
- It is “defined and proven as the composition of three functionalities: an Oblivious Pseudorandom Function (OPRF), a key recovery mechanism, and an authenticated key exchange (AKE) protocol” [5]. The OPRF lets the client compute a password-dependent value keyed by a server secret, without the server learning the password or the client learning the key.
- “The OPRF key acts as the secret salt value that ensures the infeasibility of precomputation attacks” [5].
- It “allows applications to increase the difficulty of offline dictionary attacks via iterated hashing or other key-stretching schemes” [5], so a memory-hard function such as Argon2id [7] can sit on the client side.
The RFC is equally explicit about limits. Online guessing and “offline dictionary attacks upon the compromise of a server and leakage of its credential file” are “inevitable” for any aPAKE [5]. “A corrupted server can run an exhaustive offline dictionary attack to validate guesses for the client’s password; this is inevitable in any (single-server) aPAKE protocol”, avoidable only with a multi-server threshold OPRF [5]. And server-side password rules are a trap: learning the password to enforce policy “invalidates this important security property of OPAQUE and is NOT RECOMMENDED” [5]. Move strength checks to the client.
SRP
The Secure Remote Password protocol was presented by Thomas Wu at
NDSS 1998 [8] and specified in RFC
2945 (2000) [9]. The server stores a
verifier v = g^x % N with x derived from salt
and password; during login the client first receives “the salt stored on
the host under his username” [9]. RFC
2945 claims that even if the verifier database were revealed, “the
attacker would still need an expensive dictionary search to obtain any
passwords” [9]. Jarecki, Krawczyk and
Xu’s critique applies to designs like this: protocols that “use random
‘salt’ transmitted in the clear from servers to users” are “vulnerable
to pre-computation attacks”, because an attacker can request the salt
before compromising the server [6].
SRP remains in production use, including in 1Password’s authentication
[4]; for new designs, OPAQUE is the
better-analysed choice.
What aPAKE does not give you
An aPAKE protects the authentication path. It does not encrypt the vault, and it does not stop a fully malicious server from sending clients bad parameters or bad code. In a vault product, aPAKE is one control among several, and the next section shows why the others matter.
“Zero-knowledge encryption”: client-side encryption in practice
Typical key hierarchy
Vendors’ white papers describe broadly similar structures:
- The client derives a master key from the master password with a slow KDF. Bitwarden uses PBKDF2-SHA256 “with 600,000 iteration rounds” by default, with Argon2id available [10].
- A separate value derived from the master key authenticates the client. In Bitwarden, a “Master Password Hash” is sent to the server and hashed again there [10]; in OPAQUE-based designs nothing password-derived needs to be sent.
- The master key unwraps a symmetric vault key; per-item keys are wrapped under it. Bitwarden describes each vault item (“Cipher”) encrypted locally under a “unique, random, 64-byte Cipher Key” [10].
- Sharing and organisations use public-key wrapping of item or collection keys.
- 1Password adds a second secret: a locally generated Secret Key mixed into derivation (two-secret key derivation, 2SKD), “so data we store cannot be used in cracking attempts” [4].
What the malicious-server research found
Scarlata and colleagues analysed Bitwarden, LastPass and Dashlane under a fully malicious server model, presenting 12, 7 and 6 attacks respectively, most allowing password recovery [1]. Their project site reports a later extension to 1Password, bringing the total to 31 attacks across four products [11]. The paper groups attacks into key escrow (account recovery and SSO), vault integrity, sharing, and backwards compatibility, and identifies recurring anti-patterns [1]:
- Unauthenticated public keys, which combined with key escrow and sharing let a server substitute its own keys.
- Assuming public-key ciphertexts authenticate their origin, enabling key substitution.
- No ciphertext integrity: LastPass “stands out for lacking any form of ciphertext integrity, using AES-CBC as its main encryption mode”.
- Backwards-compatibility downgrades to legacy, weaker modes.
- Item-field rather than vault-level integrity, enabling cut-and-paste attacks, due to “insufficient key separation” and “a lack of cryptographic binding between data and metadata”.
One concrete example, Bitwarden attack BW07, is worth studying because it is simple. “The KDF settings are stored unauthenticated and unencrypted on the server.” A malicious server can tell a logging-in client to use one iteration, “reducing the number of PBKDF2 iterations from 600,001 to 2 and achieving a 300,000x speed-up in a brute-force attack” on the hash the client then sends [1]. The vendors were notified and the paper reports remediation underway [1]; check current status on the project site before citing any product as vulnerable today [11].
Cloud storage shows the same patterns. Hofmann and Truong analysed Sync, pCloud, Icedrive, Seafile and Tresorit and found “severe cryptographic vulnerabilities in four of them”, with Tresorit “mostly unaffected” thanks to “a comparably more thoughtful design” [12]. Their common failures include misuse of primitives (CBC without integrity, key-IV reuse, unauthenticated RSA-OAEP) and metadata leakage: “all analysed providers leak at least the directory structure, if not the names of folders or files themselves” [12]. Backendal, Haller and Paterson’s earlier MEGA analysis showed that an adversarial provider “can break the confidentiality and integrity of user data” [13].
What the guarantee leaves out
Metadata. Scarlata et al. found that “most metadata is not kept confidential in the systems we studied” [1]. LastPass’s 2022 breach notice confirmed that copied vault backups contained “unencrypted data, such as website URLs” alongside encrypted credentials [14]. A list of sites someone has accounts on is sensitive in itself.
Offline guessing. Once encrypted vaults are stolen, guessing is bounded only by KDF cost and password entropy. LastPass told customers the attacker “may attempt to use brute force to guess your master password” [14]. NIST SP 800-63B-4 requires passwords to be stored “in a form that is resistant to offline attacks”, salted and hashed with “a suitable password hashing scheme” with a cost factor [15]; RFC 9106 specifies Argon2, a memory-hard function designed for this purpose [7]. A high-entropy second secret, as in 2SKD, removes the dependence on password strength for server-held data [4].
Client code integrity. For web clients, the server delivers the code that does the encryption. 1Password’s design paper: “The authenticity and integrity of the web client depends on the security of the host from which it’s delivered. An attacker capable of changing the web client on the server could deliver a malicious client to the user” [4]. Native apps and extensions with signed, versioned releases narrow this; reproducible builds and public source help reviewers. Scarlata et al. chose targets partly on “the availability of unobfuscated client source code” [1].
Recovery. Every recovery path is a decryption path. 1Password explains that the ability to recover or reset passwords “would give us (or an attacker who gets into our system)” the power to set a known password, so “We therefore deny ourselves this capability” [4]. Key escrow features for account recovery and SSO were the first category of attack in the password manager study [1].
The endpoint. “Malware that can inspect the memory of your computer or device when the 1Password client has unlocked your data will be able to extract secrets”, and beyond a point “there’s no way in principle to protect other processes running on that system” [4]. Lock timeouts, OS-level protections and device management matter more than the encryption mode once the vault is open.
Use. Filling a secret into a page, copying it to the clipboard or giving it to an agent takes it outside the vault’s guarantee. For agents this is the use-versus-reveal distinction from lessons 4 and 12: even a fill-only design exposes the value to anything that can read the page.
Building it properly: engineering checklist
- State the threat model. If you claim “zero-knowledge”, design and test for a fully malicious server, as the research community now expects [1][12].
- Use an aPAKE for login. OPAQUE per RFC 9807 [5]; keep password checks client-side.
- Authenticate every parameter the client acts on. KDF algorithm and cost, cipher suite, protocol version, key identifiers. Enforce client-side floors and refuse downgrades.
- Use AEAD everywhere and bind metadata as associated data; protect the vault as a whole, not just fields [1][12].
- Authenticate public keys used for sharing and escrow (signatures under an identity key, or key transparency), and never assume a public-key ciphertext proves its sender [1].
- Separate keys by purpose with labelled derivation (for example HKDF with distinct info strings).
- Encrypt metadata you do not need in the clear, and document what remains visible [12].
- Treat recovery as a decryption path: user-held recovery keys over provider escrow; if escrow exists, authenticate and audit it [1].
- Remove legacy modes rather than keep them reachable by server choice [1].
- Ship verifiable clients: signed releases, versioned builds, public source where possible [4].
Client-side floor on key-derivation cost
The BW07 pattern generalises: any parameter the server sends and the client trusts is a parameter a malicious server controls. The script below enforces a client-side floor on PBKDF2 parameters and measures what a downgrade is worth to an attacker. It uses only Python’s standard library; the same check applies to Argon2id memory, iteration and parallelism parameters.
"""Client-side guard against a server lowering key-derivation cost.
Standard library only (Python 3.10+). PBKDF2-HMAC-SHA256 is used because it is
in hashlib; the same floor check applies to Argon2id parameters.
"""
import hashlib
import time
# Floors the client enforces whatever the server sends. Values are examples:
# 600,000 matches the PBKDF2 default Bitwarden documents.
MIN_PBKDF2_ITERATIONS = 600_000
MIN_SALT_BYTES = 16
class KdfDowngrade(Exception):
pass
def derive_master_key(password: str, salt: bytes, params: dict) -> bytes:
"""Derive a 32-byte key, refusing parameters below the client's floor."""
if params.get("alg") != "pbkdf2-sha256":
raise KdfDowngrade(f"unexpected KDF {params.get('alg')!r}")
iterations = int(params.get("iterations", 0))
if iterations < MIN_PBKDF2_ITERATIONS:
raise KdfDowngrade(f"iterations {iterations} below floor {MIN_PBKDF2_ITERATIONS}")
if len(salt) < MIN_SALT_BYTES:
raise KdfDowngrade("salt too short")
return hashlib.pbkdf2_hmac("sha256", password.encode(), salt, iterations, dklen=32)
def time_per_guess(iterations: int, trials: int = 3) -> float:
salt = b"s" * 16
start = time.perf_counter()
for _ in range(trials):
hashlib.pbkdf2_hmac("sha256", b"guess", salt, iterations, dklen=32)
return (time.perf_counter() - start) / trials
if __name__ == "__main__":
salt = bytes(16)
key = derive_master_key("correct horse battery staple", salt,
{"alg": "pbkdf2-sha256", "iterations": 600_000})
print("derived key bytes:", len(key))
try:
derive_master_key("correct horse battery staple", salt,
{"alg": "pbkdf2-sha256", "iterations": 1})
except KdfDowngrade as e:
print("refused:", e)
slow, fast = time_per_guess(600_000), time_per_guess(2, trials=2000)
print(f"seconds per guess at 600,000 iterations: {slow:.3f}")
print(f"speed-up for an attacker if iterations drop to 2: about {slow / fast:,.0f}x")On the box used for this lesson it printed:
derived key bytes: 32
refused: iterations 1 below floor 600000
seconds per guess at 600,000 iterations: 0.084
speed-up for an attacker if iterations drop to 2: about 45,333x
The measured ratio is lower than the 300,000× iteration ratio in the paper because, at two iterations, Python’s per-call overhead dominates; an optimised cracking rig would get much closer to the full ratio. The floor check is the point: a client that refuses weak parameters makes BW07-style downgrades fail loudly. A complete fix also authenticates the parameters (for example, under a key derived from the master key) so that they cannot be swapped between users.
An example: Kestrel Design
Kestrel Design, a six-person studio, is choosing a password manager; Sam, a contract developer, reviews the shortlist for Priya, the office manager.
Sam reads each vendor’s white paper and the malicious-server literature. He records, per product: login protocol (OPAQUE, SRP or password hash), KDF and default cost, whether KDF parameters are authenticated, AEAD and vault-level integrity, which fields are unencrypted, recovery mechanism, and current remediation status of published attacks. One candidate stores URLs unencrypted; another offers administrator recovery for business accounts. Kestrel chooses a product with user-held recovery keys, accepts the lockout risk, and documents it in the agent use policy (lesson 9). The studio’s AI assistant gets fill-only access through the password manager’s approval feature and no browser-control tool on the same profile, because a filled value is readable by whatever controls the page.
Key takeaways
Zero-knowledge proofs, aPAKE protocols and “zero-knowledge encryption” are different constructions with different guarantees; name which one you mean. OPAQUE (RFC 9807) keeps passwords off the server and defeats precomputation, but offline guessing on stolen records remains inevitable, so key stretching and password entropy still matter. Malicious-server research on password managers and cloud storage shows that client-side encryption fails without authenticated parameters and keys, AEAD with metadata binding, and careful recovery design. Whatever the cryptography, metadata, client code, recovery paths, unlocked endpoints and the moment of use remain outside the guarantee, and agent integrations live in that last category.
primitive’s privacy policy states that “Primitive Pass encrypts your vault on your device before it is uploaded. Our server stores encrypted vault data and does not have the vault keys needed to read a locked vault. Sign-in uses OPAQUE, so your master password is not sent to or learned by the server” [16]; these are primitive’s own statements.
Sources and further reading
- Scarlata, M., Torrisi, G., Backendal, M., & Paterson, K. G. (2026). Zero Knowledge (About) Encryption: A Comparative Security Analysis of Three Cloud-based Password Managers. Proceedings of the 35th USENIX Security Symposium. https://www.usenix.org/conference/usenixsecurity26/presentation/scarlata
- Goldwasser, S., Micali, S., & Rackoff, C. (1989). The Knowledge Complexity of Interactive Proof Systems. SIAM Journal on Computing, 18(1), 186–208. https://doi.org/10.1137/0218012 (earlier version: STOC ’85, 291–304, https://doi.org/10.1145/22145.22178)
- ZKProof. (2022). ZKProof Community Reference (Version 0.3). https://docs.zkproof.org/reference
- 1Password. (2024). 1Password Security Design (white paper). https://1passwordstatic.com/files/security/1password-white-paper.pdf
- Bourdrez, D., Krawczyk, H., Lewi, K., & Wood, C. A. (2025). The OPAQUE Augmented Password-Authenticated Key Exchange (aPAKE) Protocol (RFC 9807). IRTF. https://www.rfc-editor.org/rfc/rfc9807
- Jarecki, S., Krawczyk, H., & Xu, J. (2018). OPAQUE: An Asymmetric PAKE Protocol Secure Against Pre-computation Attacks. Advances in Cryptology – EUROCRYPT 2018, LNCS 10822, 456–486. https://doi.org/10.1007/978-3-319-78372-7_15 (open copy: https://eprint.iacr.org/2018/163)
- Biryukov, A., Dinu, D., Khovratovich, D., & Josefsson, S. (2021). Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications (RFC 9106). IRTF. https://www.rfc-editor.org/rfc/rfc9106
- Wu, T. (1998). The Secure Remote Password Protocol. Network and Distributed System Security Symposium (NDSS) 1998. https://www.ndss-symposium.org/ndss1998/secure-remote-password-protocol/
- Wu, T. (2000). The SRP Authentication and Key Exchange System (RFC 2945). IETF. https://www.rfc-editor.org/rfc/rfc2945
- Bitwarden. (n.d.). Bitwarden Security Whitepaper. Bitwarden Help Center. https://bitwarden.com/help/bitwarden-security-white-paper/
- Scarlata, M., Torrisi, G., Backendal, M., & Paterson, K. G. (2026). Zero Knowledge (About) Encryption (project website). https://zkae.io/
- Hofmann, J., & Truong, K. T. (2024). End-to-End Encrypted Cloud Storage in the Wild: A Broken Ecosystem. Proceedings of the 2024 ACM SIGSAC Conference on Computer and Communications Security (CCS ’24), 3988–4001. https://doi.org/10.1145/3658644.3690309 (open copy: https://eprint.iacr.org/2024/1616)
- Backendal, M., Haller, M., & Paterson, K. G. (2023). MEGA: Malleable Encryption Goes Awry. 2023 IEEE Symposium on Security and Privacy (SP), 146–163. https://doi.org/10.1109/SP46215.2023.10179290 (project site: https://mega-awry.io/)
- Toubba, K. (2022, 22 December). Notice of Security Incident. LastPass blog. https://blog.lastpass.com/posts/notice-of-recent-security-incident
- National Institute of Standards and Technology. (2025). Digital Identity Guidelines: Authentication and Authenticator Management (NIST SP 800-63B-4). https://doi.org/10.6028/NIST.SP.800-63B-4
- Primitive AI (PRIMITIVE AI LABS PTY LIMITED). (2026, 25 October). Primitive Pass Privacy Policy, section 05 “Zero-knowledge and local decryption”. https://pass.primitiveai.com.au/privacy.html (primitive’s own statements)