DEV Community

Discussion on: How to implement WhatsApp like End-to-end encryption?

 
pankajtanwarbanna profile image
Pankaj Tanwar

That's a really smart approach, Andrei. We can store the message temporarily on the server with the public key and everything works smooth and that's why we are not able to see the previous message/history of the group.

But let's say, WhatsApp wants to add this feature of showing history of the group too, when a new user joins the group. How would you go about this? I could not think of a work around for it. Would you like to add you thoughts here?

Thread Thread
 
anduser96 profile image
Andrei Gatej

I don't think there is a way to solve this with the current approach. That's because if a new member joins and none of the other members is active, then it's impossible to get that private key of the group, so you can't decrypt the messages.

Moreover, I read that Discord does not use E2EE, so this might be a reason why you can see previous messages when you join a group there.

Thread Thread
 
pankajtanwarbanna profile image
Pankaj Tanwar

Yes, Discord & Telegram has developed their own smart algorithms to deal with such use cases. Do you have any documentation or article related to Discord's implementation for this?

Thread Thread
 
anduser96 profile image
Andrei Gatej

Sorry for the late reply. No, I just did a quick search to see whether Discord is using such feature or not. But I'd be glad to read more about it too.

Thread Thread
 
pankajtanwarbanna profile image
Pankaj Tanwar

I am also searching a bit. I will let you know if I find something. Thank you for such a useful conversation. Hope to learn more from you.