<?xml version='1.0' encoding='UTF-8'?>

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


<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
ipr="pre5378Trust200902" 
docName="draft-ietf-lamps-rfc8399bis-05" 
number="9549"
category="std" 
consensus="true" 
submissionType="IETF" 
obsoletes="8399" 
updates="5280" 
tocInclude="true" 
sortRefs="true" 
symRefs="true" 
version="3"
xml:lang="en">

  <front>
    <title abbrev="I18n Updates to RFC 5280">Internationalization Updates to RFC 5280</title>
    <seriesInfo name="RFC" value="9549"/>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security">Vigil Security, LLC</organization>
      <address>
        <postal>
          <city>Herndon</city>
	  <region>VA</region>
          <country>United States of America</country>
        </postal>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <date year="2024" month="March"/>

    <area>SEC</area>
    <workgroup>lamps</workgroup>

<keyword>Internationalized Email Address</keyword>

    <abstract>
  
<t>The updates to RFC 5280 described in this document provide alignment
with the 2008 specification for Internationalized Domain Names (IDNs)
and includes support for internationalized email addresses in X.509
certificates.  The updates ensure that name constraints for 
email addresses that contain only ASCII characters and internationalized email addresses are handled in
the same manner.  This document obsoletes RFC 8399.</t>
    </abstract>
  </front>
  <middle>
  

<section anchor="intro">
      <name>Introduction</name>
      <t>This document updates the Introduction in Section <xref target="RFC5280" section="1" sectionFormat="bare"/>, the Name Constraints
certificate extension discussion in Section <xref target="RFC5280" section="4.2.1.10" sectionFormat="bare"/>, and the Processing Rules
for Internationalized Names in Section <xref target="RFC5280" section="7" sectionFormat="bare"/> of RFC 5280 <xref target="RFC5280"/> to provide
alignment with the 2008 specification for Internationalized Domain Names (IDNs)
and includes support for internationalized email addresses in X.509 certificates.</t>
      <t>An IDN in Unicode (native character) form contains at least one
U-label <xref target="RFC5890"/>.  IDNs are carried in certificates in ACE-encoded
form.  That is, all U-labels within an IDN are converted to A-labels.  Conversion
of a U-label to an A-label is described in <xref target="RFC5891"/>.</t>
      <t>The GeneralName structure supports many different name forms, including
otherName for extensibility.  RFC 8398 <xref target="RFC8398"/> specifies the
SmtpUTF8Mailbox for internationalized email addresses.</t>
      <t>Note that Internationalized Domain Names in Applications specifications
published in 2003 (IDNA2003) <xref target="RFC3490"/> and 2008 (IDNA2008) <xref target="RFC5890"/> both
refer to the Punycode algorithm for conversion <xref target="RFC3492"/>.</t>

      <t>Note that characters in the Unicode Category "Symbol, Other" (So) are
specifically not included in IDNA2003 <xref target="RFC3490"/> or IDNA2008 <xref target="RFC5890"/>;
the derived property values for characters in this category are calculated as
DISALLOWED.  Thus, some characters that are allowed under the Unicode IDNA
Compatibility Processing <xref target="UTS46"/> are not allowed under this specification.  
For instance, ♚.example, 
which contains the Unicode character U+1F0A1 (BLACK CHESS KING), 
results in a failure under this specification, but it becomes 
xn&nbhy;&nbhy;45h.example under <xref target="UTS46"/>.</t>
      <section anchor="terms">
        <name>Terminology</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&nbsp;14 <xref target="RFC2119"/> <xref
    target="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.
        </t>

</section>
      <section anchor="changes-since-rfc-8399">
        <name>Changes since RFC 8399</name>
        <t>In some cases, <xref target="RFC8399"/> required conversion of A-labels to U-labels
in order to process name constraints for internationalized email
addresses.  This led to implementation complexity and at least two
security vulnerabilities.  One summary of the vulnerabilities can be
found in <xref target="DDHQ"/>.  Now, all IDNs
are carried and processed as A-labels.</t>
        <t>The Introduction provides a warning to implementers about the handling of
characters in the Unicode Category "Symbol, Other" (So), which includes
emoji characters.</t>
      </section>
    </section>
    <section anchor="updates-to-rfc-5280">
      <name>Updates to RFC 5280</name>
      <t>This section provides updates to several paragraphs of <xref target="RFC5280"/>.  For
