Changing name/comment on GPG key/uids without losing signatures?

RoUS picture RoUS · Jun 12, 2014 · Viewed 19k times · Source

Over the years I've accumulated a few keys. When I generated them, and when I added various uids to them, I didn't use the 'comment' feature wisely.

At this point I would like to correct that and update just the comment field on each of the uids -- but without losing the signatures that they have accumulated. No eddress change, no name change, just the comments on the uids.

Can this be done without having to adduid/{del,rev}uid for each one and losing the signatures?

Answer

Jens Erat picture Jens Erat · Jun 12, 2014

Incoming signatures always point to a UID. UIDs cannot be modified, only revoked. If you want to change one, it will have to get signed again. If you revoke a UID, you will lose all incoming signatures.

UIDs are simple strings usually adhering to the pattern Name (comment) <[email protected]>, and the signature is created over the whole string including the comment.

Imagine you could change UIDs without losing signatures. You could just change your name to another, and pretend to be this guy and be certified for this name at the same time. Same applies to comment information which is also certified.