Mailing List Archive

Some bugs in 0.4.3? (was: A sunday release)
On Sun, 08 Nov 1998, Werner Koch wrote:

> Noteworthy changes in version 0.4.3

> * Experimental support for keyrings stored in a GDBM database.
> This is *much* faster than a standard keyring. You will notice
> that the import gets slower with time; the reason is that all
> new keys are used to verify signatures of previous inserted
> keys. Use "--keyring gnupg-gdbm:<name-of-gdbm-file>". This is
> not (yet) supported for secret keys.

Wow, great!
Now it takes only some seconds to import my complete PGP 2 keyring
(~2MB) (--fast-import) and creating the trustdb (--update-trustdb)
takes only some minutes and very less memory.

But there seems to be some problem with checking PGP signatures now,
because checking a simple PGP signature (RSA) now seems to run
"forever" (it runs for 12 minutes now, with 98% CPU usage). ps shows
me, that mutt runs the following command:

USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND
roland 17295 95.6 2.0 1888 1316 pb R 13:33 13:49 /usr/local/bin/gpg --no-verbose --batch -o - --verify /tmp/mutt-spinnaker-17276-25.asc /tmp/mutt-spinnaker-17276-25

Stopping this by pressing Ctrl-C shows me this:

gpg: Signature made Fri Sep 25 02:15:07 1998 CEST using RSA key ID AE8F7CF5
gpg: Good signature from "Martin Schulze <joey@infodrom.north.de>"

gpg: Interrupt caught ... exiting

Testing this with some other signed mails, I found out, that this
behavior seems to arrive only if the signing key can be reached via a
signature chain and is not directly signed by me.

Similar problem with sign&encrypt:

gpg: public key decryption failed: Secret key not available
gpg: note: cipher algorithm 1 not found in preferences
gpg: key setup failed: g10err=-1073745528
gpg: old style signature
gpg: Signature made Wed Jul 2 10:39:23 1997 CEST using RSA key ID BA523901
gpg: Good signature from "TC TrustCenter, Hamburg, Germany, www.trustcenter.de;
+Organization Key; <info@trustcenter.de>"

gpg: Interrupt caught ... exiting

Here I also pressed Ctrl-C and the message is decrypted. Seems, that
gpg is searching for something, which isn't needed, because decryption
is done and the signature is checked...


Another problem: I tried to send a gpg encrypted message with mutt to
roland@spinnaker.rhein.de. There are two keys (a RSA and a DSS/DH key)
existing for this userid. When I try to send out this mail, mutt
starts
/usr/local/bin/gpgm --no-verbose --batch --with-colons --list-keys
which runs a long time (4 minutes now with 97% CPU time). I tried this
command out by hand and found out that this behavior seems to depend
on the --with-colons option (without this option gpgm outputs the keys
and exists in some seconds).

Ciao

Roland

--
* Internet: roland@spinnaker.rhein.de * Fido: 2:2450/42 *
PGP: 1024/DD08DD6D 2D E7 CC DE D5 8D 78 BE 3C A0 A4 F1 4B 09 CE AF
Re: Some bugs in 0.4.3? (was: A sunday release) [ In reply to ]
Roland Rosenfeld <roland@spinnaker.rhein.de> writes:

> Now it takes only some seconds to import my complete PGP 2 keyring
> (~2MB) (--fast-import) and creating the trustdb (--update-trustdb)
> takes only some minutes and very less memory.

And I checked it with a 70 meg RSA keyring and the first 50 megs of the
the keyring from the new keyservers. I think that a DB which uses
extendible hashing is a good way to store the keyblocks. Because pgp
keyids and fingerprints are highly random, a modification of gdbm may
be more suitable. Consider that the keyids of all v4 packets are the
last bytes of the fingerprint, so there is no need to store both of
them.

> because checking a simple PGP signature (RSA) now seems to run
> "forever" (it runs for 12 minutes now, with 98% CPU usage). ps shows
> me, that mutt runs the following command:

