How can I encrypt a file using gpg without including the recipient's key ID?

  • An OpenPGP encrypted file will include the key ID of the intended recipient's public encryption key, as explained in this question.

    Is there any way to remove that information from the resulting encrypted file? Does gpg provide an option to not include that information?

    If not, what workarounds are recommended? I want to encrypt a file for a specific recipient and share it with any third party without revealing the identity of the recipient or of the sender.

    (It may be assumed that the recipient's public key is widely shared and associated with the recipient's real identity.)

  • kbs

    kbs Correct answer

    8 years ago

    Use the -R (or --hidden-recipient) flag in gpg to do this. More details in this answer.

    You, sir/ma'am, are a genius. I can't believe I didn't spot this.

    Will it still show an anonymous recipient? Is it possible to hide it completely?

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

Tags used