<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc compact="yes"?>
<?rfc strict="yes"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>

<rfc category="std" docName="draft-ietf-precis-saslprepbis-16" ipr="trust200902" obsoletes="4013">

  <front>

    <title abbrev="PRECIS: Usernames and Passwords">Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords</title>

    <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
      <organization>&amp;yet</organization>
      <address>
        <email>peter@andyet.com</email>
        <uri>https://andyet.com/</uri>
      </address>
    </author>
    <author initials="A." surname="Melnikov" fullname="Alexey Melnikov">
      <organization>Isode Ltd</organization>
      <address>
        <postal>
          <street>5 Castle Business Village</street>
          <street>36 Station Road</street>
          <city>Hampton</city>
          <region>Middlesex</region>
          <code>TW12 2BX</code>
          <country>UK</country>
        </postal>
        <email>Alexey.Melnikov@isode.com</email>
      </address>
    </author>

    <date/>

    <area>Applications</area>
    <workgroup>PRECIS</workgroup>
    <keyword>Username</keyword>
    <keyword>Password</keyword>
    <keyword>Unicode</keyword>
    <keyword>Internationalization</keyword>
    <keyword>i18n</keyword>
    <keyword>Authentication</keyword>
    <keyword>SASLprep</keyword>

    <abstract>
      <t>This document describes updated methods for handling Unicode strings representing usernames and passwords.  The previous approach was known as SASLprep (RFC 4013) and was based on Stringprep (RFC 3454).  The methods specified in this document provide a more sustainable approach to the handling of internationalized usernames and passwords. The PRECIS framework, RFC YYYY, obsoletes RFC 3454, and this document obsoletes RFC 4013.</t>
      <t>[[ NOTE TO RFC EDITOR: please replace "YYYY" in the previous paragraph with the RFC number assigned to draft-ietf-precis-framework. ]]</t>
    </abstract>

  </front>

  <middle>

  <section title="Introduction" anchor="intro">

    <t>Usernames and passwords are widely used for authentication and authorization on the Internet, either directly when provided in plaintext (as in the SASL PLAIN mechanism <xref target='RFC4616'/> or the HTTP Basic scheme <xref target='I-D.ietf-httpauth-basicauth-update'/>) or indirectly when provided as the input to a cryptographic algorithm such as a hash function (as in the SASL SCRAM mechanism <xref target='RFC5802'/> or the HTTP Digest scheme <xref target='I-D.ietf-httpauth-digest'/>).</t>
    <t>To increase the likelihood that the input and comparison of usernames and passwords will work in ways that make sense for typical users throughout the world, this document defines rules for preparing, enforcing, and comparing internationalized strings that represent usernames and passwords.  Such strings consist of characters from the Unicode character set <xref target="Unicode"/>, with special attention to characters outside the ASCII range <xref target='RFC20'/>.  The rules for handling such strings are specified through profiles of the string classes defined in the PRECIS framework specification <xref target='I-D.ietf-precis-framework'/>.</t>
    <t>Profiles of the PRECIS framework enable software to handle Unicode characters outside the ASCII range in an automated way, so that such characters are treated carefully and consistently in application protocols.  In large measure, these profiles are designed to protect application developers from the potentially negative consequences of supporting the full range of Unicode characters.  For instance, in almost all application protocols it would be dangerous to treat the Unicode character SUPERSCRIPT ONE (U+0089) as equivalent to DIGIT ONE (U+0031), since that would result in false positives during comparison, authentication, and authorization (e.g., an attacker could easy spoof an account "user1@example.com").</t>
    <t>Whereas a naive use of Unicode would make such attacks trivially easy, the PRECIS profile defined here for usernames generally protects applications from inadvertently causing such problems.  (Similar considerations apply to passwords, although here it is desirable to support a wider range of characters so as to maximize entropy during authentication.)</t>
    <t>The methods defined here might be applicable wherever usernames or passwords are used.  However, the methods are not intended for use in preparing strings that are not usernames (e.g., LDAP distinguished names), nor in cases where identifiers or secrets are not strings (e.g., keys and certificates) or require specialized handling.</t>
    <t>This document obsoletes RFC 4013 (the "SASLprep" profile of stringprep <xref target='RFC3454'/>) but can be used by technologies other than the Simple Authentication and Security Layer (SASL) <xref target='RFC4422'/>, such as HTTP authentication as specified in <xref target='I-D.ietf-httpauth-basicauth-update'/> and <xref target='I-D.ietf-httpauth-digest'/>.</t>
    <t>This document does not modify the handling of internationalized strings in usernames and passwords as prescribed by existing application protocols that use SASLprep.  If the community that uses such an application protocol wishes to modernize its handling of internationalized strings to use PRECIS instead of stringprep, it needs to explicitly update the existing application protocol definition (one example is <xref target='I-D.ietf-xmpp-6122bis'/>, which obsoletes <xref target='RFC6122'/>).  Non-coordinated updates to protocol implementations are discouraged because they can have a negative impact on interoperability and security.</t>
  </section>

  <section title="Terminology" anchor="terms">
    <t>Many important terms used in this document are defined in <xref target='I-D.ietf-precis-framework'/>, <xref target='RFC5890'/>, <xref target='RFC6365'/>, and <xref target='Unicode'/>.  The term "non-ASCII space" refers to any Unicode code point having a general category of "Zs", with the exception of U+0020 (here called "ASCII space").</t>
    <t>As used here, the term "password" is not literally limited to a word; i.e., a password could be a passphrase consisting of more than one word, perhaps separated by spaces, punctuation, or other non-alphanumeric characters.</t>
    <t>Some SASL mechanisms (e.g., CRAM-MD5, DIGEST-MD5, and SCRAM) specify that the authentication identity used in the context of such mechanisms is a "simple user name" (see Section 2 of <xref target='RFC4422'/> as well as <xref target='RFC4013'/>).  Various application technologies also assume that the identity of a user or account takes the form of a username (e.g., authentication for the HyperText Transfer Protocol as specified in <xref target='I-D.ietf-httpauth-basicauth-update'/> and <xref target='I-D.ietf-httpauth-digest'/>), whether or not they use SASL.  Note well that the exact form of a username in any particular SASL mechanism or application technology is a matter for implementation and deployment, and that a username does not necessarily map to any particular application identifier (such as the localpart of an email address).</t>
    <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 <xref target='RFC2119'/>.</t>
  </section>

  <section title='Usernames' anchor='username'>

    <section title='Definition' anchor='username-definition'>
      <t>This document specifies that a username is a string of Unicode code points <xref target='Unicode'/>, encoded using UTF-8 <xref target='RFC3629'/>, and structured as an ordered sequence of "userparts" (where the complete username can consist of a single userpart or a space-separated sequence of userparts).</t>
      <t>The syntax for a username is defined as follows using the Augmented Backus-Naur Form (ABNF) <xref target="RFC5234"/>.</t>
      <figure>
        <artwork><![CDATA[
   username   = userpart *(1*SP userpart)
   userpart   = 1*(idbyte)
                ;
                ; an "idbyte" is a byte used to represent a 
                ; UTF-8 encoded Unicode code point that can be
                ; contained in a string that conforms to the 
                ; PRECIS "IdentifierClass"
                ;
        ]]></artwork>
      </figure>
      <t>All code points and blocks not explicitly allowed in the PRECIS IdentifierClass are disallowed; this includes private use characters, surrogate code points, and the other code points and blocks that were defined as "Prohibited Output" in <xref target='RFC4013'/>.  In addition, common constructions such as "user@example.com" (e.g., the Network Access Identifier from <xref target='I-D.ietf-radext-nai'/>) are allowed as usernames under this specification, as they were under <xref target='RFC4013'/>.</t>
      <t><list style='empty'><t>Implementation Note: The username construct defined in this document does not necessarily match what all deployed applications might refer to as a "username" or "userid", but instead provides a relatively safe subset of Unicode characters that can be used in existing SASL mechanisms and SASL-using application protocols, and even in most application protocols that do not currently use SASL.</t></list></t>
      <t>A username MUST NOT be zero bytes in length.  This rule is to be enforced after any normalization and mapping of code points.</t>
      <t>In protocols that provide usernames as input to a cryptographic algorithm such as a hash function, the client will need to perform proper preparation of the username before applying the algorithm.</t>
      <t>This specification defines two profiles for usernames: one that performs case mapping and one that performs case preservation (see further discussion under <xref target='username-case'/>).</t>
    </section>

    <section title='UsernameCaseMapped Profile' anchor='usernamecasemapped'>
      <t>The definition of the UsernameCaseMapped profile of the IdentifierClass is provided in the following sections, including detailed information about preparation, enforcement, and comparison (on the distinction between these actions, refer to <xref target='I-D.ietf-precis-framework'/>).</t>
      <section title="Preparation" anchor="usernamecasemapped-preparation">
        <t>An entity that prepares a string according to this profile MUST ensure that the string consists only of Unicode code points that conform to the "IdentifierClass" base string class defined in <xref target='I-D.ietf-precis-framework'/>.  In addition, the string MUST be encoded as UTF-8 <xref target='RFC3629'/>.</t>
      </section>
      <section title="Enforcement" anchor="usernamecasemapped-enforcement">
        <t>An entity that performs enforcement according to this profile MUST prepare a string as described in the previous section and MUST also apply the rules specified below for the UsernameCaseMapped profile (these rules MUST be applied in the order shown).</t>
        <t>
          <list style='numbers'>
            <t>Width Mapping Rule: Fullwidth and halfwidth characters MUST be mapped to their decomposition mappings.</t>
            <t>Additional Mapping Rule: There is no additional mapping rule.</t>
            <t>Case Mapping Rule: Uppercase and titlecase characters MUST be mapped to their lowercase equivalents, preferably using Unicode Default Case Folding as defined in the Unicode Standard <xref target='Unicode'/> (at the time of this writing, the algorithm is specified in Chapter 3 of <xref target='Unicode7.0'/>).</t>
            <t>Normalization Rule: Unicode Normalization Form C (NFC) MUST be applied to all characters.</t>
            <t>Directionality Rule: Applications MUST apply the "Bidi Rule" defined in <xref target='RFC5893'/> to strings that contain right-to-left characters (i.e., each of the six conditions of the Bidi Rule must be satisfied).</t>
          </list>
        </t>
      </section>
      <section title="Comparison" anchor="usernamecasemapped-comparison">
        <t>An entity that performs comparison of two strings according to this profile MUST prepare each string and enforce the rules specified in the previous two sections.  The two strings are to be considered equivalent if they are an exact octet-for-octet match (sometimes called "bit-string identity").</t> 
      </section>
    </section>

    <section title='UsernameCasePreserved Profile' anchor='usernamecasepreserved'>
      <t>The definition of the UsernameCasePreserved profile of the IdentifierClass is provided in the following sections, including detailed information about preparation, enforcement, and comparison (on the distinction between these actions, refer to <xref target='I-D.ietf-precis-framework'/>).</t>
      <section title="Preparation" anchor="usernamecasepreserved-preparation">
        <t>An entity that prepares a string according to this profile MUST ensure that the string consists only of Unicode code points that conform to the "IdentifierClass" base string class defined in <xref target='I-D.ietf-precis-framework'/>.  In addition, the string MUST be encoded as UTF-8 <xref target='RFC3629'/>.</t>
      </section>
      <section title="Enforcement" anchor="usernamecasepreserved-enforcement">
        <t>An entity that performs enforcement according to this profile MUST prepare a string as described in the previous section and MUST also apply the rules specified below for the UsernameCasePreserved profile (these rules MUST be applied in the order shown).</t>
        <t>
          <list style='numbers'>
            <t>Width Mapping Rule: Fullwidth and halfwidth characters MUST be mapped to their decomposition mappings.</t>
            <t>Additional Mapping Rule: There is no additional mapping rule.</t>
            <t>Case Mapping Rule: Uppercase and titlecase characters MUST NOT be mapped to their lowercase equivalents.</t>
            <t>Normalization Rule: Unicode Normalization Form C (NFC) MUST be applied to all characters.</t>
            <t>Directionality Rule: Applications MUST apply the "Bidi Rule" defined in <xref target='RFC5893'/> to strings that contain right-to-left characters (i.e., each of the six conditions of the Bidi Rule must be satisfied).</t>
          </list>
        </t>
      </section>
      <section title="Comparison" anchor="usernamecasepreserved-comparison">
        <t>An entity that performs comparison of two strings according to this profile MUST prepare each string and enforce the rules specified in the previous two sections.  The two strings are to be considered equivalent if they are an exact octet-for-octet match (sometimes called "bit-string identity").</t> 
      </section>
    </section>

    <section title='Case Mapping vs. Case Preservation' anchor='username-case'>
      <t>In order to accommodate the widest range of username constructs in applications, this document defines two username profiles: UsernameCaseMapped and UsernameCasePreserved.  These two profiles differ only in the Case Mapping Rule, and are otherwise identical.</t>
      <t>Case mapping is a matter for the application protocol, protocol implementation, or end deployment.  In general, this document suggests that it is preferable to apply the UsernameCaseMapped profile and therefore perform case mapping, since not doing so can lead to false positives during authentication and authorization (as described in <xref target='RFC6943'/>) and can result in confusion among end users given the prevalence of case mapping in many existing protocols and applications.  However, there can be good reasons to apply the UsernameCasePreserved profile and thus not perform case mapping, such as backward compatibility with deployed infrastructure.</t>
      <t>In particular:</t>
      <t>
        <list style='symbols'>
          <t>SASL mechanisms that follow the recommendations in this document MUST specify whether and when case mapping is to be applied to authentication identifiers.  SASL mechanisms SHOULD delay any case mapping to the last possible moment, such as when doing a lookup by username, username comparisons, or generating a cryptographic salt from a username (if the last possible moment happens on the server, then decisions about case mapping can be a matter of deployment policy).  In keeping with <xref target='RFC4422'/>, SASL mechanisms are not to apply this or any other profile to authorization identifiers.</t>
          <t>Application protocols that use SASL (such as IMAP <xref target='RFC3501'/> and XMPP <xref target='RFC6120'/>) and that directly re-use this profile MUST specify whether case mapping is to be applied to authorization identifiers.  Such "SASL application protocols" SHOULD delay any case mapping of authorization identifiers to the last possible moment, which happens to necessarily be on the server side (this enables decisions about case mapping to be a matter of deployment policy).  In keeping with <xref target='RFC4422'/>, SASL application protocols are not to apply this or any other profile to authentication identifiers.</t>
          <t>Application protocols that do not use SASL (such as HTTP authentication with the Basic and Digest schemes as specified in <xref target='I-D.ietf-httpauth-basicauth-update'/> and <xref target='I-D.ietf-httpauth-digest'/>) but that directly re-use this profile MUST specify whether and when case mapping is to be applied to authentication identifiers and authorization identifiers.  Such "non-SASL application protocols" SHOULD delay any case mapping to the last possible moment, such as when doing a lookup by username, username comparisons, or generating a cryptographic salt from a username (if the last possible moment happens on the server, then decisions about case mapping can be a matter of deployment policy).</t>
        </list>
      </t>
      <t>If the specification for a SASL mechanism, SASL application protocol, or non-SASL application protocol uses the UsernameCaseMapped profile, it MUST clearly describe whether case mapping is to be applied at the level of the protocol itself, implementations thereof, or service deployments (all of these approaches can be legitimate depending on the application in question).</t> 
    </section>

    <section title="Application-Layer Constructs" anchor="username-app">
      <t>Both the UsernameCaseMapped and UsernameCasePreserved profiles enable an application protocol, implementation, or deployment to create application-layer constructs such as a space-separated set of names like "Firstname Middlename Lastname".  Although such a construct is not a PRECIS profile (since U+0020 SPACE is not allowed in the IdentifierClass), it can be created at the application layer because U+0020 SPACE can be used as a separator between instances of the PRECIS IdentifierClass (or a profile thereof).</t>
    </section>

    <section title="Examples" anchor="username-examples">
      <t>The following examples illustrate a small number of userparts (not usernames) that are consistent with the format defined above (note that the characters &lt; and &gt; are used here to delineate the actual userparts and are not part of the userpart strings).</t>
      <figure>
        <preamble>Table 1: A sample of legal userparts</preamble>
        <artwork><![CDATA[
+--------------------------+---------------------------------+
| # | Userpart             | Notes                           |
+--------------------------+---------------------------------+
| 1 | <juliet@example.com> | The at-sign is allowed in the   |
|   |                      | PRECIS IdentifierClass          |
+--------------------------+---------------------------------+
| 2 | <fussball>           |                                 |
+--------------------------+---------------------------------+
| 3 | <fu&#xDF;ball>       | The third character is LATIN    |
|   |                      | SMALL LETTER SHARP S (U+00DF)   |
+--------------------------+---------------------------------+
| 4 | <&#x3C0;>            | A userpart of GREEK SMALL       |
|   |                      | LETTER PI (U+03C0)              |
+--------------------------+---------------------------------+
| 5 | <&#x3A3;>            | A userpart of GREEK CAPITAL     |
|   |                      | LETTER SIGMA (U+03A3)           |
+--------------------------+---------------------------------+
| 6 | <&#x3C3;>            | A userpart of GREEK SMALL       |
|   |                      | LETTER SIGMA (U+03C3)           |
+--------------------------+---------------------------------+
| 7 | <&#x3C2;>            | A userpart of GREEK SMALL       |
|   |                      | LETTER FINAL SIGMA (U+03C2)     |
+--------------------------+---------------------------------+
        ]]></artwork>
      </figure>
      <t>Several points are worth noting.  Regarding examples 2 and 3: although in German the character eszett (LATIN SMALL LETTER SHARP S, U+00DF) can mostly be used interchangeably with the two characters "ss", the userparts in these examples are different and (if desired) a server would need to enforce a registration policy that disallows one of them if the other is registered.  Regarding examples 5, 6, and 7: optional case-mapping of GREEK CAPITAL LETTER SIGMA (U+03A3) to lowercase (i.e., to GREEK SMALL LETTER SIGMA, U+03C3) during comparison would result in matching the userparts in examples 5 and 6; however, because the PRECIS mapping rules do not account for the special status of GREEK SMALL LETTER FINAL SIGMA (U+03C2), the userparts in examples 5 and 7 or examples 6 and 7 would not be matched during comparison.</t>
      <t>The following examples illustrate strings that are not valid userparts (not usernames) because they violate the format defined above.</t>
      <figure>
        <preamble>Table 2: A sample of strings that violate the userpart rule</preamble>
        <artwork><![CDATA[
+--------------------------+---------------------------------+
| # | Non-Userpart string  | Notes                           |
+--------------------------+---------------------------------+
| 8 | <foo bar>            | Space (U+0020) is disallowed in |
|   |                      | the userpart                    |
+--------------------------+---------------------------------+
| 9 | <>                   | Zero-length userpart            |
+--------------------------+---------------------------------+
| 10| <henry&#x2163;>      | The sixth character is ROMAN    |
|   |                      | NUMERAL FOUR (U+2163)           |
+--------------------------+---------------------------------+
| 11| <&#x265A;>           | A localpart of BLACK CHESS KING | 
|   |                      | (U+265A)                        |
+--------------------------+---------------------------------+
        ]]></artwork>
      </figure>
      <t>Here again, several points are worth noting.  Regarding example 10, the Unicode character ROMAN NUMERAL FOUR (U+2163) has a compatibility equivalent of the string formed of LATIN CAPITAL LETTER I (U+0049) and LATIN CAPITAL LETTER V (U+0056), but characters with compatibility equivalents are not allowed in the PRECIS IdentiferClass.  Regarding example 11: symbol characters such as BLACK CHESS KING (U+265A) are not allowed in the PRECIS IdentifierClass.</t>
    </section>

  </section>

  <section title='Passwords' anchor='password'>

    <section title='Definition' anchor='password-definition'>
      <t>This document specifies that a password is a string of Unicode code points <xref target='Unicode'/>, encoded using UTF-8 <xref target='RFC3629'/>, and conformant to OpaqueString profile of the PRECIS FreeformClass specified below.</t>
      <t>The syntax for a password is defined as follows using the Augmented Backus-Naur Form (ABNF) <xref target="RFC5234"/>.</t>
      <figure>
        <artwork><![CDATA[
   password   = 1*(freebyte)
                ;
                ; a "freebyte" is a byte used to represent a 
                ; UTF-8 encoded Unicode code point that can be
                ; contained in a string that conforms to the 
                ; PRECIS "FreeformClass"
                ;
        ]]></artwork>
      </figure>
      <t>All code points and blocks not explicitly allowed in the PRECIS FreeformClass are disallowed; this includes private use characters, surrogate code points, and the other code points and blocks defined as "Prohibited Output" in Section 2.3 of RFC 4013.</t>
      <t>A password MUST NOT be zero bytes in length.  This rule is to be enforced after any normalization and mapping of code points.</t>
      <t><list style='empty'><t>Note: The prohibition on zero-length passwords is not a recommendation regarding password strength (since a password of only one byte is highly insecure), but is meant to prevent applications from omitting a password entirely.</t></list></t>
      <t>In protocols that provide passwords as input to a cryptographic algorithm such as a hash function, the client will need to perform proper preparation of the password before applying the algorithm, since the password is not available to the server in plaintext form.</t>
    </section>

    <section title='OpaqueString Profile' anchor='opaquestring-profile'>
      <t>The definition of the OpaqueString profile is provided in the following sections, including detailed information about preparation, enforcement, and comparison (on the distinction between these actions, refer to <xref target='I-D.ietf-precis-framework'/>).</t>
      <section title="Preparation" anchor="opaquestring-profile-preparation">
        <t>An entity that prepares a string according to this profile MUST ensure that the string consists only of Unicode code points that conform to the "FreeformClass" base string class defined in <xref target='I-D.ietf-precis-framework'/>.  In addition, the string MUST be encoded as UTF-8 <xref target='RFC3629'/>.</t>
      </section>
      <section title="Enforcement" anchor="opaquestring-profile-enforcement">
        <t>An entity that performs enforcement according to this profile MUST prepare a string as described in the previous section and MUST also apply the rules specified below (these rules MUST be applied in the order shown).</t>
        <t>
          <list style='numbers'>
            <t>Width Mapping Rule: Fullwidth and halfwidth characters MUST NOT be mapped to their decomposition mappings.</t>
            <t>Additional Mapping Rule: Any instances of non-ASCII space MUST be mapped to ASCII space (U+0020); a non-ASCII space is any Unicode code point having a general category of "Zs", naturally with the exception of U+0020.</t>
            <t>Case Mapping Rule: Uppercase and titlecase characters MUST NOT be mapped to their lowercase equivalents.</t>
            <t>Normalization Rule: Unicode Normalization Form C (NFC) MUST be applied to all characters.</t>
            <t>Directionality Rule: There is no directionality rule. The "Bidi Rule" (defined in <xref target='RFC5893'/>) and similar rules are unnecessary and inapplicable to passwords, since they can reduce the range of characters that are allowed in a string and therefore reduce the amount of entropy that is possible in a password.  Such rules are intended to minimize the possibility that the same string will be displayed differently on a layout system set for right-to-left display and a layout system set for left-to-right display; however, passwords are typically not displayed at all and are rarely meant to be interoperable across different layout systems in the way that non-secret strings like domain names and usernames are.  Furthermore, it is perfectly acceptable for opaque strings other than passwords to be presented differently in different layout systems, as long as the presentation is consistent in any given layout system.</t>
          </list>
        </t>
      </section>
      <section title="Comparison" anchor="opaquestring-profile-comparison">
        <t>An entity that performs comparison of two strings according to this profile MUST prepare each string and enforce the rules specified in the previous two sections.  The two strings are to be considered equivalent if they are an exact octet-for-octet match (sometimes called "bit-string identity").</t> 
      </section>
    </section>

    <section title="Examples" anchor="password-examples">
      <t>The following examples illustrate a small number of passwords that are consistent with the format defined above (note that the characters &lt; and &gt; are used here to delineate the actual passwords and are not part of the password strings).</t>
      <figure>
        <preamble>Table 3: A sample of legal passwords</preamble>
        <artwork><![CDATA[
+------------------------------------+------------------------------+
| # | Password                       | Notes                        |
+------------------------------------+------------------------------+
| 12| <correct horse battery staple> | ASCII space is allowed       |
+------------------------------------+------------------------------+
| 13| <Correct Horse Battery Staple> | Different from example 12    |
+------------------------------------+------------------------------+
| 14| <&#x3C0;&#xDF;&#xE5;>          | Non-ASCII letters are OK     |
|   |                                | (e.g., GREEK SMALL LETTER    |
|   |                                | PI, U+03C0)                  |
+------------------------------------+------------------------------+
| 15| <Jack of &#x2666;s>            | Symbols are OK (e.g., BLACK  |
|   |                                | DIAMOND SUIT, U+2666)        |
+------------------------------------+------------------------------+
| 16| <foo&#x1680;bar>               | OGHAM SPACE MARK, U+1680, is |
|   |                                | mapped to U+0020 and thus    |
|   |                                | the full string is mapped to |
|   |                                | <foo bar>                    |
+------------------------------------+------------------------------+
        ]]></artwork>
      </figure>
      <t>The following example illustrates a string that is not a valid password because it violates the format defined above.</t>
      <figure>
        <preamble>Table 4: A string that violates the password rules</preamble>
        <artwork><![CDATA[
+------------------------------------+------------------------------+
| # | Password                       | Notes                        |
+------------------------------------+------------------------------+
| 17| <my cat is a &#x9;by>          | Controls are disallowed      |
+------------------------------------+------------------------------+
        ]]></artwork>
      </figure>
    </section>

  </section>

  <section title="Use in Application Protocols" anchor="use">
    <t>This specification defines only the PRECIS-based rules for handling of strings conforming to the UsernameCaseMapped and UsernameCasePreserved profiles of the PRECIS IdentifierClass, and strings conforming to the OpaqueString profile of the PRECIS FreeformClass.  It is the responsibility of an application protocol to specify the protocol slots in which such strings can appear, the entities that are expected to enforce the rules governing such strings, and when in protocol processing or interface handling the rules need to be enforced.  See Section 6 of <xref target='I-D.ietf-precis-framework'/> for guidelines about using PRECIS profiles in applications.</t>
    <t>Above and beyond the PRECIS-based rules specified here, application protocols can also define application-specific rules governing such strings (rules regarding minimum or maximum length, further restrictions on allowable characters or character ranges, safeguards to mitigate the effects of visually similar characters, etc.), application-layer constructs (see <xref target='username-app'/>), and related matters.</t>
    <t>Some PRECIS profile definitions encourage entities that enforce the rules to be liberal in what they accept.  However, for usernames and passwords such a policy can be problematic since it can lead to false positives.  An in-depth discussion can be found in "Issues in Identifier Comparison for Security Purposes" <xref target='RFC6943'/>.</t>
  </section>

  <section title="Migration" anchor='migration'>

      <t>The rules defined in this specification differ slightly from those defined by the SASLprep specification <xref target='RFC4013'/>.  The following sections describe these differences, along with their implications for migration, in more detail.</t>

    <section title='Usernames' anchor='migration-usernames'>
      <t>Deployments that currently use SASLprep for handling usernames might need to scrub existing data when migrating to use of the rules defined in this specification.  In particular:</t>
      <t>
        <list style='symbols'>
          <t>SASLprep specified the use of Unicode Normalization Form KC (NFKC), whereas the UsernameCaseMapped and UsernameCasePreserved profiles employ Unicode Normalization Form C (NFC).  In practice this change is unlikely to cause significant problems, because NFKC provides methods for mapping Unicode code points with compatibility equivalents to those equivalents, whereas the PRECIS IdentifierClass entirely disallows Unicode code points with compatibility equivalents (i.e., during comparison NFKC is more "aggressive" about finding matches than NFC).  A few examples might suffice to indicate the nature of the problem:
          <list style='numbers'>
            <t>U+017F LATIN SMALL LETTER LONG S is compatibility equivalent to U+0073 LATIN SMALL LETTER S</t>
            <t>U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER V</t>
            <t>U+FB01 LATIN SMALL LIGATURE FI is compatibility equivalent to U+0066 LATIN SMALL LETTER F and U+0069 LATIN SMALL LETTER I</t>
          </list>
          Under SASLprep, the use of NFKC also handled the mapping of fullwidth and halfwidth code points to their decomposition mappings.  Although it is expected that code points with compatibility equivalents are rare in existing usernames, for migration purposes deployments might want to search their database of usernames for Unicode code points with compatibility equivalents and map those code points to their compatibility equivalents.</t>
          <t>SASLprep mapped the "characters commonly mapped to nothing" from Appendix B.1 of <xref target='RFC3454'/>) to nothing, whereas the PRECIS IdentifierClass entirely disallows most of these characters, which correspond to the code points from the "M" category defined under Section 8.13 of <xref target='I-D.ietf-precis-framework'/> (with the exception of U+1806 MONGOLIAN TODO SOFT HYPHEN, which was "commonly mapped to nothing" in Unicode 3.2 but at the time of this writing does not have a derived property of Default_Ignorable_Code_Point in Unicode 7.0).  For migration purposes, deployments might want to remove code points contained in the PRECIS "M" category from usernames.</t>
          <t>SASLprep allowed uppercase and titlecase characters, whereas the UsernameCaseMapped profile maps uppercase and titlecase characters to their lowercase equivalents (by contrast, the UsernameCasePreserved profile matches SASLprep in this regard).  For migration purposes, deployments can either use the UsernameCaseMapped profile (thus losing the case information) or use the UsernameCasePreserved profile (thus ignoring case difference when comparing usernames).</t>
        </list>
      </t>
    </section>

    <section title='Passwords' anchor='migration-passwords'>
      <t>Depending on local service policy, migration from RFC 4013 to this specification might not involve any scrubbing of data (since passwords might not be stored in the clear anyway); however, service providers need to be aware of possible issues that might arise during migration.  In particular:</t>
      <t>
        <list style='symbols'>
          <t>SASLprep specified the use of Unicode Normalization Form KC (NFKC), whereas the OpaqueString profile employs Unicode Normalization Form C (NFC).  Because NFKC is more aggressive about finding matches than NFC, in practice this change is unlikely to cause significant problems and indeed has the security benefit of probably resulting in fewer false positives when comparing passwords.  A few examples might suffice to indicate the nature of the problem:
          <list style='numbers'>
            <t>U+017F LATIN SMALL LETTER LONG S is compatibility equivalent to U+0073 LATIN SMALL LETTER S</t>
            <t>U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER V</t>
            <t>U+FB01 LATIN SMALL LIGATURE FI is compatibility equivalent to U+0066 LATIN SMALL LETTER F and U+0069 LATIN SMALL LETTER I</t>
          </list>
          Under SASLprep, the use of NFKC also handled the mapping of fullwidth and halfwidth code points to their decomposition mappings.  Although it is expected that code points with compatibility equivalents are rare in existing passwords, some passwords that matched when SASLprep was used might no longer work when the rules in this specification are applied.</t>
          <t>SASLprep mapped the "characters commonly mapped to nothing" from Appendix B.1 of <xref target='RFC3454'/>) to nothing, whereas the PRECIS FreeformClass entirely disallows such characters, which correspond to the code points from the "M" category defined under Section 8.13 of <xref target='I-D.ietf-precis-framework'/> (with the exception of U+1806 MONGOLIAN TODO SOFT HYPHEN, which was commonly mapped to nothing in Unicode 3.2 but at the time of this writing is allowed by Unicode 7.0).  In practice, this change will probably have no effect on comparison, but user-oriented software might reject such code points instead of ignoring them during password preparation.</t>
        </list>
      </t>
    </section>

  </section>

  <section title="IANA Considerations" anchor="iana">

    <t>The IANA shall add the following entries to the PRECIS Profiles Registry.</t>

    <section title="UsernameCaseMapped Profile" anchor="iana-usernamecasemapped">
      <t>
        <list style='hanging'>
          <t hangText='Name:'>UsernameCaseMapped.</t>
          <t hangText='Base Class:'>IdentifierClass.</t>
          <t hangText='Applicability:'>Usernames in security and application protocols.</t>
          <t hangText='Replaces:'>The SASLprep profile of Stringprep.</t>
          <t hangText='Width Mapping Rule:'>Map fullwidth and halfwidth characters to their decomposition mappings.</t>
          <t hangText='Additional Mapping Rule:'>None.</t>
          <t hangText='Case Mapping Rule:'>Map uppercase and titlecase characters to lowercase.</t>
          <t hangText='Normalization Rule:'>NFC.</t>
          <t hangText='Directionality Rule:'>The "Bidi Rule" defined in RFC 5893 applies.</t>
          <t hangText='Enforcement:'>To be defined by security or application protocols that use this profile.</t>
          <t hangText='Specification:'>RFC XXXX. [Note to RFC Editor: please change XXXX to the number issued for this specification.]</t>
        </list>
      </t>
    </section>

    <section title="UsernameCasePreserved Profile" anchor="iana-usernamecasepreserved">
      <t>
        <list style='hanging'>
          <t hangText='Name:'>UsernameCasePreserved.</t>
          <t hangText='Base Class:'>IdentifierClass.</t>
          <t hangText='Applicability:'>Usernames in security and application protocols.</t>
          <t hangText='Replaces:'>The SASLprep profile of Stringprep.</t>
          <t hangText='Width Mapping Rule:'>Map fullwidth and halfwidth characters to their decomposition mappings.</t>
          <t hangText='Additional Mapping Rule:'>None.</t>
          <t hangText='Case Mapping Rule:'>None.</t>
          <t hangText='Normalization Rule:'>NFC.</t>
          <t hangText='Directionality Rule:'>The "Bidi Rule" defined in RFC 5893 applies.</t>
          <t hangText='Enforcement:'>To be defined by security or application protocols that use this profile.</t>
          <t hangText='Specification:'>RFC XXXX. [Note to RFC Editor: please change XXXX to the number issued for this specification.]</t>
        </list>
      </t>
    </section>

    <section title="OpaqueString Profile" anchor="iana-password">
      <t>
        <list style='hanging'>
          <t hangText='Name:'>OpaqueString.</t>
          <t hangText='Base Class:'>FreeformClass.</t>
          <t hangText='Applicability:'>Passwords and other opaque strings in security and application protocols.</t>
          <t hangText='Replaces:'>The SASLprep profile of Stringprep.</t>
          <t hangText='Width Mapping Rule:'>None.</t>
          <t hangText='Additional Mapping Rule:'>Map non-ASCII space characters to ASCII space.</t>
          <t hangText='Case Mapping Rule:'>None.</t>
          <t hangText='Normalization Rule:'>NFC.</t>
          <t hangText='Directionality Rule:'>None.</t>
          <t hangText='Enforcement:'>To be defined by security or application protocols that use this profile.</t>
          <t hangText='Specification:'>RFC XXXX. [Note to RFC Editor: please change XXXX to the number issued for this specification.]</t>
        </list>
      </t>
    </section>
  </section>

  <section title="Security Considerations" anchor="security">
    <section title="Password/Passphrase Strength" anchor="security-passwords">
      <t>The ability to include a wide range of characters in passwords and passphrases can increase the potential for creating a strong password with high entropy.  However, in practice, the ability to include such characters ought to be weighed against the possible need to reproduce them on various devices using various input methods.</t>
    </section>
    <section title="Identifier Comparison" anchor="security-id">
      <t>The process of comparing identifiers (such as SASL simple user names, authentication identifiers, and authorization identifiers) can lead to either false negatives or false positives, both of which have security implications.  A more detailed discussion can be found in <xref target='RFC6943'/>.</t>
    </section>
    <section title="Reuse of PRECIS" anchor="security-precis">
      <t>The security considerations described in <xref target="I-D.ietf-precis-framework"/> apply to the "IdentifierClass" and "FreeformClass" base string classes used in this document for usernames and passwords, respectively.</t>
    </section>
    <section title="Reuse of Unicode" anchor="security-unicode">
      <t>The security considerations described in <xref target='UTS39'/> apply to the use of Unicode characters in usernames and passwords.</t>
    </section>
  </section>

  </middle>

  <back>

    <references title="Normative References">

