DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

How are you handling the data revolution? We want your take on what's real, what's hype, and what's next in the world of data engineering.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Debunking LLM Intelligence: What's Really Happening Under the Hood?
  • Predicting Ad Viewability With XGBoost Regressor Algorithm
  • Floyd's Cycle Algorithm for Fraud Detection in Java Systems
  • Metal and the Simulated Annealing Algorithm

Trending

  • gRPC and Its Role in Microservices Communication
  • How You Clear Your HTML5 Canvas Matters
  • Deploying LLMs Across Hybrid Cloud-Fog Topologies Using Progressive Model Pruning
  • Top Trends for Data Streaming With Apache Kafka and Flink
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Trying to Understand How WhatsApp Uses Encryption

Trying to Understand How WhatsApp Uses Encryption

It turns out that the encryption used by WhatsApp is built on elliptic curves. They can be a little complicated to explain but this article contains excellent information about it.

By 
Traven West user avatar
Traven West
·
Jul. 22, 16 · Opinion
Likes (5)
Comment
Save
Tweet
Share
11.6K Views

Join the DZone community and get the full member experience.

Join For Free

encryption

By now all of the security-minded users have upgraded to the current version of WhatsApp, which supports end-to-end encryption.

End to end encryption, as the name suggests is a way of encrypting communication between two parties such that a third party, or even Whatsapp themselves, cannot decrypt/read the communication.

For a while now, I have been trying to understand the algorithm from the white paper which Whatsapp has published and I apparently realized that explaining the algorithm in simple terms seems almost impossible.

The setup includes a handful of encryption keys. Like any other communication systems, the ‘signal’ protocol uses a combination of asymmetric and symmetric key cryptographic algorithms. The symmetric key algorithms ensure confidentiality and integrity whereas the asymmetric key cryptographic algorithms help in achieving the other security goals namely authentication and non-repudiation. In symmetric key cryptography, a single key is used for encryption of the data as well as decryption. In asymmetric key cryptography, there would be two separate keys. The data which is encrypted using the public key of a user can only be decrypted using the private key of that user and vice versa.

Whatsapp uses the Curve25519 based algorithm. The history of Curve25519 is worth noting as it was introduced after the concerns over allegations that certain parameters of the previously prevalent P-256 NIST standards have been manipulated by NSA for easier snooping. Elliptic Curve Diffie Hellman algorithm is a mathematical algorithm which helps two communicating entities to agree upon a shared secret without actually sending the actual keys to each other.

To understand the article and the method which they use, it is necessary to have a basic understanding of advanced cryptographic algorithms. So if you are not aware of ECDH, AES, SHA etc, this article may not entertain you. The following video by Robert Pierce beautifully explains the ECDH algorithm.


In the following flow chart,  all the key exchanges which occur when a user installs WhatsApp up until a message is sent to another user. Message key is a one-time usable key and the process is repeated from the step where the new chain key is calculated.

Communicating Entities

ecdh-figure-1

Asymmetric Keys

ecdh-figure-2.png

Symmetric Keys/ Pseudo Random Numbers

ecdh-figure-3.png

Cryptographic Functions

ecdh-figure-4.png

Step By Step Process of Whatsapp End to End Encryption

Image title

Algorithm

Published at DZone with permission of Traven West, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Debunking LLM Intelligence: What's Really Happening Under the Hood?
  • Predicting Ad Viewability With XGBoost Regressor Algorithm
  • Floyd's Cycle Algorithm for Fraud Detection in Java Systems
  • Metal and the Simulated Annealing Algorithm

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: