idnits 2.17.1 draft-melnikov-precis-saslprepbis-04.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 (September 23, 2012) is 4226 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-05 -- Possible downref: Non-RFC (?) normative reference: ref. 'UNICODE' == Outdated reference: A later version (-03) exists of draft-yoneya-precis-mappings-02 -- Obsolete informational reference (is this intentional?): RFC 3454 (Obsoleted by RFC 7564) -- Obsolete informational reference (is this intentional?): RFC 4013 (Obsoleted by RFC 7613) Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 4 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: March 27, 2013 September 23, 2012 8 Preparation and Comparison of Internationalized Strings Representing 9 Simple User Names and Passwords 10 draft-melnikov-precis-saslprepbis-04 12 Abstract 14 This document describes how to handle Unicode strings representing 15 simple user names and passwords, primarily for purposes of 16 comparison. This profile is intended to be used by Simple 17 Authentication and Security Layer (SASL) mechanisms (such as PLAIN 18 and SCRAM-SHA-1), as well as other protocols that exchange simple 19 user names or passwords. This document obsoletes RFC 4013. 21 Status of this Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on March 27, 2013. 38 Copyright Notice 40 Copyright (c) 2012 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 1.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 58 2. Simple User Names . . . . . . . . . . . . . . . . . . . . . . 4 59 2.1. Definition . . . . . . . . . . . . . . . . . . . . . . . . 4 60 2.2. Preparation . . . . . . . . . . . . . . . . . . . . . . . 4 61 3. Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 3.1. Definition . . . . . . . . . . . . . . . . . . . . . . . . 5 63 3.2. Preparation . . . . . . . . . . . . . . . . . . . . . . . 5 64 4. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . 6 65 4.1. User Names . . . . . . . . . . . . . . . . . . . . . . . . 6 66 4.2. Passwords . . . . . . . . . . . . . . . . . . . . . . . . 7 67 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 68 5.1. Password/Passphrase Strength . . . . . . . . . . . . . . . 8 69 5.2. Reuse of PRECIS . . . . . . . . . . . . . . . . . . . . . 8 70 5.3. Reuse of Unicode . . . . . . . . . . . . . . . . . . . . . 9 71 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 72 6.1. Use of NameClass . . . . . . . . . . . . . . . . . . . . . 9 73 6.2. Use of FreeClass . . . . . . . . . . . . . . . . . . . . . 9 74 7. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 9 75 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 10 76 8.1. Normative References . . . . . . . . . . . . . . . . . . . 10 77 8.2. Informative References . . . . . . . . . . . . . . . . . . 10 78 Appendix A. Differences from RFC 4013 . . . . . . . . . . . . . . 11 79 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 11 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12 82 1. Introduction 84 1.1. Overview 86 User names and passwords are used pervasively in authentication and 87 authorization on the Internet. To increase the likelihood that the 88 input and comparison of user names and passwords will work in ways 89 that make sense for typical users throughout the world, this document 90 defines rules for preparing and comparing internationalized strings 91 that represent simple user names and passwords. 93 The algorithms defined in this document assume that all strings are 94 comprised of characters from the Unicode character set [UNICODE]. 96 The algorithms are designed for use in Simple Authentication and 97 Security Layer (SASL) [RFC4422] mechanisms, such as PLAIN [RFC4616] 98 and SCRAM-SHA-1 [RFC5802]. However, they might be applicable 99 wherever simple user names or passwords are used. This profile is 100 not intended for use in preparing strings that are not simple user 101 names (e.g., email addresses, DNS domain names, LDAP distinguished 102 names), nor in cases where identifiers or secrets are not strings 103 (e.g., keys or certificates) or require different handling (e.g., 104 case folding). 106 This document builds upon the PRECIS framework defined in 107 [FRAMEWORK], which differs fundamentally from the stringprep 108 technology [RFC3454] used in SASLprep [RFC4013]. The primary 109 difference is that stringprep profiles allowed all characters except 110 those which were explicitly disallowed, whereas PRECIS profiles 111 disallow all characters except those which are explicitly allowed 112 (this "inclusion model" was originally used for internationalized 113 domain names in [RFC5891]; see [RFC5894] for further discussion). It 114 is important to keep this distinction in mind when comparing the 115 technology defined in this document to SASLprep [RFC4013]. 117 This document obsoletes RFC 4013. 119 1.2. Terminology 121 Many important terms used in this document are defined in 122 [FRAMEWORK], [RFC4422], [RFC5890], [RFC6365], and [UNICODE]. The 123 term "non-ASCII space" refers to any Unicode code point with a 124 general category of "Zs", with the exception of U+0020 (here called 125 "ASCII space"). 127 As used here, the term "password" is not literally limited to a word; 128 i.e., a password could be a passphrase consisting of more than one 129 word, perhaps separated by spaces or other such characters. 131 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 132 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 133 "OPTIONAL" in this document are to be interpreted as described in 134 [RFC2119]. 136 2. Simple User Names 138 2.1. Definition 140 Some SASL mechanisms (e.g., CRAM-MD5, DIGEST-MD5, and SCRAM) specify 141 that the authentication identity used in the context of such 142 mechanisms is a "simple user name" (see Section 2 of [RFC4422] as 143 well as [RFC4013]). However, the exact form of a simple user name in 144 any particular mechanism or deployment thereof is a local matter, and 145 a simple user name does not necessarily map to an application 146 identifier such as the localpart of an email address. 148 For purposes of preparation and comparison of authentication 149 identities, this document specifies that a simple user name is a 150 string of Unicode code points [UNICODE], encoded using UTF-8 151 [RFC3629], and structured as an ordered sequence of "simpleparts" 152 (where the complete simple user name can consist of a single 153 simplepart or a space-separated sequence of simpleparts). 155 Therefore the syntax for a simple user name is defined as follows 156 using the Augmented Backus-Naur Form (ABNF) as specified in 157 [RFC5234]. 159 simpleusername = simplepart [1*(1*SP simplepart)] 160 simplepart = 1*(namepoint) 161 ; 162 ; a "namepoint" is a UTF-8 encoded 163 ; Unicode code point that conforms to 164 ; the "NameClass" string class defined 165 ; in draft-ietf-precis-framework 166 ; 168 Note well that all code points and blocks not explicitly allowed in 169 the PRECIS NameClass are disallowed; this includes private use 170 characters, surrogate code points, and the other code points and 171 blocks defined as "Prohibited Output" in Section 2.3 of RFC 4013. 173 2.2. Preparation 175 A simple user name MUST NOT be zero bytes in length. This rule is to 176 be enforced after any normalization and mapping of code points. 178 Each simplepart of a simple user name MUST conform to the definition 179 of the PRECIS NameClass provided in [FRAMEWORK], where the 180 normalization, casemapping, and directionality rules are as described 181 below. 183 1. Unicode Normalization Form C (NFC) MUST be applied to all 184 characters. 186 2. Uppercase and titlecase characters MUST be mapped to their 187 lowercase equivalents. 189 3. Additional mappings MAY be applied, such as those defined in 190 [I-D.yoneya-precis-mappings]. 192 With regard to directionality, the "Bidi Rule" provided in [RFC5893] 193 applies. 195 3. Passwords 197 3.1. Definition 199 For purposes of preparation and comparison of passwords, this 200 document specifies that a password is a string of Unicode code points 201 [UNICODE], encoded using UTF-8 [RFC3629], and conformant to the 202 PRECIS FreeClass. 204 Therefore the syntax for a password is defined as follows using the 205 Augmented Backus-Naur Form (ABNF) as specified in [RFC5234]. 207 password = 1*(freepoint) 208 ; 209 ; a "freepoint" is a UTF-8 encoded 210 ; Unicode code point that conforms to 211 ; the "FreeClass" string class defined 212 ; in draft-ietf-precis-framework 213 ; 215 Note well that all code points and blocks not explicitly allowed in 216 the PRECIS FreeClass are disallowed; this includes private use 217 characters, surrogate code points, and the other code points and 218 blocks defined as "Prohibited Output" in Section 2.3 of RFC 4013. 220 3.2. Preparation 222 A password MUST NOT be zero bytes in length. This rule is to be 223 enforced after any normalization and mapping of code points. 225 A password MUST be treated as follows, where the operations specified 226 MUST be completed in the order shown: 228 1. Apply Unicode Normalization Form C (NFC) to all characters. 230 2. Map any instances of non-ASCII space to ASCII space (U+0020). 232 3. Ensure that the resulting string conforms to the definition of 233 the PRECIS FreeClass. 235 With regard to directionality, the "Bidi Rule" (defined in [RFC5893]) 236 and similar rules are unnecessary and inapplicable to passwords, 237 since they can reduce the range of characters that are allowed in a 238 string and therefore reduce the amount of entropy that is possible in 239 a password. Furthermore, such rules are intended to minimize the 240 possibility that the same string will be displayed differently on a 241 system set for right-to-left display and a system set for left-to- 242 right display; however, passwords are typically not displayed at all 243 and are rarely meant to be interoperable across different systems in 244 the way that non-secret strings like domain names and user names are. 246 4. Migration 248 The rules defined in this specification differ slightly from those 249 defined by the SASLprep specification [RFC4013]. The following 250 sections describe these differences, along with their implications 251 for migration, in more detail. 253 4.1. User Names 255 Deployments that currently use SASLprep for handling user names might 256 need to scrub existing data when migrating to use of the rules 257 defined in this specification. In particular: 259 o SASLprep specified the use of Unicode Normalization Form KC 260 (NFKC), whereas this usage of the PRECIS NameClass employs Unicode 261 Normalization Form C (NFC). In practice this change is unlikely 262 to cause significant problems, because NFKC provides methods for 263 mapping Unicode code points with compatibility equivalents to 264 those equivalents, whereas the PRECIS NameClass entirely disallows 265 Unicode code points with compatibility equivalents (i.e., during 266 comparison NFKC is more "aggressive" about finding matches than is 267 NFC). A few examples might suffice to indicate the nature of the 268 problem: (1) U+017F LATIN SMALL LETTER LONG S is compatibility 269 equivalent to U+0073 LATIN SMALL LETTER S (2) U+2163 ROMAN NUMERAL 270 FOUR is compatibility equivalent to U+0049 LATIN CAPITAL LETTER I 271 and U+0056 LATIN CAPITAL LETTER V (3) U+FB01 LATIN SMALL LIGATURE 272 FI is compatibility equivalent to U+0066 LATIN SMALL LETTER F and 273 U+0069 LATIN SMALL LETTER I. Under SASLprep, the use of NFKC also 274 handled the mapping of fullwidth and halfwidth code points to 275 their decomposition equivalents (see 276 [I-D.yoneya-precis-mappings]). Although it is expected that code 277 points with compatibility equivalents are rare in existing user 278 names, for migration purposes deployments might want to search 279 their database of user names for Unicode code points with 280 compatibility equivalents and map those code points to their 281 compatibility equivalents. 283 o SASLprep mapped non-ASCII spaces to ASCII space (U+0020), whereas 284 the PRECIS NameClass entirely disallows non-ASCII spaces. The 285 non-ASCII space characters are U+00A0 NO-BREAK SPACE, U+1680 OGHAM 286 SPACE MARK, U+180E MONGOLIAN VOWEL SEPARATOR, U+2000 EN QUAD 287 through U+200A HAIR SPACE, U+202F NARROW NO-BREAK SPACE, U+205F 288 MEDIUM MATHEMATICAL SPACE, and U+3000 IDEOGRAPHIC SPACE. For 289 migration purposes, deployments might want to convert non-ASCII 290 space characters to ASCII space in simple user names. 292 o SASLprep mapped the "characters commonly mapped to nothing" from 293 Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS 294 NameClass entirely disallows most of these characters, which 295 correspond to the code points from the "M" category defined under 296 Section 6.13 of [FRAMEWORK] (with the exception of U+1806 297 MONGOLIAN TODO SOFT HYPHEN, which was "commonly mapped to nothing" 298 in Unicode 3.2 but at the time of this writing does not have a 299 derived property of Default_Ignorable_Code_Point in Unicode 6.1). 300 For migration purposes, deployments might want to remove code 301 points contained in the PRECIS "M" category from simple user 302 names. 304 o SASLprep allowed uppercase and titlecase characters, whereas this 305 usage of the PRECIS NameClass maps uppercase and titlecase 306 characters to their lowercase equivalents. For migration 307 purposes, deployments can either convert uppercase and titlecase 308 characters to their lowercase equivalents in simple user names 309 (thus losing the case information) or preserve uppercase and 310 titlecase characters and ignore the case difference when comparing 311 simple user names. 313 4.2. Passwords 315 Depending on local service policy, migration from RFC 4013 to this 316 specification might not involve any scrubbing of data (since 317 passwords might not be stored in the clear anyway); however, service 318 providers need to be aware of possible issues that might arise during 319 migration. In particular: 321 o SASLprep specified the use of Unicode Normalization Form KC 322 (NFKC), whereas this usage of the PRECIS FreeClass employs Unicode 323 Normalization Form C (NFC). Because NFKC is more aggressive about 324 finding matches than NFC, in practice this change is unlikely to 325 cause significant problems and indeed has the security benefit of 326 probably resulting in fewer false positives when comparing 327 passwords. A few examples might suffice to indicate the nature of 328 the problem: (1) U+017F LATIN SMALL LETTER LONG S is compatibility 329 equivalent to U+0073 LATIN SMALL LETTER S (2) U+2163 ROMAN NUMERAL 330 FOUR is compatibility equivalent to U+0049 LATIN CAPITAL LETTER I 331 and U+0056 LATIN CAPITAL LETTER V (3) U+FB01 LATIN SMALL LIGATURE 332 FI is compatibility equivalent to U+0066 LATIN SMALL LETTER F and 333 U+0069 LATIN SMALL LETTER I. Under SASLprep, the use of NFKC also 334 handled the mapping of fullwidth and halfwidth code points to 335 their decomposition equivalents (see 336 [I-D.yoneya-precis-mappings]). Although it is expected that code 337 points with compatibility equivalents are rare in existing 338 passwords, some passwords that matched when SASLprep was used 339 might no longer work when the rules in this specification are 340 applied. 342 o SASLprep mapped the "characters commonly mapped to nothing" from 343 Appendix B.1 of [RFC3454]) to nothing, whereas the PRECIS 344 FreeClass entirely disallows such characters, which correspond to 345 the code points from the "M" category defined under Section 6.13 346 of [FRAMEWORK] (with the exception of U+1806 MONGOLIAN TODO SOFT 347 HYPHEN, which was commonly mapped to nothing in Unicode 3.2 but at 348 the time of this writing is allowed by Unicode 6.1). In practice, 349 this change will probably have no effect on comparison, but user- 350 oriented software might reject such code points instead of 351 ignoring them during password preparation. 353 5. Security Considerations 355 5.1. Password/Passphrase Strength 357 The ability to include a wide range of characters in passwords and 358 passphrases can increase the potential for creating a strong password 359 with high entropy. However, in practice, the ability to include such 360 characters ought to be weighed against the possible need to reproduce 361 them on various devices using various input methods. 363 5.2. Reuse of PRECIS 365 The security considerations described in [FRAMEWORK] apply to the 366 "NameClass" and "FreeClass" base string classes used in this document 367 for simple user names and passwords, respectively. 369 5.3. Reuse of Unicode 371 The security considerations described in [UTR39] apply to the use of 372 Unicode characters in user names and passwords. 374 6. IANA Considerations 376 6.1. Use of NameClass 378 The IANA shall add an entry to the PRECIS Usage Registry for reuse of 379 the PRECIS NameClass in SASL, as follows: 381 Applicability: Usernames in SASL and Kerberos. 382 Base Class: NameClass. 383 Subclass: No. 384 Replaces: The SASLprep profile of Stringprep. 385 Normalization: NFC. 386 Casemapping: Map uppercase and titlecase characters to lowercase. 387 Additional Mappings: None. 388 Directionality: The "Bidi Rule" defined in RFC 5893 applies. 389 Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to 390 the number issued for this specification.] 392 6.2. Use of FreeClass 394 The IANA shall add an entry to the PRECIS Usage Registry for reuse of 395 the PRECIS FreeClass in SASL, as follows: 397 Applicability: Passwords in SASL and Kerberos. 398 Base Class: FreeClass 399 Subclass: No. 400 Replaces: The SASLprep profile of Stringprep. 401 Normalization: NFC. 402 Casemapping: None. 403 Additional Mappings: Map non-ASCII space characters to ASCII space. 404 Directionality: None. 405 Specification: RFC XXXX. [Note to RFC Editor: please change XXXX to 406 the number issued for this specification.] 408 7. Open Issues 410 We need to compare the output obtained when applying the new rules 411 with Unicode 3.2 and Unicode 6.1 data to the output obtained when 412 applying the SASLprep rules with Unicode 3.2 data, then make sure 413 that the PRECIS Working Group and KITTEN Working Group are 414 comfortable with any changes to the Unicode characters that are 415 allowed and disallowed. (See also the migration issues described 416 under Section 4.) 418 8. References 420 8.1. Normative References 422 [FRAMEWORK] 423 Saint-Andre, P. and M. Blanchet, "Precis Framework: 424 Handling Internationalized Strings in Protocols", 425 draft-ietf-precis-framework-05 (work in progress), 426 August 2012. 428 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 429 Requirement Levels", BCP 14, RFC 2119, March 1997. 431 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 432 10646", STD 63, RFC 3629, November 2003. 434 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 435 Specifications: ABNF", STD 68, RFC 5234, January 2008. 437 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 438 6.1", 2012, 439 . 441 8.2. Informative References 443 [I-D.yoneya-precis-mappings] 444 YONEYA, Y. and T. NEMOTO, "Mapping characters for PRECIS 445 classes", draft-yoneya-precis-mappings-02 (work in 446 progress), July 2012. 448 [RFC3454] Hoffman, P. and M. Blanchet, "Preparation of 449 Internationalized Strings ("stringprep")", RFC 3454, 450 December 2002. 452 [RFC4013] Zeilenga, K., "SASLprep: Stringprep Profile for User Names 453 and Passwords", RFC 4013, February 2005. 455 [RFC4422] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple 456 Authentication and Security Layer (SASL)", RFC 4422, 457 June 2006. 459 [RFC4616] Zeilenga, K., "The PLAIN Simple Authentication and 460 Security Layer (SASL) Mechanism", RFC 4616, August 2006. 462 [RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams, 463 "Salted Challenge Response Authentication Mechanism 464 (SCRAM) SASL and GSS-API Mechanisms", RFC 5802, July 2010. 466 [RFC5890] Klensin, J., "Internationalized Domain Names for 467 Applications (IDNA): Definitions and Document Framework", 468 RFC 5890, August 2010. 470 [RFC5891] Klensin, J., "Internationalized Domain Names in 471 Applications (IDNA): Protocol", RFC 5891, August 2010. 473 [RFC5893] Alvestrand, H. and C. Karp, "Right-to-Left Scripts for 474 Internationalized Domain Names for Applications (IDNA)", 475 RFC 5893, August 2010. 477 [RFC5894] Klensin, J., "Internationalized Domain Names for 478 Applications (IDNA): Background, Explanation, and 479 Rationale", RFC 5894, August 2010. 481 [RFC6365] Hoffman, P. and J. Klensin, "Terminology Used in 482 Internationalization in the IETF", BCP 166, RFC 6365, 483 September 2011. 485 [UTR39] The Unicode Consortium, "Unicode Technical Report #39: 486 Unicode Security Mechanisms", August 2010, 487 . 489 Appendix A. Differences from RFC 4013 491 The following substantive modifications were made from RFC 4013. 493 o A single SASLprep algorithm was replaced by two separate 494 algorithms: one for simple user names and another for passwords. 495 o The new preparation algorithms use PRECIS instead of a stringprep 496 profile. The new algorithms work independenctly of Unicode 497 versions. 498 o As recommended in the PRECIS framwork, changed the Unicode 499 normalization form from NFKC to NFC. 500 o Some Unicode code points that were mapped to nothing in RFC 4013 501 are simply disallowed by PRECIS. 503 Appendix B. Acknowledgements 505 Thanks to Yoshiro YONEYA and Takahiro NEMOTO for implementation 506 feedback. Thanks also to Marc Blanchet, Joe Hildebrand, Alan DeKok, 507 Simon Josefsson, Jonathan Lennox, Matt Miller, Pete Resnick, and 508 Andrew Sullivan for their input regarding the text. 510 This document borrows some text from RFC 4013 and RFC 6120. 512 Authors' Addresses 514 Peter Saint-Andre 515 Cisco Systems, Inc. 516 1899 Wynkoop Street, Suite 600 517 Denver, CO 80202 518 USA 520 Phone: +1-303-308-3282 521 Email: psaintan@cisco.com 523 Alexey Melnikov 524 Isode Ltd 525 5 Castle Business Village 526 36 Station Road 527 Hampton, Middlesex TW12 2BX 528 UK 530 Email: Alexey.Melnikov@isode.com