pgp4pine keyring searching
Brought to you by:
ftobin
|
From: Billy D. <bi...@da...> - 2000-07-23 17:30:05
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've veen studying pgp4pine this morning.
It does an interesting caching with the keyring.
To determine whether to 'sign', or 'sign & encrypt', pgp4pine
checks whether a key exists for all of the recipients.
Figuring out which key to use for each recipient is sped up
by a cache database of the public keyring. The cache is built
by parsing the output of:
gpg --list-keys --with-colons --no-greeting 2>/dev/null
filling in a linked list of 'struct pkiKey' objects, where:
struct pkiKey {
char emailAddress[EMAIL_ADDRESS_MAX_LENGTH];
char displayName[EMAIL_ADDRESS_MAX_LENGTH];
char keyID[KEY_ID_LENGTH];
char keySize[KEY_SIZE_LENGTH];
char keyType[KEY_TYPE_LENGTH];
struct pkiKey *nextKey;
};
If a key has more than one 'uid', an additional copy of the struct pkiKey
is added to the database to accomodate the extra uid's emailAddress and
displayName fields. So all email addresses in the keyring are taken into
consideration.
When you go to send a message, the cache is consulted (and possibly rebuilt).
If all recipient email addresses are matched, then you are allowed
the option to encrypt the message, otherwise, the best you can do
is to sign it. If a recipient address matches more than one key,
you have to choose which key you want to encrypt to.
- --
"The Funk, the whole Funk, and nothing but the Funk."
Billy Donahue <mailto:bi...@da...>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: pgpenvelope 2.8.11 - http://pgpenvelope.sourceforge.net/
iD8DBQE5eyxH+2VvpwIZdF0RAuAeAJ9a6T7N1HTvqnQzcW5b9VU5rBZ2twCfdXQy
UOyrl7EC04gunEZUX2p2hkA=
=g0hC
-----END PGP SIGNATURE-----
|