If you want to stick with JavaScript, then have a look at the LGPL library OpenPGP.js.
GPG (PGP) decryption in client side web applications
-
31-05-2022 - |
Pergunta
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.
Solução
Outras dicas
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.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow