A minimal, local-first password manager for Windows.
Lain stores your accounts in an encrypted vault in a dedicated Lain folder beside the application. It does not require a cloud account or a hosted service to create, unlock, or use the vault. You control the application files, the encrypted vault, and your backups.
On first launch after upgrading from a build that used the Data folder, Lain moves that folder to Lain without rewriting its contents. If both folders contain files, Lain stops rather than merging or overwriting them.
- Local encrypted vault with no account or cloud synchronization requirement.
- AES-256-GCM authenticated encryption for account fields.
- Master-password protection with automatic PBKDF2 work-factor upgrades.
- Optional FIDO2 security keys, with Either and Both unlock modes.
- Recovery code support for the second factor in Both mode.
- Password generator, pinned/recent/edited account views, tags, search, and account metadata.
- Read-only integrity verification for the active vault and retained encrypted backups.
- Import saved accounts from Firefox, Chrome, and Edge using their password-export CSV files.
- Ready for Post-Quantum cryptography transition.
- Automatic locking, configurable clipboard clearing, and optional start-with-Windows behavior.
- Security report for weak, reused, and old passwords, with an optional online breach check.
- Keyboard shortcuts for common account actions.
If you find this tool useful, consider showing your support by donating through PayPal.
- Windows.
- .NET Framework 4.8
- For FIDO2 security-key support, the Windows WebAuthn API must be available. Lain requires WebAuthn API version 4 or later; the application reports Windows 10 22H2 or Windows 11 as supported environments for this feature.
Lain uses Windows CNG (bcrypt.dll) for AES-GCM and the Windows WebAuthn API for security-key operations. The application targets .NET Framework 4.8 and is not a cross-platform application.
Lain supports three modes:
| Mode | Unlock requirement | Minimum master-password length |
|---|---|---|
| Password only | Master password | 15 Unicode scalar values |
| Either | Master password or an enrolled security key | 15 Unicode scalar values |
| Both | Master password and a security key, or the master password and the recovery code | 12 Unicode scalar values |
The password must also receive a Strong or Very strong result from Lain's offline strength estimator. Lain does not require arbitrary uppercase/lowercase/digit/symbol combinations; long passphrases are accepted. The estimator checks common passwords, repetition, predictable sequences, and related patterns. It is a local heuristic, not a guarantee that a password has never appeared in a breach.
The policy is enforced when creating a vault, changing the master password, enabling security keys, or switching modes. Existing passwords remain accepted for unlocking so a policy change does not unexpectedly lock out an existing vault; choose a compliant password when changing the password or a policy-sensitive setting.
The password KDF is PBKDF2-HMAC-SHA-256. New password-derived keys use 600,000 iterations and a fresh 16-byte random salt. The 64-byte derived output is separated into a 32-byte AES key and a 32-byte HMAC key. Existing iteration counts are validated before derivation and are never reduced; the accepted maximum is 10,000,000 iterations.
After a successful password-based unlock, older password KDF settings are upgraded to at least 600,000 iterations:
- Password-only: Lain generates a new random salt, derives a new data key, re-encrypts the account fields, verifies the replacement vault, and then replaces the old vault. The master password itself does not change.
- Either / Both: Lain retains the random vault data key and re-wraps the password slot using a fresh salt and the target work factor. A pure KDF re-wrap does not require changing account ciphertexts. Both mode still requires the password plus its second factor.
- Either, security-key-only unlock: The password is not available during that login, so the password-slot upgrade is deferred until the next password-based login or a security-key management action that confirms the master password.
- Existing work factors above 600,000 are preserved rather than downgraded. The recovery-code KDF is separate and is not changed by the master-password KDF upgrade.
Vault creation, unlocking, editing, and local storage do not require a cloud account or a remote vault service. The encrypted vault resides in the local Lain directory and remains under the user's control.
The optional breach check is the feature that sends password-derived information to an external service. It uses the Have I Been Pwned Pwned Passwords range API with k-anonymity:
- Lain computes each password's SHA-1 hash locally. SHA-1 is used only for compatibility with this lookup protocol; it is not used for vault encryption or authentication.
- Only the first five hexadecimal characters of each hash are sent to
api.pwnedpasswords.comover HTTPS. - The service returns a padded set of matching hash suffixes. Lain checks the full suffix locally.
- The password and complete SHA-1 hash are not sent by this feature.
The breach check is optional and requires an internet connection. Update checks fetch update-manifest.txt from the Lain GitHub repository. The manifest contains the release version, the fixed release asset name, the SHA-256 digest, and an RSA-3072/SHA-256 signature. Lain verifies the signature against a public key embedded in the application before it offers an update, then verifies the downloaded executable's SHA-256 digest before replacing the running executable. The download URL is derived locally from the signed version and fixed asset name; the manifest cannot direct Lain to an arbitrary host or path. Invalid, missing, or unsigned update metadata fails closed and never installs a file.
Use More → Import from browser in the unlocked vault, then select a CSV export from Firefox, Chrome, or Edge. Lain recognizes the standard browser export columns and encrypts imported account fields before adding them to the vault. Exact URL/username/password duplicates already in the vault are skipped.
Export steps:
- Firefox: open
about:logins, open the menu, and choose Export Logins. - Chrome: open Google Password Manager, go to Settings, and choose Export passwords.
- Edge: open Settings → Profiles → Passwords and choose Export passwords.
Browser password exports are plaintext CSV files. Store the file securely and delete it after importing; Lain does not read browser profile databases directly.
Data copied from Lain uses the secure clipboard path: clipboard-history/cloud-sync exclusion formats are set where supported, copied values are automatically cleared after the configured timeout when enabled, and Lain clears its own clipboard content when the vault locks or the application closes. Clipboard cleanup checks the clipboard sequence number so it does not erase content copied by another application afterwards.
When automatic locking is enabled, Lain locks after the configured period without system keyboard or mouse input, including while its window remains in the foreground. It also retains a background timeout: if Lain loses focus, it locks after the same interval even when the computer is otherwise active. Lain locks immediately when the Windows session is locked, a remote session disconnects, or the device is suspending. Lock when Lain is minimized is an additional optional setting. Clipboard content owned by Lain is cleared whenever the vault locks. During a lock transition, Lain first conceals its open windows and waits for active authentication, password-change, security-key, and security-report operations to finish. It then saves pending vault changes before locking. If saving fails, changes remain in memory and Lain retries automatically; the user can also retry from the lock-pending screen. A one-time recovery-code prompt remains available until the code is acknowledged as saved.
| Shortcut | Action |
|---|---|
Ctrl+Q |
Copy the selected account's username/email |
Ctrl+W |
Copy the selected account's password |
Ctrl+E |
Open the selected account's link |
Ctrl+F |
Focus the search box and select its contents |
Delete |
Delete the selected account(s), when the search box is not focused |
Enter |
Edit the selected account, when the search box is not focused |
Ctrl+N |
Create a new account |
Ctrl+L |
Lock Lain immediately |
Ctrl+O |
Open Options |
Ctrl+D |
Add/remove the selected account(s) from Favorites |
Ctrl+R |
Open the account security analysis |
Esc |
Clear the search box, or return focus to the account list when it is empty |
