<?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.26 (Ruby 3.3.6) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-lamps-x509-alg-none-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.28.0 -->
  <front>
    <title>Unsigned X.509 Certificates</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-lamps-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="2025" month="March" day="20"/>
    <area>Security</area>
    <workgroup>Limited Additional Mechanisms for PKIX and SMIME</workgroup>
    <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-ietf-lamps-x509-alg-none.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-lamps-x509-alg-none/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Limited Additional Mechanisms for PKIX and SMIME Working Group mailing list (<eref target="mailto:spasm@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/spasm/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/spasm/"/>.
      </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>[[TODO: It's an open question whether we should use this existing OID or define
a new one. See issue #2.]]</t>
      <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 152?>

<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:
H4sIAAAAAAAAA51Y2XLbRhZ976+4wzzYmiKoJc5iVqUSarFNR4tHpJNMpfLQ
BJpkR0A3g26QolXKt8+53QAFUlQeJlWOSLCXu5x77rlIkkR47XPVp85n4/TM
qIx+631z9JbOVOn1VKfSK9cR/Gdmy3WfnM+EyGx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