<reference anchor='I-D.ietf-precis-framework'>
<front>
<title>Precis Framework: Handling Internationalized Strings in Protocols</title>
<author initials='P' surname='Saint-Andre' fullname='Peter Saint-Andre'>
    <organization>&amp;yet</organization>
</author>
<author initials='M' surname='Blanchet' fullname='Marc Blanchet'>
    <organization>Viagenie</organization>
</author>
<date month='February' day='19' year='2015' />
<abstract><t>Application protocols using Unicode code points in protocol strings need to properly prepare such strings in order to perform valid comparison operations (e.g., for purposes of authentication or authorization).  This document defines a framework enabling application protocols to perform the preparation and comparison of internationalized strings (a.k.a. "PRECIS") in a way that depends on the properties of Unicode code points and thus is agile with respect to versions of Unicode.  As a result, this framework provides a more sustainable approach to the handling of internationalized strings than the previous framework, known as Stringprep (RFC 3454).  This document obsoletes RFC 3454.</t></abstract>
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-precis-framework-23' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-precis-framework-23.txt' />
</reference>

<reference anchor="RFC2119">
<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass.  Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date month='March' year='1997' />
<area>General</area>
<keyword>keyword</keyword>
<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.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:
<list>
<t>
      The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL
      NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,  &quot;MAY&quot;, and
      &quot;OPTIONAL&quot; in this document are to be interpreted as described in
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>
<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='TXT' octets='4723' target='ftp://ftp.isi.edu/in-notes/rfc2119.txt' />
<format type='HTML' octets='14486' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5661' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>

