BotPassword protects every recipient envelope, the wrapped keys used for device enrollment, collection sharing and broker delegation, with a hybrid key encapsulation that combines ML-KEM-768 and X25519, and offers no classical-only alternative. This post summarizes ADR 0003.
The cryptography has not yet had an independent review.
What is “harvest now, decrypt later”?
An attacker who records encrypted data today can store it and wait. If a large quantum computer ever breaks the public-key schemes that protect it, the stored ciphertext opens up retroactively. The concern applies to data that must stay secret for many years, which describes a password manager’s shared keys well.
Recipient envelopes are the exposed part. A vault’s bulk data is encrypted with symmetric keys, which are not the weak point. But when a key is shared with a device or a teammate, it is wrapped to that recipient’s public key, and that wrapped copy lives on the server for years. ADR 0003 identifies exactly those envelopes as the ciphertext most exposed to harvesting. Retrofitting protection later does not help envelopes that were already collected, so the decision is to have it from the start. See post-quantum cryptography for the general idea.
What does “hybrid” mean here?
A hybrid scheme runs two key-establishment methods side by side and derives the final key from both. The result is secure if either one holds.
- X25519 is an elliptic-curve Diffie-Hellman function with years of deployment behind it. It is not expected to survive a large quantum computer. See X25519.
- ML-KEM-768 is a lattice-based key encapsulation mechanism standardized by NIST as FIPS 203. It is built to resist quantum attack, but it is much newer, and new schemes carry the risk of undiscovered flaws, in the math or in code. See ML-KEM.
Combining them is a hedge against both failures: a quantum break of the classical half, and a classical break of the new half. The general idea is covered on hybrid key exchange.
What exactly was decided?
ADR 0003 sets one recipient suite for v1, identified as 0x0201:
- HPKE in base mode (the Hybrid Public Key Encryption standard, RFC 9180).
- KEM MLKEM768-X25519, pinned to
draft-ietf-hpke-pq-05and its test vectors. - HKDF-SHA-256 for key derivation.
- ChaCha20-Poly1305 for the authenticated encryption.
Signatures are separate. Ed25519 stays for signing in v1, and ML-DSA-65 is reserved under identifier 0x0302 for a future migration. The decision is about recipient envelopes first because that is where the harvesting exposure sits.
Why no classical-only fallback?
Because a fallback is a downgrade path. The envelope format permits exactly one encryption suite and one signature suite for each purpose, each identified by a 16-bit ID in a fixed header, with no negotiation. A parser that sees an unknown suite rejects the envelope. There is nothing for an attacker to talk a client down to, and no code path that quietly produces weaker envelopes when a peer is old or confused.
This follows a wider rule in the repository: strict parsing. Unknown suites, purposes, flags and non-canonical encodings are rejected, and a change to the protocol vectors must pass in every implementation that runs them.
What does it cost?
The decision record is plain about the downsides.
- Size. An ML-KEM-768 public key is about 1.2 KB, so envelopes and public keys are larger than a classical-only design would need. For a vault of ciphertext records this is acceptable, but it is not free.
- Draft dependence. The scheme is pinned to a draft, as of 2026-10-23. If the draft changes before it becomes an RFC, the result is a new suite identifier and a key-epoch migration, not a silent in-place change.
- Unaudited implementations. The Rust implementations of this combination are described as unaudited. The ML-KEM implementation in libcrux is formally verified but pre-1.0. The ADR requires that the early design reviews and the later independent security assessment explicitly cover whichever crate is chosen, and the key hierarchy notes say the candidates are compared before one is adopted.
That last point is why the status line says “accepted for review”, not “final”. A hybrid scheme only helps if the code is right, and choosing a verified or audited implementation is a precondition for relying on it.
What does this mean for sharing in practice?
When you share a collection or enroll a new device, a random key is wrapped to the recipient’s hybrid public key. Each device has its own signing key and hybrid KEM key, and enrollment is signed by an existing trusted device, so the server cannot add a recipient simply by inserting a row. The server holds ciphertext and validates only outer headers and sizes.
When a member leaves a company, the collection keys advance to a new epoch and are wrapped again to the remaining members. The hybrid wrapping applies to each of those envelopes.
Why not wait for a finished standard?
Because the cost of waiting falls on users whose envelopes were already harvested, while the cost of pinning is a managed migration. The decision accepts a possible future suite change in exchange for protecting data from day one. If you want the protocol-level view of how suites and headers fit together, the key hierarchy document in the repository is the reference.
For how the server stores these envelopes, read one SQLite database per account. For the general background on why agents sit outside this trust boundary, see why a local daemon holds the keys.