Finding the key-id of an armoured key

Timo Schulz
Fri Jan 10 19:57:02 2003

On Fri Jan 10 2003; 18:29, Chris Hastie wrote:

> Many can be parsed from the output of "gpg --list-packets /path/to/file" 
> but I can see no reliable way of getting the key id or its digest 
> algorithm from this. The digest algorithm can probably be established 
> from a self-signature if I know what the key id is so that I can match 

What's wrong with gpg --export foo | gpg --with-colons. In your case
gpg --with-colons /path/to/file. Then the output looks like this:
pub:u:1024:17:ED4681C9BF3DF9B4:1999-04-29:::u:Timo Schulz <>

It should be easy to parse the output due to the colon format and I guess
there is every information you need.


"Ich habe das Interesse an meiner eigenen Frage verloren." -- John Cage