<reference anchor='RFC3629'>

<front>
<title>UTF-8, a transformation format of ISO 10646</title>
<author initials='F.' surname='Yergeau' fullname='F. Yergeau'>
<organization /></author>
<date year='2003' month='November' />
<abstract>
<t>ISO/IEC 10646-1 defines a large character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems.  The originally proposed encodings of the UCS, however, were not compatible with many current applications and protocols, and this has led to the development of UTF-8, the object of this memo.  UTF-8 has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values.  This memo obsoletes and replaces RFC 2279.</t></abstract></front>
<seriesInfo name='STD' value='63' />
<seriesInfo name='RFC' value='3629' />
<format type='TXT' octets='33856' target='http://www.rfc-editor.org/rfc/rfc3629.txt' />
</reference>

<reference anchor='RFC5234'>
<front>
<title>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.' surname='Crocker' fullname='D. Crocker'>
<organization /></author>
<author initials='P.' surname='Overell' fullname='P. Overell'>
<organization /></author>
<date year='2008' month='January' />
<abstract>
<t>Internet technical specifications often need to define a formal syntax.  Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications.  The current specification documents ABNF.  It balances compactness and simplicity with reasonable representational power.  The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges.  This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='STD' value='68' />
<seriesInfo name='RFC' value='5234' />
<format type='TXT' octets='26359' target='http://www.rfc-editor.org/rfc/rfc5234.txt' />
</reference>

      <reference anchor='RFC5890'>
        <front>
          <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
          <author initials='J.' surname='Klensin' fullname='J. Klensin'>
            <organization />
          </author>
          <date year='2010' month='August' />
          <abstract>
            <t>This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version.  It describes the document collection and provides definitions and other material that are common to the set. [STANDARDS TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name='RFC' value='5890' />
        <format type='TXT' octets='54245' target='http://www.rfc-editor.org/rfc/rfc5890.txt' />
      </reference>

<reference anchor='RFC6365'>
<front>
<title>Terminology Used in Internationalization in the IETF</title>
<author initials='P.' surname='Hoffman' fullname='P. Hoffman'>
<organization /></author>
<author initials='J.' surname='Klensin' fullname='J. Klensin'>
<organization /></author>
<date year='2011' month='September' />
<abstract>
<t>This document provides a list of terms used in the IETF when discussing internationalization.  The purpose is to help frame discussions of internationalization in the various areas of the IETF and to help introduce the main concepts to IETF participants.  This memo documents an Internet Best Current Practice.</t></abstract></front>
<seriesInfo name='BCP' value='166' />
<seriesInfo name='RFC' value='6365' />
<format type='TXT' octets='103155' target='http://www.rfc-editor.org/rfc/rfc6365.txt' />
</reference>

<reference anchor="Unicode" target="http://www.unicode.org/versions/latest/">
  <front>
    <title>The Unicode Standard</title>
    <author>
      <organization>The Unicode Consortium</organization>
    </author>
    <date year="2015-present" />
  </front>
</reference>

<reference anchor="Unicode7.0" target="http://www.unicode.org/versions/Unicode7.0.0/">
  <front>
    <title>The Unicode Standard, Version 7.0.0</title>
    <author>
      <organization>The Unicode Consortium</organization>
    </author>
    <date year="2014" />
  </front>
</reference>

    </references>

    <references title="Informative References">

<reference anchor='I-D.ietf-httpauth-basicauth-update'>
<front>
<title>The 'Basic' HTTP Authentication Scheme</title>
<author initials='J' surname='Reschke' fullname='Julian Reschke'>
    <organization />
</author>
<date month='February' day='28' year='2015' />
<abstract><t>This document defines the "Basic" Hypertext Transfer Protocol (HTTP) Authentication Scheme, which transmits credentials as userid/password pairs, obfuscated by the use of Base64 encoding.</t></abstract>
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-httpauth-basicauth-update-07' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-httpauth-basicauth-update-07.txt' />
</reference>

<reference anchor='I-D.ietf-httpauth-digest'>
<front>
<title>HTTP Digest Access Authentication</title>
<author initials='R' surname='Shekh-Yusef' fullname='Rifaat Shekh-Yusef'>
    <organization />
</author>
<author initials='D' surname='Ahrens' fullname='David Ahrens'>
    <organization />
</author>
<author initials='S' surname='Bremer' fullname='Sophie Bremer'>
    <organization />
</author>
<date month='April' day='27' year='2015' />
<abstract><t>HTTP provides a simple challenge-response authentication mechanism that may be used by a server to challenge a client request and by a client to provide authentication information. This document defines the HTTP Digest Authentication scheme that may be used with the authentication mechanism.</t></abstract>
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-httpauth-digest-19' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-httpauth-digest-19.txt' />
</reference>

<reference anchor='I-D.ietf-radext-nai'>
<front>
<title>The Network Access Identifier</title>
<author initials='A' surname='DeKok' fullname='Alan DeKok'>
    <organization />
</author>
<date month='December' day='17' year='2014' />
<abstract><t>In order to provide inter-domain authentication services, it is necessary to have a standardized method that domains can use to identify each other's users.  This document defines the syntax for the Network Access Identifier (NAI), the user identity submitted by the client prior to accessing network resources. This document is a revised version of RFC 4282, which addresses issues with international character sets, as well as a number of other corrections to the previous document.</t></abstract>
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-radext-nai-15' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-radext-nai-15.txt' />
</reference>

<reference anchor='I-D.ietf-xmpp-6122bis'>
<front>
<title>Extensible Messaging and Presence Protocol (XMPP): Address Format</title>
<author initials='P' surname='Saint-Andre' fullname='Peter Saint-Andre'>
    <organization />
</author>
<date month='March' day='23' year='2015' />
<abstract><t>This document defines the address format for the Extensible Messaging and Presence Protocol (XMPP), including support for code points outside the ASCII range.  This document obsoletes RFC 6122.</t></abstract>
</front>
<seriesInfo name='Internet-Draft' value='draft-ietf-xmpp-6122bis-20' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-xmpp-6122bis-20.txt' />
</reference>

<reference anchor='RFC20'>
<front>
<title>ASCII format for network interchange</title>
<author initials='V.' surname='Cerf' fullname='Vint Cerf'>
<organization>University California Los Angeles (UCLA)</organization></author>
<date year='1969' day='16' month='October' />
<abstract>
<t>For concreteness, we suggest the use of standard 7-bit ASCII embedded in an 8 bit byte whose high order bit is always 0.</t></abstract></front>
<seriesInfo name='RFC' value='20' />
<format type='TXT' octets='18504' target='http://www.rfc-editor.org/rfc/rfc20.txt' />
</reference>

<reference anchor="RFC3454">
<front>
<title>Preparation of Internationalized Strings ("stringprep")</title>
<author initials='P.' surname='Hoffman' fullname='P.  Hoffman'>
<organization /></author>
<author initials='M.' surname='Blanchet' fullname='M.  Blanchet'>
<organization /></author>
<date month='December' year='2002' /></front>
<seriesInfo name='RFC' value='3454' />
<format type='TXT' octets='138684' target='ftp://ftp.isi.edu/in-notes/rfc3454.txt' />
</reference>

<reference anchor='RFC3501'>
<front>
<title>INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1</title>
<author initials='M.' surname='Crispin' fullname='M. Crispin'>
<organization /></author>
<date year='2003' month='March' />
<abstract>
<t>The Internet Message Access Protocol, Version 4rev1 (IMAP4rev1) allows a client to access and manipulate electronic mail messages on a server.  IMAP4rev1 permits manipulation of mailboxes (remote message folders) in a way that is functionally equivalent to local folders.  IMAP4rev1 also provides the capability for an offline client to resynchronize with the server.  IMAP4rev1 includes operations for creating, deleting, and renaming mailboxes, checking for new messages, permanently removing messages, setting and clearing flags, RFC 2822 and RFC 2045 parsing, searching, and selective fetching of message attributes, texts, and portions thereof.  Messages in IMAP4rev1 are accessed by the use of numbers.  These numbers are either message sequence numbers or unique identifiers.  IMAP4rev1 supports a single server.  A mechanism for accessing configuration information to support multiple IMAP4rev1 servers is discussed in RFC 2244.  IMAP4rev1 does not specify a means of posting mail; this function is handled by a mail transfer protocol such as RFC 2821. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='3501' />
<format type='TXT' octets='227640' target='http://www.rfc-editor.org/rfc/rfc3501.txt' />
</reference>

<reference anchor='RFC4013'>
<front>
<title>SASLprep: Stringprep Profile for User Names and Passwords</title>
<author initials='K.' surname='Zeilenga' fullname='K. Zeilenga'>
<organization /></author>
<date year='2005' month='February' />
<abstract>
<t>This document describes how to prepare Unicode strings representing usernames and passwords for comparison.  The document defines the "SASLprep" profile of the "stringprep" algorithm to be used for both usernames and passwords.  This profile is intended to be used by Simple Authentication and Security Layer (SASL) mechanisms (such as PLAIN, CRAM-MD5, and DIGEST-MD5), as well as other protocols exchanging simple user names and/or passwords. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='4013' />
<format type='TXT' octets='13051' target='http://www.rfc-editor.org/rfc/rfc4013.txt' />
</reference>

<reference anchor="RFC4422">
<front>
<title>Simple Authentication and Security Layer (SASL)</title>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov' role="editor">
<organization /></author>
<author initials='K.' surname='Zeilenga' fullname='K. Zeilenga' role="editor">
<organization /></author>
<date year='2006' month='June' />
<abstract>
<t>&lt;p>The Simple Authentication and Security Layer (SASL) is a framework for providing authentication and data security services in connection-oriented protocols via replaceable mechanisms. It provides a structured interface between protocols and mechanisms. The resulting framework allows new protocols to reuse existing mechanisms and allows old protocols to make use of new mechanisms. The framework also provides a protocol for securing subsequent protocol exchanges within a data security layer.&lt;/p>&lt;p> This document describes how a SASL mechanism is structured, describes how protocols include support for SASL, and defines the protocol for carrying a data security layer over a connection. In addition, this document defines one SASL mechanism, the EXTERNAL mechanism.&lt;/p>&lt;p> This document obsoletes RFC 2222. [STANDARDS TRACK]&lt;/p></t></abstract></front>
<seriesInfo name='RFC' value='4422' />
<format type='TXT' octets='73206' target='ftp://ftp.isi.edu/in-notes/rfc4422.txt' />
</reference>

<reference anchor='RFC4616'>
<front>
<title>The PLAIN Simple Authentication and Security Layer (SASL) Mechanism</title>
<author initials='K.' surname='Zeilenga' fullname='K. Zeilenga'>
<organization /></author>
<date year='2006' month='August' />
<abstract>
<t>This document defines a simple clear-text user/password Simple Authentication and Security Layer (SASL) mechanism called the PLAIN mechanism.  The PLAIN mechanism is intended to be used, in combination with data confidentiality services provided by a lower layer, in protocols that lack a simple password authentication command. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='4616' />
<format type='TXT' octets='20270' target='http://www.rfc-editor.org/rfc/rfc4616.txt' />
</reference>

<reference anchor='RFC5802'>
<front>
<title>Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms</title>
<author initials='C.' surname='Newman' fullname='C. Newman'>
<organization /></author>
<author initials='A.' surname='Menon-Sen' fullname='A. Menon-Sen'>
<organization /></author>
<author initials='A.' surname='Melnikov' fullname='A. Melnikov'>
<organization /></author>
<author initials='N.' surname='Williams' fullname='N. Williams'>
<organization /></author>
<date year='2010' month='July' />
<abstract>
<t>The secure authentication mechanism most widely deployed and used by Internet application protocols is the transmission of clear-text passwords over a channel protected by Transport Layer Security (TLS). There are some significant security concerns with that mechanism, which could be addressed by the use of a challenge response authentication mechanism protected by TLS. Unfortunately, the challenge response mechanisms presently on the standards track all fail to meet requirements necessary for widespread deployment, and have had success only in limited use.&lt;/t>&lt;t> This specification describes a family of Simple Authentication and Security Layer (SASL; RFC 4422) authentication mechanisms called the Salted Challenge Response Authentication Mechanism (SCRAM), which addresses the security concerns and meets the deployability requirements. When used in combination with TLS or an equivalent security layer, a mechanism from this family could improve the status quo for application protocol authentication and provide a suitable choice for a mandatory-to-implement mechanism for future application protocol standards. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='5802' />
<format type='TXT' octets='59049' target='http://www.rfc-editor.org/rfc/rfc5802.txt' />
</reference>

      <reference anchor='RFC5891'>
        <front>
          <title>Internationalized Domain Names in Applications (IDNA): Protocol</title>
          <author initials='J.' surname='Klensin' fullname='J. Klensin'>
            <organization />
          </author>
          <date year='2010' month='August' />
          <abstract>
            <t>This document is the revised protocol definition for Internationalized Domain Names (IDNs).  The rationale for changes, the relationship to the older specification, and important terminology are provided in other documents.  This document specifies the protocol mechanism, called Internationalized Domain Names in Applications (IDNA), for registering and looking up IDNs in a way that does not require changes to the DNS itself.  IDNA is only meant for processing domain names, not free text. [STANDARDS TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name='RFC' value='5891' />
        <format type='TXT' octets='38105' target='http://www.rfc-editor.org/rfc/rfc5891.txt' />
      </reference>

      <reference anchor='RFC5893'>
        <front>
          <title>Right-to-Left Scripts for Internationalized Domain Names for Applications (IDNA)</title>
          <author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
            <organization />
          </author>
          <author initials='C.' surname='Karp' fullname='C. Karp'>
            <organization />
          </author>
          <date year='2010' month='August' />
          <abstract>
            <t>The use of right-to-left scripts in Internationalized Domain Names (IDNs) has presented several challenges.  This memo provides a new Bidi rule for Internationalized Domain Names for Applications (IDNA) labels, based on the encountered problems with some scripts and some shortcomings in the 2003 IDNA Bidi criterion. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name='RFC' value='5893' />
        <format type='TXT' octets='38870' target='http://www.rfc-editor.org/rfc/rfc5893.txt' />
      </reference>

<reference anchor='RFC5894'>
<front>
<title>Internationalized Domain Names for Applications (IDNA): Background, Explanation, and Rationale</title>
<author initials='J.' surname='Klensin' fullname='J. Klensin'>
<organization /></author>
<date year='2010' month='August' />
<abstract>
<t>Several years have passed since the original protocol for Internationalized Domain Names (IDNs) was completed and deployed.  During that time, a number of issues have arisen, including the need to update the system to deal with newer versions of Unicode.  Some of these issues require tuning of the existing protocols and the tables on which they depend.  This document provides an overview of a revised system and provides explanatory material for its components.  This document is not an Internet Standards Track specification; it is published for informational purposes.</t></abstract></front>
<seriesInfo name='RFC' value='5894' />
<format type='TXT' octets='115174' target='http://www.rfc-editor.org/rfc/rfc5894.txt' />
</reference>

<reference anchor='RFC6120'>
<front>
<title>Extensible Messaging and Presence Protocol (XMPP): Core</title>
<author initials='P.' surname='Saint-Andre' fullname='P. Saint-Andre'>
<organization /></author>
<date year='2011' month='March' />
<abstract>
<t>The Extensible Messaging and Presence Protocol (XMPP) is an application profile of the Extensible Markup Language (XML) that enables the near-real-time exchange of structured yet extensible data between any two or more network entities.  This document defines XMPP's core protocol methods: setup and teardown of XML streams, channel encryption, authentication, error handling, and communication primitives for messaging, network availability ("presence"), and request-response interactions.  This document obsoletes RFC 3920. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='6120' />
<format type='TXT' octets='451942' target='http://www.rfc-editor.org/rfc/rfc6120.txt' />
</reference>

<reference anchor='RFC6122'>
<front>
<title>Extensible Messaging and Presence Protocol (XMPP): Address Format</title>
<author initials='P.' surname='Saint-Andre' fullname='P. Saint-Andre'>
<organization /></author>
<date year='2011' month='March' />
<abstract>
<t>This document defines the format for addresses used in the Extensible Messaging and Presence Protocol (XMPP), including support for non-ASCII characters.  This document updates RFC 3920. [STANDARDS-TRACK]</t></abstract></front>
<seriesInfo name='RFC' value='6122' />
<format type='TXT' octets='50646' target='http://www.rfc-editor.org/rfc/rfc6122.txt' />
</reference>

<reference anchor='RFC6943'>
<front>
<title>Issues in Identifier Comparison for Security Purposes</title>
<author initials='D.' surname='Thaler' fullname='D. Thaler'>
<organization /></author>
<date year='2013' month='May' />
<abstract>
<t>Identifiers such as hostnames, URIs, IP addresses, and email addresses are often used in security contexts to identify security principals and resources.  In such contexts, an identifier presented via some protocol is often compared using some policy to make security decisions such as whether the security principal may access the resource, what level of authentication or encryption is required, etc.  If the parties involved in a security decision use different algorithms to compare identifiers, then failure scenarios ranging from denial of service to elevation of privilege can result.  This document provides a discussion of these issues that designers should consider when defining identifiers and protocols, and when constructing architectures that use multiple protocols.</t></abstract></front>
<seriesInfo name='RFC' value='6943' />
<format type='TXT' octets='62676' target='http://www.rfc-editor.org/rfc/rfc6943.txt' />
</reference>

<reference anchor="UTS39" target='http://unicode.org/reports/tr39/'>
  <front>
    <title>Unicode Technical Standard #39: Unicode Security Mechanisms</title>
    <author>
      <organization>The Unicode Consortium</organization>
    </author>
    <date month="July" year="2012" />
  </front>
</reference>

    </references>

    <section title="Differences from RFC 4013" anchor="diffs">
      <t>This document builds upon the PRECIS framework defined in <xref target='I-D.ietf-precis-framework'/>, which differs fundamentally from the stringprep technology <xref target='RFC3454'/> used in SASLprep <xref target='RFC4013'/>.  The primary difference is that stringprep profiles allowed all characters except those which were explicitly disallowed, whereas PRECIS profiles disallow all characters except those which are explicitly allowed (this "inclusion model" was originally used for internationalized domain names in <xref target='RFC5891'/>; see <xref target='RFC5894'/> for further discussion).  It is important to keep this distinction in mind when comparing the technology defined in this document to SASLprep <xref target='RFC4013'/>.</t>
      <t>The following substantive modifications were made from RFC 4013.</t>
      <t>
        <list style='symbols'>
          <t>A single SASLprep algorithm was replaced by three separate algorithms: one for usernames with case mapping, one for usernames with case preservation, and one for passwords.</t>
          <t>The new preparation algorithms use PRECIS instead of a stringprep profile.  The new algorithms work independenctly of Unicode versions.</t>
          <t>As recommended in the PRECIS framework, changed the Unicode normalization form from NFKC to NFC.</t>
          <t>Some Unicode code points that were mapped to nothing in RFC 4013 are simply disallowed by PRECIS.</t>
        </list>
      </t>
    </section>

    <section title="Acknowledgements" anchor="acks">
      
      <t>This document borrows some text from <xref target='RFC4013'/> and <xref target='RFC6120'/>.</t>
      <t>The following individuals provided helpful feedback on this document: Marc Blanchet, Ben Campbell, Alan DeKok, Joe Hildebrand, Jeffrey Hutzelman, Simon Josefsson, Jonathan Lennox, James Manger, Matt Miller, Chris Newman, Yutaka OIWA, Pete Resnick, Andrew Sullivan, Nico Williams, and Yoshiro YONEYA.  Nico in particular deserves special recognition for providing text that was used in <xref target='username-case'/>.  Thanks also to Takahiro NEMOTO and Yoshiro YONEYA for implementation feedback.</t>
      <t>Robert Sparks and Derek Atkins reviewed the document on behalf of the General Area Review Team and the Security Directorate, respectively.</t>
      <t>Peter Saint-Andre wishes to acknowledge Cisco Systems, Inc., for employing him during his work on earlier versions of this document.</t>
      
    </section>

  </back>

</rfc>
