0020 · Passkeys: Klav as a WebAuthn authenticator (ES256, synced discoverable credentials), the private key sealed with the vault key, RustCrypto's p256/ecdsa, and the PSL only for the rpId
- Status: accepted
- Date: 2026-11-04
Accepted on 2026-11-04. Omar answered P1 with the work order: 1) generator and history (ADR 0022 §1–3, done), 2) importers, 3) task requests (ADR 0021), 4) assisted change (ADR 0022 §5–7), 5) passkeys (ADR 0020) and 6) Android (phase 7). Passkeys come fifth and there is no code yet; the additions to the specification (§2.3, §3, §7.1 and §14) and to the threat model (§5.8 and residual risks 21–24) stand as "accepted, pending implementation". The
0x43queue (§11) already exists on the desktop because of ADR 0022.
Context
Klav stores passwords and TOTP. Sites are moving to passkeys, which today end up in iCloud or Google, outside the vault. Passkeys are under "Después (sin fecha)" in the roadmap and outside the MVP in diseno.md, so an ADR is needed before touching code. What has to be decided:
- the schema: where a passkey lives within the item model;
- the cryptography and its dependencies:
CLAUDE.mdand ADR 0005 require an ADR for any new cryptographic crate; - how to validate the rpId, given the "no Public Suffix List" rule of ADRs 0006 §6 and 0017 §5;
- how to guarantee that an agent never gets a passkey's private key out (ADR 0014), and under what conditions it can use the person's;
- how the iOS extension writes, which today is read-only and has no network (ADR 0018 §4).
Decision
1. Scope of v1
- Klav is an authenticator (passkey provider) in two places:
- the browser extension (Chromium and Firefox), through
klavd; - the iOS Credential Provider Extension.
- the browser extension (Chromium and Firefox), through
- ES256 (
-7) only, discoverable credentials andnoneattestation. - Outside v1:
- Ed25519 (
-8), possible later withed25519-dalek, which is already in the tree (P11); - the
prf,largeBlobandhmac-secretextensions (P8); - conditional create (creating a passkey automatically when signing in with a password);
- cross-origin frames and Related Origin Requests (P10);
- Safari and Android;
- importing and exporting with FIDO's CXF/CXP.
- Ed25519 (
Implementation note, 2026-11-05; Omar decided the counter the same day. Passkeys from Bitwarden's unencrypted JSON are imported (
login.fido2Credentials), because that file carries the private key (PKCS#8). They go into the login they come with, sealed with the vault key (0x15), and are never stored in the clear. The details are in ADR 0024. Counter (decided by Omar on 2026-11-05): Klav always signs with 0 (§5), and an exported passkey with a counter greater than 0 is imported anyway, with a warning on that row, because an RP that watches the counter may reject it. The warning says what to do in that case: sign in another way and register a new passkey in Klav for that site. CXF/CXP stays outside v1.
2. Where the passkey lives: inside a login item, at most one per item (P3, accepted)
- Why:
- an account is a single entry (password + TOTP + passkey), as in Apple Passwords and Bitwarden; every platform does it this way;
- the passkeys of several accounts on the same site are several logins, each with its own;
- the menu, the card and QuickType don't duplicate rows;
urls,username, the unique-title rule and projects are reused.
- An account without a password: it is a login without a password.
- Another user on the same site: goes in another login.
- Same
rp_id+user_handle: it is replaced after confirming in the UI, as CTAP2 requires. - Alternative: its own
ItemKind::Passkey. It separates passkeys from logins and duplicates rows on every surface.
3. Schema (additions to the specification's v1 JSON, §7.1)
In details, a new optional passkey key, only with kind = login:
| Key | Type | Notes |
|---|---|---|
credential_id |
base64url | 16 random bytes; immutable |
rp_id |
text | lowercase ASCII (punycode) domain; immutable |
rp_name |
optional text | display only |
user_handle |
base64url | 1 to 64 bytes, given by the RP; immutable |
user_name |
text | user.name |
user_display_name |
optional text | user.displayName |
alg |
integer | -7 |
created_at |
integer | Unix ms |
key |
base64url | 74-byte 0x15 blob (§4) |
In overview, a new optional key passkey: { rp_id, credential_id, user_name }. It carries no secrets and whoever has list sees it, like username.
- Consistency: when the item is rebuilt, the overview summary must match what comes out of details. If not,
SectionMismatch, as already happens withusername. - Compatibility:
OverviewandRawDetailsreject unknown keys (deny_unknown_fields), andItemKindhas no catch-all case.- An old client skips the item with the "does not decrypt" warning (
crates/klav-client/src/session.rs) and nothing else breaks. - Nothing is published, so this is accepted.
vstays at 1 and it is noted in the specification's changelog.
- An old client skips the item with the "does not decrypt" warning (
- Editing:
credential_id,rp_id,user_handleandkeyare immutable:klav item editandItemEditdon't touch them;- an edit of the login keeps the passkey intact;
- only
Item::set_passkeyandItem::remove_passkeychange it.
- URL: when the passkey is created, if no URL of the login is on the
rp_idhost,https://<rp_id>is added.
4. The private key is sealed with the vault key: new blob 0x15 (P4, accepted)
- Problem:
- agents receive project keys (ADR 0014 §2.2) and an item's details through
POST /v1/agent/access, after the policy is evaluated; - the server doesn't see the item's kind;
- if the P-256 scalar were only inside details (encrypted with the item key), an agent runtime with
fillorrevealon that login could get it out.
- agents receive project keys (ADR 0014 §2.2) and an item's details through
- Decision:
- the scalar (32 bytes) is sealed with the vault key (
VaultKey), which no agent ever receives (ADR 0014 §2.2); - format:
0x01 ‖ 0x15 ‖ nonce(24) ‖ ct(32 + 16), 74 bytes, the same envelope as0x02–0x04(specification §3.1); - AAD:
header ‖ tuple("klav/v1/passkey/private-key", account_id, vault_id, item_id, credential_id, rp_id, user_handle); - the blob travels inside details, so it is encrypted twice;
project_idis left out of the AAD, so that moving the item to another project in the same vault doesn't force a reseal.
- the scalar (32 bytes) is sealed with the vault key (
- What is gained:
- the barrier against agents is cryptographic: with
reveal, an agent sees the metadata and an opaque blob. When an agent uses a passkey inside a task (§9),klavdsigns, and it does have the vault key; the agent's runtime never opens0x15; - an agent with
updatecan't move the key to anotherrp_idor another item, because the AAD fails; - an agent with
createcan't forge a valid passkey.
- the barrier against agents is cryptographic: with
- Cost:
- one blob type, one label and new vectors;
- if in the future a project is shared with another person (without the vault key), that person won't be able to use its passkeys. Sharing by vault, which is what is planned, does carry them. Omar accepted this.
- Rejected alternative: enforcing the rule only in the clients, with no cryptographic barrier. It leaves the key within reach of a compromised agent runtime.
5. Authenticator parameters
| Parameter | Value | Reason |
|---|---|---|
| Algorithm | ES256 (-7): ECDSA P-256/SHA-256, DER signature, RFC 6979 nonce |
doesn't depend on the random generator when signing; reproducible vectors |
signCount |
always 0 | like Apple's and Google's synced passkeys; the RP treats it as "no counter"; no conflicts on sync; signing writes nothing, so the iOS extension stays read-only when signing in |
| Flags on create | UP·UV·BE·BS·AT = 0x5D |
synced passkey (BE = BS = 1) |
| Flags on sign | UP·UV·BE·BS = 0x1D |
UV only if there was a real verification inside the chosen window, or an agent's task approval (§8) |
| AAGUID | a fixed Klav UUID v4, a constant in klav-core, the same on every platform (P2) |
the RP can show "Klav"; it is registered in the community list passkey-authenticator-aaguids. See "Pending checks" |
| Attestation | always fmt: "none" and attStmt: {}, even if the RP asks for direct |
there is no CA; WebAuthn allows it |
credential_id |
16 bytes from getrandom |
independent of the item's ID |
| Resident credential | always (rk = true) |
|
| Extensions | only credProps → { rk: true }; the rest are ignored |
prf in v2 (P8) |
authenticatorAttachment / transports |
"platform" / ["internal", "hybrid"] |
like desktop providers |
| COSE key | {1: 2, 3: -7, -1: 1, -2: x, -3: y} in CTAP2 canonical order |
|
attestationObject |
{"fmt", "attStmt", "authData"} in canonical order (by length, then alphabetical) |
6. Dependencies
This ADR lists its dependencies; ADR 0005 isn't edited. The list of approved crates in CLAUDE.md is updated on accepting this ADR, not before.
p2560.14 andecdsa0.17, from RustCrypto (Apache-2.0 OR MIT).- Features: in
p256,ecdsa,sha256andpkcs8(SPKI DER forgetPublicKey()and the future export); inecdsa,rfc6979andder. - ADR 0018 §5 rejected
p2560.13 because it usescrypto-bigint0.5.5 (RUSTSEC-2026-0387, timing leaks). The advisory considers versions>= 0.7.6fixed. - Verified nuance (2026-11-03):
p256alone doesn't give that guarantee.p2560.14.0 requireselliptic-curve ^0.14.1, andelliptic-curve0.14.1 still acceptscrypto-bigint ^0.7.5, which is vulnerable. Onlyelliptic-curve0.14.3 requires^0.7.8. Today it resolves tocrypto-bigint0.7.9 or 0.7.10 because 0.7.0–0.7.8 are yanked (0.7.6–0.7.8 for an incompatible change, #1373, not for security). - Also, the current
ignoreof RUSTSEC-2026-0387 indeny.tomlgoes by ID, so it covers any version ofcrypto-bigint:cargo-denywouldn't warn if a 0.7.5 came in. - That is why the layer that adds
p256:- pins the minimum explicitly in the workspace (
elliptic-curve >= 0.14.3orcrypto-bigint >= 0.7.9); - adds a guard to
deny.tomlthat rejectscrypto-bigint0.7 earlier than 0.7.6; - with that, arithmetic with the secret scalar goes through the fixed version.
- pins the minimum explicitly in the workspace (
- Consequence: two major versions of
crypto-bigintremain in the tree. 0.5.5 still comes in viaopaque-ke→elliptic-curve0.13.8, with theignorethat already exists (ADR 0009).multiple-versions = "warn"indeny.tomltolerates it: it warns, it doesn't fail.
- Features: in
- Why not others:
aws-lc-rs: it isn't RustCrypto, it doesn't build well forwasm32-unknown-unknown(andklav-wasmdepends onklav-core), and ADR 0018 keeps it for transport only;ring: it is banned indeny.toml.
psl2.1 (MIT/Apache-2.0, like its dependencypsl-types; it publishes new versions several times a month, with the list up to date):- it is used only to validate the rpId;
- it sits behind
klav-core's non-defaultrp-idfeature, whichklav-clientturns on (andklav-import, which is already in its graph, for the rpId of imported passkeys); klav-wasmdoesn't build it, so the extension package doesn't grow;- site matching (
klav-core::site, ADR 0017 §5) stays without the PSL; - compared with
publicsuffix(no releases since 2024-11),pslcarries the list up to date.
- CBOR:
- a minimal in-house encoder in
klav-core, which only encodes integers,bstr,tstrand definite-length maps; - the canonical order comes from how it is built;
- it is encoding, not cryptography;
ciborium0.2 (Apache-2.0) comes in only as a dev-dependency, to decode in the tests with a verifier independent of the encoder;- rejected:
minicbor(BlueOak-1.0.0, outside theallowlist indeny.toml) andcoset(Apache-2.0, but for full COSE; too much for a single key).
- a minimal in-house encoder in
- Verifiers:
- in Rust:
ciborium+p256(verification) + the vectors from WebAuthn L3's "Test Vectors" section ("ES256 Credential with No Attestation"); - in the extension's e2e tests:
@simplewebauthn/server14 as a real RP and@simplewebauthn/browser14 in the page (both MIT), as devDependencies ofapps/extension.
- in Rust:
webauthn-rs-corerejected: 0.6.2 no longer uses openssl, but:- it is MPL-2.0, like its cryptographic base
crypto-glue0.2, and both would need new exceptions indeny.toml; crypto-gluepulls inrsa0.10.0-rc, with the Marvin advisory (RUSTSEC-2023-0071, no fixed version), plusp384,p521, AES, MD5 andargon20.5 (Klav uses 0.6).
- it is MPL-2.0, like its cryptographic base
7. rpId validation (klav_core::passkey::rp; klavd calls it with the origin the browser gives)
- The origin must be
https:, orhttp:onlocalhostor*.localhost(RFC 6761, likeklav-core::site). - The
nullorigin and hosts that are an IP are rejected. rp_id(by default, the origin's host) is lowercase, ASCII/punycode and without a port.rp_idmust be the host or a suffix of whole labels:host == rp_id || host.ends_with("." + rp_id).rp_idcan't be a known public suffix in the PSL (ICANN or private).rp_idcan't have a single label, exceptlocalhost. The PSL doesn't havelocalhost, and its wildcard rule would treat it as a public suffix.- If validation fails, Klav doesn't return an error: it passes the call to the browser's authenticator, which applies its own rules (including Related Origin Requests).
- Credentials are looked up by exact
passkey.rp_id == rp_id, as WebAuthn requires, not withhost_matches.
8. User verification (UV) (P6, changed by Omar's answer)
By default, Touch ID on every use. Every creation and every signature with a passkey go through
klavd's presence confirmation (touchid::confirm_presence).The person can choose another window, in a local device setting (in
klavd's on the desktop), which doesn't sync:Option Value What it asks for "Every time" (default) alwaysa real verification on every use "Every 5 minutes" 5ma real verification if the last one was more than 5 minutes ago "While Klav is unlocked" unlockedthe unlock counts as verification until the next lock What a real verification is:
- Touch ID in
klavd; - without Touch ID, the master password typed into a Klav frame, never into the page. With "Every time" that costs an Argon2id (about a second) on every sign-in; whoever doesn't want that picks another window;
- with Klav locked, unlocking within the same flow (with Touch ID or with the password in Klav's frame).
- Touch ID in
The window:
klavdkeeps in memory the time of the last real verification, with a monotonic clock;- it forgets it on locking, so locking always closes the window;
- loosening the setting (going from "Every time" to another option) asks for a real verification.
The UV flag is only 1 if there was a real verification inside the chosen window. If there wasn't, Klav asks for one before signing; if the person cancels it, the page receives
NotAllowedError. Klav never signs with UV = 0 to save itself the question.UP (presence) is the person's click on Klav's surface.
Agents: inside an approved task, the Touch ID or Face ID with which the person approved the task counts as the UV (and UP) of those uses, for the task's duration (§9). Omar accepted this.
iOS: the Face ID that opens the extension is the UV. The extension asks for Face ID every time it opens (T72), so on iOS v1 it is always equivalent to "Every time" and the setting doesn't apply.
Note of 2026-11-17 (ADR 0041 §2.5, Omar's decision, not built).
- One window per key. The window above is one for the whole
klavdtoday:passkey_presenceloads the setting and reads oneslot.verified()(crates/klav-daemon/src/server.rs:2013–2027). It becomes one window per key, the same key as ADR 0041's presence window: a terminal session, the browser, a parent process, or the connection when none of those can be read. A verification for one key no longer counts for another. - What stays. The browser's passkey uses come through its hosts, so they share the browser's key. The setting, its three values and its default ("Every time") don't change, and neither does
passkey_flow's one-use unlock. - Where the setting lives (ADR 0041 §2.4, P4). Today
passkeys.jsonis re-read on every use (uv::load,crates/klav-daemon/src/server.rs:2019). A program of the same user can then write a looser value, so the setting moves intoklavd's sealed local data (spec §12.2), read at unlock. Missing means "Every time"; a blob that doesn't open means "Every time". - The upgrade (ADR 0041 §2.4, Omar's decision of 2026-11-18). The existing
passkeys.jsonis ignored: its value isn't read, so a person who had loosened the setting is back on "Every time", and Klav tells them once so they choose again. Loosening the setting isn't retroactive: a verification lasts what its prompt said. The loosening's own verification no longer counts as the window's first one (confirmed by Omar on 2026-11-18): it only authorizes the change, and the next use asks once more.
9. Agents (P12, changed by Omar's answer): they use the person's passkeys only inside an approved task
- What doesn't change: the key stays sealed with the vault key (§4) and only
klavdopens it. No agent runtime, with any permission, receives the scalar or a blob it could open. The agent asks for the use;klavdsigns. - New
passkeypermission inPermission:denyby default;- it is only granted inside an approved task request (ADR 0021, "Task requests", also accepted), with its expiry (24 h at most);
- it can't go in a permanent grant: the client refuses to sign, and the server rejects (
400), a grant whose policy has apasskeyrule. Outside a current task there is nothing to approve:request_access(…, "passkey")answers that a task has to be requested.
- Only through the person's
klavd, unlocked, on their machine:- the only target is
extension: the agent drives a browser with Klav's extension, hooked up to the person'sklavd(ADR 0017 §6). The origin is given by the browser (T80), never by the runtime; sdk:<sesión>and CDP are left out: there the origin and theclientDataJSONwould come from the agent's runtime;klavdtalks over a Unix socket with a UID check (ADR 0012), so an agent running in the cloud can't use passkeys, by construction, not by policy;- with Klav locked, the use fails with
lockedand the agent tells the person. Klav doesn't unlock for an agent.
- the only target is
- How it is used (signing in only; creating a passkey for the person is left out):
- The agent calls
passkey_sign_in(ref, target: "extension", reason); the runtime sends the serverPOST /v1/agent/accesswithpasskey, the tab's host asdomainand thetask_id. The server checks the task's lease and records the event before answering, without details. - The runtime asks
klavdfor the new operationagent_passkey_arm, with its signed request and thetask_id. klavdverifies on its own, without trusting the runtime or the server (double barrier, like T22). It fetches the task with the person's session and checks the account's signature on the task's decision, that it is still current and not ended, that the agent is the task's (and its request's signature), that the item is in the task withpasskey, and that the tab's host matches therp_idand the approved domain.klavdarms a use: the nextgetrequest from that tab for thatrp_id, within the following 60 s, is answered by Klav with that passkey and without the person's surface. The page shows in blue "Klav used the passkey of title for the agent name: reason".- The response to the agent carries only
{used: true, rp_id}; the assertion goes to the page, like any other.
- The agent calls
- UV: the Touch ID or Face ID of the task approval counts as verification (§8). The flags are UP·UV·BE·BS.
- Audit log: each use is recorded under the task, with the server's event (permission
passkey,task_id) andklavd'spasskey.usedwith the agent and thetask_id(§10). - The agent's own passkeys (created for its account at the RP and sealed with a key of its own) remain for later, with their own ADR.
Implementation note, 2026-11-05, confirmed by Omar on 2026-11-05. Step 5 said the agent always receives
{used: true, rp_id}. That would forcepasskey_sign_into wait for the page to ask for the passkey, and the page only asks for it when someone presses its button: the agent can't press it while its tool is waiting, because its calls go one after another. The implementation doesn't wait:
- if the tab already has a
getrequest from that site waiting (in the field's menu or with Klav's frame open),klavdsigns at that moment and the agent receives{used: true, rp_id};- if not, the use stays armed for 60 s for the site's next request in that tab, and the agent receives
{used: false, armed: true, rp_id, expires_in_s: 60, next};nexttells it to press the site's passkey button.
usedis onlytrueifklavdreally signed. The armed window is a new threat, T139 in the threat model: it is bounded by the tab, the host, the rpId and the login, a single use, the 60 s and locking. The protocol is inklavd.md§3.Security review note, 2026-11-05. A check is added to step 3: before arming,
klavdlooks in the server's audit log (GET /v1/audit, the last 1000 events) for the allowedagent.accessof that same signed request (agent, item, task,nonceand signature). That way step 1 no longer depends on the agent complying: an agent that signs the request and gives it only toklavd, without sending it to the server, arms nothing. The check trusts the server: it keeps the audit log complete against an agent that skips it, not against a malicious server. Each request arms only once, also after locking and unlocking, becauseklavdkeeps the usednonces outside the session. Aklavdrestart forgets them. Sinceklavdstarts locked, repeating the request requires the person to unlock within its 5 minutes, and then one server event can cover two uses (T139).
10. Audit log (P7)
- Creating or replacing a passkey is already recorded as
item.createdoritem.updated, which the server attests. - Use is local (counter 0, no write). v1 adds the person event
passkey.used:- it carries only the
item_id, withoutrp_idor domain; - if the use was by an agent inside a task, it also carries the
agent_idand thetask_id(the domain is already in the server event from step 1 of §9); klavdsends it best-effort through a new, limited route,POST /v1/audit/person;- on iOS it goes to the outbox (§11) and the app sends it later.
- it carries only the
11. iOS: the extension registers without the network, with an outbox (P5, accepted)
- ADR 0018 §4 is respected: the extension stays without the network and doesn't compete with the app for the refresh token.
- On registering, the extension builds the complete creation:
- a new item key, wrapped with the project key;
- the two sealed sections;
- the
0x15blob.
- Where it stores it: in
outbox.bin, with a new local type,0x43local-outbox:- it goes in the
0x40–0x4Frange, that of the blobs that never leave the device; - it is sealed with the local key;
- it has its own label,
klav/v1/local/outbox, because0x41already usesklav/v1/local/data; - AAD (the plan didn't fix it):
header ‖ tuple("klav/v1/local/outbox", account_id, device_id), by symmetry with0x41; - a simpler alternative, with no new type: a
0x41with theoutboxpurpose (specification §12.2 already separates uses by purpose). A type of its own is proposed so that the queue, which carries complete creations, can't be confused with the cache or the session even if the purpose is wrong; if Omar prefers fewer types, the change only touches layer 9.
- it goes in the
- Immediate use:
- the extension merges the queue with the cache when reading, so the passkey works right away on that phone;
- it also registers it in
ASCredentialIdentityStore.
- Sync: the app empties the queue when it comes to the foreground, with a
createthat uses the ID the client chose. If a title clashes, it renames it. - Risk: uninstalling the app before opening it loses the passkey. The UI says so: "Open Klav to sync this passkey".
- Alternative: letting the extension make a network call.
session.lockalready orders the refresh between processes, but it adds memory to the extension.
Checks done (2026-11-03)
Against crates.io, npm, RustSec's advisory-db, and main's deny.toml and Cargo.lock:
| Claim | Result |
|---|---|
p256 0.14 and ecdsa 0.17 exist |
Yes: p256 0.14.0 (2026-07-03) and ecdsa 0.17.0 (2026-07-02), stable, Apache-2.0 OR MIT |
elliptic-curve 0.14 requires crypto-bigint ≥ 0.7.8, after the fix |
Only 0.14.3 (^0.7.8); 0.14.1 accepts ^0.7.5. RUSTSEC-2026-0387 considers >= 0.7.6 fixed. Today it resolves to 0.7.9/0.7.10 because the earlier ones are yanked. See §6 |
Licenses of psl, ciborium, coset and minicbor |
psl 2.1.246: MIT/Apache-2.0 ✓; ciborium 0.2.2: Apache-2.0 ✓; coset 0.4.2: Apache-2.0 ✓; minicbor 2.3.1: BlueOak-1.0.0 ✗ (outside allow) |
multiple-versions at warn |
Yes ([bans] in deny.toml) |
webauthn-rs-core 0.6: license and dependencies |
0.6.2 (2026-10-31): MPL-2.0, without openssl; crypto-glue 0.2 (MPL-2.0) → rsa 0.10.0-rc (RUSTSEC-2023-0071, unpatched) |
Licenses of @simplewebauthn/server and @simplewebauthn/browser |
MIT, both (14.0.3 and 14.0.0) |
Today in Cargo.lock |
crypto-bigint 0.5.5 and elliptic-curve 0.13.8, via opaque-ke and voprf; no p256, ecdsa, psl or CBOR |
Pending checks
They aren't decisions; they are checked in the layer named and, if they fail, whatever depends on them is adjusted:
- AAGUID in Chromium: whether Chromium zeroes the AAGUID with
attestation: "none". If so, the RP won't see "Klav" even though the extension sends it, and P2 loses its reason in Chromium. It is checked in the registration e2e (layer 7), by reading the AAGUID@simplewebauthn/serversees. match_origin_as_fallbackin Firefox 140: whether Firefox 140 (the extension's current minimum) supports thatcontent_scriptskey. If not, it is removed from the Firefox manifest;about:blankframes fall back to the browser anyway (layer 7).- iOS 18 in the simulator: whether Safari in the iOS 18 simulator accepts a third-party passkey provider against
http://localhost. If not, that test is left for Omar's iPhone (layer 10). crypto-bigintminimum: that layer 2 leavescrypto-bigint0.7 at ≥ 0.7.9 inCargo.lockand that thedeny.tomlguard (§6) fails with a 0.7 earlier than 0.7.6.
Questions for Omar
Each one had a default value. Those marked ⚑ changed the following layers (schema, binary format, iOS or the UV flow). The Status column records the answers of 2026-11-04 (next section); the Value column is what this ADR describes today.
| # | Question | Value | Status |
|---|---|---|---|
| P1 | Where do they go in the roadmap? | Fifth in the work order: after importers, task requests and assisted change, and before phase 7 (Android). The rest of the ADR doesn't change | resolved |
| P2 | Klav's own AAGUID or zeros? | A fixed Klav AAGUID, registered in the community list | no objection; the default stands |
| P3 ⚑ | Passkey inside the login or as its own kind? | Inside the login, one per item (§2) | accepted |
| P4 ⚑ | Seal the key with the vault key (0x15)? |
Yes: it is the cryptographic barrier against agents. In exchange, sharing a project with another person won't carry its passkeys (§4) | accepted |
| P5 ⚑ | Registration on iOS: outbox or network in the extension? | Outbox (0x43), with the "Open Klav" warning (§11) |
accepted |
| P6 ⚑ | UV on the desktop | Touch ID on every use by default; setting "Every time" / "Every 5 minutes" / "While Klav is unlocked"; UV = 1 only with a real verification inside the chosen window (§8) | changed |
| P7 | Record use in the audit log? | Yes: passkey.used with the item_id (and the agent and the task if any), best-effort (§10) |
no objection; the default stands |
| P8 | The prf extension (other end-to-end encrypted apps use it)? |
In v2, with HMAC-SHA256 and a seed sealed next to the key | no objection; the default stands |
| P9 | Conditional mediation when Klav and the browser both have passkeys | Klav only, without passing it to the browser; "Use another device" in the menu | no objection; the default stands |
| P10 | Cross-origin frames? | In v1 they fall back to the browser | no objection; the default stands |
| P11 | Ed25519 (-8) as well as ES256? |
Not in v1 | no objection; the default stands |
| P12 | Agents with passkeys? | Yes, the person's, only inside an approved task, with the passkey permission and through their klavd; the agent's own, later (§9) |
changed |
| P13 | A modal request (get/create) with Klav locked: show the unlock or silently fall back to the browser, since it isn't known whether Klav has a matching passkey? |
Show the surface with "Unlock" and "Use another device". Without klavd installed, fall back silently |
no objection; the default stands |
Omar's answers (2026-11-04)
These answers fix the content. With the answer to P1, Omar accepted the ADR the same day.
- P3, P4 and P5: accepted as they were.
- P3: the passkey goes inside the login, because every platform does it that way and it allows passkeys for several accounts (one login per account).
- P4: it is accepted that sharing a project with another person doesn't carry the passkeys.
- P5: an outbox on iOS.
- P6 changes (§8):
- by default, Touch ID on every use of a passkey;
- the person can choose "Every time" (default), "Every 5 minutes" or "While Klav is unlocked";
- the UV flag is only 1 if there was a real verification inside the chosen window.
- What was decided here to close it: without Touch ID, the real verification is the master password in a Klav frame, with its Argon2id; the setting is local and loosening it asks for verification; locking closes the window; on iOS it doesn't apply.
- P12 changes (§9): agents can use the person's passkeys, under these conditions:
- only inside an approved task request (ADR 0021), with the new
passkeypermission, which can't be given in a permanent grant; - only through the person's
klavd, unlocked, on their machine, and with theextensiontarget. The private key never leavesklavd: the agent drives a browser with Klav's extension andklavdsigns. An agent in the cloud can't; - the Touch ID or Face ID with which Omar approves the task counts as the verification (UV) of those uses; Omar accepted this;
- each use is recorded in the audit log under the task;
- the agent's own passkeys remain as "later".
- What was decided here to close it: signing in only (not creating);
klavdverifies the task's signed decision on its own before signing; UP also comes from the task approval (residual risk 24).
- only inside an approved task request (ADR 0021), with the new
- P1: resolved. Omar set the work order: 1) generator and history (ADR 0022 §1–3, done), 2) importers, 3) task requests (ADR 0021), 4) assisted change (ADR 0022 §5–7), 5) passkeys (ADR 0020) and 6) Android (phase 7). Passkeys come before Android.
- P2, P7–P11 and P13: Omar didn't comment on them; they keep their default value.
Consequences
klav-coregainsp256,ecdsaandpsl(the latter behind therp-idfeature), andciboriumas a dev-dependency. On accepting, the list of approved crates inCLAUDE.mdis updated.- The specification gains (accepted; pending implementation, except
0x43, which the desktop already uses):- in §2.3, the labels
klav/v1/passkey/private-keyandklav/v1/local/outbox; - in §3, the types
0x15and0x43; - in §7.1, the
passkeykey; - a new section, §14 "Passkeys" (authData, COSE,
clientDataJSONand AAGUID); the changelog moves to §15 and is still the last one. ADR 0019 §2 cites "specification §14" for the changelog; it is accepted and isn't edited, so that reference is to be read as §15.
- in §2.3, the labels
- New vectors in
docs/vectores/passkey.json(layer 2). - Components (following layers):
klavdandklav-native-hostgain three operations (passkey_candidates,passkey_getandpasskey_create);klavdalso gainsagent_passkey_arm(§9), only over the socket and outside the native host's list, and the UV window setting (§8);klav-coregains thePermission::Passkeypermission, which grant validation rejects outside a task (ADR 0021);klav mcpgainspasskey_sign_in;- the extension gains a script in the
MAINworld and apasskeysurface; klav-ffigains five methods;- the server gains
POST /v1/audit/person; blobs stay opaque.
- Threat model: threats T80–T90 (§5.8) and residual risks 21–24.
- Signatures: the specification's §9 rule ("every signature carries
klav/v1/sig/") applies to the Ed25519 identity keys. Passkey P-256 keys are of another kind, are generated per credential and only sign WebAuthn messages (authData ‖ clientDataHash), so there is no cross-protocol confusion. The specification's §14 says so. docs/diseno.mdstill says passkeys are outside the MVP; it is updated on accepting, along with the roadmap's "Después (sin fecha)" row.