clarity, if the entire section is not replaced, then the original text and
the replacement text are shown.</t>
      <section anchor="update-in-the-introduction-section-1">
        <name>Update in the Introduction (Section 1)</name>
        <t>This update provides references for IDNA2008.</t>
        <t>OLD</t>
      <blockquote>
<ul><li>
  Enhanced support for internationalized names is specified in
    Section 7, with rules for encoding and comparing
    Internationalized Domain Names, Internationalized Resource
    Identifiers (IRIs), and distinguished names.  These rules are
    aligned with comparison rules established in current RFCs,
    including <xref target="RFC3490"/>, <xref target="RFC3987"/>, and <xref target="RFC4518"/>.
  </li></ul>
      </blockquote>
        <t>NEW</t>
<blockquote>
<ul><li>
  Enhanced support for internationalized names is specified in
    Section 7, with rules for encoding and comparing
    Internationalized Domain Names, Internationalized Resource
    Identifiers (IRIs), and distinguished names.  These rules are
    aligned with comparison rules established in current RFCs,
    including <xref target="RFC3987"/>, <xref target="RFC4518"/>, <xref target="RFC5890"/>, and <xref target="RFC5891"/>.
</li>  </ul>
</blockquote>
      </section>
      <section anchor="update-in-name-constraints-section-42110">
        <name>Update in Name Constraints (Section 4.2.1.10)</name>
        <t>This update removes the ability to include constraints for a
particular mailbox.  This capability was not used, and removing it
allows name constraints to apply to email addresses in rfc822Name and
SmtpUTF8Mailbox <xref target="RFC8398"/> within otherName.</t>
        <t>OLD</t>
      <blockquote>
   A name constraint for Internet mail addresses <bcp14>MAY</bcp14> specify a
   particular mailbox, all addresses at a particular host, or all
   mailboxes in a domain.  To indicate a particular mailbox, the
   constraint is the complete mail address.  For example,
   "root@example.com" indicates the root mailbox on the host
   "example.com".  To indicate all Internet mail addresses on a
   particular host, the constraint is specified as the host name.  For
   example, the constraint "example.com" is satisfied by any mail
   address at the host "example.com".  To specify any address within a
   domain, the constraint is specified with a leading period (as with
   URIs).  For example, ".example.com" indicates all the Internet mail
   addresses in the domain "example.com", but not Internet mail
   addresses on the host "example.com".
      </blockquote>
        <t>NEW</t>
<blockquote> 
   A name constraint for Internet mail addresses <bcp14>MAY</bcp14> specify all
   addresses at a particular host or all mailboxes in a domain.  To
   indicate all Internet mail addresses on a particular host, the
   constraint is specified as the host name.  For example, the
   constraint "example.com" is satisfied by any mail address at the
   host "example.com".  To specify any address within a domain, the
   constraint is specified with a leading period (as with URIs).  For
   example, ".example.com" indicates all the Internet mail addresses
   in the domain "example.com" but not Internet mail addresses on
   the host "example.com".
</blockquote>
      </section>
      <section anchor="update-in-idns-in-generalname-section-72">
        <name>Update in IDNs in GeneralName (Section 7.2)</name>
        <t>This update aligns with IDNA2008.  Since all of <xref target="RFC5280" section="7.2" sectionFormat="of"/> is
replaced, the OLD text is not provided.</t>
        <t>NEW</t>
<blockquote>
<t>
   Internationalized Domain Names (IDNs) may be included in certificates
   and CRLs in the subjectAltName and issuerAltName extensions, name
   constraints extension, authority information access extension,
   subject information access extension, CRL distribution points
   extension, and issuing distribution point extension.  Each of these
   extensions uses the GeneralName type; one choice in GeneralName is
   the dNSName field, which is defined as type IA5String.</t>
<t>
   IA5String is limited to the set of ASCII characters.  To accommodate
   IDNs, U-labels are converted to A-labels.  The A-label is the
   encoding of the U-label according to the Punycode algorithm <xref target="RFC3492"/>
   with the ACE prefix "xn--" added at the beginning of the string.</t>
