Skip to content

Creating GPG keys

Lucas Teske edited this page Apr 11, 2019 · 2 revisions

There are two ways to create GPG keys with Chevron right now. One is using the RemoteSigner API and other is using the Standalone CLI tools.

Remote Signer API

Although creating a GPG Key here might not be a good idea, you can use QRS to generate new GPG Keys on the fly. To do so, make a POST request to /remoteSigner/gpg/generateKey with the following JSON Content:

{
  "Identifier": "Lucas Teske <lucas@teske.com.br>",
  "Password": "123456",
  "Bits": 3072
}

It should return your Encrypted GPG Private Key in ASCII Armored format.

-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: BCPG C# v1.8.1.0

lQVsBFpqVT0BDADIMVGd96DMUGf+zrcs0cGTzofbvV56WTWFju9WzIiUMigON6Qw
XdpdHUad1H31pnI1COCKH+k2t3TOlQr7qgXHMFOjW+/xHKoN6NhGMZVC7MkUllaj
uTFDH9823N/fhbJ4BRuBb2a5X4HBIeIDscu19xsW5B3HvwggojjhZ5iKRCt49Hsv
dJ6gPA5fDURGAbt9xdAqWvlkT9xagHqylVSG1A1CxOmeP3p+Vfjh/IhCgZ/nbi52
s+iBthuraYJAIPB9snASniMIqYs7sWTpC8T4m+WYEZGB2ejvVscmEgXFNWn6hzKI
(...)
-----END PGP PRIVATE KEY BLOCK-----

Standalone CLI Tools

standalone gen --bits=3072 --password="123456" --id="Lucas Teske <lucas@teske.com.br>"

Please be careful that passing the password in arguments make it visible for anyone that can list the processes running in your machine. Ideally you should omit the --password argument and fill the password when the CLI asks for it.

You can also redirect the output to a file by using the --output option:

standalone gen --bits=3072 --password="123456" --id="Lucas Teske <lucas@teske.com.br>" --output=test.key