storing gpg keys on a database
Werner Koch
wk at gnupg.org
Mon Jan 19 14:34:53 CET 2009
On Mon, 19 Jan 2009 13:57, rjh at sixdemonbag.org said:
> 1. Create a regular SQL database with an email address as part of a
> composite primary key, and a binary blob as an unindexed column
Alternatively store the fingerprint and then use the fingerprint to
specify the key or to extract it. If you want to have a format that
will work in the future you may prepend a "2:" to the fingerprint. Example:
$ gpg --list-keys --with-fingerprint --with-colons --fixed-list-mode
[...]
pub:f:2048:17:F2AD85AC1E42B367:1199118275:1546232400::-:::scESC:
fpr:::::::::80615870F5BAD690333686D0F2AD85AC1E42B367:
uid:f::::1199120023::[...]::Werner Koch <wk at gnupg.org>:
uid:f::::1199120000::[...]
sub:f:2048:1:8117B6EBFA8FE1F9:1206105295:1325286000:::::e:
With that data you would insert this into your DB.
"wk at gnupg.org" -> "2:80615870F5BAD690333686D0F2AD85AC1E42B367"
The reason for the "2:" is that the OpenPGP format will eventually be
changed to compute the fingerprint using a different algorithm. The
"2:" indicates the curent algorithm. If you need to save space you
would of course not use the hex encoding of the fingerprint.
Salam-Shalom,
Werner
--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gnupg-users
mailing list