After running gpg --gen-key to make a key for file encryption. Eventually I get to this part:

"GnuPG needs to construct a user ID to identify your key.

Real name: "

I don't fully understand how this works. If I use my name to sign my key, can my name be recovered from a file I've encrypted?

link|improve this question

50% accept rate
feedback

2 Answers

up vote 1 down vote accepted

The UID (your name/email pair) is not related to encryption or signing, it is merely a label for others to know who owns this key. When signing or encrypting, only 64-bit key IDs are stored in the message. You also can have multiple UIDs on a single key (most people use a single key for all their mailboxes).

If you only encrypt a file but do not sign it, then your key ID won't be stored anywhere in the encrypted data. Only the recipient key IDs will be present.

But if you sign a file, then you'll be shown as its signer.

link|improve this answer
feedback

If you do encryption only, you can also use the --hidden-recipient option, to prevent inclusion of the key ID of the recipient (or when you encrypt files to yourself). You will however have to specify the key by hand when you want to decrypt.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.