← back to work

project 01 / password security

Coffre.

A password manager built to understand how authentication, key derivation, sessions, OTP, and encrypted data behave as one system.

Status
Live
Started
08 May 2026
Stack
FastAPI / JS / PostgreSQL
Type
Password manager

01 / what it is

A vault where the security model is the project.

Coffre—French for a safe or vault—is a web password manager. It stores encrypted credentials, supports authenticator and email-based second factors, and separates listing an entry from retrieving its password.

The interface is only one part of it. Most of the work lives underneath: deciding which side derives keys, what the API should never receive, how a session expires, and how to make a captured request useless after a short window.

02 / why I built it

I did not want “encrypted” to be a checkbox.

Coffre started as a Bash prototype, moved through a plain HTML version and a template-based build, then became the current web interface. Each version exposed a different assumption I had made too casually.

I wanted to understand what a password manager should actually trust—not just reproduce what one looks like.

That question pulled the project into cryptography, authentication, rate limiting, email delivery, replay protection, deployment, and security logging. The growing scope was not accidental; it was the lesson.

03 / how it works

Separate responsibilities, short-lived trust.

The current design uses browser cryptography for vault operations and a FastAPI backend for authenticated storage and security controls. PostgreSQL holds durable state, while Redis handles temporary state such as short-lived challenges.

01 / browserDerive + encryptWeb Crypto and local key material
02 / APIValidate requestFastAPI, nonce, session, rate limits
03 / stateStore ciphertextPostgreSQL and temporary Redis state
04 / retrieveDecrypt locallyFetch one selected entry

Cryptographic direction

Key derivationArgon2id → HKDF-SHA256

Expensive derivation, then separate key material for separate jobs.

Vault encryptionAES-GCM

Authenticated encryption for stored password data.

Request validationHMAC-SHA256 + nonce

Five-minute nonces are invalidated after use.

TOTP secretsChaCha20-Poly1305

Authenticator secrets are not intended to sit in plaintext.

Authentication path

signup → email verification → OTP setup → login → OTP → session

Sessions last roughly one hour. Email OTP codes use uppercase letters and digits with a five-minute lifetime; authenticator-based TOTP is also supported. Passwords copied from the vault are cleared from the clipboard after roughly ten seconds.

04 / what went wrong

The useful bugs were architectural.

The first versions made some boundaries too optimistic. Testing replay scenarios pushed the request flow toward expiring nonces and one-time use. User-controlled fields raised XSS questions. Mobile testing found signup text that could become hard to see, while the API documentation once rendered blank.

TrustThe frontend held too much assumed state

Replay testing forced a clearer challenge and session model.

InputNames are still attacker-controlled

User labels need the same output handling as any other untrusted field.

InterfaceMobile exposed invisible input text

A small visual bug can make an otherwise correct signup flow unusable.

InfrastructureFree tiers shape architecture

Limits and expiry are part of the system even when they are outside the code.

05 / what I learned

Security is mostly about boundaries and expiry.

Key separation is not an abstract recommendation once several features depend on the same root secret. A nonce matters only if its lifetime and reuse rules are checked. An encrypted database still needs careful session handling, input validation, monitoring, and recovery paths.

Coffre is now live as a public beta and remains under active development. The next useful milestone is not more features—it is tighter auditing, better mobile behavior, and more hostile testing of the flows already there.

06 / Coffre Teams

Coffre for teams

Share passwords and API keys with your team while keeping control over who can access them. Built for startups and small teams.

Shared vaultPasswords and API keys, with controlled access

Password visibility is set per member; API keys use an explicit user allow-list.

PeopleInvitations + Owner / Admin / Member roles

Invite people into the workspace and keep management permissions separate from everyday access.

VerificationMore checks for sensitive actions

Passwords can require 2FA, API keys always do, and protected team actions use a fresh verification step.

Security controlsClient-side encryption and short team sessions

Secrets stay encrypted on the device, while signed actions and security logging cover team activity.

07 / Android beta

Coffre, a little closer.

A lightweight Android build for people who prefer opening Coffre like an app. It exists for convenience—the web app remains the main Coffre experience.

Android Early beta

Coffre for Android

Direct APK download. Built as a small comfort layer for mobile users.

Download APK
Fresh build. Rough edges are possible.

The Android app was just made and may have bugs in its flows. It was vibe coded with AI assistance—not manually built end-to-end by the creator—and is shared only for user comfort. If anything feels wrong, use the web app instead.

AI-assisted · vibe coded
Next projectNeuris / v0id