[openpgp] Re: Review of draft-ietf-openpgp-replacementkey-04

Heiko Schäfer <heiko.schaefer@posteo.de> Fri, 29 August 2025 08:49 UTC

Return-Path: <heiko.schaefer@posteo.de>
X-Original-To: openpgp@mail2.ietf.org
Delivered-To: openpgp@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 461D15A7FD5A for <openpgp@mail2.ietf.org>; Fri, 29 Aug 2025 01:49:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.696
X-Spam-Level:
X-Spam-Status: No, score=-1.696 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=posteo.de
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kcC0UojZgcPC for <openpgp@mail2.ietf.org>; Fri, 29 Aug 2025 01:49:49 -0700 (PDT)
Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id BFC0B5A7FD52 for <openpgp@ietf.org>; Fri, 29 Aug 2025 01:49:49 -0700 (PDT)
Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2846F240101 for <openpgp@ietf.org>; Fri, 29 Aug 2025 10:49:47 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1756457387; bh=D90Gbmt7BB/KQiSa6fejbQomLtY3o8Si+5Sv1r+2iSM=; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:From:From; b=UKCgp/9hxSUbGlIdRgZCWIdqv/HKKQxcc5ZQY6eRE9gAd3pken5YR1ebaK31JYVsQ puHdVUE1qGT2NEJo4+SgIkj25UEBBTdjPndUoZnvl+YE6L3y19tNvIPFPbizJdHkM5 Faq+4+RfEf6H25GHj4KzNKVsbaVr+s/VkQUQ9PFdypSGY3+5ytT6PF3daZL2HNFoGB ycuJUcSaDlj52EvrFG9qia6w9IsChgeFbW14z9ML88qfSIAmuSyMUAbK8PWpvS2A4W bApOf8RV8Arxq7isIscnl/AsnY5xytpIR/1X1iu5fuN2X3V9oNNOq92DQ0pvbuwM57 FwTudqb1mjCsQ==
Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4cCsQf5kf9z9rxB for <openpgp@ietf.org>; Fri, 29 Aug 2025 10:49:46 +0200 (CEST)
Received: from services.foundation.hs (services.foundation.hs [192.168.21.4]) by mail.foundation.hs (Postfix) with ESMTP id 61915705C5 for <openpgp@ietf.org>; Fri, 29 Aug 2025 10:49:46 +0200 (CEST)
Content-Type: multipart/alternative; boundary="------------Xk5Njk7BphBVXfIkJW2hINoO"
Message-ID: <c342538d-5c18-43f1-9b76-18174b1cc022@posteo.de>
Date: Fri, 29 Aug 2025 08:49:46 +0000
MIME-Version: 1.0
To: openpgp@ietf.org
References: <3d5a4a59-3765-477d-a250-13afe98aa808@mtg.de> <87fre7ukwy.fsf@fifthhorseman.net> <3AB4E844-57C8-470C-AB70-CDAEDB2BBFF8@andrewg.com>
Content-Language: en-US
From: Heiko Schäfer <heiko.schaefer@posteo.de>
In-Reply-To: <3AB4E844-57C8-470C-AB70-CDAEDB2BBFF8@andrewg.com>
Message-ID-Hash: NDZ4LBOAZXJMUWBRUT6OA7LJRFCMRQIN
X-Message-ID-Hash: NDZ4LBOAZXJMUWBRUT6OA7LJRFCMRQIN
X-MailFrom: heiko.schaefer@posteo.de
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-openpgp.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [openpgp] Re: Review of draft-ietf-openpgp-replacementkey-04
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/LCJlwODvHVbvqdVs5OctwUWSOMg>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Owner: <mailto:openpgp-owner@ietf.org>
List-Post: <mailto:openpgp@ietf.org>
List-Subscribe: <mailto:openpgp-join@ietf.org>
List-Unsubscribe: <mailto:openpgp-leave@ietf.org>

Hello Andrew, all,

On 8/7/25 1:46 AM, Andrew Gallagher wrote:
>> Why is the subfield "Record Length" field two octets?  a v6 fingerprint
>> is 32 octets long, and the imprint is the length of the signature's
>> digest.  The longest OpenPGP digest algorithms (SHA512 and SHA3-512) are
>> 64 octets long.  Even if we have some new key version with a 512-bit (64
>> octet) fingerprint,*and* the largest possible sig digest, we're still
>> only at 1+64+64=129 octets for the field.  The first octet will always
>> be zero.  why not make it one octet?
> I’ll admit this is a cautious design decsion. Yes, as far as we can tell now it seems unlikely that a digest algorithm of more than 512 bits will be necessary in the foreseeable future. But if it were, we could conceivably exceed the capacity of a single octet. Given the overall size of the target record, one spare octet is not that significant.

I'm leaning towards preferring a one byte length here.

To my understanding, it is currently considered unlikely that there will 
ever be a need for hash functions with digests larger than 512 bits.
Even 512 bit hashes are, as I understand it, already a design that 
embodies an excess of caution.

While defensive designs are attractive to me, having a two byte length 
here feels like overkill (that I expect would mostly seem baffling and 
odd to implementers).

But then, I'm not a domain expect. I'd be happy to defer to expert 
opinion that favors two byte lengths.

Thanks,
Heiko