Document TOTP support in AGENTS.md
This commit is contained in:
parent
9758e80a02
commit
c9a42c4670
@ -75,12 +75,19 @@ Password verification uses a test payload (random string encrypted at vault crea
|
|||||||
|
|
||||||
## Security Notes
|
## Security Notes
|
||||||
|
|
||||||
- Only `encryptedPassword` is encrypted at rest; other fields (title, username, URL, notes) are plaintext in IndexedDB.
|
- Only `encryptedPassword` and `encryptedTotpSecret` are encrypted at rest; other fields (title, username, URL, notes) are plaintext in IndexedDB. Passwords and TOTP secrets are optional on an entry.
|
||||||
- `testPlaintext` for password verification is stored unencrypted in the `meta` store.
|
- `testPlaintext` for password verification is stored unencrypted in the `meta` store.
|
||||||
- Auto-lock triggers on tab visibility change and configurable inactivity timer (default 5 min).
|
- Auto-lock triggers on tab visibility change and configurable inactivity timer (default 5 min).
|
||||||
- Clipboard auto-clears after 15 seconds.
|
- Clipboard auto-clears after 15 seconds.
|
||||||
- No browser fingerprinting or anti-keylogger protections.
|
- No browser fingerprinting or anti-keylogger protections.
|
||||||
|
|
||||||
|
## TOTP (2FA)
|
||||||
|
|
||||||
|
- `src/lib/crypto/totp.js`: native RFC 6238 TOTP via Web Crypto HMAC-SHA1 (no external lib). Exports `generateTotp(secret, {timestamp, period=30, digits=6})`, `base32Decode`, `extractSecret` (accepts bare base32 OR `otpauth://` URI), `totpRemainingSeconds`.
|
||||||
|
- Entries store an optional `encryptedTotpSecret` (AES-GCM, like passwords). EntryForm accepts a base32 secret or otpauth:// URI; EntryDetail shows a live, copyable 6-digit code with a 1s countdown + urgency color, cleaned up via `onDestroy`.
|
||||||
|
- Export/import re-key `encryptedTotpSecret` alongside passwords for sealed exports (and decrypt/re-encrypt on import), so TOTP survives migration between vaults.
|
||||||
|
- Note: `extractSecret` must strip hyphens from hyphen-grouped secrets (authenticator display style) as well as whitespace.
|
||||||
|
|
||||||
## Export / Import
|
## Export / Import
|
||||||
|
|
||||||
- `exportSelected(groupIds, options)` — group IDs to export; `null`/`[]` = full export (include `''` for ungrouped). `options = { vaultKey, password = '', useExistingPassword = false }`. An explicit protection choice is required; every protected export AES-256-GCM-seals the whole payload (titles/usernames/notes included) into `{ format: 'encrypted-export', salt, data }`.
|
- `exportSelected(groupIds, options)` — group IDs to export; `null`/`[]` = full export (include `''` for ungrouped). `options = { vaultKey, password = '', useExistingPassword = false }`. An explicit protection choice is required; every protected export AES-256-GCM-seals the whole payload (titles/usernames/notes included) into `{ format: 'encrypted-export', salt, data }`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user