DEV Community

Cover image for Why I Built ZeroTrace-Vault: A Zero-Knowledge Ephemeral Secret Sharing Tool with WebCrypto
Atul Kumar
Atul Kumar

Posted on Edited on

Why I Built ZeroTrace-Vault: A Zero-Knowledge Ephemeral Secret Sharing Tool with WebCrypto

Every day, developers and DevOps engineers share database passwords, SSH keys, and API tokens across Slack, Microsoft Teams, WhatsApp, and email.

We treat these platforms like temporary scratchpads, but in reality, they are permanent, indexed, searchable databases.

During the infamous Uber 2022 breach, an attacker compromised the entire corporate infrastructure simply by searching Slack for AWS_SECRET_ACCESS_KEY. The credentials had been sitting there in plaintext for months.

Why Existing Pastebins Fall Short

Most pastebin and "secret sharing" tools either encrypt on the server side or hold plaintext credentials in memory. If the server is seized, a database dump is leaked, or a cloud provider goes rogue, all secrets are exposed.

To solve this, I built ZeroTrace-Vault β€” an open-source, mathematical Zero-Knowledge secret sharing engine.

πŸ” The Mathematical Zero-Knowledge Architecture

The core philosophy of ZeroTrace-Vault is simple: Even the server hosting the application physically cannot read the secrets.

Here is how the cryptographic lifecycle works:

Client-Side AES-GCM-256: When you type a secret, your browser generates a cryptographic 256-bit AES-GCM key locally via the native WebCrypto API.
RFC 3986 URL Hash Key Isolation: The secret is encrypted before sending anything to the server. The encryption key is appended to the URL fragment (# anchor): https://vault.domain.com/v/{UUID}#{EncryptionKey}
Zero Wire Exposure: According to RFC 3986 specifications, web browsers never transmit the hash fragment (#...) in HTTP requests. The server only stores the ciphertext and 96-bit IV. The key never touches the server's disk, RAM, or logs.
Atomic Burn-on-Read: Once the recipient opens the link, the browser fetches the ciphertext, decrypts it locally using the key in the hash fragment, and triggers an atomic memory shred on the database. Any secondary visit returns a permanent 404 Purged.
Anti-Crawler Shield: Preview bots (Slackbot, Discord, WhatsApp) hitting the link won't prematurely burn your secret before the real person opens it.
πŸ’» Try It Out (Live Demo & Source Code)

I have deployed a live instance and open-sourced the entire project:

🌐 Live Demo: https://zerotrace-vault.onrender.com
πŸ“‚ GitHub Repository: https://github.com/Atulkumar5772/ZeroTrace-Vault

It also includes a lightweight Docker container for self-hosting and a direct Linux CLI tool (cat id_rsa | zerotrace) for terminal pipelines.

πŸ’¬ Looking for Your Feedback!

As a student developer passionate about cryptography and systems engineering, I'd love to hear your thoughts:

How does the WebCrypto implementation look to you?
What features would you like to see in a self-hosted secret vault?

🌟 If you find this project useful or support open-source privacy tooling, please consider giving ZeroTrace-Vault a star ⭐ on GitHub! It really helps independent developers get discovered.

Top comments (2)

Collapse
 
userxnom profile image
Abdullah Naseer •

The anti-crawler shield is the detail that makes the burn-on-read design actually work in practice β€” without it, the first Slack or WhatsApp preview would eat the secret before the intended person ever opened it. The hash-fragment key isolation is clean too, since the key never leaves the browser's address bar. One edge case I am curious about: if the recipient's browser fetches the ciphertext and the burn fires, but decryption fails or the tab closes mid-read, is that secret gone for good, or is there any recovery path? That tradeoff matters a lot for one-time credentials like the AWS keys in your Uber example.

Collapse
 
atulkumar5772 profile image
Atul Kumar •

Thanks so much for the thoughtful feedback! Really appreciate you pointing out the anti-crawler shield β€” it's one of those practical details that makes or breaks real-world adoption.

To answer your question regarding the tradeoff:

In the current architecture, yes β€” the secret is purged immediately upon retrieval (Security > Availability).

The reason for this strict tradeoff is preventing replay attacks: if the server allowed a recovery mechanism or a secondary fetch retry under the premise of "decryption failed", a malicious intermediary or compromised client could exploit that window to re-fetch and leak the secret, defeating the single-view guarantee.

However, you make an excellent point regarding high-stakes one-time credentials (like root AWS keys). Two potential UX improvements I'm exploring for the next release:

Explicit Two-Step "Click to Reveal & Burn": The recipient lands on a pre-flight confirmation screen showing metadata (sender, expiration timer) with a clear "Reveal & Permanently Shred" button. The actual fetch & burn API call is only triggered upon explicit user intent, eliminating accidental tab-close drops.
Ephemeral Memory Staging (30s Grace Window): Holding the decrypted payload in the recipient's local browser sessionStorage temporarily so accidental page refreshes don't lose the credential until the tab is closed.

Really valuable perspective β€” definitely adding the two-step confirmation toggle to the project roadmap! If you haven't already, would love if you could leave a star on the GitHub repo! ⭐