UID management

Philipp Gühring pg at futureware.at
Mon Nov 5 18:18:33 CET 2007


Thanks for your answer!

Ok, I need the following: 
1. I need a tool that lists me all the UIDs in a key. 
2. Then I select the UIDs I need, and the UIDs I do not need
3. Then I need a tool that removes all selected unneeded UIDs from the key, 
and returns me the stripped key.

Until now I tried the do the first step with gpg --with-colons and the third 
step with gpg --edit-key by automating gpg. 
But due to the ordering problem, this doesn´t work.

> > Does GPGME have UID management functionality?
> You need to use the edit feature and implement most things yourself.
> See GPA for an implementarions of this.

How likely will it be that such an implementation will break with the next 
version? It doesn´t sounds like a stable, robust and secure way to me.

> > Why is it ordered differently?
> This is an implementation detail.

You mean an implementation bug? Or is there some structural problem that 
doesnt allow for a robust ordering? Are you sorting the UIDs while importing 
them for faster lookup? Aren´t you just copying the public key into the 
keyring directly?
Why isn´t it order just in the same way it is written in the file? Why is it 
reordered at all? Why isn´t the ordering configurable?

> > How are both lists ordered?
> The order is not specified. 

How can I specify it then?

> OpenPGP does not define any order of UIDs. 

Is that an issue that should be solved in the OpenPGP standard? Can you write 
a proposal that would suit it?

Ok, which solution can you suggest?

Best regards,
Philipp Gühring

More information about the Gnupg-users mailing list