<t>
   When comparing DNS names for equality, conforming implementations
   <bcp14>MUST</bcp14> perform a case-insensitive exact match on the entire DNS name.
   When evaluating name constraints, conforming implementations <bcp14>MUST</bcp14>
   perform a case-insensitive exact match on a label-by-label basis.  As
   noted in Section <xref target="RFC5280" section="4.2.1.10" sectionFormat="bare"/>, any DNS name that may be constructed by
   adding labels to the left-hand side of the domain name given as the
   constraint is considered to fall within the indicated subtree.</t>

<t>   Implementations that have a user interface <bcp14>SHOULD</bcp14> convert IDNs to
   Unicode for display.  Specifically, conforming implementations
   convert A-labels to U-labels for display purposes.</t>

<t>   Implementation consideration: There are increased memory requirements
   for IDNs.  An IDN ACE label will begin with the four additional
   characters "xn--", and an IDN can require as many as five ASCII
   characters to specify a single international character.</t>
</blockquote>
      </section>
      <section anchor="update-in-idns-in-distinguished-names-section-73">
        <name>Update in IDNs in Distinguished Names (Section 7.3)</name>
        <t>This update aligns with IDNA2008.</t>
        <t>OLD</t>
<blockquote>
   Domain Names may also be represented as distinguished names using
   domain components in the subject field, the issuer field, the
   subjectAltName extension, or the issuerAltName extension.  As with
   the dNSName in the GeneralName type, the value of this attribute is
   defined as an IA5String.  Each domainComponent attribute represents a
   single label.  To represent a label from an IDN in the distinguished
   name, the implementation <bcp14>MUST</bcp14> perform the "ToASCII" label conversion
   specified in Section 4.1 of RFC 3490.  The label <bcp14>SHALL</bcp14> be considered
   a "stored string".  That is, the AllowUnassigned flag <bcp14>SHALL NOT</bcp14> be
   set.
</blockquote>
        <t>NEW</t>
<blockquote>
   Domain names may also be represented as distinguished names using
   domain components in the subject field, the issuer field, the
   subjectAltName extension, or the issuerAltName extension.  As with
   the dNSName in the GeneralName type, the value of this attribute is
   defined as an IA5String.  Each domainComponent attribute represents a
   single label.  To represent a label from an IDN in the distinguished
   name, the implementation <bcp14>MUST</bcp14> convert all U-labels to A-labels.
</blockquote>
      </section>
      <section anchor="update-in-internationalized-electronic-mail-addresses-section-75">
        <name>Update in Internationalized Electronic Mail Addresses (Section 7.5)</name>
        <t>This update aligns with IDNA2008 and <xref target="RFC8398"/>.  Since all
of <xref target="RFC5280" section="7.5" sectionFormat="of"/> is replaced, the OLD text is not provided.</t>
        <t>NEW</t>
<blockquote>
<t>
   Electronic Mail addresses may be included in certificates and CRLs in
   the subjectAltName and issuerAltName extensions, name constraints
   extension, authority information access extension, subject
   information access extension, issuing distribution point extension,
   or CRL distribution points extension.  Each of these extensions uses
   the GeneralName construct.  If the email address includes an IDN but
   the local-part of the email address can be represented in ASCII, then
   the email address is placed in the rfc822Name choice of GeneralName,
   which is defined as type IA5String.  If the local-part of the
   internationalized email address cannot be represented in ASCII, then
   the internationalized email address is placed in the otherName choice
   of GeneralName using the conventions in RFC 8398 <xref target="RFC8398"/>.
</t>
<t>
   When the host-part contains an IDN, conforming implementations <bcp14>MUST</bcp14>
   convert all U-labels to A-labels.
</t>

<t>7.5.1.  Local-Part Contains Only ASCII Characters</t>

<t>   Two email addresses are considered to match if:</t>

<ol type="%d)"><li>The local-part of each name is an exact match, AND</li>
<li>The host-part of each name matches using a case-insensitive
         ASCII comparison.</li>
</ol>

<t>
   Implementations that have a user interface <bcp14>SHOULD</bcp14> convert the
   host-part of internationalized email addresses specified in these
   extensions to Unicode before display.  Specifically, conforming
   implementations convert A-labels to U-labels for display purposes.</t>

<t>   7.5.2.  Local-Part Contains Non-ASCII Characters</t>

