Blog | G5 Cyber Security

Add Key Holders to PGP File

TL;DR

You can’t directly ‘add’ key holders to an existing PGP file in the way you might think. PGP files (usually containing a public key) are for encryption and verification, not managing access control. However, you can distribute your public key to multiple people so they can encrypt messages *for* you or verify signatures *from* you. If you’re thinking about shared decryption, you need a different approach like key sharing software or a dedicated key management system.

Understanding PGP Key Files

PGP (Pretty Good Privacy) uses pairs of keys: a public key and a private key.

A PGP file typically contains the public key (or both keys). Distributing your public key doesn’t grant anyone access to decrypt your messages; it just lets them send encrypted ones.

How to Share Your Public Key

  1. Export Your Public Key: Use GPG (GNU Privacy Guard), the most common PGP implementation. Open a terminal and run:
    gpg --export -a "Your Name" > your_public_key.asc

    Replace “Your Name” with the name associated with your key.

  2. Share the .asc File: You can now send your_public_key.asc to anyone you want to be able to encrypt messages for you or verify your signatures. Common methods include email, secure file transfer, or a keyserver (see below).

Using Keyservers

Keyservers are public repositories where people can upload and download PGP public keys. This makes it easier to share your key without directly exchanging files.

  1. Upload Your Key: Use the following command:
    gpg --send-keys --keyserver hkps://keyserver.ubuntu.com "Your Key ID"

    Replace “Your Key ID” with your key’s ID (you can find this using gpg --list-keys). hkps://keyserver.ubuntu.com is just one example; others are available.

  2. Verify Upload: Check that your key has been uploaded successfully by searching for it on the keyserver’s website (e.g., https://keyserver.ubuntu.com/).

What if you need shared decryption?

If multiple people need to be able to decrypt the same messages, PGP isn’t the right tool on its own. Consider these alternatives:

Exit mobile version