sks-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sks-devel] How are Key's stored (format) in the berkeley Database


From: Kim Minh Kaplan
Subject: Re: [Sks-devel] How are Key's stored (format) in the berkeley Database
Date: Sat, 16 Nov 2013 15:56:12 +0100

Thomas Spycher wrote:

> i’m trying to generate some statistics out of my running sks keyserver. For 
> this i’m accessing the berkeley Database directly.
> I was a bit surprised, that i can’t use the received public key in my python 
> script directly as binary based key.
[...]
> It is not a error in the pgpdump library. Are the keys compressed stored?

Check keydb.ml[1] to see the database format. If and only if the first
byte is 0 then the rest is the raw key. If you used "sks build" then
all entries should begin with 0. If you used "sks fastbuild" then you
will also encounter entries that are index in the pgp dump files. The
format is 32 bit unsigned int that indicate the pgpdump file number,
and a 32 bit (if first byte is 1) or 64 bit (if first byte is 2)
offset into that dump file.

[1] 
https://bitbucket.org/skskeyserver/sks-keyserver/src/4069c369eaaa718c6d4f19427f8f164fb9a1e1f0/keydb.ml?at=default#cl-214
-- 
Kim Minh.
http://www.kim-minh.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]