Design: End-to-End Encryption Messaging System
Design focuses on encryption architecture, key management, message flow, and storage. UI/UX and network transport protocols are out of scope.
Functional Requirements
FR1: Messages must be encrypted on the sender's device and decrypted only on the receiver's device.
FR2: No intermediate server or third party can read the message content.
FR3: Support secure key exchange between users.
FR4: Allow sending text messages and attachments securely.
FR5: Ensure message integrity and authenticity.
FR6: Support offline message delivery with encrypted storage on server.
FR7: Handle multiple users and group chats securely.
Non-Functional Requirements
NFR1: System should support 1 million daily active users.
NFR2: Message delivery latency p99 should be under 500ms.
NFR3: Availability target is 99.9% uptime.
NFR4: Encryption and decryption must happen on client devices only.
NFR5: Server must not store any plaintext messages or encryption keys.