I already noticed that and I found more missing stuff in g10/trustdb.c
:-(


> gpg: Good signature from "TC TrustCenter, Hamburg, Germany, www.trustcenter.de;
> +Organization Key; <info@trustcenter.de>"
>
> gpg: Interrupt caught ... exiting
>
> Here I also pressed Ctrl-C and the message is decrypted. Seems, that
> gpg is searching for something, which isn't needed, because decryption
> is done and the signature is checked...

It wants to check whether the signature is valid.

> /usr/local/bin/gpgm --no-verbose --batch --with-colons --list-keys
> which runs a long time (4 minutes now with 97% CPU time). I tried this
> command out by hand and found out that this behavior seems to depend
> on the --with-colons option (without this option gpgm outputs the keys

--with-colons list the validiyt if the key, so it has to do some
trust checking stuff - we really need to cache the validity of keys.


Werner
Re: Some bugs in 0.4.3? (was: A sunday release) [ In reply to ]
On Tue, 10 Nov 1998, Werner Koch wrote:

> > /usr/local/bin/gpgm --no-verbose --batch --with-colons --list-keys
> > which runs a long time (4 minutes now with 97% CPU time). I tried
> > this command out by hand and found out that this behavior seems to
> > depend on the --with-colons option (without this option gpgm
> > outputs the keys

> --with-colons list the validiyt if the key, so it has to do some
> trust checking stuff - we really need to cache the validity of keys.

I checked this with the debugger and found out, that gpgm runs in an
endless loop in release_lid_table() in trustdb.c where some
next-pointers are cyclic...

Ciao

Roland

--
* Internet: roland@spinnaker.rhein.de * Fido: 2:2450/42 *
PGP: 1024/DD08DD6D 2D E7 CC DE D5 8D 78 BE 3C A0 A4 F1 4B 09 CE AF
Re: Some bugs in 0.4.3? (was: A sunday release) [ In reply to ]
Roland Rosenfeld <roland@spinnaker.rhein.de> writes:

> I checked this with the debugger and found out, that gpgm runs in an
> endless loop in release_lid_table() in trustdb.c where some
> next-pointers are cyclic...

I remember: I fixed this yesterday morning while on the train, the
table has not been cleared after reusing an already used table.

It's fixed in the CVS.


Thanks,

Werner
Re: Some bugs in 0.4.3? (was: A sunday release) [ In reply to ]
On Tue, 10 Nov 1998, Werner Koch wrote:

> > I checked this with the debugger and found out, that gpgm runs in
> > an endless loop in release_lid_table() in trustdb.c where some
> > next-pointers are cyclic...

> I remember: I fixed this yesterday morning while on the train, the
> table has not been cleared after reusing an already used table.
>
> It's fixed in the CVS.

Yes, great, this fixes both bugs, I noticed in my previous mail.

The only problem seems to be in the mutt integration with large key
rings now, because mutt calls
gpgm --no-verbose --batch --with-colons --list-keys
without the addressee as parameter and this is quite slow (nearly 2
minutes for a pubring with 2090 keys on a K6/200 processor).

The above command has to become much faster or we have to change mutt
to call it with the addressee as a parameter (at the moment, mutt asks
for the complete pubring and selects the matching keys itself).

Ciao

Roland

--
* Internet: roland@spinnaker.rhein.de * Fido: 2:2450/42 *
PGP: 1024/DD08DD6D 2D E7 CC DE D5 8D 78 BE 3C A0 A4 F1 4B 09 CE AF
Re: Some bugs in 0.4.3? [ In reply to ]
Roland Rosenfeld <roland@spinnaker.rhein.de> writes:

> without the addressee as parameter and this is quite slow (nearly 2
> minutes for a pubring with 2090 keys on a K6/200 processor).
>
> The above command has to become much faster or we have to change mutt
> to call it with the addressee as a parameter (at the moment, mutt asks
> for the complete pubring and selects the matching keys itself).

Yes, Mutt is not designed to handle such large keyrings (and they may
even be much larger)
Re: Some bugs in 0.4.3? [ In reply to ]
On Wed, Nov 11, 1998 at 09:29:24PM +0100, Werner Koch wrote:

> Yes, Mutt is not designed to handle such large keyrings (and they may
> even be much larger)

Well... It works quite well with large pgp public key rings - the
amount of time spent for selecting keys is O(size of pubring). The
actual problem lies in the fact that mutt requires the trust
information for doing the actual key selection. With pgp, this
information is read from the public key ring as it's currently on
the disk. With GPG, it's partially re-computed when listing the
trust information.

Maybe I should just implement an additional parameter for the key
ring list code, some kind of "key hint".

tlr
--
Thomas Roessler · 74a353cc0b19 · dg1ktr · http://home.pages.de/~roessler/
2048/CE6AC6C1 · 4E 04 F0 BC 72 FF 14 23 44 85 D1 A1 3B B0 73 C1
Re: Some bugs in 0.4.3? [ In reply to ]
Thomas Roessler <roessler@guug.de> writes:

> Well... It works quite well with large pgp public key rings - the
> amount of time spent for selecting keys is O(size of pubring). The

The time is not the real problem, but the current global keyring
is > 200 megs and that is far too much too hold in core.

> the disk. With GPG, it's partially re-computed when listing the
> trust information.

I chnaged this and it is now MUCH faster exept for the first time.
It's not yet in the CVS.

> Maybe I should just implement an additional parameter for the key
> ring list code, some kind of "key hint".

Or an interactive key selection which gives the user a message
that he has to refine his selection because N keys would match.



Werner