[openpgp] padding packet as first packet in a packet sequence

"Neal H. Walfield" <neal@walfield.org> Thu, 01 December 2022 10:23 UTC

Return-Path: <neal@walfield.org>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0B708C14CE26 for <openpgp@ietfa.amsl.com>; Thu, 1 Dec 2022 02:23:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.198
X-Spam-Level:
X-Spam-Status: No, score=-4.198 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DhmPucW6_UAo for <openpgp@ietfa.amsl.com>; Thu, 1 Dec 2022 02:23:22 -0800 (PST)
Received: from mail.dasr.de (mail.dasr.de [202.61.250.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 35090C14CF1A for <openpgp@ietf.org>; Thu, 1 Dec 2022 02:23:20 -0800 (PST)
Received: from p5de92f23.dip0.t-ipconnect.de ([93.233.47.35] helo=forster.huenfield.org) by mail.dasr.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <neal@walfield.org>) id 1p0gis-0003mk-Ix for openpgp@ietf.org; Thu, 01 Dec 2022 11:23:18 +0100
Received: from grit.huenfield.org ([192.168.20.9] helo=grit.walfield.org) by forster.huenfield.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <neal@walfield.org>) id 1p0gir-0075u4-N4 for openpgp@ietf.org; Thu, 01 Dec 2022 11:23:18 +0100
Date: Thu, 01 Dec 2022 11:23:17 +0100
Message-ID: <87sfhz4e3u.wl-neal@walfield.org>
From: "Neal H. Walfield" <neal@walfield.org>
To: IETF OpenPGP WG <openpgp@ietf.org>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset="US-ASCII"
X-SA-Exim-Connect-IP: 192.168.20.9
X-SA-Exim-Mail-From: neal@walfield.org
X-SA-Exim-Scanned: No (on forster.huenfield.org); SAEximRunCond expanded to false
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/eT16eI0MF8ZrUcKU24rwv6VO0c4>
Subject: [openpgp] padding packet as first packet in a packet sequence
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Dec 2022 10:23:24 -0000

> 5.14.  Padding Packet (Tag 21)
>
>     The Padding packet contains random data...
>
>     Such a packet MUST be ignored when received.

> 11.4.  Detached Signatures
>
>    In addition, a marker packet (Section 5.8) and a padding packet
>    (Section 5.14) can appear anywhere in the sequence.

The padding packet doesn't contain much identifying information
(perhaps 8 bits: the two hard-wired high bits, and the 6-bit packet
tag?).  This makes fingerprint files quite difficult.  Ideally, a
program, like file(1), should be able to look at the first few
kilobytes of data, and quickly identify its format.  This is also
important for an OpenPGP implementation to avoid wasting cycles.

I think the draft should be changed to forbid the padding packet from
being the first packet in a packet sequence.  Something like:

  the padding packet MUST NOT occur as the first packet in a packet
  sequence.

Alternative, I propose fixing the first few (4? 8?) bytes of the
padding packet to some value specified by the standard.

Neal