Add PGP library docker, scripts and endpoint
We don't have a dockerized PGP library so this needs to be added to https://github.com/SatoshiPortal/dockers
The PGP keypairs would be added in the configs of the Proxy. Possibly a good idea to put an additional password on modifying the keypairs since we want this to be resistant to an attacker take control of the app which would call the Cyphernode via API (don't want the attacker to be able to change the PGP key). and this is not a burdgen because you wouldn't be doing this too often anyway.
I think we should use https://github.com/openpgpjs/openpgpjs because it is so widely used and maintained, but other libraries can be used if they are good.
I think cleartext signing and verification + encrypt\decrypt string would be what we need.
TODO:
-
[ ] Dockerize OPENPGP.JS
-
[ ] Add PGP keypairs to proxy configs.
-
[ ] Add "clearsign" endpoint that dispatches data to pgp docker to create a cleartext signature.
-
[ ] Add "detachedsign" endpoint that dispatches data to pgp docker to create a detached signature.
-
[ ] Add "verify" endpoint for both detached and clearsign
https://github.com/openpgpjs/openpgpjs/blob/1bee091f2acd054b9cd78c6eca5c139061761662/src/cleartext.js
-
[ ] In verified response, give smart info: fingerprint, errors
-
[ ] Add "encrypt" and "decrypt" endpoint that dispatches data to pgp docker to create a encrypted file or string
-
[ ] Add "encrypt" and "decrypt" endpoint that dispatches data to pgp docker to create a encrypted file or string
BONUS
(privacy concerns)
- [ ] When returned the fingerprint, add "keybase lookup" (e.g. for Bylls) https://keybase.io/_/api/1.0/user/discover.json?key_fingerprint=7B32CB5B143F0D26549E01AAA199584252141E1D
- [ ] Look up on public key servers
Update: still pending. Contributions welcome
Self-assigned