Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Encrypt in frontend and decrypt once it reaches backend

What would be the most secure way to do so?

So far I tried providing the same public key for every user which automatically encrypts the data sent over a https request to my backend.

For that reason, people with enough knowledge can get the json payload before its encrypted and encrypt it by themselves on their end and send it over my server.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The most ideal case would be so the client side only has access to the public key while the server can view both user’s private key and public key.

I’m currently using RSA for this
Frameworks in use: VueJS and NestJS

>Solution :

The web browser belongs to the user. It is completely under their control. Anything you do in the browser can be inspected and manipulated by the user.

You can encrypt data during transmission to protect it from third-parties with HTTPS.

You can’t make the user’s browser compensate for you not trusting the user.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading