John1984 John1984 - 1 year ago 199
Javascript Question

end to end encryption with javascript and php

I'm looking to implement end-to-end encryption for messages sent between users in my Laravel app. I want to encrypt these messages in a way that they are only viewable by the sender and receiver (just like in secure messaging apps like WhatsApp). No one else can read them, including admins or dbas.

How would I go about doing this?

I should also mention that the messages will be sent through the browser to the server by a JavaScript AJAX request and pushed to the other user by Node.js / setup.

Answer Source

Would be helpful if you have posted some examples that you have tried. Here are the steps that you can follow to achieve it.

Step 1. You will have to establish a private chat between Client and server. An example can be seen here: Creating a private chat between a key using a node.js and

Step 2. Add encryption/decryption logic for the messages at Client side. Here is a logic for the same:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download