[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sks-devel] Keydump file format documentation?
From: |
Phil Pennock |
Subject: |
Re: [Sks-devel] Keydump file format documentation? |
Date: |
Wed, 12 Mar 2014 18:36:16 -0400 |
On 2014-03-12 at 11:35 -0700, Philip White wrote:
> I want to develop a program that analyzes the PGP web of trust. To do this, I
> figure the best source is the keydump file. The problem is, it's a binary
> file and I don't see any documentation for the binary file format. Given
> enough time and effort I can probably read the source code of `sksserver` and
> figure out how the file is encoded, but I wonder if there's a better way.
>
> Has anyone documented the file format? Alternately, is anyone willing to
> document it?
>
> P.S. I don't want to develop my program in O'Caml, if I can help it, so I
> don't want to simply reuse the file parsing libraries. :)
Your first tool for debugging a file format is the "file" command, which
might be used like this:
% file sks-dump-0000.pgp
sks-dump-0000.pgp: GPG key public ring
The answer might be wrong, but it provides a good starting point for
investigation. In this case, the answer is mostly correct (except that
it's not GPG-specific).
You can find documentation in RFC 4880. It actually doesn't say much
and disavows full knowledge, but the "Traditionally, a keyring is simply
a sequential list of keys" comment may help.
You can get an overview using gpg like so:
% gpg --list-packets < sks-dump-0000.pgp | less
and you can find parsing libraries in various languages.
-Phil