03 / PROJECTSecurity · Real-Time Systems

ChatPulse

A messaging server that cannot read its own traffic

End-to-end encrypted messaging where the private key never leaves the browser. The server relays ciphertext and wrapped session keys, and holds nothing it could decrypt.

Year
2026
Status
Building
Technology
Node.js · Express · Socket.io · MongoDB · WebCrypto · IndexedDB
01 / SYSTEM MAP

Architecture

Security · Real-Time Systems / flow6 stages

Client

Sender

Generates the RSA-OAEP key pair in-browser; the private key stays in IndexedDB.

Sender → AES-GCM → Ciphertext + Wrapped Session Key → Socket.io → Server → Recipient

02 / CONTEXT

The problem

Most chat applications encrypt in transit and then store readable messages. If the server can read the conversation, a server compromise is a conversation compromise.

Engineering challenge

Delivering real-time messaging while making it structurally impossible for the server — or anyone who compromises it — to read message contents.

03 / DESIGN DECISION

Approach

Key generation happens in the browser with WebCrypto and the private key is persisted only to IndexedDB. Each message is encrypted with a fresh AES-256-GCM session key, which is then RSA-wrapped for the recipient. The server relays ciphertext and wrapped keys, and MongoDB TTL indexes expire ephemeral records without intervention.

WebCrypto
Native browser primitives — no hand-rolled cryptography, no key material in application code.
IndexedDB
Origin-scoped local persistence for a private key that must not be transmitted.
AES-256-GCM
Authenticated encryption — tampering is detected, not just hidden.
Socket.io
Bidirectional real-time transport with reconnection handling.
04 / IMPLEMENTATION

Engineering detail

  1. 01RSA-OAEP key pair generated in the browser via WebCrypto
  2. 02Private key stored only in IndexedDB — it is never transmitted
  3. 03Per-message AES-256-GCM encryption with a fresh session key
  4. 04RSA key wrapping, so the session key travels encrypted to the recipient
  5. 05Server receives ciphertext only and has no path to plaintext
  6. 06Zero-knowledge server architecture as a structural property, not a policy
  7. 07MongoDB TTL indexes expiring ephemeral data automatically
05 / OPERATING PRINCIPLES

Engineering practices

  • Threat model stated first; the architecture follows from it.
  • Server trust minimised by design rather than by configuration.
  • Ephemeral data expires through TTL indexes, not cleanup scripts.
06 / CAPABILITIES

Features

  • Browser-generated RSA-OAEP key pairs.
  • Per-message AES-256-GCM with RSA key wrapping.
  • Ciphertext-only server storage.
  • TTL-expired ephemeral records.