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

Daniel Huigens <d.huigens@protonmail.com> Tue, 12 July 2022 19:15 UTC

Return-Path: <d.huigens@protonmail.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 21A2CC14F738 for <openpgp@ietfa.amsl.com>; Tue, 12 Jul 2022 12:15:06 -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, FREEMAIL_FROM=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=protonmail.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 6N7bC2oQhy2E for <openpgp@ietfa.amsl.com>; Tue, 12 Jul 2022 12:15:02 -0700 (PDT)
Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) (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 DC23EC14F735 for <openpgp@ietf.org>; Tue, 12 Jul 2022 12:15:01 -0700 (PDT)
Date: Tue, 12 Jul 2022 19:13:16 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1657653298; x=1657912498; bh=AplYDqJUhDLIs5zAro0WRFUUn/JgRhQCfNesaJd3EaM=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=dlbRBZ36Oe/7nSdK11yx2+cj9AtQxx8u02rZXJOhLjfX93HlJ4Jt8sPrY556QJiJa 11ksv6JISRx27vROzNzIkwYFNm9oUAF5TZO7NoPTKP+YjjIpw7UR6eHQb0lui63naO sOVG7I4u/c0vxuBEpL2oqMduhGefiUDWZo9MRrTolgpdLzn9A3X2SFVJT/mmzTExbp dFAPuf0ggyMFIfTxH8k3cwZ0+CBdAOge4V1iN1CXo99T9iVN2bA1hLfjlTO6Ddy3SI AetB761dHITv7qPxSkuPT6PEiWBUAqOroztTwjapmioW5/WuW2m2d/aE/flV4LWtR6 zSHr4rf9yUEsw==
To: Andrew Gallagher <andrewg@andrewg.com>
From: Daniel Huigens <d.huigens@protonmail.com>
Cc: Justus Winter <justus@sequoia-pgp.org>, openpgp@ietf.org
Reply-To: Daniel Huigens <d.huigens@protonmail.com>
Message-ID: <IdS0-BxA6w80HLI578WI9YpxpzFb0MbynW3DOEhCWSF825_1qT6Dj6KlYX5CYs9-VYOJoNlj-8KZ6dd6ywX3xufc11_k_vScRCI-F1ik9XM=@protonmail.com>
In-Reply-To: <637768CF-CD88-4A2C-BC58-EE2945A1F008@andrewg.com>
References: <d0483dcb-025b-37c2-9a26-e42133b506ac@andrewg.com> <rFGQzFpo7YRJdeCEIqSDMYYZhf_svkyx8UHG3GE__VMZFj2pRAbcTa-G9jjQoppUln1XNblYl6Lbjn7wMDMLqwzTJxB-hO0RwAofwLJL7wc=@protonmail.com> <87sfnbx3we.fsf@europ.lan> <HcMPnSrBDMEb2UqLScL9OTrornuJln5O0WG0ZBe2FLW3Q3YbJ9plFBKGJGdWYyVF-Wz9HA6supa9tXH5y8DfJTe05cUD5Uk0VciCnGuQNMo=@protonmail.com> <87pmifx2km.fsf@europ.lan> <Gjz95aE4GW3B-PIIf3VWobfxKwlSPyI-yU5L7B5zM-6QBv48RXZrrXvIkFQ5NUd9g64Ai9Adzqxahueo5LEqWRCY-Hjj9dRZeI2JYlaWqd4=@protonmail.com> <87let3wxtj.fsf@europ.lan> <ejV91k6cLZSWu6XKlMLLyVhrwpYOJWOD6q4Ekp6veU53kVA4kSNM1zZ1EoCJG2QJLlYoq2Rylxd7LWxssmPji5ozUn8iZHiD1f3x8vqJ2wc=@protonmail.com> <637768CF-CD88-4A2C-BC58-EE2945A1F008@andrewg.com>
Feedback-ID: 2934448:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/6sHhcPGqVUW9un15rpbtZxevaOY>
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: Tue, 12 Jul 2022 19:15:06 -0000

go-crypto currently doesn't move signatures from one object to the other
if they're incorrectly ordered. I think it would return an error in
that case, since it verifies signatures during parsing (except for
third-party signatures on the User ID) - whether that's desirable is
of course also debatable but that's what it does currently.

Best,
Daniel


------- Original Message -------
On Tuesday, July 12th, 2022 at 19:38, Andrew Gallagher <andrewg@andrewg.com> wrote:

> On 8 Jul 2022, at 15:22, Daniel Huigens d.huigens@protonmail.com wrote:
>
> > On Friday, July 8th, 2022 at 15:14, Justus Winter wrote:
> >
> > > You said before that you prefer not to use the reordering heuristic.
> > > But how else should the keyserver fix the certificate?
> >
> > I meant more that they could do a manual intervention for the keys where
> > that happened, perhaps. (Particularly in the case where the keyserver
> > itself broke the key, I didn't mean that they should fix up these keys
> > in general.) Then, they could also verify the signature packets with
> > each of the components, to check where it should be placed.
>
>
> Hockeypuck already fixes such badly-ordered sigs, because it uses go-crypto to parse the key material before serving to clients, and AIUI this normalises signatures implicitly. (There are knock-on issues about how to deal with the non-normalised back end storage but those are orthogonal to this discussion…)
>
> A