HeadlinesBriefing favicon HeadlinesBriefing.com

Zero‑Knowledge Secret Sharing with Nix and AES‑GCM

DEV Community •
×

Developers often trust servers to store encrypted secrets, but leaks expose sensitive data. To eliminate that risk, the author built Nix, a zero‑knowledge sharing app that never sends decryption keys to the backend. The tool relies on AES‑GCM encryption and the browser’s URL hash fragment to keep keys private securely.

On the client side, a random 256‑bit key is generated with the native Web Crypto API and exported to Base64 for the URL. The encrypted payload, wrapped in JSON with a fresh 96‑bit IV, is sent to Supabase. The server stores only ciphertext, enforcing row‑level security and optional burn‑on‑read rules.

Users receive a link like https://nix.jaid.dev/view/ID#KEY. When the recipient clicks, the browser fetches the ID, extracts the key from the hash, and decrypts locally—never exposing the secret to the server. The author invites feedback on encryption robustness and user experience, with the source on GitHub for future improvements and updates.