↖▢✒TPen tool · drawing
T Piyush Yadav · vector
Piyush0 × 180 · 0%
  • ↳ Importing Cover
0%

▢ Case study · 2026

DropVault

Zero-knowledge, self-destructing file sharing. Files are encrypted in your browser, the key never reaches the server, and each file deletes itself after download or expiry, with a signed proof of destruction.

Main Page
Role
Solo full-stack developer
Year
2026
Timeline
Sep to Oct 2026
Built with
TypeScriptReactViteTailwind CSSWeb Crypto APIWeb WorkersService WorkersNode.jsExpressZodPostgreSQLPrismaRedisBackblaze B2VitestPlaywright

01

The problem

Sending a sensitive file usually means uploading it to a service that can read it, where it sits forever. You can’t know who else has opened it, or whether it was ever deleted. “Delete after download” features are only a promise, with no way to check.

I wanted file sharing where the server can’t read the file even if it wanted to. Each link should work exactly as many times as the sender allows, and deletion should be provable, not just promised.

02

What he built

DropVault is a zero-knowledge, self-destructing file-sharing service.

Encrypted in the browser. Files are encrypted with AES-256-GCM in 1 MiB chunks, using my own file format (DVF1), inside a Web Worker. Filenames are encrypted too. The key lives in the link’s #fragment, which browsers never send to servers.

Features

  • Files up to 100 MB, uploaded directly to storage in parallel parts. Uploads survive network drops and page reloads.

  • Downloads stream through a Service Worker and are decrypted on the fly, so memory use stays flat.

  • One download by default (or up to ten), with expiry from minutes to 7 days

  • An optional password, hashed with Argon2id in the browser. Five wrong guesses destroy the file.

  • A private manage link that shows downloads left and lets the sender destroy the file at any time

  • A signed Ed25519 receipt when a file is destroyed, which anyone can verify offline at /verify

Architecture. File bytes never pass through the API, which only handles small JSON requests and hands out short-lived presigned URLs.

  • Frontend: React on Vercel, with a strict Content Security Policy

  • API: Express, Zod and Prisma on Render

  • Storage: Neon Postgres for file records and events, Upstash Redis for rate limits, and Backblaze B2 for ciphertext only

  • Cleanup: GitHub Actions triggers a cleanup worker every 15 minutes

Everything runs on free tiers. All cryptography lives in one shared package used by both the browser and the server.

03

The hard parts

A one-time link that’s truly one-time. If 1,000 people click a one-time link at the same moment, exactly one should get the file. A “check, then update” approach leaves a race window, so a download claim is one atomic conditional UPDATE in Postgres. I ran 1,000 simultaneous claims 100 times, and every run had exactly one success.

Link previews that don’t burn the download. Chat apps like Slack and WhatsApp open links to build previews. If opening the page counted as a download, the recipient would find the file already gone. So opening a link is free, and only an explicit claim spends a download.

Tamper-proof encryption. Encrypting chunks isn’t enough on its own. An attacker could reorder, truncate or swap them. DVF1 protects against this with:

  • an authentication tag on every chunk

  • STREAM-style nonces, so chunks can’t be reordered or cut short

  • the file header bound in as associated data

  • key commitment, so a file can’t decrypt validly under two different keys

Resumable uploads without nonce reuse. Resuming an upload risks encrypting different data with the same key and nonce, which breaks AES-GCM. A part is only re-encrypted under the same key if its plaintext hash matches what was sent before. Otherwise, a new key is used.

Provable deletion. Every file has a SHA-256 hash-chained event history, so its record can’t be quietly rewritten. When the ciphertext is deleted, the server signs an Ed25519 receipt that can be verified offline. Storage lifecycle rules act as a backstop in case the cleanup worker misses anything.

Hardening

  • A strict CSP with no inline code and no third-party scripts

  • Referrer-Policy: no-referrer, so the key can’t leak through referrer headers

  • Rate limits and daily quotas keyed by an HMAC of the IP, so raw IPs are never stored

  • A destroyed file’s remaining record is deleted after 7 days

04

How it turned out

DropVault is live at dropvault.piyushydv.com (opens in a new tab). In my local benchmarks:

  • 2,021 MB/s browser encryption in a Web Worker (the cipher alone, since real uploads are limited by the network)

  • Exactly 1 success out of 1,000 simultaneous claims, in 100 out of 100 runs

  • 662 download claims per second at p95 136 ms, with 50 concurrent clients

  • 1,000 expired files purged with signed receipts in 1.3 seconds

  • Tab memory under 300 MB during a 1 GiB upload and download test

The full threat model is documented in the repo, including what DropVault can’t protect against, like a malicious server shipping altered JavaScript.

This project taught me that “secure” has to be specific. Every feature meant asking exactly who could break it and how.