Repository navigation
Description
Follow-on from the key-recovery investigation for #2060 (deliverable: PR #2278, doc/2026-10-29T11-28-18Z_investigation_key_recovery_hosted/).
Slice 1 — documented, passphrase-wrapped key export/import
The investigation's §11 lists eight buildable slices. This issue carries only the first,
because every other slice depends on it and it is the smallest honest step: today the
identity key is a raw 32-byte file at 0600 (pkgs/id/src/store.rs:58-190, KEY_FILE in
src/lib.rs:292) with no export path, so a user who loses the device loses the identity.
Scope:
id key export/id key importproducing a versioned envelope: format header with
KDF id + parameters (Argon2id), AEAD ciphertext of the identity secret key.- No server involvement: the file is the user's to store. The server never sees plaintext
or the passphrase. - Refuse to import over an existing identity without an explicit replace flag.
- Tests: round-trip, wrong passphrase, truncated/tampered envelope, parameter-floor refusal.
Explicitly out of scope (later slices, owned by the synthesis): L1 backup blob storage,
recovery sessions with veto windows, device/delegation certificates, guardian shares over
the invite channel, SSO binding records.
Trust constraint from #2060 holds: custodial keys stay rejected (LIST 7 trust model).
Open question this issue should settle: whether slices 2-8 get their own issues now or wait
for the gated synthesis. Sequencing is the synthesis's call, not this issue's.
Acceptance criteria
-
id key export/id key importproduce/consume a versioned envelope (KDF id + Argon2id parameters in the header, AEAD ciphertext of the identity secret) - Tests pass: round-trip, wrong passphrase, truncated/tampered envelope, parameter-floor refusal
- Import over an existing identity refuses without an explicit replace flag
- No server involvement: plaintext and passphrase never leave the user's machine
Activity
developing-today commentedon Oct 29, 2026
CODE-1138
dezren39 commentedon Oct 29, 2026
Intake review
Related: #2060 (key-recovery investigation, PR #2278, §11 slice 1), epic context in the body
Notes: Smallest honest slice of the key-recovery family and the dependency for slices 2–8; well-scoped with file:line evidence (store.rs:58-190, lib.rs:292) already in the body.
Risks: Envelope format is a one-way door — versioning and parameter floors must be right in v1 or old backups become unreadable.
Suggested approach: Implement the envelope + CLI pair test-first; settle the slices 2–8 sequencing question on the synthesis, not here.
🤖 Agent note · filed
meta/enrichedapplied. Still-live check this pass: no merged PR or fix commit explicitly resolving this issue was found; where a queue triage task owns verification, it is named in the notes.dezren39 commentedon Nov 3, 2026
🤖 Agent note · done — triage verdict: CONFIRMED (still live, unblocked, foundation slice)
Verified fresh (2026-11-03)
main(doc/2026-10-29T11-28-18Z_investigation_key_recovery_hosted/), and the files the body cites still exist (pkgs/id/src/store.rs,pkgs/id/src/lib.rs). A code search for a key export/import implementation inpkgs/idreturns nothing — no export path exists yet, so the "user who loses the device loses the identity" gap is still open.pkgs/id/Cargo.lock(a transitive lock entry), not in anypkgs/idsource or manifest the search can see — expect to add the Argon2id + AEAD crates as direct dependencies. The existingenvelope_net.rs/envelope_outbox.rsare messaging envelopes, unrelated to this key envelope; do not reuse the name without care.effort/mstands. Routing stays a build task.developing-today commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
46 remaining items
dezren39 commentedon Nov 4, 2026
agent-note:v1
event: parked (Drew-owned PR hard stop)
task: 9154 (small_fix; queue repo-health-code-pilot; worker repo-worker-code; lane c8b9355e-319a-4640-8096-7ad19480d151 — OpenChamber scheduled lane)
by: repo-worker-code
Fresh verification: issue #2279 remains OPEN. PR #5322 remains OPEN on
queue/9154-2279-key-exportand is authored by dezren39 (Drew), so the standing Drew-owned PR hard stop applies. The required production-line check is now SUCCESS and CodeRabbit is NEUTRAL; this does not remove the ownership restriction. Existing checkpoint/worktree and targeted test evidence were preserved; I did not inspect or change the diff, merge, or create a competing PR.Resume: after 30 minutes, revalidate issue and PR. Continue only after explicit handoff or PR disposition removes the hard stop. Queue task 9154 is parked; queue/parked and status/parked mark this task, and work/assigned remains through the park.
dezren39 commentedon Nov 4, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 4, 2026
🤖 Agent note · picked up
Merge pull request #5322 from developing-today/queue/9154-2279-key-ex…
dezren39 commentedon Nov 4, 2026
🤖 Agent note · done
id key export/id key importwith hidden passphrase prompts and--replaceguard. Codex review at head eab43f0 completed with no findings; targeted tests on PR feat(id): passphrase-wrapped identity key export/import (#2279) #5322 pass (key_envelope 4, key suite 102). Closing issue id: key export/import — passphrase-wrapped identity key envelope (key-recovery slice 1) #2279 as completed (PR feat(id): passphrase-wrapped identity key export/import (#2279) #5322 did not auto-close it).