<t>   When the local-part contains non-ASCII characters, conforming
   implementations <bcp14>MUST</bcp14> place the internationalized email address in the
   SmtpUTF8Mailbox within the otherName choice of GeneralName as
   specified in Section <xref target="RFC8398" section="3" sectionFormat="bare"/> of RFC 8398 <xref target="RFC8398"/>.  Note that the UTF8
   encoding of the internationalized email address <bcp14>MUST NOT</bcp14> contain a
   Byte-Order-Mark (BOM) <xref target="RFC3629"/> to aid comparison.  The email address
   local-part within the SmtpUTF8Mailbox <bcp14>MUST</bcp14> conform to the
   requirements of <xref target="RFC6530"/> and <xref target="RFC6531"/>.</t>

<t>   Two email addresses are considered to match if:</t>

<ol type="%d)"><li>The local-part of each name is an exact match, AND</li>
<li>The host-part of each name matches using a case-insensitive
         ASCII comparison.</li>
</ol>
<t>
   Implementations that have a user interface <bcp14>SHOULD</bcp14> convert the
   host-part of internationalized email addresses specified in these
   extensions to Unicode before display.  Specifically, conforming
   implementations convert A-labels to U-labels for display purposes.
</t>
</blockquote>
      </section>
    </section>
    <section anchor="sec-cons">
      <name>Security Considerations</name>

      <t>The Security Considerations related to internationalized names in 
<xref section="4" sectionFormat="of" target="RFC5890"/> are relevant to this specification.
</t>
      <t>Conforming Certification Authorities (CAs) <bcp14>SHOULD</bcp14> ensure that IDNs are valid according to IDNA2008, which
is defined in <xref target="RFC5890"/>, <xref target="RFC5891"/>, <xref target="RFC5892"/>, <xref target="RFC5893"/>, <xref target="RFC5894"/>,
and the updates to these documents.  Failure to use valid A-labels may yield a
domain name that cannot be correctly represented in the Domain Name System
(DNS).  In addition, the CA/Browser Forum offers some
guidance regarding internal server names in certificates <xref target="CABF"/>.</t>
      <t>An earlier version of this specification <xref target="RFC8399"/> required conversion
of A-labels to U-labels in order to process name constraints for
internationalized email addresses in SmtpUTF8Mailbox other names.  This
led to implementation complexity and at least two security vulnerabilities.
Now, all IDNs are carried and processed
as A-labels.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>

	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3492.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3629.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3987.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4518.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5890.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5891.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5892.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5893.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6530.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6531.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8398.xml"/>
      </references>

      <references anchor="sec-informative-references">
        <name>Informative References</name>

	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3490.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5894.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8399.xml"/>

        <reference anchor="CABF" target="https://cabforum.org/internal-names/">
          <front>
            <title>Internal Server Names and IP Address Requirements for SSL: Guidance on the Deprecation of Internal Server Names and Reserved IP Addresses provided by the CA/Browser Forum</title>
            <author>
              <organization>CA/Browser Forum</organization>
            </author>
            <date year="2012" month="June"/>
          </front>
<refcontent>Version 1.0</refcontent>
        </reference>

        <reference anchor="DDHQ" target="https://securitylabs.datadoghq.com/articles/openssl-november-1-vulnerabilities/">
          <front>
            <title>The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation</title>
            <author>
              <organization>Datadog Security Labs</organization>
            </author>
            <date year="2022" month="November" day="01"/>
          </front>
        </reference>

        <reference anchor="UTS46" target="https://www.unicode.org/reports/tr46">
          <front>
            <title>Unicode Technical Standard #46: Unicode IDNA Compatibility Processing</title>
            <author initials="M." surname="Davis" fullname="Mark Davis">
              <organization/>
            </author>
            <author initials="M." surname="Suignard" fullname="Michel Suignard">
              <organization/>
            </author>
            <date year="2023" month="September"/>
          </front>
          <refcontent>Revision 31, The Unicode Consortium, Mountain View</refcontent>
        </reference>
      </references>
    </references>

    <section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Thanks to <contact fullname="David Benjamin"/> and <contact fullname="Wei Chuang"/>
for identifying the issue and a solution.</t>
      <t>Thanks to <contact fullname="Takahiro Nemoto"/>,
<contact fullname="John Klensin"/>, <contact fullname="Mike Ounsworth"/>, and <contact fullname="Orie Steele"/> for their
careful review and thoughtful comments.</t>
    </section>
  </back>
</rfc>
