How does what's app work - What's App end-to-end encryption

 More than 2 billion people in 180 countries use WhatsApp to stay in touch with friends and family anytime, anywhere.


 Almost pick traffic, no one help but wonder how WhatsApp works, How does it handle more users and messages at once? , How do they store all that data?      
                                                       
In this article, see these concepts,

How does what's app work

WhatsApp Back End System Design looks like this: Erlang, Ejabberd, BEAM, Mnesia, YAWS.

 WhatsApp uses the Ejabberd (XMPP) server is written in the Erlang language. which facilitates instant message transfer between two or more users on a real-time basis. The Ejabberd works on Sending a message to one another, Group chat, Storing and forwarding offline messages, Contact list, and presence.

ERLANG is the programming language used by Whatsapp. Its process-based asset offers Erlang its highest concurrency, scalability, and reliability.

WhatsApp uses Mnesia DataBase to handle the heavy-duty task of database management. Mnesia is a multiserver distributed DBMS that also becomes ERLANG's default Database.

BEAM (Bogdan's Erlang Abstract Machine) is a virtual machine that compiles and executes Erlong source code.

WhatsApp uses YAWS(Yet Another Web Server) to store multimedia data. YAWS provides Two-way communication by establishing a reliable and fast connection between server and app.

Message Flow

The user who wants to send the message sends a text or media file to the server. The Ejabberd server saves the message in the Mnesia database table where it is placed in the queue. When the receiving user opens the app, thereby reconnecting to the socket, the message in the queue is redirected by the Ejabberd server and delivered to the recipient. After confirming a successful delivery, the message will be deleted from the Mnesia database.

What's App end-to-end encryption

WhatsApp's end-to-end encryption ensures that only you and the person you are communicating with can read what's sent. No one in the middle can read the messages along with WhatsApp. Messages are stored with locks and only the recipient has a special key to unlock and read the messages.

end-to-end encryption

Data transfer in WhatsApp means end-to-end encryption means messages are not stored on the server. These messages are decoded only when the receiver receives the message.

Steps illustrate the work of two people communicating on WhatsApp.

  1. When a user first opens WhatsApp, two different keys (public & private) appear. The encryption process takes place over the phone.
  2. The public key is transferred to the receiver via a centralized WhatsApp server but the private key must be with the user.
  3. The public key encrypts the sender's message on the phone before reaching the centralized server.
  4. The server is used only to transmit the encrypted message. The message is unlocked only by the receiver's private key. No third party, including WhatsApp, can intercept the message.














Post a Comment