Hi HN,
Bastion Enclave is an experiment in removing centralized trust from password management by eliminating server-side state entirely.
Instead of storing an encrypted vault or syncing secrets through a backend, Bastion computes credentials deterministically on-the-fly using explicit cryptographic inputs. Given the same master entropy, service name, username, and version counter, the same password is reproduced across platforms. There is no account system, no database, and no persistent server storage — the server serves static code only.
Password generation uses domain-separated salts and PBKDF2-HMAC-SHA512 (210k iterations) to produce a byte stream, followed by unbiased rejection sampling to avoid modulo bias when mapping to character sets. Nothing is stored; passwords are derived when needed and discarded immediately after use.
When users choose to persist data locally (vault state, notes, file keys), encryption is handled separately using Argon2id (64 MB memory, 3 iterations) to derive a master key, followed by AES-256-GCM for authenticated encryption. All plaintext exists only in volatile memory; closing the tab tears down the runtime.
Recovery and key escrow are handled via Shamir Secret Sharing over a large prime field (secp256k1 order) using a hybrid scheme: the secret is encrypted with a random session key, and only that key is split into shards. Invalid or mismatched shards fail cryptographically via AEAD tag verification.
The security claim here is architectural, not policy-based: no stored vaults, no encrypted blobs on servers, no sync endpoints, and no recovery infrastructure to subpoena or breach. Attacking Bastion means attacking individual devices, not a centralized honeypot.
This design intentionally trades convenience (sync, automated recovery) for reduced attack surface and deterministic guarantees. It assumes a trusted local execution environment and a strong master secret; it does not attempt to defend against a compromised OS or browser runtime.
Live demo: https://bastion-enclave.vercel.app
Spec / source / threat model: https://github.com/imkevinchasse/Bastion-Enclave-repo-V2
I’d appreciate critique of the threat model and whether this class of design meaningfully removes attack vectors inherent to cloud-based managers.
SahAssar|23 days ago
So you are trusting at the very least the author, umami, esm.sh (including the authors of all of those packages) and vercel.
This is not how you code a security-sensitive app.
There also is a database, it's just indexdb/localStorage in your browser.
It's an old idea to use in browser static pages to encrypt data, this solves none of the problems with the idea, but is just glitzy AI-written marketing copy.
collingreen|24 days ago
- losing the master is catastrophic - sign ins with dumb password rules meant I had to sync metadata - a bad actor knowing my resulting password, their site, my username, and potentially my password version meant in theory they could brute force offline and see if they could infer my master - I had to do silly things to use my passwords on not-my-device - getting my password on not-my-device felt extremely dangerous
KevinChasse|24 days ago
unknown|24 days ago
[deleted]
KevinChasse|24 days ago
stephenr|23 days ago
Yeah good luck with that. Authentication code needs AI generated code like a cow needs burger sauce and brioche buns.
KevinChasse|23 days ago
commandersaki|24 days ago
Also sync'ing is handy for multi-device setup.
KevinChasse|23 days ago
rustyhancock|24 days ago
It seems particularly important since this doesn't defend against compromised local environment.
KevinChasse|23 days ago
stavros|24 days ago
KevinChasse|23 days ago
An important note is Hashing ≠ memory-hard Hashing ≠ unbiased sampling Hashing ≠ domain separation Hashing ≠ rotation without storage