<?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.8 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-madden-jose-deprecate-none-rsa15-00" category="std" consensus="true" submissionType="IETF" updates="7518" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.20.1 -->
  <front>
    <title>JOSE: Deprecate 'none' and 'RSA1_5'</title>
    <seriesInfo name="Internet-Draft" value="draft-madden-jose-deprecate-none-rsa15-00"/>
    <author fullname="Neil Madden">
      <organization>Illuminated Security Ltd</organization>
      <address>
        <email>neil@illuminated-security.com</email>
      </address>
    </author>
    <date year="2024" month="March" day="18"/>
    <area>Security</area>
    <workgroup>Javascript Object Signing and Encryption</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 55?>

<t>This draft updates <xref target="RFC7518"/> to deprecate the JWS algorithm "none" and the JWE algorithm
"RSA1_5".</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://NeilMadden.github.io/jose-deprecate-none-rsa1_5/draft-madden-jose-deprecate-none-rsa15.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-madden-jose-deprecate-none-rsa15/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Javascript Object Signing and Encryption Working Group mailing list (<eref target="mailto:jose@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/jose/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/jose/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/NeilMadden/jose-deprecate-none-rsa1_5"/>.</t>
    </note>
  </front>
  <middle>
    <?line 60?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>JSON Web Algorithms (JWA, <xref target="RFC7518"/>) introduced several standard algorithms for both JSON Web
Signature (JWS) and JSON Web Encryption (JWE). Many of these algorithms have stood the test of time
and are still in widespread use. However, some algorithms have proved to be difficult to implement
correctly leading to exploitable vulnerabilities. This draft deprecates two such algorithms:</t>
      <ul spacing="normal">
        <li>
          <t>The JWS "none" algorithm, which indicates that no security is applied to the message at all.</t>
        </li>
        <li>
          <t>The JWE "RSA1_5" algorithm, which indicates RSA encryption with PKCS#1 version 1.5 padding.</t>
        </li>
      </ul>
      <section anchor="the-none-algorithm">
        <name>The 'none' algorithm</name>
        <t>The "none" algorithm creates an Unsecured JWS, whose contents are completely unsecured as the name
implies. Despite strong guidance in the original RFC around not accepting Unsecured JWS by default,
many implementations have had serious bugs due to accepting this algorithm. In some cases, this has
led to a complete loss of security as authenticity and integrity checking can be disabled by an
adversary simply by changing the algorithm ("alg") header in the JWS. The website <xref target="howmanydays"/>
tracks public vulnerabilities due to implementations mistakenly accepting the "none" algorithm. It
currently lists 12 reports, many of which have high impact ratings.</t>
        <t>Although there are some legitimate use-cases for Unsecured JWS, these are relatively few in number
and can easily be satisfied by simply base64url-encoding some JSON instead. The small risk of breaking
some of these use-cases is far outweighed by the improvement in security for the majority of
JWS users who may be impacted by accidental acceptance of the "none" algorithm.</t>
      </section>
      <section anchor="the-rsa15-algorithm">
        <name>The 'RSA1_5' algorithm</name>
        <t>The "RSA1_5" algorithm implements RSA encryption using PKCS#1 version 1.5 padding <xref target="RFC8017"/>. This
padding mode has long been known to have security issues, since at least Bleichenbacher's attack in
1998. It was supported in JWE due to the wide deployment of this algorithm, especially in legacy
hardware. However, more secure replacements such as OAEP <xref target="RFC8017"/> or elliptic curve encryption
algorithms are now widely available. NIST has disallowed the use of this encryption mode for federal
use since the end of 2023 <xref target="NIST.SP800-131r2"/> and a CFRG draft <xref target="I-D.kario-rsa-guidance"/> also deprecates
this encryption mode for IETF protocols. This document therefore also deprecates this algorithm for
JWE.</t>
      </section>
      <section anchor="guidance-on-deprecation">
        <name>Guidance on deprecation</name>
        <t>Both of the algorithms listed above are deprecated for use in JWS and JWE. JOSE library developers
