Compression compatability [was Re: 10x compression factor]

David Shaw dshaw at jabberwocky.com
Tue Feb 10 08:31:54 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Feb 09, 2004 at 08:46:00PM -1000, Maxine Brandt wrote:
> On Mon, 9 Feb 2004  David Shaw wrote
> Subject: Re: 10x compression factor
> 
> > If they are compressing within PGP, then it's ZIP compression, as
> > that's the only compression algorithm that PGP supports.  
> 
> This raises a point about compatability of GPG keys with PGP
> 8.x. The default compression preferences in GPG are Z2 Z1 (ZLIB ZIP)
> and decompression failures with GPG-encrypted messages were reported
> by PGP 8.0.3 users in a recent thread on the PGP-Basics list.
> 
> PGP keys have no compression (or hash) preferences as far as I can
> see by importing a PGP key and doing gpg --pref, so it seems GPG
> uses ZLIB even if PGP 8 can't handle it, and apparently has no way
> of finding from the PGP key that it shouldn't.

This isn't what happens.  GnuPG treats having no compression
preferences as a preference for ZIP.  This is part of the OpenPGP
standard.  Thus, it will always use ZIP when encrypting to a PGP key,
and PGP has ZIP, of course.

There are occasional problems when someone generates a key in GnuPG
(thus having a "ZLIB ZIP" preference), then moves that key over to PGP
for use without updating their preferences.  Programs encrypting to
that key see the ZLIB preference and use it.

The problem here is actually in PGP, which should warn the user when
they import the key that they are advertising preferences that cannot
be honored.  The new OpenPGP draft standard recommends this.

Nevertheless, since PGP does not currently have the ability to rewrite
preferences, this has to be done on the GnuPG side.  It's a FAQ, in
fact:

   http://www.gnupg.org/(en)/documentation/faqs.html#q5.9

David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.5-cvs (GNU/Linux)
Comment: Key available at http://www.jabberwocky.com/david/keys.asc

iHEEARECADEFAkAo3UoqGGh0dHA6Ly93d3cuamFiYmVyd29ja3kuY29tL2Rhdmlk
L2tleXMuYXNjAAoJEOJmXIdJ4cvJrI4AnjUpZFWvna25sllY3gz64W5swDveAJ9r
VrfZ5FcXy4Y+JmvBxoLEQ7/XKA==
=iLe5
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list