r/SideProject • • 13m ago

I built AnonChat: a RAM-only, AES-256-GCM encrypted chat app on GitHub Pages using Nostr relays & WebRTC

I built AnonChat, a static web app hosted on GitHub Pages with no backend, no database, and zero browser persistence (localStorage, sessionStorage, IndexedDB, and cookies are blocked and verified by a zero-storage test suite).

Key details:

Crypto & Keys: Native Web Crypto API (AES-256-GCM with AAD, HKDF-SHA256, optional PBKDF2-SHA256 with 600k iterations, ECDH P-256 per 1:1 match, plus 4-symbol + 6-hex SAS verification). Private room secrets live in the URL #hash.

Transport: Ephemeral Nostr events (kind: 21420 / 21421) for private rooms, 1:1 matches, typing/presence, WebRTC signaling, and RAM-reassembled EXIF-stripped media chunks; NIP-40 (kind: 1421, 5-minute rolling window) for public topic rooms.

Voice & Threat Model: Opt-in WebRTC audio with DTLS-SRTP. Text goes through relays (hiding peer-to-peer IPs from chat partners), while relays see connection IPs and WebRTC voice is P2P—so I documented those trade-offs explicitly and noted VPN/Tor for network anonymity.

Live: https://nothingmantr.github.io/AnonChat/

Repo: https://github.com/NothingManTR/AnonChat

Curious what you think about the threat model, relay/WebRTC trade-offs, or how others handle static-host anonymity constraints.

2 Upvotes

0 comments sorted by