<?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.21 (Ruby 3.3.6) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-davidben-x509-alg-none-01" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.25.0 -->
  <front>
    <title>Unsigned X.509 Certificates</title>
    <seriesInfo name="Internet-Draft" value="draft-davidben-x509-alg-none-01"/>
    <author initials="D." surname="Benjamin" fullname="David Benjamin">
      <organization>Google LLC</organization>
      <address>
        <email>davidben@google.com</email>
      </address>
    </author>
    <date year="2024" month="December" day="17"/>
    <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 how to use the id-alg-noSignature OID from
<xref section="C.1" sectionFormat="of" target="RFC5272"/> with X.509 certificates.</t>
      <artwork><![CDATA[
  id-pkix OBJECT IDENTIFIER  ::= { iso(1) identified-organization(3)
      dod(6) internet(1) security(5) mechanisms(5) pkix(7) }

  id-alg-noSignature OBJECT IDENTIFIER ::= {id-pkix id-alg(6) 2}
]]></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-alg-noSignature. The parameters for
id-alg-noSignature MUST be present and MUST be encoded as NULL. The
Certificate's signatureValue field MUST be a BIT STRING of length zero.</t>
    </section>
    <section anchor="consuming-unsigned-certificates">
      <name>Consuming Unsigned Certificates</name>
      <t>X.509 signatures of type id-alg-noSignature are always invalid. This contrasts
with <xref target="JWT"/>. When processing X.509 certificates without verifying signatures,
receivers MAY accept id-alg-noSignature. When verifying X.509 signatures,
receivers MUST reject id-alg-noSignature. In particular, X.509 validators MUST
NOT accept id-alg-noSignature 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-alg-noSignature
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-alg-noSignature 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-alg-noSignature 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-alg-noSignature 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-alg-noSignature
differently from any other previously unrecognized signature algorithm.
Non-compliant applications that instead accept id-alg-noSignature 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>
        <reference anchor="RFC5272">
          <front>
            <title>Certificate Management over CMS (CMC)</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <author fullname="M. Myers" initials="M." surname="Myers"/>
            <date month="June" year="2008"/>
            <abstract>
              <t>This document defines the base syntax for CMC, a Certificate Management protocol using the Cryptographic Message Syntax (CMS). This protocol addresses two immediate needs within the Internet Public Key Infrastructure (PKI) community:</t>
              <t>1. The need for an interface to public key certification products and services based on CMS and PKCS #10 (Public Key Cryptography Standard), and</t>
              <t>2. The need for a PKI enrollment protocol for encryption only keys due to algorithm or hardware design.</t>
              <t>CMC also requires the use of the transport document and the requirements usage document along with this document for a full definition. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5272"/>
          <seriesInfo name="DOI" value="10.17487/RFC5272"/>
        </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 149?>

<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"/>. Thanks to Russ Housley for pointing out that id-alg-noSignature
was already defined in <xref target="RFC5272"/>.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA31Y23LbRhJ9x1f0ch8spQjacpyLWZVKqIttOrLkFel493EI
DMmJAAyDGZCiVcq37+keAAIpKqlyRIIzPX05ffoM4jiOvPGZHlLvS+HMotAp
/Xfww6u3dKZLb+YmUV67XsR/FrbcDsn5NIpSmxQqx660VHMfp2pt0pku4jvs
jFW2iAtb6PjVSeSqWW6cM7bw2xXWjy+m74j+TSpzFmeaItUrjf8Vvtennk6N
t6VRGX8Zj07xx5b4dDN914uKKp/pchilcGUYJbZwunCVG5IvKx2th/R9BLul
VkMa3VyM8GVjy9tFaavVkL6+p6/4ZooFvecn0a3e4ud0GMXkdDaP69iTx6ij
tS4qnMTutlbkWwhl1x4/z5XJeNFv+k7lq0wPEpvLD6pMlkNaer9yw5cvO7++
FIsL45fVDOlo8vhyJ489LMm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