Re: [openpgp] Definition of Subkey Revocation Signatures

Daniel Huigens <d.huigens@protonmail.com> Thu, 11 May 2023 10:10 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 5828EC151545 for <openpgp@ietfa.amsl.com>; Thu, 11 May 2023 03:10:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.095 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, 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 7NdQOw2H3vOb for <openpgp@ietfa.amsl.com>; Thu, 11 May 2023 03:10:34 -0700 (PDT)
Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) (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 C0736C151095 for <openpgp@ietf.org>; Thu, 11 May 2023 03:10:34 -0700 (PDT)
Date: Thu, 11 May 2023 10:10:28 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1683799832; x=1684059032; bh=uBg/4EcMmu9zp5c4Wmat5LpEToNDzKZwEND8zLGyUZw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=J7OoFYao/V79lNsGQydRFeTenDAnQ0D+CfJE91EyghqsJtuASEpaoMya531QRiZDz gG/qHDuZP4ManQkWJEQ4eSMOJgEgsVuyCjng58Havg51fSN3/+vmPV9Zcy6b/0nUto WQije4snC4lqtPqe/MZoH8u5Jr6Cb4ftTQ+WWX0Gfz7wC8lYwtg+gRmOrl4tZJ+4+b t1+263VR5LBzdb3TsZN7/UEpXc6CECNRc1w835bT1UpaS8n+q5qDEIzMrVMbftTcUQ Qh4xdgfURL6GTQQsQln0P8Hn2339GFx2SMHK85glRfaPzQ8arKjTjg3ofRbdenZBPw z95tUG/IvPhOQ==
To: Paul Schaub <vanitasvitae@fsfe.org>
From: Daniel Huigens <d.huigens@protonmail.com>
Cc: openpgp@ietf.org
Message-ID: <2ex8TsajdUJThvDaxpvI-OhTJaBTuziu1j73jcqEVwcWE0lU94KoJVWXJZMt275V_R6iM9pfih9f1HXUx77TkyRhqltK68ZNyKeFY6Vqr10=@protonmail.com>
In-Reply-To: <b850fdd2-69b1-fb18-086e-06c94c0cc13b@fsfe.org>
References: <b850fdd2-69b1-fb18-086e-06c94c0cc13b@fsfe.org>
Feedback-ID: 2934448:user:proton
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="b1_QAy71LNkku67lXNKNlqQEZDjN7fYVs1QiHXOvnRksQ"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/MRxgbgIxVyzQ2EyLASYBoK-ZE0s>
Subject: Re: [openpgp] Definition of Subkey Revocation Signatures
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, 11 May 2023 10:10:39 -0000

Hey Paul,

Yeah, actually I remember this confusing me as well. Both OpenPGP.js and gopenpgp hash both the primary key and subkey, as you said.

Best,
Daniel

------- Original Message -------
On Thursday, May 11th, 2023 at 10:53, Paul Schaub <vanitasvitae@fsfe.org> wrote:

> Hey!
>
> While hacking around I discovered, that there was a discrepancy between my implementation and rfc4880 that surprised me.
>
> https://www.rfc-editor.org/rfc/rfc4880#section-5.2.1 states for section 0x28:
>
>> 0x28: Subkey revocation signature
>>        The signature is calculated directly on the subkey being revoked.
>>        [...]
>
> In my code, I calculated the signature over the primary key and the subkey instead.
>
> The descriptions for binding signature types 0x18 and 0x19 explicitly stated that the signature would be generated over the primary key and the subkey:
>
>> 0x18: Subkey Binding Signature
>>        [...] This signature is calculated
>>        directly on the primary key and subkey, and not on any User ID or
>>        other packets. [...]
>>
>>    0x19: Primary Key Binding Signature
>>        [...] This signature
>>        is calculated the same way as a 0x18 signature: directly on the
>>        primary key and subkey, and not on any User ID or other packets.
>
> Since I haven't had any interoperability problems with other implementations with regards to subkey revocations in the past, I suspect that most implementations did not follow the spec to the word either and did how I did.
>
> Therefore I proposed a patch that brings the wording of 0x28 signatures in line with 0x18 and 0x19: https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/307
>
> Paul