Design a Chat System with End-to-End Encryption (like WhatsApp).

Code Playground
JavaScript (V8)
Loading...
Console Output
// Output will appear here...
// For React: ReactDOM.createRoot(rootElement).render(<App />);
Recommended Answer

System Design Scenario:

1. Encryption: Signal Protocol. Keys stored on device. Server only passes encrypted blobs.

2. Delivery: Store-and-forward. Server holds message until user helps acknowledges receipt, then deletes.

3. Media: Upload to Blob store, send encrypted URL + decryption key in the text message.