GPG (PGP) decryption in client side web applications

萝らか妹 提交于 2019-12-03 07:38:03

问题


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.


回答1:


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




回答2:


I know I'm coming a bit late to this, but for future reference, there's always an option of using crypto-browserify via Browserify.



来源:https://stackoverflow.com/questions/16951531/gpg-pgp-decryption-in-client-side-web-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!