<bcp14>SHOULD</bcp14> deprecate support for these algorithms and commit to a timeline for removal. Application
developers <bcp14>SHOULD</bcp14> disable support for these algorithms by default. New specifications building on
top of JOSE <bcp14>MUST NOT</bcp14> allow the use of either algorithm.</t>
      </section>
    </section>
    <section anchor="conventions-and-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>
      <?line -18?>

</section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>No security issues are introduced by this specification.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>The following changes are to be made to the IANA JOSE Web Signature and Encryption Algorithms registry:</t>
      <ul spacing="normal">
        <li>
          <t>For the entry with Algorithm Name "none", update the JOSE Implementation Requirements to "Deprecated".</t>
        </li>
        <li>
          <t>For the entry with Algorithm Name "RSA1_5", update the JOSE Implementation Requirements to "Deprecated".</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC7518">
          <front>
            <title>JSON Web Algorithms (JWA)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <date month="May" year="2015"/>
            <abstract>
              <t>This specification registers cryptographic algorithms and identifiers to be used with the JSON Web Signature (JWS), JSON Web Encryption (JWE), and JSON Web Key (JWK) specifications. It defines several IANA registries for these identifiers.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7518"/>
          <seriesInfo name="DOI" value="10.17487/RFC7518"/>
        </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="howmanydays" target="https://github.com/zofrex/howmanydayssinceajwtalgnonevuln/blob/deploy/data/vulns.yml">
          <front>
            <title>How Many Days Has It Been Since a JWT alg:none Vulnerability?</title>
            <author fullname="James Sanderson">
              <organization/>
            </author>
            <date year="2023" month="September" day="25"/>
          </front>
        </reference>
        <reference anchor="RFC8017">
          <front>
            <title>PKCS #1: RSA Cryptography Specifications Version 2.2</title>
            <author fullname="K. Moriarty" initials="K." role="editor" surname="Moriarty"/>
            <author fullname="B. Kaliski" initials="B." surname="Kaliski"/>
            <author fullname="J. Jonsson" initials="J." surname="Jonsson"/>
            <author fullname="A. Rusch" initials="A." surname="Rusch"/>
            <date month="November" year="2016"/>
            <abstract>
              <t>This document provides recommendations for the implementation of public-key cryptography based on the RSA algorithm, covering cryptographic primitives, encryption schemes, signature schemes with appendix, and ASN.1 syntax for representing keys and for identifying the schemes.</t>
              <t>This document represents a republication of PKCS #1 v2.2 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series. By publishing this RFC, change control is transferred to the IETF.</t>
              <t>This document also obsoletes RFC 3447.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8017"/>
          <seriesInfo name="DOI" value="10.17487/RFC8017"/>
        </reference>
        <reference anchor="I-D.kario-rsa-guidance">
          <front>
            <title>Implementation Guidance for the PKCS #1 RSA Cryptography Specification</title>
            <author fullname="Hubert Kario" initials="H." surname="Kario">
              <organization>Red Hat, Inc.</organization>
            </author>
            <date day="22" month="November" year="2023"/>
            <abstract>
              <t>   This document specifies additions and amendments to RFC 8017.
   Specifically, it provides guidance to implementers of the standard to
   protect against side-channel attacks.  It also deprecates the RSAES-
   PKCS-v1_5 encryption scheme, but provides an alternative depadding
   algorithm that protects against side-channel attacks raising from
   users of vulnerable APIs.  The purpose of this specification is to
   increase security of RSA implementations.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-kario-rsa-guidance-02"/>
        </reference>
        <reference anchor="NIST.SP800-131r2" target="https://csrc.nist.gov/pubs/sp/800/131/a/r2/final">
          <front>
            <title>NIST SP 800-131A Rev. 2: Transitioning the Use of Cryptographic Algorithms and Key Lengths</title>
            <author fullname="Elaine Barker">
              <organization>NIST</organization>
            </author>
            <author fullname="Allen Roginsky">
              <organization>NIST</organization>
            </author>
            <date year="2019" month="March" day="21"/>
          </front>
        </reference>
      </references>
    </references>
    <?line 138?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
    </section>
  </back>
  <!-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