Is my GPG key the same as my public key?

1

I'm trying to set up pass on OSX. The installation instructions say to run:

pass init "ZX2C4 Password Storage Key"

But I don't to my knowledge have a GPG public key. Do I need to set one up?

I have an SSH public key. Can I use this instead? If so, how do I get the ID?

Richard

Posted 2016-05-18T07:17:46.847

Reputation: 419

See also How do I import a RSA SSH key into GPG as the primary private key? on [sf].

– a CVn – 2016-05-18T18:46:03.050

Answers

1

GnuPG is an implementation of the OpenPGP standard, and used by pass for encryption using an OpenPGP key pair. pass init expects an OpenPGP user ID or key ID as parameter. There are different ways to reference keys in GnuPG, the most common ones for use with pass are the full user ID (like Joe Tester <joe@example.org>) or the key ID (like DEADBEEFDEADBEEF).

You cannot really use SSH keys for OpenPGP. While they support the same cryptographic algorithms (like RSA), the formats are very different. Also, an OpenPGP key contains additional information like the key creation timestamp, and usually is connected to user IDs. While you theoretically could convert an SSH key to an OpenPGP key by adding those details, you cannot simply construct an equivalence between SSH and OpenPGP keys (though some people use OpenPGP authentication subkeys for SSH, but this is the other way round and easier to do as an SSH key does not require additional information compared to an OpenPGP key).

It is more reasonable to simply generate a new OpenPGP key. As OpenPGP keys are usually something you use for a very long time, read about some best practices before creating it.

Jens Erat

Posted 2016-05-18T07:17:46.847

Reputation: 14 141