[openpgp] Constrained Legacy Fingerprint Storage for v5 Keys

"Neal H. Walfield" <neal@walfield.org> Fri, 02 December 2022 12:04 UTC

Return-Path: <neal@walfield.org>
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 CEDF4C14F745 for <openpgp@ietfa.amsl.com>; Fri, 2 Dec 2022 04:04:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.898
X-Spam-Level:
X-Spam-Status: No, score=-6.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
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 DI_P4Dl2MtVy for <openpgp@ietfa.amsl.com>; Fri, 2 Dec 2022 04:04:43 -0800 (PST)
Received: from mail.dasr.de (mail.dasr.de [202.61.250.5]) (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) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7974C14F741 for <openpgp@ietf.org>; Fri, 2 Dec 2022 04:04:42 -0800 (PST)
Received: from p5de92f23.dip0.t-ipconnect.de ([93.233.47.35] helo=forster.huenfield.org) by mail.dasr.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <neal@walfield.org>) id 1p14mV-00079Y-KC for openpgp@ietf.org; Fri, 02 Dec 2022 13:04:39 +0100
Received: from grit.huenfield.org ([192.168.20.9] helo=grit.walfield.org) by forster.huenfield.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <neal@walfield.org>) id 1p14mU-000DV0-Gk for openpgp@ietf.org; Fri, 02 Dec 2022 13:04:39 +0100
Date: Fri, 02 Dec 2022 13:04:38 +0100
Message-ID: <87h6ye3tbd.wl-neal@walfield.org>
From: "Neal H. Walfield" <neal@walfield.org>
To: IETF OpenPGP WG <openpgp@ietf.org>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset="US-ASCII"
X-SA-Exim-Connect-IP: 192.168.20.9
X-SA-Exim-Mail-From: neal@walfield.org
X-SA-Exim-Scanned: No (on forster.huenfield.org); SAEximRunCond expanded to false
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/VV1Fz8YvJDPzisRSJ1ARJTOI6bg>
Subject: [openpgp] Constrained Legacy Fingerprint Storage for v5 Keys
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: Fri, 02 Dec 2022 12:04:44 -0000

> 15.1.  Constrained Legacy Fingerprint Storage for v5 Keys
>
>    Some OpenPGP implementations have fixed length constraints for key
>    fingerprint storage that will not fit all 32 octets of a v5
>    fingerprint.  For example, [OPENPGPCARD] reserves 20 octets for each
>    stored fingerprint.
>
>    An OpenPGP implementation MUST NOT attempt to map any part of a v5
>    fingerprint to such a constrained field unless the relevant spec for
>    the constrained environment has explicit guidance for storing a v5
>    fingerprint that distinguishes it from a v4 fingerprint.  An
>    implementation interacting with such a constrained field SHOULD
>    directly calculate the v5 fingerprint from public key material and
>    associated metadata instead of relying on the constrained field.

This text forbids (MUST NOT) an OpenPGP implementation from storing
part of a v5 fingerprint in constrained space.  But, it doesn't say
what should be stored there instead.  Should an OpenPGP implementation
that stores a v5 key on an OpenPGP card leave the fingerprint field as
is?  Should it set it to all zeros?  I feel some guidance should be
provided.


I'm also a bit confused by the guidance.  This text specifically
references the OpenPGP card spec as an example of a constrained
environment.  As far as I know, the OpenPGP card spec doesn't provide
space for the public key.  What should an implementation do?


Finally, what is so bad about storing a truncated fingerprint?  What's
the attack model?  An implementation can set the wrong fingerprint
field.  So, as I understand it, the fingerprint is only a hint anyway.

Thanks,

Neal