Re: [openpgp] Deprecating compression support

Peter Gutmann <> Tue, 19 March 2019 00:57 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 33168130EA7 for <>; Mon, 18 Mar 2019 17:57:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id jzH5D_jeZRUy for <>; Mon, 18 Mar 2019 17:57:56 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 8610F1240D3 for <>; Mon, 18 Mar 2019 17:57:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple;;; q=dns/txt; s=mail; t=1552957075; x=1584493075; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=FzhokFlCRjDIt6AcwuNnaCnDdGTOE4gD6TzdeWhMMOg=; b=RciXOmnofy27rhoBwfZctZF6f84wiMN2bM5K3Y3ZHU1M7aQYY6uUOdCx Thq73JT66wnSwQLj2iqF4MWlw7e2Vt7yJlx9fvs/1GBH/HddFtS3wjzwc 4okC62YBUcBzmzJH9OLiqcMa3EWEEXo2UN9WXXogHFgmRZMzTtshDs+Q+ I7VFJGQUWpSO4kVcoXJNvVof1rjtJ0OhL9DbibC1yb+R4h7a5oCps6XIx 0vkaObKUJEtvmV7M+5UCex201FWo2nWZmELzjXs1u8xrlxwxeSzizEBFz R/nY10yb77zKnXDHiicEJl+wtGCKdM78RenvOrJZeWY5vhYacBbslUHvE g==;
X-IronPort-AV: E=Sophos;i="5.58,495,1544439600"; d="scan'208";a="52222457"
X-Ironport-Source: - Outgoing - Outgoing
Received: from (HELO ([]) by with ESMTP/TLS/AES256-SHA; 19 Mar 2019 13:57:52 +1300
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 19 Mar 2019 13:57:51 +1300
Received: from ([]) by ([]) with mapi id 15.00.1395.000; Tue, 19 Mar 2019 13:57:51 +1300
From: Peter Gutmann <>
To: Jon Callas <>, "" <>
CC: Jon Callas <>
Thread-Topic: [openpgp] Deprecating compression support
Thread-Index: AQHU3YM4vbELTl6DS0ip+YCblb7fpaYRAjQAgAEgQyg=
Date: Tue, 19 Mar 2019 00:57:51 +0000
Message-ID: <>
References: <>, <>
In-Reply-To: <>
Accept-Language: en-NZ, en-GB, en-US
Content-Language: en-NZ
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: []
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <>
Subject: Re: [openpgp] Deprecating compression support
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 19 Mar 2019 00:57:58 -0000

Jon Callas <> writes:

>One of these differences is that zip-style compression is just not as useful

There is one situation in which PGP was at one point widely used but for which
I don't have much current data (more recent than about five years ago) and
that's banking and medical EDI (so X12/HL7), where compression is a required
feature, because you're moving potentially multi-megabyte text files via FTP
to/from mainframes over slow links.

Outside of that rather specialised use, there's no reason to use compression.

>The compression inside of OpenPGP is also hard to implement correctly. The
>default compression, the “DEFLATE” option is a modified implementation of
>ZIP-style programs from the era of the late 1980s. 

To give some background to this, the original PGP use LHarc because it was
sort-of free.  When the first InfoZip implementations came out, Phil correctly
guessed that it would become the universal standard based on the popularity of
MSDOS Pkzip.  However, what went into PGP 2 was a pre-pre-pre-release of Zip,
whose format didn't settle down completely until after PGP was released.  I
think the only reason why deflateInit() still accepts -13 as a compression
parameter is to trigger the PGP 2-compatibility mode in the compressor.

>The underlying reality is even worse. Go look at section 5.6 of 2440, and
>there are interoperability hints for working with PGP2 because it had further
>limitations in it for internal table sizes. 

That was due to 16-bit segments on the 8086, even then you had all sorts of
hacks to get things to work.