idnits 2.17.1 draft-ietf-precis-saslprepbis-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (December 3, 2013) is 3790 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-23) exists of draft-ietf-precis-framework-12 -- Possible downref: Non-RFC (?) normative reference: ref. 'UNICODE' == Outdated reference: A later version (-12) exists of draft-ietf-precis-mappings-05 -- Obsolete informational reference (is this intentional?): RFC 2617 (Obsoleted by RFC 7235, RFC 7615, RFC 7616, RFC 7617) -- Obsolete informational reference (is this intentional?): RFC 3454 (Obsoleted by RFC 7564) -- Obsolete informational reference (is this intentional?): RFC 3501 (Obsoleted by RFC 9051) -- Obsolete informational reference (is this intentional?): RFC 4013 (Obsoleted by RFC 7613) Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 PRECIS P. Saint-Andre 3 Internet-Draft Cisco Systems, Inc. 4 Obsoletes: 4013 (if approved) A. Melnikov 5 Intended status: Standards Track Isode Ltd 6 Expires: June 6, 2014 December 3, 2013 8 Preparation and Comparison of Internationalized Strings Representing 9 Usernames and Passwords 10 draft-ietf-precis-saslprepbis-06 12 Abstract 14 This document describes methods for handling Unicode strings 15 representing usernames and passwords. This document obsoletes RFC 16 4013. 18 Status of this Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on June 6, 2014. 35 Copyright Notice 37 Copyright (c) 2013 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 2. What the Username and Password Profiles Provide . . . . . . . 3 54 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 55 4. Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 4.1. Definition . . . . . . . . . . . . . . . . . . . . . . . . 4 57 4.2. Preparation . . . . . . . . . . . . . . . . . . . . . . . 5 58 4.2.1. Case Mapping . . . . . . . . . . . . . . . . . . . . . 6 59 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 7 60 5. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 9 61 5.1. Definition . . . . . . . . . . . . . . . . . . . . . . . . 9 62 5.2. Preparation . . . . . . . . . . . . . . . . . . . . . . . 10 63 5.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 10 64 6. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . 11 65 6.1. Usernames . . . . . . . . . . . . . . . . . . . . . . . . 11 66 6.2. Passwords . . . . . . . . . . . . . . . . . . . . . . . . 12 67 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 68 7.1. UsernameIdentifierClass . . . . . . . . . . . . . . . . . 13 69 7.2. PasswordFreeformClass . . . . . . . . . . . . . . . . . . 14 70 8. Security Considerations . . . . . . . . . . . . . . . . . . . 14 71 8.1. Password/Passphrase Strength . . . . . . . . . . . . . . . 14 72 8.2. Identifier Comparison . . . . . . . . . . . . . . . . . . 14 73 8.3. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 15 74 8.4. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . . 15 75 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 15 76 9.1. Normative References . . . . . . . . . . . . . . . . . . . 15 77 9.2. Informative References . . . . . . . . . . . . . . . . . . 15 78 Appendix A. Differences from RFC 4013 . . . . . . . . . . . . . . 17 79 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 17 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 18 82 1. Introduction 84 Usernames and passwords are widely used for authentication and 85 authorization on the Internet, either directly when provided in 86 plaintext (as in the SASL PLAIN mechanism [RFC4616] or the HTTP Basic 87 scheme [RFC2617]) or indirectly when provided as the input to a 88 cryptographic algorithm such as a hash function (as in the SASL SCRAM 89 mechanism [RFC5802] or the HTTP Digest scheme [RFC2617]). To 90 increase the likelihood that the input and comparison of usernames 91 and passwords will work in ways that make sense for typical users 92 throughout the world, this document defines rules for preparing and 93 comparing internationalized strings that represent usernames and 94 passwords. 96 The methods specified in this document define two PRECIS profiles as 97 explained in the PRECIS framework specification 98 [I-D.ietf-precis-framework]. This document assumes that all strings 99 are comprised of characters from the Unicode character set [UNICODE], 100 with special attention to characters outside the ASCII range [RFC20]. 101 The methods defined here might be applicable wherever usernames or 102 passwords are used. However, the methods are not intended for use in 103 preparing strings that are not usernames (e.g., email addresses and 104 LDAP distinguished names), nor in cases where identifiers or secrets 105 are not strings (e.g., keys and certificates) or require specialized 106 handling. 108 This document obsoletes RFC 4013 (the "SASLprep" profile of 109 stringprep [RFC3454]) but can be used by technologies other than the 110 Simple Authentication and Security Layer (SASL) [RFC4422], such as 111 HTTP authentication [RFC2617]. 113 2. What the Username and Password Profiles Provide 115 Profiles of the PRECIS framework enable software to handle Unicode 116 characters outside the ASCII range in an automated way, so that such 117 characters are treated carefully and consistently in application 118 protocols. In large measure, these profiles are designed to protect 119 application developers from the potentially negative consequences of 120 supporting the full range of Unicode characters. For instance, in 121 almost all application protocols it would be dangerous to treat the 122 Unicode character SUPERSCRIPT ONE (U+0089) as equivalent to DIGIT ONE 123 (U+0031), since that would result in false positives during 124 comparison, authentication, and authorization (e.g., an attacker 125 could easy spoof an account "user1@example.com"). 127 Whereas a naive use of Unicode would make such attacks trivially 128 easy, the Username PRECIS profile defined in this document generally 129 protects applications from inadvertently causing such problems. 130 (Similar considerations apply to passwords, although here it is 131 desirable to support a wider range of characters so as to maximize 132 entropy during authentication.) 134 3. Terminology 136 Many important terms used in this document are defined in 137 [I-D.ietf-precis-framework], [RFC5890], [RFC6365], and [UNICODE]. 138 The term "non-ASCII space" refers to any Unicode code point having a 139 general category of "Zs", with the exception of U+0020 (here called 140 "ASCII space"). 142 As used here, the term "password" is not literally limited to a word; 143 i.e., a password could be a passphrase consisting of more than one 144 word, perhaps separated by spaces or other such characters. 146 Some SASL mechanisms (e.g., CRAM-MD5, DIGEST-MD5, and SCRAM) specify 147 that the authentication identity used in the context of such 148 mechanisms is a "simple user name" (see Section 2 of [RFC4422] as 149 well as [RFC4013]). Various application technologies also assume 150 that the identity of a user or account takes the form of a username 151 (e.g., authentication for the HyperText Transfer Protocol [RFC2617]), 152 whether or not they use SASL. Note well that the exact form of a 153 username in any particular SASL mechanism or application technology 154 is a matter for implementation and deployment, and that a username 155 does not necessarily map to any particular application identifier 156 (such as the localpart of an email address). 158 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 159 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 160 "OPTIONAL" in this document are to be interpreted as described in 161 [RFC2119]. 163 4. Usernames 165 4.1. Definition 167 This document specifies that a username is a string of Unicode code 168 points [UNICODE], encoded using UTF-8 [RFC3629], and structured 169 either as an ordered sequence of "userparts" (where the complete 170 username can consist of a single userpart or a space-separated 171 sequence of userparts) or as a userpart@domainpart (where the 172 domainpart is an IP literal, an IPv4 address, or a fully-qualified 173 domain name). 175 The syntax for a username is defined as follows using the Augmented 176 Backus-Naur Form (ABNF) [RFC5234]. 178 username = userpart [1*(1*SP userpart)] 179 / userpart '@' domainpart 180 userpart = 1*(idpoint) 181 ; 182 ; an "idpoint" is a UTF-8 encoded Unicode code point 183 ; that conforms to the PRECIS "IdentifierClass" 184 ; 185 domainpart = IP-literal / IPv4address / ifqdn 186 ; 187 ; the "IPv4address" and "IP-literal" rules are 188 ; defined in RFC 3986, and the first-match-wins 189 ; (a.k.a. "greedy") algorithm described in RFC 3986 190 ; applies 191 ; 192 ; reuse of the IP-literal rule from RFC 3986 implies 193 ; that IPv6 addresses are enclosed in square brackets 194 ; (i.e., beginning with '[' and ending with ']') 195 ; 196 ifqdn = 1*1023(domainpoint) 197 ; 198 ; a "domainpoint" is a UTF-8 encoded Unicode code 199 ; point that conforms to RFC 5890 200 ; 202 All code points and blocks not explicitly allowed in the PRECIS 203 IdentifierClass are disallowed; this includes private use characters, 204 surrogate code points, and the other code points and blocks that were 205 defined as "Prohibited Output" in [RFC4013]. In addition, common 206 constructions such as "user@example.com" are allowed as usernames 207 under this specification, as they were under [RFC4013]. 209 4.2. Preparation 211 Each userpart of a username MUST conform to the 212 "UsernameIdentifierClass" profile of the PRECIS IdentifierClass, 213 which is defined as follows: 215 1. The base string class is the "IdentifierClass" specified in 216 [I-D.ietf-precis-framework]. 217 2. Fullwidth and halfwidth characters MUST be mapped to their 218 decomposition equivalents. 219 3. So-called additional mappings MAY be applied, such as those 220 defined in [I-D.ietf-precis-mappings]. 222 4. Uppercase and titlecase characters might be mapped to their 223 lowercase equivalents (see Section 4.2.1 below). 224 5. Unicode Normalization Form C (NFC) MUST be applied to all 225 characters. 227 With regard to directionality, the "Bidi Rule" provided in [RFC5893] 228 applies. 230 A username MUST NOT be zero bytes in length. This rule is to be 231 enforced after any normalization and mapping of code points. 233 In protocols that provide usernames as input to a cryptographic 234 algorithm such as a hash function, the client will need to perform 235 proper preparation of the username before applying the algorithm. 237 4.2.1. Case Mapping 239 Case mapping is a matter for the application protocol, protocol 240 implementation, or end deployment. In general, this document 241 suggests that it is preferable to perform case mapping, since not 242 doing so can lead to false positives during authentication and 243 authorization (as described in [RFC6943]) and can result in confusion 244 among end users given the prevalence of case mapping in many existing 245 protocols and applications. However, there can be good reasons to 246 not perform case mapping, such as backward compatibility with 247 deployed infrastructure. 249 In particular: 251 o SASL mechanisms that directly re-use this profile MUST specify 252 whether and when case mapping is to be applied to authentication 253 identifiers. SASL mechanisms SHOULD delay any case mapping to the 254 last possible moment, such as when doing a lookup by username, 255 username comparisons, or generating a cryptographic salt from a 256 username (if the last possible moment happens on the server, then 257 decisions about case mapping can be a matter of deployment 258 policy). In keeping with RFC4422, SASL mechanisms are not to 259 apply this or any other profile to authorization identifiers. 260 o Application protocols that use SASL (such as IMAP [RFC3501] and 261 XMPP [RFC6120]) and that directly re-use this profile MUST specify 262 whether case mapping is to be applied to authorization 263 identifiers. Such "SASL application protocols" SHOULD delay any 264 case mapping of authorization identifiers to the last possible 265 moment, which happens to necessarily be on the server side (this 266 enables decisions about case mapping to be a matter of deployment 267 policy). In keeping with RFC4422, SASL application protocols are 268 not to apply this or any other profile to authentication 269 identifiers. 271 o Application protocols that do not use SASL (such as HTTP 272 authentication with the Basic and Digest schemes [RFC2617]) MUST 273 specify whether and when case mapping is to be applied to 274 authentication identifiers and authorization identifiers. Such 275 "non-SASL application protocols" SHOULD delay any case mapping to 276 the last possible moment, such as when doing a lookup by username, 277 username comparisons, or generating a cryptographic salt from a 278 username (if the last possible moment happens on the server, then 279 decisions about case mapping can be a matter of deployment 280 policy). 282 If the specification for a SASL mechanism, SASL application protocol, 283 or non-SASL application protocol specifies the handling of case 284 mapping for strings that conform to the UsernameIdentifierClass, it 285 MUST clearly describe whether case mapping is required, recommended, 286 or optional at the level of the protocol itself, implementations 287 thereof, or service deployments. 289 4.3. Examples 291 The following examples illustrate a small number of usernames that 292 are consistent with the format defined above (note that the 293 characters < and > are used here to delineate the actual usernames 294 and are not part of the username strings). 296 Table 1: A sample of legal usernames 298 +---------------------------------+---------------------------------+ 299 | # | Username | Notes | 300 +---------------------------------+---------------------------------+ 301 | 1 | | A userpart only | 302 +---------------------------------+---------------------------------+ 303 | 2 | | A userpart and domainpart | 304 +---------------------------------+---------------------------------+ 305 | 3 | | The third character is LATIN | 306 | | | SMALL LETTER SHARP S (U+00DF) | 307 +---------------------------------+---------------------------------+ 308 | 4 | <π@example.com> | A userpart of GREEK SMALL | 309 | | | LETTER PI (U+03C0) | 310 +---------------------------------+---------------------------------+ 311 | 5 | <Σ@example.com> | A userpart of GREEK CAPITAL | 312 | | | LETTER SIGMA (U+03A3) | 313 +---------------------------------+---------------------------------+ 314 | 6 | <σ@example.com> | A userpart of GREEK SMALL | 315 | | | LETTER SIGMA (U+03C3) | 316 +---------------------------------+---------------------------------+ 317 | 7 | <ς@example.com> | A userpart of GREEK SMALL | 318 | | | LETTER FINAL SIGMA (U+03C2) | 319 +---------------------------------+---------------------------------+ 321 Several points are worth noting. Regarding examples 2 and 3: 322 although in German the character esszett (LATIN SMALL LETTER SHARP S, 323 U+00DF) can mostly be used interchangeably with the two characters 324 "ss", the userparts in these examples are different and (if desired) 325 a server would need to enforce a registration policy that disallows 326 one of them if the other is registered. Regarding examples 5, 6, and 327 7: optional case-mapping of GREEK CAPITAL LETTER SIGMA (U+03A3) to 328 lowercase (i.e., to GREEK SMALL LETTER SIGMA, U+03C3) during 329 comparison would result in matching the usernames in examples 5 and 330 6; however, because the PRECIS mapping rules do not account for the 331 special status of GREEK SMALL LETTER FINAL SIGMA (U+03C2), the 332 usernames in examples 5 and 7 or examples 6 and 7 would not be 333 matched. 335 The following examples illustrate strings that are not valid 336 usernames because they violate the format defined above. 338 Table 2: A sample of strings that violate the username rules 340 +---------------------------------+---------------------------------+ 341 | # | Non-Username string | Notes | 342 +---------------------------------+---------------------------------+ 343 | 8 | <"juliet"@example.com> | Quotation marks (U+0022) in | 344 | | | userpart | 345 +---------------------------------+---------------------------------+ 346 | 9 | | Space (U+0020) in userpart | 347 +---------------------------------+---------------------------------+ 348 | 10| <@example.com> | Zero-length userpart | 349 +---------------------------------+---------------------------------+ 350 | 11| | The sixth character is ROMAN | 351 | | | NUMERAL FOUR (U+2163) | 352 +---------------------------------+---------------------------------+ 353 | 12| <♚@example.com> | A localpart of BLACK CHESS KING | 354 | | | (U+265A) | 355 +---------------------------------+---------------------------------+ 357 Here again, several points are worth noting. Regarding example 11, 358 the Unicode character ROMAN NUMERAL FOUR (U+2163) has a compatibility 359 equivalent of the string formed of LATIN CAPITAL LETTER I (U+0049) 360 and LATIN CAPITAL LETTER V (U+0056), but characters with 361 compatibility equivalents are not allowed in the PRECIS 362 IdentiferClass. Regarding example 12: symbol characters such as 363 BLACK CHESS KING (U+265A) are not allowed in the PRECIS 364 IdentifierClass. 366 5. Passwords 368 5.1. Definition 370 This document specifies that a password is a string of Unicode code 371 points [UNICODE], encoded using UTF-8 [RFC3629], and conformant to 372 the PRECIS FreeformClass. 374 The syntax for a password is defined as follows using the Augmented 375 Backus-Naur Form (ABNF) [RFC5234]. 377 password = 1*(freepoint) 378 ; 379 ; a "freepoint" is a UTF-8 encoded 380 ; Unicode code point that conforms to 381 ; the PRECIS "FreeformClass" 382 ; 384 All code points and blocks not explicitly allowed in the PRECIS 385 FreeformClass are disallowed; this includes private use characters, 386 surrogate code points, and the other code points and blocks defined 387 as "Prohibited Output" in Section 2.3 of RFC 4013. 389 5.2. Preparation 391 A password MUST conform to the "PasswordFreeformClass" profile of the 392 PRECIS FreeformClass, which is defined as follows: 394 1. The base string class is the "FreeformClass" specified in 395 [I-D.ietf-precis-framework]. 396 2. Fullwidth and halfwidth characters MUST NOT be mapped to their 397 decomposition equivalents. 398 3. Any instances of non-ASCII space MUST be mapped to ASCII space 399 (U+0020). 400 4. So-called additional mappings MAY be applied, such as those 401 defined in [I-D.ietf-precis-mappings]. 402 5. Uppercase and titlecase characters MUST NOT be mapped to their 403 lowercase equivalents. 404 6. Unicode Normalization Form C (NFC) MUST be applied to all 405 characters. 407 With regard to directionality, the "Bidi Rule" (defined in [RFC5893]) 408 and similar rules are unnecessary and inapplicable to passwords, 409 since they can reduce the range of characters that are allowed in a 410 string and therefore reduce the amount of entropy that is possible in 411 a password. Furthermore, such rules are intended to minimize the 412 possibility that the same string will be displayed differently on a 413 system set for right-to-left display and a system set for left-to- 414 right display; however, passwords are typically not displayed at all 415 and are rarely meant to be interoperable across different systems in 416 the way that non-secret strings like domain names and usernames are. 418 A password MUST NOT be zero bytes in length. This rule is to be 419 enforced after any normalization and mapping of code points. 421 In protocols that provide passwords as input to a cryptographic 422 algorithm such as a hash function, the client will need to perform 423 proper preparation of the password before applying the algorithm, 424 since the password is not available to the server in plaintext form. 426 5.3. Examples 428 The following examples illustrate a small number of passwords that 429 are consistent with the format defined above (note that the 430 characters < and > are used here to delineate the actual passwords 431 and are not part of the username strings). 433 Table 3: A sample of legal passwords 435 +------------------------------------+------------------------------+ 436 | # | Password | Notes | 437 +------------------------------------+------------------------------+ 438 | 13| | ASCII space is allowed | 439 +------------------------------------+------------------------------+ 440 | 14| | | 441 +------------------------------------+------------------------------+ 442 | 15| <πßå> | Non-ASCII letters are OK | 443 | | | (e.g., GREEK SMALL LETTER | 444 | | | PI, U+03C0) | 445 +------------------------------------+------------------------------+ 446 | 16| | Symbols are OK (e.g., BLACK | 447 | | | DIAMOND SUIT, U+2666) | 448 +------------------------------------+------------------------------+ 450 The following examples illustrate strings that are not valid 451 passwords because they violate the format defined above. 453 Table 4: A sample of strings that violate the password rules 455 +------------------------------------+------------------------------+ 456 | # | Password | Notes | 457 +------------------------------------+------------------------------+ 458 | 17| | Non-ASCII space (here, OGHAM | 459 | | | SPACE MARK, U+1680) is not | 460 | | | allowed | 461 +------------------------------------+------------------------------+ 462 | 18| | Controls are disallowed | 463 +------------------------------------+------------------------------+ 465 6. Migration 467 The rules defined in this specification differ slightly from those 468 defined by the SASLprep specification [RFC4013]. The following 469 sections describe these differences, along with their implications 470 for migration, in more detail. 472 6.1. Usernames 474 Deployments that currently use SASLprep for handling usernames might 475 need to scrub existing data when migrating to use of the rules 476 defined in this specification. In particular: 478 o SASLprep specified the use of Unicode Normalization Form KC 479 (NFKC), whereas this usage of the PRECIS IdentifierClass employs 480 Unicode Normalization Form C (NFC). In practice this change is 481 unlikely to cause significant problems, because NFKC provides 482 methods for mapping Unicode code points with compatibility 483 equivalents to those equivalents, whereas the PRECIS 484 IdentifierClass entirely disallows Unicode code points with 485 compatibility equivalents (i.e., during comparison NFKC is more 486 "aggressive" about finding matches than is NFC). A few examples 487 might suffice to indicate the nature of the problem: (1) U+017F 488 LATIN SMALL LETTER LONG S is compatibility equivalent to U+0073 489 LATIN SMALL LETTER S (2) U+2163 ROMAN NUMERAL FOUR is 490 compatibility equivalent to U+0049 LATIN CAPITAL LETTER I and 491 U+0056 LATIN CAPITAL LETTER V (3) U+FB01 LATIN SMALL LIGATURE FI 492 is compatibility equivalent to U+0066 LATIN SMALL LETTER F and 493 U+0069 LATIN SMALL LETTER I. Under SASLprep, the use of NFKC also 494 handled the mapping of fullwidth and halfwidth code points to 495 their decomposition equivalents (see [I-D.ietf-precis-mappings]). 496 Although it is expected that code points with compatibility 497 equivalents are rare in existing usernames, for migration purposes 498 deployments might want to search their database of usernames for 499 Unicode code points with compatibility equivalents and map those 500 code points to their compatibility equivalents. 502 o SASLprep mapped the "characters commonly mapped to nothing" from 503 Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS 504 IdentifierClass entirely disallows most of these characters, which 505 correspond to the code points from the "M" category defined under 506 Section 6.13 of [I-D.ietf-precis-framework] (with the exception of 507 U+1806 MONGOLIAN TODO SOFT HYPHEN, which was "commonly mapped to 508 nothing" in Unicode 3.2 but at the time of this writing does not 509 have a derived property of Default_Ignorable_Code_Point in Unicode 510 6.2). For migration purposes, deployments might want to remove 511 code points contained in the PRECIS "M" category from usernames. 513 o SASLprep allowed uppercase and titlecase characters, whereas this 514 usage of the PRECIS IdentifierClass maps uppercase and titlecase 515 characters to their lowercase equivalents. For migration 516 purposes, deployments can either convert uppercase and titlecase 517 characters to their lowercase equivalents in usernames (thus 518 losing the case information) or preserve uppercase and titlecase 519 characters and ignore the case difference when comparing 520 usernames. 522 6.2. Passwords 524 Depending on local service policy, migration from RFC 4013 to this 525 specification might not involve any scrubbing of data (since 526 passwords might not be stored in the clear anyway); however, service 527 providers need to be aware of possible issues that might arise during 528 migration. In particular: 530 o SASLprep specified the use of Unicode Normalization Form KC 531 (NFKC), whereas this usage of the PRECIS FreeformClass employs 532 Unicode Normalization Form C (NFC). Because NFKC is more 533 aggressive about finding matches than NFC, in practice this change 534 is unlikely to cause significant problems and indeed has the 535 security benefit of probably resulting in fewer false positives 536 when comparing passwords. A few examples might suffice to 537 indicate the nature of the problem: (1) U+017F LATIN SMALL LETTER 538 LONG S is compatibility equivalent to U+0073 LATIN SMALL LETTER S 539 (2) U+2163 ROMAN NUMERAL FOUR is compatibility equivalent to 540 U+0049 LATIN CAPITAL LETTER I and U+0056 LATIN CAPITAL LETTER V 541 (3) U+FB01 LATIN SMALL LIGATURE FI is compatibility equivalent to 542 U+0066 LATIN SMALL LETTER F and U+0069 LATIN SMALL LETTER I. Under 543 SASLprep, the use of NFKC also handled the mapping of fullwidth 544 and halfwidth code points to their decomposition equivalents (see 545 [I-D.ietf-precis-mappings]). Although it is expected that code 546 points with compatibility equivalents are rare in existing 547 passwords, some passwords that matched when SASLprep was used 548 might no longer work when the rules in this specification are 549 applied. 551 o SASLprep mapped the "characters commonly mapped to nothing" from 552 Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS 553 FreeformClass entirely disallows such characters, which correspond 554 to the code points from the "M" category defined under Section 555 6.13 of [I-D.ietf-precis-framework] (with the exception of U+1806 556 MONGOLIAN TODO SOFT HYPHEN, which was commonly mapped to nothing 557 in Unicode 3.2 but at the time of this writing is allowed by 558 Unicode 6.2). In practice, this change will probably have no 559 effect on comparison, but user-oriented software might reject such 560 code points instead of ignoring them during password preparation. 562 7. IANA Considerations 564 The IANA shall add the following entries to the PRECIS Profiles 565 Registry. 567 7.1. UsernameIdentifierClass 568 Name: UsernameIdentifierClass. 569 Applicability: Usernames in security and application protocols. 570 Base Class: IdentifierClass. 571 Replaces: The SASLprep profile of Stringprep. 572 Width Mapping: Map fullwidth and halfwidth characters to their 573 decomposition equivalents. 574 Additional Mappings: None required or recommended. 575 Case Mapping: To be defined by security or application protocols 576 that use this profile. 577 Normalization: NFC. 578 Directionality: The "Bidi Rule" defined in RFC 5893 applies. 579 Exclusions: None. 580 Enforcement: To be defined by security or application protocols that 581 use this profile. 582 Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to 583 the number issued for this specification.] 585 7.2. PasswordFreeformClass 587 Name: PasswordFreeformClass. 588 Applicability: Passwords in security and application protocols. 589 Base Class: FreeformClass 590 Replaces: The SASLprep profile of Stringprep. 591 Width Mapping: None. 592 Additional Mappings: Map non-ASCII space characters to ASCII space. 593 Case Mapping: None. 594 Normalization: NFC. 595 Directionality: None. 596 Exclusions: None. 597 Enforcement: To be defined by security or application protocols that 598 use this profile. 599 Specification: RFC XXXX. 601 8. Security Considerations 603 8.1. Password/Passphrase Strength 605 The ability to include a wide range of characters in passwords and 606 passphrases can increase the potential for creating a strong password 607 with high entropy. However, in practice, the ability to include such 608 characters ought to be weighed against the possible need to reproduce 609 them on various devices using various input methods. 611 8.2. Identifier Comparison 613 The process of comparing identifiers (such as SASL simple user names, 614 authentication identifiers, and authorization identifiers) can lead 615 to either false negatives or false positives, both of which have 616 security implications. A more detailed discussion can be found in 617 [RFC6943]. 619 8.3. Reuse of PRECIS 621 The security considerations described in [I-D.ietf-precis-framework] 622 apply to the "IdentifierClass" and "FreeformClass" base string 623 classes used in this document for usernames and passwords, 624 respectively. 626 8.4. Reuse of Unicode 628 The security considerations described in [UTS39] apply to the use of 629 Unicode characters in usernames and passwords. 631 9. References 633 9.1. Normative References 635 [I-D.ietf-precis-framework] 636 Saint-Andre, P. and M. Blanchet, "Precis Framework: 637 Handling Internationalized Strings in Protocols", 638 draft-ietf-precis-framework-12 (work in progress), 639 November 2013. 641 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 642 Requirement Levels", BCP 14, RFC 2119, March 1997. 644 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 645 10646", STD 63, RFC 3629, November 2003. 647 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 648 Specifications: ABNF", STD 68, RFC 5234, January 2008. 650 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 651 6.1", 2012, 652 . 654 9.2. Informative References 656 [I-D.ietf-precis-mappings] 657 Yoneya, Y. and T. NEMOTO, "Mapping characters for PRECIS 658 classes", draft-ietf-precis-mappings-05 (work in 659 progress), October 2013. 661 [RFC20] Cerf, V., "ASCII format for network interchange", RFC 20, 662 October 1969. 664 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 665 Leach, P., Luotonen, A., and L. Stewart, "HTTP 666 Authentication: Basic and Digest Access Authentication", 667 RFC 2617, June 1999. 669 [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of 670 Internationalized Strings ("stringprep")", RFC 3454, 671 December 2002. 673 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 674 4rev1", RFC 3501, March 2003. 676 [RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names 677 and Passwords", RFC 4013, February 2005. 679 [RFC4422] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple 680 Authentication and Security Layer (SASL)", RFC 4422, 681 June 2006. 683 [RFC4616] Zeilenga, K., "The PLAIN Simple Authentication and 684 Security Layer (SASL) Mechanism", RFC 4616, August 2006. 686 [RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams, 687 "Salted Challenge Response Authentication Mechanism 688 (SCRAM) SASL and GSS-API Mechanisms", RFC 5802, July 2010. 690 [RFC5890] Klensin, J., "Internationalized Domain Names for 691 Applications (IDNA): Definitions and Document Framework", 692 RFC 5890, August 2010. 694 [RFC5891] Klensin, J., "Internationalized Domain Names in 695 Applications (IDNA): Protocol", RFC 5891, August 2010. 697 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 698 Internationalized Domain Names for Applications (IDNA)", 699 RFC 5893, August 2010. 701 [RFC5894] Klensin, J., "Internationalized Domain Names for 702 Applications (IDNA): Background, Explanation, and 703 Rationale", RFC 5894, August 2010. 705 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 706 Protocol (XMPP): Core", RFC 6120, March 2011. 708 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 709 Internationalization in the IETF", BCP 166, RFC 6365, 710 September 2011. 712 [RFC6943] Thaler, D., "Issues in Identifier Comparison for Security 713 Purposes", RFC 6943, May 2013. 715 [UTS39] The Unicode Consortium, "Unicode Technical Standard #39: 716 Unicode Security Mechanisms", July 2012, 717 . 719 Appendix A. Differences from RFC 4013 721 This document builds upon the PRECIS framework defined in 722 [I-D.ietf-precis-framework], which differs fundamentally from the 723 stringprep technology [RFC3454] used in SASLprep [RFC4013]. The 724 primary difference is that stringprep profiles allowed all characters 725 except those which were explicitly disallowed, whereas PRECIS 726 profiles disallow all characters except those which are explicitly 727 allowed (this "inclusion model" was originally used for 728 internationalized domain names in [RFC5891]; see [RFC5894] for 729 further discussion). It is important to keep this distinction in 730 mind when comparing the technology defined in this document to 731 SASLprep [RFC4013]. 733 The following substantive modifications were made from RFC 4013. 735 o A single SASLprep algorithm was replaced by two separate 736 algorithms: one for usernames and another for passwords. 737 o The new preparation algorithms use PRECIS instead of a stringprep 738 profile. The new algorithms work independenctly of Unicode 739 versions. 740 o As recommended in the PRECIS framwork, changed the Unicode 741 normalization form to NFC (from NFKC). 742 o Some Unicode code points that were mapped to nothing in RFC 4013 743 are simply disallowed by PRECIS. 745 Appendix B. Acknowledgements 747 The following individuals provided helpful feedback on this document: 748 Marc Blanchet, Alan DeKok, Joe Hildebrand, Jeffrey Hutzelman, Simon 749 Josefsson, Jonathan Lennox, Matt Miller, Chris Newman, Yutaka OIWA, 750 Pete Resnick, Andrew Sullivan, and Nico Williams (Nico in particular 751 provided text that was used in Section 4.2.1). Thanks also to 752 Yoshiro YONEYA and Takahiro NEMOTO for implementation feedback. 754 This document borrows some text from [RFC4013] and [RFC6120]. 756 Authors' Addresses 758 Peter Saint-Andre 759 Cisco Systems, Inc. 760 1899 Wynkoop Street, Suite 600 761 Denver, CO 80202 762 USA 764 Phone: +1-303-308-3282 765 Email: psaintan@cisco.com 767 Alexey Melnikov 768 Isode Ltd 769 5 Castle Business Village 770 36 Station Road 771 Hampton, Middlesex TW12 2BX 772 UK 774 Email: Alexey.Melnikov@isode.com