Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GPG (PGP) decryption in client side web applications

How would I be able to decrypt some encrypted data on the client side of a web application?

E.g.

  • The data is stored encrypted on the server.
  • It was encrypted using a public GPG key.
  • The server sends the encrypted to the client.
  • The client needs to decrypt it using their local private key.

Assumably I would be able to pass the private key to the browser and use Javascript to decrypt the data.

like image 401
Petah Avatar asked Jun 05 '13 23:06

Petah


1 Answers

If you want to stick with JavaScript, then have a look at the LGPL library OpenPGP.js.

like image 89
Jens Erat Avatar answered Oct 27 '22 00:10

Jens Erat