Get a Pentest and security assessment of your IT network.

Cyber Security

Add Email to GPG Key

TL;DR

Yes, you can add an email address to your existing GPG key using the gpg --edit-key command. This guide shows you how.

How to Add an Email Address to Your GPG Key

  1. Open your key for editing: Use the following command, replacing [email protected] with the email address associated with your key (or one of them if you have multiple).
    gpg --edit-key [email protected]
  2. Enter edit mode: Once the key is loaded, you’ll be in the GPG editing prompt. Type list to see a list of commands.
  3. Add user ID: To add your email address as a new User ID (which includes your name and email), type uid and press Enter. You will then be prompted for your full name, comment, and finally the email address.
    gpg> uid
    Please enter what to do (Change UID/Add UID/Delete UID): Add UID
    Your name:
    Real name: Your Full Name
    Email: [email protected]
    Comment: (optional)
    
  4. Confirm the User ID: GPG will display the new User ID you’ve entered. Confirm it is correct.
  5. Save the changes: Type save and press Enter to save your changes.
    gpg> save
    
  6. Exit GPG: Type quit and press Enter to exit the editing session.
    gpg> quit
    
  7. Verify the changes: Use the following command to list your keys and confirm that the new email address is associated with your key.
    gpg --list-keys [email protected]

Important Considerations

  • Key IDs: Adding a User ID doesn’t change the primary Key ID of your key. It simply adds another identity associated with it.
  • Trust: You may need to rebuild trust for the new User ID if you are using a web of trust.
  • Multiple Emails: You can add multiple email addresses to a single GPG key by repeating steps 3-6 for each address.
Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation