diff options
Diffstat (limited to 'doc/DETAILS')
-rw-r--r-- | doc/DETAILS | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/DETAILS b/doc/DETAILS index 6f1d895ad..de5a84747 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -6,7 +6,7 @@ a rmd160 hash value from it. This is used as the fingerprint and the low 64 bits are the keyid. - * Revocation certificates consists only of the signature packet; + * Revocation certificates consist only of the signature packet; "import" knows how to handle this. The rationale behind it is to keep them small. @@ -17,7 +17,7 @@ Layout of the TrustDB ===================== FIXME: use a directory record as top node instead of the pubkey record -The TrustDB is build from fixed length records, where the first bytes +The TrustDB is built from fixed length records, where the first byte describes the record type. All numeric values are stored in network byte order. The length of each record is 40 bytes. The first record of the DB is always of type 1 and this is the only record of this type. @@ -29,7 +29,7 @@ Record type 0: Record type 1: -------------- Version information for this TrustDB. This is always the first - record of the DB and the onyl one with type 1. + record of the DB and the only one with type 1. 1 byte value 1 3 bytes 'gpg' magic value 1 byte Version of the TrustDB @@ -74,7 +74,7 @@ Record type 3: 1 byte reserved 1 u32 owner This is used to bind all records for a given certificate together. It is valid only in this TrustDB - and usefull if we have duplicate keyids + and useful if we have duplicate keyids It points back to the directory node. 1 byte pubkey algorithm 1 byte reserved @@ -86,7 +86,7 @@ Record type 3: Record type 4: (cache record) -------------- Used to bind the trustDB to the concrete instance of keyblock in - a pubring. This is used to cache informations. + a pubring. This is used to cache information. 1 byte value 4 1 byte reserved @@ -132,14 +132,14 @@ Record Type 6 (hash table) ------------- Due to the fact that we use the keyid to lookup keys, we can implement quick access by some simple hash methods, and avoid - the overhead gdbm. A property of keyids is that they can be - used directly as hash value (They can be considered as strong - random numbers. + the overhead of gdbm. A property of keyids is that they can be + used directly as hash values. (They can be considered as strong + random numbers.) What we use is a dynamic multilevel architecture, which combines - Hashtables, record lists, and linked list. + Hashtables, record lists, and linked lists. This record is a hashtable of 256 entries; a special property - is, that all these records are adjacent stored to make up one + is that all these records are stored consecutively to make one big table. The hash value is simple the 1st, 2nd, ... byte of the keyid (depending on the indirection level). @@ -154,15 +154,15 @@ Record Type 6 (hash table) which is 29 for a record length of 40. To look up a key we use its lsb to get the recnum from this - hashtable and look up this addressed record: + hashtable and look up the addressed record: - If this record is another hashtable, we use 2nd lsb to index this hast table and so on. - - if this record is of hashlist, we lwalk thru these - reclist record until we found one whos hash fields + - if this record is a hashlist, we walk thru the + reclist records until we found one whose hash field matches the MSB of our keyid, and lookup this record - if this record is a dir record, we compare the keyid and if this is correct, we get the keyrecod and compare - the fingerprint to decide wether it is the requested key; + the fingerprint to decide whether it is the requested key; if this is not the correct dir record, we look at the next dir record which is linked by the link field. @@ -185,8 +185,8 @@ Record type 7 (hash list) Packet Headers =============== -GNUPG uses PGP 2 packet headers and also understand OpenPGP packet header. -There is one enhavement used ith the old style packet headers: +GNUPG uses PGP 2 packet headers and also understands OpenPGP packet header. +There is one enhancement used with the old style packet headers: CTB bits 10, the "packet-length length bits", have values listed in the following table: |