[openpgp] Re: I-D Action: draft-ietf-openpgp-replacementkey-02.txt
Andrew Gallagher <andrewg@andrewg.com> Sat, 14 December 2024 14:22 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 D2BFDC14F70D for <openpgp@ietfa.amsl.com>; Sat, 14 Dec 2024 06:22:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.103
X-Spam-Level:
X-Spam-Status: No, score=-2.103 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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=unavailable 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 lQ9LLu3N3oV7 for <openpgp@ietfa.amsl.com>; Sat, 14 Dec 2024 06:22:27 -0800 (PST)
Received: from fum.andrewg.com (fum.andrewg.com [135.181.198.78]) (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 ietfa.amsl.com (Postfix) with ESMTPS id EFF9FC14F71F for <openpgp@ietf.org>; Sat, 14 Dec 2024 06:22:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=andrewg.com; s=andrewg-com; t=1734186144; bh=ft/MmGCAh6bd3fb8qps6zqrfyh5XDhg/USwR7xtvAx0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=OtWZTGtL/oBoQdTZZj+RfvnEXXQyTXB0fQdsKq9dr1oULDBJjK7jjsNnaDYflffKa 6msiAabRYnXPxGW8hgepx1T2LvB3nUNFAVdnjgTHYE0E/JWc+4rwGbuY8Ezveq0jSz EhrFveTUC1aPsqQtBEyfdTar69ln3ECNo/odvFtLILq7oF4dHp0zSPWyyqXrpSibHP lUEgzYzQbiEUAX0Udj+bc75cc9ZoGSMlRK7CeZDFFrThk/gbieUp9kjRZ4w6687U/c FrPglLd9sAk/LNhQu9s70TeesSa5ezaPfPTlsuJbH1rUA2zj6qy1XBioPVAQTEbUtQ gZPMGUbdTASgw==
Received: from smtpclient.apple (serenity [IPv6:fc93:5820:7349:eda2:99a7::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by fum.andrewg.com (Postfix) with ESMTPSA id DF5BD5DCA4; Sat, 14 Dec 2024 14:22:23 +0000 (UTC)
From: Andrew Gallagher <andrewg@andrewg.com>
Message-Id: <2014BBED-66A4-4C75-8F53-C272028358B7@andrewg.com>
Content-Type: multipart/signed; boundary="Apple-Mail=_5EFADD00-B947-4BE8-A525-98D55D61738F"; protocol="application/pgp-signature"; micalg="pgp-sha512"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.9\))
Date: Sat, 14 Dec 2024 14:21:43 +0000
In-Reply-To: <2649917e-59f4-4f9a-a3fb-b348061a3f35@mtg.de>
To: Johannes Roth <johannes.roth@mtg.de>
References: <173264571597.581885.1047714570419252899@dt-datatracker-5679c9c6d-qbvvv> <14B07CCC-BD69-4302-9E1C-96B853942C5F@andrewg.com> <cb1627a3-1257-4177-9917-9ea7d73652b1@mtg.de> <EEED1E4F-973E-4424-88F0-5D81BD6F997F@andrewg.com> <2649917e-59f4-4f9a-a3fb-b348061a3f35@mtg.de>
X-Mailer: Apple Mail (2.3731.700.6.1.9)
Message-ID-Hash: GCVWI4JAVCFIIUOEH5LAYFCZUOKQ2EG5
X-Message-ID-Hash: GCVWI4JAVCFIIUOEH5LAYFCZUOKQ2EG5
X-MailFrom: andrewg@andrewg.com
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
CC: Andrew Gallagher <andrewg=40andrewg.com@dmarc.ietf.org>, IETF OpenPGP WG <openpgp@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [openpgp] Re: I-D Action: draft-ietf-openpgp-replacementkey-02.txt
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/44ptXGRFu5OZKUXy7SzlOhH8260>
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>
Hi, Johannes. Thanks for the thorough examination! I’ll try to address each of your points below (please remind me if I have missed something). > I think you are missing a combined third case where a chain of forward replacements (like A -> B -> C -> ...) ends in one certificate that has an inverse replacement subpacket (this achieves key equivalency at most between the last two certificates). If this is not intended, then it should be written in the document, or did I miss it? Correct, the last two certificates that have the equivalence binding are equivalent to each other, and the other certificates in the chain have no equivalence relationship. I think this interpretation follows naturally though, and doesn’t need to be explicitly clarified - but if anyone has a suggestion for wording, please feel free to propose it. :-) > Suggestion: Clarify what transitivity means since it can easily lead to wrong assumptions. Yes, this could be better clarified. I have opened a ticket: https://gitlab.com/andrewgdotcom/openpgp-replacementkey/-/issues/29 > t0: Key A is created. > t1: Key B is created as a replacement for A and key A is updated to include a forward replacement, and key B is created with an inverse replacement for A. > t2: Key C is created and replaces both A and B (inverse replacement). Keys A and B are updated with a new forward replacement to C. > > Case 2: An implementation has B and C at time t2 but A is at version t1. > Now B and C are equal, but A is not equal to anything. If we assume that forward replacements are also transitive, then we have: A is replaced by C due to transitivity of forward replacements and thus A equals C. Due to transitivity of key equivalence A also equals B. This effectively sidesteps the requirement for an equivalence binding, which is that both key owners must consent. If B has been updated so that there is no equivalence relationship between it and A, then we cannot assume that B still consents to the relationship. But this is perhaps too simplistic. This is one specific example of a broader concern: are equivalence relationships “sticky”? i.e. if A and B had an equivalence relationship in the past, and a correspondent used their pre-existing trust in A to derive a trust value for B, what happens if the equivalence relationship is broken in the future? This can happen for many reasons - updating the replacement key subpacket in B is only one way, the key owner could also hard-revoke A or make a new self-sig on it without the subpacket. Should correspondents who relied on equivalence at a point in the past retain a memory of that equivalence calculation even after facts change? The “A is subsequently hard revoked” scenario is particularly tricky. I have opened a ticket: https://gitlab.com/andrewgdotcom/openpgp-replacementkey/-/issues/31 > Suggestion: As you suggest put a limit on how many replacements are followed or put in a proper loop detection. Possibly there are more solutions. ... > 1) What about chains of forward replacements? It should be clarified that we iterate until the end of the chain (where we find an inverse replacement subpacket or no replacement subpacket at all). Going from the end of the chain, the subkeys can be chosen as described. Note that you can have key equivalency between the replacement certificate and a certificate in the fallback list that belongs to another chain than the one you followed to the replacement certificate. I would RECOMMEND a short limit per invocation, preferably 1. If it takes N encrypted messages to iterate to the end of a chain of length N, then that’s a reasonable price to pay for stability IMO. In such a case, we don’t need to consider transitivity explicitly, Ticket here: https://gitlab.com/andrewgdotcom/openpgp-replacementkey/-/issues/28 > 2) It is mentioned that other means than key equivalency can be used to validate the replacement certificate. However, when going through the list of original/fallback certificates that the replacement certificate lists, only key equivalency is considered. Wouldn't it make sense to validate them by some other means as well (if possible)? If successful, we can use the fallback even without an equivalency binding. If that is not intended, the draft should state why. This was not explicitly considered during the design process. Fallback is effectively a bonus feature of key equivalency that we get for free due to the inverse subpacket construction. The original design only considered forward relationships and not inverse, so non-equivalent fallback relationships did not arise, and nobody thought to specify them since. When would a key owner wish to declare such a standalone fallback? Do we need to support this use case, or would it just be for theoretical symmetry? > 3) What if the replacement certificate points to a fallback certificate that in turn claims it is replaced by yet another certificate (instead of the currently processed replacement certificate)? This can happen in legitimate cases, for example when the version of the newly fetched fallback certificate is newer than the replacement certificate that we found and thus points to an even newer replacement certificate. Note again, that not all fallback certificates must belong to the chain you followed, so you might fetch this one at a different time than the ones you already have. I think this is a convincing argument against following unpaired fallback references. ;-) > 4) This might be obvious, but subkeys of soft-revoked certificates should not be used. Might not hurt to explicitly state how implementations should handle this. Personally I think this is obvious, but I wouldn’t object to adding a clarification. Any suggestions for wording? > B might want to state "I am a replacement for A". But in doing so, B forms an equivalence binding with A and legitimates the use of A's subkeys. Do we need a possibility to state "I replace this key but I don't want anyone to use it as fallback"? Yes, this is an interesting use case that we didn’t think of. As you say, we know that in practice we cannot assume that offline/escrowed revocation certs always exist, so any method of conveying the same information by other means deserves serious consideration. If we specified such a flag, it would need to be located inside each target record, not in the class octet, so that setting it on one original would not prevent fallback to any others. Would it prevent both encryption and signature verification? Could it be abused? I have opened a ticket: https://gitlab.com/andrewgdotcom/openpgp-replacementkey/-/issues/30 A
- [openpgp] I-D Action: draft-ietf-openpgp-replacem… internet-drafts
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Johannes Roth
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Johannes Roth
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Daniel Huigens
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Johannes Roth
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Daniel Huigens
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Daniel Huigens
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Daniel Huigens
- [openpgp] Re: I-D Action: draft-ietf-openpgp-repl… Andrew Gallagher