Bird
Raised Fist0
HLDsystem_design~12 mins

End-to-end encryption concept in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - End-to-end encryption concept

This system ensures that messages sent between users are encrypted on the sender's device and decrypted only on the receiver's device. No intermediate servers or services can read the message content, providing strong privacy and security.

Architecture Diagram
User A Device --\
                 \  Encrypted Message  
                  >---[Internet]---<
                 /                 
User B Device --/                 

Server (Relay) sits in the middle forwarding encrypted messages only
Components
User A Device
client_device
Encrypts message before sending and decrypts received messages
User B Device
client_device
Decrypts received messages and encrypts replies
Internet
network
Transports encrypted messages between devices
Server (Relay)
relay_server
Forwards encrypted messages without decrypting them
Request Flow - 4 Hops
User A DeviceUser A Device
User A DeviceServer (Relay)
Server (Relay)User B Device
User B DeviceUser B Device
Failure Scenario
Component Fails:Server (Relay)
Impact:Messages cannot be forwarded between users, causing communication disruption
Mitigation:Use multiple relay servers with load balancing and failover to maintain availability
Architecture Quiz - 3 Questions
Test your understanding
Which component decrypts the message in an end-to-end encryption system?
AServer (Relay)
BUser B Device
CInternet
DUser A Device
Design Principle
End-to-end encryption ensures privacy by encrypting data on the sender's device and decrypting only on the receiver's device, with intermediate servers acting only as message forwarders without access to the content.