Re: [openpgp] PGP/MIME, RFC 3156, Require empty boundary preamble lines

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Thu, 23 September 2021 02:04 UTC

Return-Path: <dkg@fifthhorseman.net>
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 ADD533A15CB for <openpgp@ietfa.amsl.com>; Wed, 22 Sep 2021 19:04:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=fifthhorseman.net header.b=3hzRauVt; dkim=pass (2048-bit key) header.d=fifthhorseman.net header.b=xAA27ihD
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wUu8vTS8sY6J for <openpgp@ietfa.amsl.com>; Wed, 22 Sep 2021 19:04:10 -0700 (PDT)
Received: from che.mayfirst.org (che.mayfirst.org [IPv6:2001:470:1:116::7]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9B15C3A15C8 for <openpgp@ietf.org>; Wed, 22 Sep 2021 19:04:10 -0700 (PDT)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1632362649; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=6DXjtbtIyCA4pwefBxJ1iI37K1yVDrYOxyozTJRoWy8=; b=3hzRauVt25YBeDqHHJT6DX74BMZDZEIUOBF4l34D/12Az17o136pnxafXCelBiL8AUtOI GghQj5hlVRGZmZVCQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1632362649; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=6DXjtbtIyCA4pwefBxJ1iI37K1yVDrYOxyozTJRoWy8=; b=xAA27ihDvX0sBICYPbUoQML/LT3+2rO/w9EIOUtr0e7cU3ULslwj5awD++awohd+w9DQZ mWjBBIbG+2hGFsUQD7CcmjbqETYqgkwCe0pPC9fgBL/hxtllt7u5nYpcjVeQAQf3lshbUKj xtKCqZ05kqd13zgpAWeW7WXHwAOhX8/NhZNobfqZ0AY74C3MNxwwvbm9TMSLmAO5eJb4EQW fMu+f5dfgkYsXSSaa54S7lQ5cvwq3iQ1v9DewHp/eme/iKALMxKd3xnEv2fbX4F1T0YjtCm 7E5702Uyw819VacvOo96n/nNeZHYR9C8iIqF8XpsAlV0g13/V7bxqnIiF9MQ==
Received: from fifthhorseman.net (lair.fifthhorseman.net [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id C045EF9A6; Wed, 22 Sep 2021 22:04:08 -0400 (EDT)
Received: by fifthhorseman.net (Postfix, from userid 1000) id 51DB0208D6; Wed, 22 Sep 2021 22:03:43 -0400 (EDT)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Kai Engert <kaie@kuix.de>, openpgp@ietf.org
In-Reply-To: <4e17aa02-e78c-3d48-8a68-7342996ddedd@kuix.de>
References: <4e17aa02-e78c-3d48-8a68-7342996ddedd@kuix.de>
Autocrypt: addr=dkg@fifthh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5WXAAAvrsBAIJ5sBg8Udocv25N stN/zWOiYpnjjvOjVMLH4fV3pWE1AP9T6hzHz7hRnAA8d01vqoxOlQ3O6cb/kFYAjqx3oMXSBhYh BMKfigwB81402BaqXOCS6zpcoQ26AADX7gD/b83VObe14xrNP8xcltRrBZF5OE1rQSPkMNy+eWpk eCwA/1hxiS8ZxL5/elNjXiWuHXEvUGnRoVj745Vl48sZPVYMuDgEX+i03xIKKwYBBAGXVQEFAQEH QIGex1WZbH6xhUBve5mblScGYU+Y8QJOomXH+rr5tMsMAwEICYjJBBgWCgB7BYJf6LTfBYkFn6YA CRDgkus6XKENukcUAAAAAAAeACBzYWx0QG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmcEAx9vTD3b J0SXkhvcRcCr6uIDJwic3KFKxkH1m4QW0QKbDAIeARYhBMKfigwB81402BaqXOCS6zpcoQ26AAAX mwD8CWmukxwskU82RZLMk5fm1wCgMB5z8dA50KLw3rgsCykBAKg1w/Y7XpBS3SlXEegIg1K1e6dR fRxL7Z37WZXoH8AH
Date: Wed, 22 Sep 2021 22:03:40 -0400
Message-ID: <87sfxw59qb.fsf@fifthhorseman.net>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/acBRgzxXjv4mDPtYiKK5KxqjMEc>
Subject: Re: [openpgp] PGP/MIME, RFC 3156, Require empty boundary preamble lines
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
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, 23 Sep 2021 02:04:16 -0000

On Mon 2021-09-20 11:57:53 +0200, Kai Engert wrote:
> Perhaps a future revision of RFC 3156 could state that preamble lines 
> inside the signed payload MUST be empty - in the hope that no transport 
> agent will add their own preamble lines.

RFC 3156 describes (among other things) how to use OpenPGP in the
context RFC 1847 multipart/signed messages.

RFC 1847 §2.1 already says:

>   The entire contents of the multipart/signed container must be treated
>   as opaque while it is in transit from an originator to a recipient.
>   Intermediate message transfer agents must not alter the content of a
>   multipart/signed in any way, including, but not limited to, changing
>   the content transfer encoding of the body part or any of its
>   encapsulated body parts.

If the MTA that mangled the sample message is not treating the signed
message content as opaque, they are already inviolation of RFC 1847.
Making a revision to make those MTAs "more" in violation seems unlikely
to cure the problem.

The best we can do here, i think, is to encourage MUAs to generate
minimally-fancy MIME messages (i.e., empty preamble and postamble seem
the simplest possible, and therefore least likely to be tampered with,
since stripping of preamble and postamble seem like the most likely form
of tampering) and encourage MTAs to comply with the now
quarter-century-old standards that were surely available to them at the
time the current operating version was released.

   --dkg