<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version  (Ruby 3.1.2) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-gallagher-openpgp-replacementkey-00" category="info" submissionType="IETF" updates="4880" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title>OpenPGP Replacement Key Signalling Mechanism</title>

    <author fullname="Daphne Shaw">
      <organization>Jabberwocky Tech</organization>
      <address>
        <email>dshaw@jabberwocky.com</email>
      </address>
    </author>
    <author fullname="Andrew Gallagher" role="editor">
      <organization>PGPKeys.EU</organization>
      <address>
        <email>andrewg@andrewg.com</email>
      </address>
    </author>

    <date year="2024" month="March" day="04"/>

    <area>int</area>
    <workgroup>openpgp</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document specifies a method in OpenPGP to suggest a replacement for an expired or revoked key.</t>



    </abstract>

    <note title="About This Document" removeInRFC="true">
      <t>
        The latest revision of this draft can be found at <eref target="https://andrewgdotcom.gitlab.io/draft-gallagher-openpgp-replacementkey"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-gallagher-openpgp-replacementkey/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        OpenPGP Working Group mailing list (<eref target="mailto:openpgp@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/openpgp/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/openpgp/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://gitlab.com/andrewgdotcom/draft-gallagher-openpgp-replacementkey"/>.</t>
    </note>


  </front>

  <middle>


<section anchor="introduction"><name>Introduction</name>

<t>The OpenPGP message format <xref target="crypto-refresh"></xref> defines two ways to invalidate a key.
One way is that the key may be explicitly revoked via a revocation signature.
OpenPGP also supports the concept of key expiration, a date after which the key should not be used.
When a key is revoked or expires, very often there is another key that is intended to replace it.</t>

<t>This document is to specify the format of a signature subpacket to be optionally included in the revocation signature or in the self-signature for a key that has an expiration date.
This subpacket contains a pointer to a suggested replacement for the revoked or expired key.</t>

</section>
<section anchor="conventions-definitions"><name>Conventions and Definitions</name>

<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

</section>
<section anchor="replacement-key-subpacket"><name>The Replacement Key Subpacket</name>

<t>The replacement key subpacket is a Signature Subpacket as defined in <xref target="crypto-refresh"></xref>, section 5.2.3.7, and all general signature subpacket considerations from there apply here as well.
 The value of the signature subpacket type octet for the replacement key subpacket is (insert this later).</t>

<t>A preferred key server subpacket (<xref target="crypto-refresh"></xref>, section 5.2.3.26) <bcp14>MAY</bcp14> be included in the revocation or self-signature to recommend a location and method to fetch the replacement key.</t>

<t>The absence of a replacement key subpacket <bcp14>SHOULD NOT</bcp14> be interpreted as meaning that there is no replacement for a revoked or expired key.</t>

<t>The replacement key subpacket is only meaningful in a key revocation or self-signature.
It <bcp14>SHOULD NOT</bcp14> be present in any other sort of signature.</t>

</section>
<section anchor="replacement-key-subpacket-format"><name>Format of the Replacement Key Subpacket</name>

<t>The format of the replacement key subpacket is 1 octet of subpacket version and 1 octet of class, followed by an optional 1 octet of key version and N octets of fingerprint.</t>

<t>The subpacket version octet <bcp14>MUST</bcp14> be set to 0x01 to indicate the version of the replacement key subpacket as specified in this document.
An implementation that encounters a subpacket version octet that is different than the version(s) it is capable of understanding <bcp14>MUST</bcp14> disregard that replacement key subpacket.
Note that if the critical bit for the replacement key subpacket is set, this <bcp14>MAY</bcp14> also mean considering the whole signature to be in error (<xref target="crypto-refresh"></xref>, section 5.2.3.7).</t>

<t>The 0x80 bit of the class octet is the "no replacement" bit.
When set, this explicitly specifies there is no replacement for the revoked or expired key.
All other bits of the class octet are currently undefined and <bcp14>MUST</bcp14> be set to zero.</t>

<t>If the class octet does not have the 0x80 bit set to indicate there is no replacement, the replacement key subpacket also contains 1 octet for the key version of the replacement key and N octets for the fingerprint of the replacement key.
If present, the length of the fingerprint field <bcp14>MUST</bcp14> equal the fingerprint length corresponding to the key version field, e.g.
20 octets for version 4, or 32 octets for version 6.</t>

<t>If the intent is to state that the replacement key is unknown, then no replacement key subpacket should be included in the revocation signature.</t>

<t>If multiple replacement key subpackets are present, implementations <bcp14>MAY</bcp14> use any method desired to resolve which key (or keys) are the chosen replacement.</t>

</section>
<section anchor="replacement-key-subpacket-trust"><name>Trust and Validation of the Replacement Key Subpacket</name>

<t>No unusual trust in the replacement key should be implied by it being designated as the replacement.
Implementations <bcp14>SHOULD</bcp14> validate the replacement key as they would any other key.</t>

</section>
<section anchor="replacement-key-subpacket-placement"><name>Placement of the Replacement Key Subpacket</name>

<t>While nothing prevents using the replacement key subpacket on a subkey revocation or self-signature, it is mainly useful on a primary key revocation or self-signature as a replacement subkey can be directly added by the keyholder with no need for the indirection provided by this subpacket.
The replacement key subpacket <bcp14>SHOULD</bcp14> be placed in the hashed section of the signature to prevent a possible key substitution attack.
If the replacement key subpacket was allowed in the unhashed section of the signature, an attacker could add a bogus replacement key subpacket to an existing revocation or self-signature.</t>

</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>The replacement key subpacket provides non-sensitive information only.
Nevertheless, as noted above, implementations <bcp14>SHOULD NOT</bcp14> trust a replacement key subpacket that is located in the unhashed area of the signature packet, and <bcp14>SHOULD</bcp14> validate the replacement key as they would any other key.
In addition, as this document is an update of <xref target="crypto-refresh"></xref>, the security considerations there should be carefully reviewed.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>This document requests that the following entry be added to the OpenPGP Signature Subpacket registry:</t>

<texttable title="Signature Subpacket Registry" anchor="signature-subpacket-registry">
      <ttcol align='left'>Type</ttcol>
      <ttcol align='left'>Name</ttcol>
      <ttcol align='left'>Specification</ttcol>
      <c>TBC</c>
      <c>Replacement Key</c>
      <c>This document</c>
</texttable>

</section>


  </middle>

  <back>


    <references title='Normative References'>

<reference anchor="crypto-refresh" target="https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-13">
  <front>
    <title>OpenPGP</title>
    <author initials="P." surname="Wouters" fullname="Paul Wouters">
      <organization></organization>
    </author>
    <author initials="D." surname="Huigens" fullname="Daniel Huigens">
      <organization></organization>
    </author>
    <author initials="J." surname="Winter" fullname="Justus Winter">
      <organization></organization>
    </author>
    <author initials="N." surname="Yutaka" fullname="Niibe Yutaka">
      <organization></organization>
    </author>
    <date year="2023" month="October"/>
  </front>
</reference>


<reference anchor='RFC2119'>
  <front>
    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
    <author fullname='S. Bradner' initials='S.' surname='Bradner'/>
    <date month='March' year='1997'/>
    <abstract>
      <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
    </abstract>
  </front>
  <seriesInfo name='BCP' value='14'/>
  <seriesInfo name='RFC' value='2119'/>
  <seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>

<reference anchor='RFC8174'>
  <front>
    <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
    <author fullname='B. Leiba' initials='B.' surname='Leiba'/>
    <date month='May' year='2017'/>
    <abstract>
      <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
    </abstract>
  </front>
  <seriesInfo name='BCP' value='14'/>
  <seriesInfo name='RFC' value='8174'/>
  <seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>




    </references>



<section anchor="acknowledgments"><name>Acknowledgments</name>

<t>The authors would like to thank Aron Wussler for his contributions.</t>

</section>
<section anchor="document-history"><name>Document History</name>

<t>Note to RFC Editor: this section should be removed before publication.</t>

<section anchor="changes-between-draft-shaw-openpgp-replacementkey-00-and-draft-gallagher-openpgp-replacementkey-00"><name>Changes Between draft-shaw-openpgp-replacementkey-00 and draft-gallagher-openpgp-replacementkey-00</name>

<t><list style="symbols">
  <t>Changed <spanx style="verb">algid</spanx> octet to <spanx style="verb">key version</spanx> octet.</t>
  <t>Changed initial subpacket version number to 1.</t>
  <t>Clarified semantics of some edge cases.</t>
</list></t>

</section>
</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA6VZ63LbuBX+z6dA5T/JjknLTrrJatpOFNtJvE1s13aayWQy
DURCFGqKYAFQitbJu/RZ+mT9DgBS1M3O7PqPJVwOzvnOdy6A4jiOrLSFGLDe
RSXKy9eX7EpUBU/FVJSW/V0s2LXMS14UsszZO5FOeCnNtBel3Ipc6cWAyXKs
okylJZ9CTKb52MY5NvB8InSsILXKq1gvpd6KRdzvR3WVQYYZsKfPn/cjWekB
s7o29qjf/6V/FHEtOAm30Vzp21yruhqwIC2CCIxmA3ZWWqFLYeMTOjcy9Wgq
jZGqvFlU0Obs9OZVNBNlLQYRY0FIY2kPQ9Yt633AEWTga1pB41MuC4yH815I
YceJ0jlNcZ1OMDWxtjKDgwNaSUNyJpJm2QENHIy0mhtxEGQc0F6goDp7c0DP
R0mqpge8zLSY55my9O3HUCSJBWFoOzJXBCXhBKl+WKSxkPAvXqgSwCyEiSo5
YJ+sSveZUdpqMTb4tJjSh88Rr+1EaYAbQxfGxnVReB6c8GpSCnY94XM3A1TA
nN+4hW8G7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