Skip to content

3.0 phase 1b: local accounts + 2.x import (3.0.0-alpha.1, Lab only) - #16

Merged
usermaneGermane merged 5 commits into
mainfrom
v3-local-accounts
Nov 8, 2026
Merged

usermaneGermane merged 5 commits into
mainfrom
v3-local-accounts

Conversation

@usermaneGermane

@usermaneGermane usermaneGermane commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

PassMan 3's first usable step. Lab only. The app now opens PassMan 3 accounts instead of 2.x vault files. Keep 2.11.0 for real use, and don't install this over it: your 2.x vaults would not show up. Nothing changes or deletes them.

What it does

  • Create an account in three steps: a name and master password, then the Emergency Kit with the Secret Key (save as .txt or copy), then the 12-word recovery phrase. You type words 3, 7 and 11 back. Nothing is written until the last step, so cancelling leaves no files.
  • Unlock uses Argon2id (64 MiB) on the master password plus the Secret Key. That opens the keyset, which opens the personal vault (PMV3). This uses the phase 1a code (3.0 phase 1a: account cryptography (no app change) #15).
  • The Secret Key is kept per PC, protected by Windows DPAPI for your Windows user (secret_store.py). A PC that can't read it, such as a new PC or another Windows user, asks for the Emergency Kit once, catches typos via the check character, then keeps it.
  • Import a 2.x vault: pick one of the 2.x vaults on this PC, or a .vault.enc file. Every entry is copied whole: id, history, archive state and timestamps. The 2.x file is only read, and its sync URL and token stay behind. Importing again adds nothing twice.
  • Settings:
    • change the master password (only the keyset is resealed; the vault file is untouched)
    • save the Emergency Kit again (asks for the password first)
    • Open folder for a backup
    • delete the account
  • Sync shows "Not in this test version". The login screen has no Restore from server until phase 2.

On disk

<home>/accounts/<name>/ holds:

  • account.json: nothing secret
  • keyset.pmk
  • recovery.pmk
  • vaults/<id>.pmv3 (+ .bak)

It sits beside the 2.x vault/ folder, which 3.0 only reads.

Versions

3.0.0-alpha.1. Windows needs four plain numbers, so version.file_version() turns it into 3.0.0.1 for the exe's version resource. The builder passes /DFileVersion=3.0.0.1 to Inno Setup. I built locally to check: the exe shows FileVersion 3.0.0-alpha.1 (raw 3.0.0.1), and the installer shows 3.0.0.1.

Not yet

  • sync (phase 2)
  • using the recovery phrase to get back in (phase 5); it is made and checked now, and accounts.check_recovery_phrase proves it opens recovery.pmk
  • sharing

Proof

  • pytest from the repo root: 500 passed, 2 skipped (the skips are POSIX-permission checks, which run in the Linux PR). 53 tests are new in test_accounts.py:
    • files and layout
    • nothing written before save; a failed save leaves no half account
    • the new-PC Secret Key path, typo detection, and a record copied from another account refused
    • .bak fallback, password change, recovery phrase
    • import keeps history and archive, leaves 2.x settings and the 2.x file untouched
  • Lab flow Lab\dev-shots\flows_accounts.py, which drives the real dialogs: 42/42.
  • 6 mutants, all killed:
    • writing at prepare
    • import dropping history
    • typed key not kept
    • phrase check ignored
    • password change keeping the old keyset
    • 2.x settings copied
  • Screenshots in Lab\dev-shots\accountshots.

Follow-up commits

  • dialogs.py now works on Linux too: Open folder uses xdg-open, and the Secret Key prompt doesn't name Windows. That keeps the file byte-identical with Linux PR #14.
  • Account folders are 700 and the Emergency Kit file is 600 (accounts.write_emergency_kit). Windows ignores the modes.
  • The kit test now looks for the phrase as a sequence. The per-word check failed once in about 10 Lab runs, because the kit is plain English and BIP39 has words like account, page and file. The new check gave 0 false alarms in 300 tries and still catches a real leak.

🤖 Generated with Claude Code

https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH

usermaneGermane and others added 5 commits November 8, 2026 11:04
…ort (3.0.0-alpha.1)

PassMan 3's first usable step, for the lab only. The app now opens
accounts instead of 2.x vault files:

- Create an account: name + master password, then the Emergency Kit
  (Secret Key) and the 12-word recovery phrase with a type-back check of
  words 3, 7 and 11. Nothing is written until the last step.
- Unlock = Argon2id(master password) + Secret Key -> keyset -> personal
  vault in PMV3 (account_crypto, phase 1a). The Secret Key is kept per PC:
  DPAPI on Windows (secret_store.py); a PC that cannot read it asks for the
  Emergency Kit once, then keeps it.
- Import lists the 2.x vaults on this PC (or takes a .vault.enc file) and
  copies every entry whole -- id, history, archive state. The 2.x file is
  only read; its sync settings stay behind.
- Settings: change master password (keyset resealed, vault untouched),
  save the Emergency Kit again, open the account folder for a backup,
  delete the account. Sync is shown as "not in this test version"; the
  login screen has no Restore from server until phase 2.
- version.py: 3.0.0-alpha.1, with file_version() -> 3.0.0.1 for the exe
  resource; the builder passes /DFileVersion to Inno Setup.

Tests: 499 passed, 1 skipped (51 new in test_accounts.py). Lab flow
flows_accounts.py 42/42; 6 mutants all killed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
So dialogs.py stays the same file in both client repos: xdg-open where
there is no os.startfile, and a prompt that does not name Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
The Emergency Kit is plain English and the BIP39 list holds words like
account, page and file, so the per-word check failed now and then (seen
once in the Lab flow). No two phrase words in a row is the real claim;
it has no false alarms in 300 tries and still catches a leaked phrase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
As the 2.x vault folder and the plaintext export already are on Linux:
other users of the machine can neither list the accounts nor read the
Secret Key from a saved kit. Windows ignores the modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
@usermaneGermane
usermaneGermane merged commit 58061d3 into main Nov 8, 2026
2 checks passed
@usermaneGermane
usermaneGermane deleted the v3-local-accounts branch November 8, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant