Re: [openpgp] Expected client behaviour ambiguity in signature verification

Andrew Gallagher <andrewg@andrewg.com> Thu, 07 July 2022 22:00 UTC

Return-Path: <andrewg@andrewg.com>
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 59C7DC14F748 for <openpgp@ietfa.amsl.com>; Thu, 7 Jul 2022 15:00:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 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, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=andrewg.com
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 B_IKyF4XQ3YO for <openpgp@ietfa.amsl.com>; Thu, 7 Jul 2022 15:00:37 -0700 (PDT)
Received: from fum.andrewg.com (fum.andrewg.com [IPv6:2a01:4f9:c011:23ad::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 017B0C15AB4B for <openpgp@ietf.org>; Thu, 7 Jul 2022 15:00:36 -0700 (PDT)
Received: from smtpclient.apple (unknown [176.61.115.103]) (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) (Client did not present a certificate) by fum.andrewg.com (Postfix) with ESMTPSA id 33C925EC99; Thu, 7 Jul 2022 22:00:30 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=andrewg.com; s=andrewg-com; t=1657231230; bh=GgFQ4U8c5IXohV++MSHWTpUwjFUBvXnYfmG0JOaFoh8=; h=From:Subject:Date:References:In-Reply-To:To:From; b=OjXrCnVbDh5Kpt7ZQ/fdFaKwhRRqMnhK2tMO11yjsq8ER1RoFhDep+MKVUgDbHGMb hBlMz4GkqXZPZ/zLHzhzj2kzh1ZN4QS3ChzemeNw0YfRW80vmTC8SLQaNXOXyxL7F7 DM9E9n0O4OLghy+Iq+PhYRZHwAdgh7PywDFoXzOCHQiDawFxGlnZ59fI+Ui77rkT7e Gccyog/vy46zY4AO0XYzqGgefp2tMedZqRnz/yHgR1Vgv/m7IlHehiaWztXWlFpc/t KAtDBRzTdtHSIuRGKMmQNt5DZxQaa3vXqXcwRK0eV8+MEyinWR4m56+C/OAqhPJm/j gnIzQZaczJ6Yg==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
From: Andrew Gallagher <andrewg@andrewg.com>
Mime-Version: 1.0 (1.0)
Date: Thu, 07 Jul 2022 23:00:29 +0100
Message-Id: <7C8BF74B-3926-4227-9AD9-39C8A6FA94DB@andrewg.com>
References: <YscsLPg2I0Oaio8B@earth.li>
In-Reply-To: <YscsLPg2I0Oaio8B@earth.li>
To: Jonathan McDowell <noodles@earth.li>, openpgp@ietf.org
X-Mailer: iPhone Mail (19F77)
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/oNuk-VB0r3FNrYqomhvgQItJHlQ>
Subject: Re: [openpgp] Expected client behaviour ambiguity in signature verification
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, 07 Jul 2022 22:00:41 -0000

> On 7 Jul 2022, at 19:55, Jonathan McDowell <noodles@earth.li> wrote:
> 
> On Thu, Jul 07, 2022 at 07:39:33PM +0100, Andrew Gallagher wrote:
>> 
>> What should an implementation do in the case where these 16 bits are
>> incorrectly set but the signature is otherwise valid? It is implied that
>> failing hard on this test is allowed (otherwise why bother?) but it is
>> not specified as MUST or even SHOULD.
> 
> I know the GitHub key has this problem. I ended up dropping the check
> from onak as a result, but I'd be really interested to know what client
> software is generating the incorrect keys.

I wish it was as simple as dropping this check from Hockeypuck, but go-crypto doesn’t make it optional. It might in fact be easier to forcibly correct the error on submission, but that opens another question - what will (and what SHOULD) implementations do when faced with two conflicting signature packets that are identical in their signed data but differ in their unsigned components?

A