ietf-openpgp
[Top] [All Lists]

Re: Trust Packets

2004-01-30 03:30:35

* Peter Gutmann wrote:
Just out of interest, is there anyone using an SQL DB to store PGP keys?

Yes, here. Keyserver on DB.

I've thought about this a bit in the past (I use databases to store other
types of keys) but because of the free-form association of different bits
and pieces of keys with identifying information I can't think of any easy
way to do it unless you use a multi-level lookup.

I distribute the keys over a bunch of tables.
pgp=# \dt
 List of relations
 Schema |         Name          | Type  | Owner 
--------+-----------------------+-------+-------
 public | asymmetric_algorithm  | table | lutz
 public | compression_algorithm | table | lutz
 public | hash_algorithm        | table | lutz
 public | pubkey                | table | lutz
 public | revocation            | table | lutz
 public | revocation_class      | table | lutz
 public | sig                   | table | lutz
 public | sigtype               | table | lutz
 public | symmetric_algorithm   | table | lutz
 public | userid                | table | lutz
(10 rows)

  SELECT keyID FROM indexTable WHERE email = foo 
  SELECT key FROM sigKeyTable WHERE keyID = foo

Yes.

which isn't very efficient (multiple tables, multi-level lookups, etc etc).

This is very efficient compared to the alternatives:
  - You search the only the part of the data associated with the query.
  - Intertable links are indexed using hashs or btrees.
  - Records are dense.



<Prev in Thread] Current Thread [Next in Thread>