6 Commits

Author SHA1 Message Date
a89c7811e1 Password export: explicit choice (new password vs reuse existing vault password)
- exportSelected(groupIds, { vaultKey, password, useExistingPassword }) replaces the
  positional (groupIds, vaultKey, exportPassword) form. Protection is now an explicit
  choice, never an ambiguous optional field.
  - password mode: re-key entries under a fresh export-derived key (unchanged semantics).
  - reuseExistingPassword mode: seal with the vault's own key, keep vault salt embedded,
    so import derives the key from the vault master password. No second password required.
- ImportExport.svelte: replaces the long-placeholder free-text field with two radio
  options (Use a new password / Reuse my vault password); short placeholder, with
  client-side validation that a new password isn't empty.
- Cryptography importAll unchanged: derives the envelope key from the supplied password +
  embedded salt, which covers both sealed modes; wrong password still rejects import.
- Tests: updated call sites to options object; added round-trip + wrong-password tests for
  reuseExistingPassword.
2026-08-27 00:01:59 +00:00
800feb1d37 Export can be sealed with a separate password; import accepts file with a different password
- exportSelected(groupIds, vaultKey, exportPassword=''): plain JSON export unchanged when
  no export password; when one is set, re-keys each entry's password to a key derived from
  the export password and AES-256-GCM-seals the entire payload (titles/usernames/notes
  protected too). Returns a { format: 'encrypted-export', salt, data } envelope.
- importAll() detects sealed exports and treats the supplied password as the EXPORT password,
  so it may differ from any vault's master password. Wrong password rejects import instead of
  silently skipping entries.
- ImportExport.svelte: optional 'separate password' field in the export dialog; import dialog's
  field reworded as a generic file password covering both plain and sealed files.
- Tests for sealed export/import round-trip incl. wrong-password & missing-password rejects.
2026-08-26 23:38:25 +00:00
dc7c29b7ce Don't forget about ungrouped entries when selecting export groups 2026-05-18 02:11:05 +00:00
fb8df00e91 Add tests and trim down inconsistencies in the code. 2026-05-17 22:08:36 +00:00
a6589fb1f3 Fix search not working 2026-05-15 23:53:03 +00:00
c0231fcd26 Add the AGENTs file to cut down on model code analysis 2026-05-15 21:07:09 +00:00