Menu

How I built zero-knowledge secret sharing with Web Crypto and Cloudflare Durable Objects
📰

How I built zero-knowledge secret sharing with Web Crypto and Cloudflare Durable Objects

DEV Community: security·Farkas Zoli·12 days ago
#iuJ0TwAl
#devtosecurity#devto#dev#key#server
Reading 0:00
15s threshold

Every team has had this moment: someone urgently needs an API token, database credential, or .env file, and the fastest path is pasting it into Slack, Teams, or Discord.

The problem? That chat channel keeps the plaintext forever: in search logs, backups, exports, and on every device synced to the account.

I built zeepass which is a free, open-source tool to share secrets via one-time self-destructing links.

But my goal was stricter than just "trusting the server not to look":

The server should physically never have what it needs to decrypt the secret.

Here is the exact architecture, the 150 lines of code powering it, and where the limits of browser cryptography lie.

How it works under the hood

Client-side encryption: Your browser generates a fresh 256-bit AES-GCM key with the Web Crypto API. Only the ciphertext and a random 12-byte IV leave your machine.

Zero-knowledge URL fragment: The key is appended to the URL fragment ( pass.wzee.dev/s/<id>#key=... ).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.