List-packets help

Peter Lebbing peter at digitalbrains.com
Fri Apr 6 18:31:22 CEST 2012


On 06/04/12 16:32, John Gill wrote:
> Of course, if there is a better way to extract all the preferences data,
> using just the gpg program, please let me know.

I just found this in the manual:

$ gpg --list-options show-sig-subpackets --with-colons --list-sigs KEYID

And I see for my own self signature:

sig:::1:AC46EFE6DE500B3E:2011-11-01::::Peter Lebbing
<peter at digitalbrains.com>:13x:
spk:30:1:1:%01
spk:27:1:1:%01
spk:23:1:1:%80
spk:22:1:3:%02%03%01
spk:21:1:3:%08%03%02
spk:16:0:8:%ACF%EF%E6%DEP%0B>
spk:11:1:5:%07%09%08%03%02
spk:9:1:4:%05%95%0A%03
spk:2:1:4:N%AF%D7%1D

Referring to RFC 4880, subpacket 11 is preferred symmetric algorithms,
for example. But you need to parse the quoted octets that follow it. For
subpacket 11, this is rather trivial, since %07%09%08%03%02 just means
"S7 S9 S8 S3 S2" as preference string (each octet a symmetric algorithm
number).

If you look at other strings, I see %ACF%EF... at subpacket 16, which is
a nice tricky example where the second octet appears to be 46 hex, ASCII
F. Since 16 is the issuer, it's no surprise the string expands to
AC46EFE6DE500B3E in hex, my long key id.

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt



More information about the Gnupg-users mailing list