<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.19 (Ruby 3.3.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-davidben-x509-alg-none-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.23.2 -->
  <front>
    <title>Unsigned X.509 Certificates</title>
    <seriesInfo name="Internet-Draft" value="draft-davidben-x509-alg-none-00"/>
    <author initials="D." surname="Benjamin" fullname="David Benjamin">
      <organization>Google LLC</organization>
      <address>
        <email>davidben@google.com</email>
      </address>
    </author>
    <date year="2024" month="October" day="10"/>
    <keyword>self-signed certificate</keyword>
    <abstract>
      <?line 40?>

<t>This document defines a placeholder X.509 signature algorithm that may be used
in contexts where the consumer of the certificate does not intend to verify the
signature.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://davidben.github.io/x509-alg-none/draft-davidben-x509-alg-none.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-davidben-x509-alg-none/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/davidben/x509-alg-none"/>.</t>
    </note>
  </front>
  <middle>
    <?line 46?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>An X.509 certificate <xref target="RFC5280"/> relates two entities in the PKI: information
about a subject and a proof from an issuer. Some applications, however, only
require subject information. For example, an X.509 trust anchor is described by
information about the subject (a root certification authority, or root CA). The
relying party trusts this information out-of-band and does not require an
issuer's signature.</t>
      <t>X.509 does not define such a structure. Instead, X.509 trust anchors often use
"self-signed" certificates, where the CA's key is used to sign the certificate.
Other formats, such as <xref target="RFC5914"/> exist to convey trust anchors, but
self-signed certificates remain widely used. Additionally, some TLS <xref target="RFC8446"/>
server deployments use self-signed certificates when they do not intend to
present a CA-issued identity, instead expecting the relying party to
authenticate the certificate out-of-band, e.g. via a known fingerprint.</t>
      <t>These self-signatures typically have no security value, aren't checked by
the receiver, and only serve as placeholders to meet syntactic requirements of
an X.509 certificate.</t>
      <t>Computing signatures as placeholders has some drawbacks:</t>
      <ul spacing="normal">
        <li>
          <t>Post-quantum signature algorithms are large, so including a self-signature
significantly increases the size of the payload.</t>
        </li>
        <li>
          <t>If the subject is an end entity, rather than a CA, computing an X.509
signature risks cross-protocol attacks with the intended use of the key.</t>
        </li>
        <li>
          <t>It is ambiguous whether such a self-signature requires the CA bit in basic
constraints or keyCertSign in key usage. If the key is intended for a
non-X.509 use, asserting those capabilities is an unnecessary risk.</t>
        </li>
        <li>
          <t>If end entity's key is not a signing key (e.g. a KEM key), there is no valid
signature algorithm to use with the key.</t>
        </li>
      </ul>
      <t>This document defines a profile for unsigned X.509 certificates, which may be
used when the certificate is used as a container for subject information,
without any specific issuer.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" 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="constructing-unsigned-certificates">
      <name>Constructing Unsigned Certificates</name>
      <t>This document defines the id-unsigned OID:</t>
      <artwork><![CDATA[
id-unsigned OBJECT IDENTIFER ::= { TBD }
]]></artwork>
      <t>To construct an unsigned X.509 certificate, the sender MUST set the
Certificate's signatureAlgorithm and TBSCertificate's signature fields each to
an AlgorithmIdentifier with algorithm id-unsigned and omitted parameters. The
Certificate's signatureValue field MUST be an empty BIT STRING.</t>
    </section>
    <section anchor="consuming-unsigned-certificates">
      <name>Consuming Unsigned Certificates</name>
      <t>Signatures of type id-unsigned are always invalid. This contrasts with <xref target="JWT"/>.
When processing X.509 certificates without verifying signatures, receivers MAY
accept id-unsigned. When verifying X.509 signatures, receivers MUST reject
id-unsigned. In particular, X.509 validators MUST NOT accept id-unsigned in the
place of a signature in the certification path.</t>
      <t>X.509 applications must already account for unknown signature algorithms, so
applications are RECOMMENDED to satisfy these requirements by ignoring this
document. An unmodified X.509 validator will not recognize id-unsigned and is
thus already expected to reject it in the certification path. Conversely, in
contexts where an X.509 application was ignoring the self-signature, id-unsigned
will also be ignored, but more efficiently.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>If an application uses a self-signature when constructing a subject-only
certificate for a non-X.509 key, the X.509 signature payload and those of the
key's intended use may collide. The self-signature might then be used as part of
a cross-protocol attack. Using id-unsigned avoids a single key being used for
both X.509 and the end-entity protocol, eliminating this risk.</t>
      <t>If an application accepts id-unsigned as part of a certification path, or in any
other context where it is necessary to verify the X.509 signature, the signature
check would be bypassed. Thus, <xref target="consuming-unsigned-certificates"/> prohibits
this and recommends that applications not treat id-unsigned differently from any
other previously unrecognized signature algorithm. Non-compliant applications
that instead accept id-unsigned as a valid signature risk of vulnerabilities
analogous to <xref target="JWT"/>.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC5280">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author fullname="D. Cooper" initials="D." surname="Cooper"/>
            <author fullname="S. Santesson" initials="S." surname="Santesson"/>
            <author fullname="S. Farrell" initials="S." surname="Farrell"/>
            <author fullname="S. Boeyen" initials="S." surname="Boeyen"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="W. Polk" initials="W." surname="Polk"/>
            <date month="May" year="2008"/>
            <abstract>
              <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet. An overview of this approach and model is provided as an introduction. The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms. Standard certificate extensions are described and two Internet-specific extensions are defined. A set of required certificate extensions is specified. The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions. An algorithm for X.509 certification path validation is described. An ASN.1 module and examples are provided in the appendices. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5280"/>
          <seriesInfo name="DOI" value="10.17487/RFC5280"/>
        </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>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="JWT" target="https://www.howmanydayssinceajwtalgnonevuln.com/">
          <front>
            <title>How Many Days Has It Been Since a JWT alg:none Vulnerability?</title>
            <author initials="J." surname="Sanderson" fullname="James 'zofrex' Sanderson">
              <organization/>
            </author>
            <date year="2024" month="October" day="09"/>
          </front>
        </reference>
        <reference anchor="RFC5914">
          <front>
            <title>Trust Anchor Format</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="S. Ashmore" initials="S." surname="Ashmore"/>
            <author fullname="C. Wallace" initials="C." surname="Wallace"/>
            <date month="June" year="2010"/>
            <abstract>
              <t>This document describes a structure for representing trust anchor information. A trust anchor is an authoritative entity represented by a public key and associated data. The public key is used to verify digital signatures, and the associated data is used to constrain the types of information or actions for which the trust anchor is authoritative. The structures defined in this document are intended to satisfy the format-related requirements defined in Trust Anchor Management Requirements. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5914"/>
          <seriesInfo name="DOI" value="10.17487/RFC5914"/>
        </reference>
        <reference anchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
      </references>
    </references>
    <?line 143?>

<section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to Bob Beck, Nick Harper, and Sophie Schmieg for reviewing an early
iteration of this document. Thanks to Alex Gaynor for providing a link to cite
for <xref target="JWT"/>.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA31Y73PbNhL9jr9iT/ch7Y2oOLn0rtFMp5V/JFHq2DlLae4+
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