Ephemeral Encrypted Messaging
A real-time end-to-end encrypted messaging system where a stolen key never unlocks the past.
The problem
Most chat systems keep plaintext somewhere and reuse long-lived keys, which means a single key compromise can unlock the entire history. For a messaging system that claims to be private, the past has to stay private even if a key leaks tomorrow.
What I built
A real-time end-to-end encrypted messaging system built on a deliberate chain of primitives, each doing one job well.
- X25519 for an Elliptic-Curve Diffie-Hellman key exchange, with ephemeral keys that give forward secrecy.
- HKDF to derive the actual message keys from the shared secret, rather than using it raw.
- AES-GCM for authenticated encryption, so messages are both confidential and tamper-evident.
Why it matters
The point of this one was to apply cryptographic principles correctly in a production-style architecture, not to invent anything. Forward secrecy is the headline: compromising a key does not retroactively expose the conversations it never should have reached.