1 1.1 elric 2 1.1 elric 3 1.1 elric 4 1.1 elric 5 1.1 elric 6 1.1 elric 7 1.1 elric Network Working Group K. Zeilenga 8 1.1 elric Request for Comments: 4013 OpenLDAP Foundation 9 1.1 elric Category: Standards Track February 2005 10 1.1 elric 11 1.1 elric 12 1.1 elric SASLprep: Stringprep Profile for User Names and Passwords 13 1.1 elric 14 1.1 elric Status of This Memo 15 1.1 elric 16 1.1 elric This document specifies an Internet standards track protocol for the 17 1.1 elric Internet community, and requests discussion and suggestions for 18 1.1 elric improvements. Please refer to the current edition of the "Internet 19 1.1 elric Official Protocol Standards" (STD 1) for the standardization state 20 1.1 elric and status of this protocol. Distribution of this memo is unlimited. 21 1.1 elric 22 1.1 elric Copyright Notice 23 1.1 elric 24 1.1 elric Copyright (C) The Internet Society (2005). 25 1.1 elric 26 1.1 elric Abstract 27 1.1 elric 28 1.1 elric This document describes how to prepare Unicode strings representing 29 1.1 elric user names and passwords for comparison. The document defines the 30 1.1 elric "SASLprep" profile of the "stringprep" algorithm to be used for both 31 1.1 elric user names and passwords. This profile is intended to be used by 32 1.1 elric Simple Authentication and Security Layer (SASL) mechanisms (such as 33 1.1 elric PLAIN, CRAM-MD5, and DIGEST-MD5), as well as other protocols 34 1.1 elric exchanging simple user names and/or passwords. 35 1.1 elric 36 1.1 elric 1. Introduction 37 1.1 elric 38 1.1 elric The use of simple user names and passwords in authentication and 39 1.1 elric authorization is pervasive on the Internet. To increase the 40 1.1 elric likelihood that user name and password input and comparison work in 41 1.1 elric ways that make sense for typical users throughout the world, this 42 1.1 elric document defines rules for preparing internationalized user names and 43 1.1 elric passwords for comparison. For simplicity and implementation ease, a 44 1.1 elric single algorithm is defined for both user names and passwords. 45 1.1 elric 46 1.1 elric The algorithm assumes all strings are comprised of characters from 47 1.1 elric the Unicode [Unicode] character set. 48 1.1 elric 49 1.1 elric This document defines the "SASLprep" profile of the "stringprep" 50 1.1 elric algorithm [StringPrep]. 51 1.1 elric 52 1.1 elric The profile is designed for use in Simple Authentication and Security 53 1.1 elric Layer ([SASL]) mechanisms, such as [PLAIN], [CRAM-MD5], and 54 1.1 elric [DIGEST-MD5]. It may be applicable where simple user names and 55 1.1 elric 56 1.1 elric 57 1.1 elric 58 1.1 elric Zeilenga Standards Track [Page 1] 59 1.1 elric 61 1.1 elric RFC 4013 SASLprep February 2005 62 1.1 elric 63 1.1 elric 64 1.1 elric passwords are used. This profile is not intended for use in 65 1.1 elric preparing identity strings that are not simple user names (e.g., 66 1.1 elric email addresses, domain names, distinguished names), or where 67 1.1 elric identity or password strings that are not character data, or require 68 1.1 elric different handling (e.g., case folding). 69 1.1 elric 70 1.1 elric This document does not alter the technical specification of any 71 1.1 elric existing protocols. Any specification that wishes to use the 72 1.1 elric algorithm described in this document needs to explicitly incorporate 73 1.1 elric this document and provide precise details as to where and how this 74 1.1 elric algorithm is used by implementations of that specification. 75 1.1 elric 76 1.1 elric 2. The SASLprep Profile 77 1.1 elric 78 1.1 elric This section defines the "SASLprep" profile of the "stringprep" 79 1.1 elric algorithm [StringPrep]. This profile is intended for use in 80 1.1 elric preparing strings representing simple user names and passwords. 81 1.1 elric 82 1.1 elric This profile uses Unicode 3.2 [Unicode]. 83 1.1 elric 84 1.1 elric Character names in this document use the notation for code points and 85 1.1 elric names from the Unicode Standard [Unicode]. For example, the letter 86 1.1 elric "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>. 87 1.1 elric In the lists of mappings and the prohibited characters, the "U+" is 88 1.1 elric left off to make the lists easier to read. The comments for 89 1.1 elric character ranges are shown in square brackets (such as "[CONTROL 90 1.1 elric CHARACTERS]") and do not come from the standard. 91 1.1 elric 92 1.1 elric Note: A glossary of terms used in Unicode can be found in [Glossary]. 93 1.1 elric Information on the Unicode character encoding model can be found in 94 1.1 elric [CharModel]. 95 1.1 elric 96 1.1 elric 2.1. Mapping 97 1.1 elric 98 1.1 elric This profile specifies: 99 1.1 elric 100 1.1 elric - non-ASCII space characters [StringPrep, C.1.2] that can be 101 1.1 elric mapped to SPACE (U+0020), and 102 1.1 elric 103 1.1 elric - the "commonly mapped to nothing" characters [StringPrep, B.1] 104 1.1 elric that can be mapped to nothing. 105 1.1 elric 106 1.1 elric 2.2. Normalization 107 1.1 elric 108 1.1 elric This profile specifies using Unicode normalization form KC, as 109 1.1 elric described in Section 4 of [StringPrep]. 110 1.1 elric 111 1.1 elric 112 1.1 elric 113 1.1 elric 114 1.1 elric 115 1.1 elric Zeilenga Standards Track [Page 2] 116 1.1 elric 118 1.1 elric RFC 4013 SASLprep February 2005 119 1.1 elric 120 1.1 elric 121 1.1 elric 2.3. Prohibited Output 122 1.1 elric 123 1.1 elric This profile specifies the following characters as prohibited input: 124 1.1 elric 125 1.1 elric - Non-ASCII space characters [StringPrep, C.1.2] 126 1.1 elric - ASCII control characters [StringPrep, C.2.1] 127 1.1 elric - Non-ASCII control characters [StringPrep, C.2.2] 128 1.1 elric - Private Use characters [StringPrep, C.3] 129 1.1 elric - Non-character code points [StringPrep, C.4] 130 1.1 elric - Surrogate code points [StringPrep, C.5] 131 1.1 elric - Inappropriate for plain text characters [StringPrep, C.6] 132 1.1 elric - Inappropriate for canonical representation characters 133 1.1 elric [StringPrep, C.7] 134 1.1 elric - Change display properties or deprecated characters 135 1.1 elric [StringPrep, C.8] 136 1.1 elric - Tagging characters [StringPrep, C.9] 137 1.1 elric 138 1.1 elric 2.4. Bidirectional Characters 139 1.1 elric 140 1.1 elric This profile specifies checking bidirectional strings as described in 141 1.1 elric [StringPrep, Section 6]. 142 1.1 elric 143 1.1 elric 2.5. Unassigned Code Points 144 1.1 elric 145 1.1 elric This profile specifies the [StringPrep, A.1] table as its list of 146 1.1 elric unassigned code points. 147 1.1 elric 148 1.1 elric 3. Examples 149 1.1 elric 150 1.1 elric The following table provides examples of how various character data 151 1.1 elric is transformed by the SASLprep string preparation algorithm 152 1.1 elric 153 1.1 elric # Input Output Comments 154 1.1 elric - ----- ------ -------- 155 1.1 elric 1 I<U+00AD>X IX SOFT HYPHEN mapped to nothing 156 1.1 elric 2 user user no transformation 157 1.1 elric 3 USER USER case preserved, will not match #2 158 1.1 elric 4 <U+00AA> a output is NFKC, input in ISO 8859-1 159 1.1 elric 5 <U+2168> IX output is NFKC, will match #1 160 1.1 elric 6 <U+0007> Error - prohibited character 161 1.1 elric 7 <U+0627><U+0031> Error - bidirectional check 162 1.1 elric 163 1.1 elric 4. Security Considerations 164 1.1 elric 165 1.1 elric This profile is intended to prepare simple user name and password 166 1.1 elric strings for comparison or use in cryptographic functions (e.g., 167 1.1 elric message digests). The preparation algorithm was specifically 168 1.1 elric designed such that its output is canonical, and it is well-formed. 169 1.1 elric 170 1.1 elric 171 1.1 elric 172 1.1 elric Zeilenga Standards Track [Page 3] 173 1.1 elric 175 1.1 elric RFC 4013 SASLprep February 2005 176 1.1 elric 177 1.1 elric 178 1.1 elric However, due to an anomaly [PR29] in the specification of Unicode 179 1.1 elric normalization, canonical equivalence is not guaranteed for a select 180 1.1 elric few character sequences. These sequences, however, do not appear in 181 1.1 elric well-formed text. This specification was published despite this 182 1.1 elric known technical problem. It is expected that this specification will 183 1.1 elric be revised before further progression on the Standards Track (after 184 1.1 elric [Unicode] and/or [StringPrep] specifications have been updated to 185 1.1 elric address this problem). 186 1.1 elric 187 1.1 elric It is not intended for preparing identity strings that are not simple 188 1.1 elric user names (e.g., distinguished names, domain names), nor is the 189 1.1 elric profile intended for use of simple user names that require different 190 1.1 elric handling (such as case folding). Protocols (or applications of those 191 1.1 elric protocols) that have application-specific identity forms and/or 192 1.1 elric comparison algorithms should use mechanisms specifically designed for 193 1.1 elric these forms and algorithms. 194 1.1 elric 195 1.1 elric Application of string preparation may have an impact upon the 196 1.1 elric feasibility of brute force and dictionary attacks. While the number 197 1.1 elric of possible prepared strings is less than the number of possible 198 1.1 elric Unicode strings, the number of usable names and passwords is greater 199 1.1 elric than as if only ASCII was used. Though SASLprep eliminates some 200 1.1 elric Unicode code point sequences as possible prepared strings, that 201 1.1 elric elimination generally makes the (canonical) output forms practicable 202 1.1 elric and prohibits nonsensical inputs. 203 1.1 elric 204 1.1 elric User names and passwords should be protected from eavesdropping. 205 1.1 elric 206 1.1 elric General "stringprep" and Unicode security considerations apply. Both 207 1.1 elric are discussed in [StringPrep]. 208 1.1 elric 209 1.1 elric 5. IANA Considerations 210 1.1 elric 211 1.1 elric This document details the "SASLprep" profile of the [StringPrep] 212 1.1 elric protocol. This profile has been registered in the stringprep profile 213 1.1 elric registry. 214 1.1 elric 215 1.1 elric Name of this profile: SASLprep 216 1.1 elric RFC in which the profile is defined: RFC 4013 217 1.1 elric Indicator whether or not this is the newest version of the 218 1.1 elric profile: This is the first version of the SASPprep profile. 219 1.1 elric 220 1.1 elric 6. Acknowledgement 221 1.1 elric 222 1.1 elric This document borrows text from "Preparation of Internationalized 223 1.1 elric Strings ('stringprep')" and "Nameprep: A Stringprep Profile for 224 1.1 elric Internationalized Domain Names", both by Paul Hoffman and Marc 225 1.1 elric Blanchet. This document is a product of the IETF SASL WG. 226 1.1 elric 227 1.1 elric 228 1.1 elric 229 1.1 elric Zeilenga Standards Track [Page 4] 230 1.1 elric 232 1.1 elric RFC 4013 SASLprep February 2005 233 1.1 elric 234 1.1 elric 235 1.1 elric 7. Normative References 236 1.1 elric 237 1.1 elric [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of 238 1.1 elric Internationalized Strings ("stringprep")", RFC 3454, 239 1.1 elric December 2002. 240 1.1 elric 241 1.1 elric [Unicode] The Unicode Consortium, "The Unicode Standard, Version 242 1.1 elric 3.2.0" is defined by "The Unicode Standard, Version 243 1.1 elric 3.0" (Reading, MA, Addison-Wesley, 2000. ISBN 0-201- 244 1.1 elric 61633-5), as amended by the "Unicode Standard Annex 245 1.1 elric #27: Unicode 3.1" 246 1.1 elric (http://www.unicode.org/reports/tr27/) and by the 247 1.1 elric "Unicode Standard Annex #28: Unicode 3.2" 248 1.1 elric (http://www.unicode.org/reports/tr28/). 249 1.1 elric 250 1.1 elric 8. Informative References 251 1.1 elric 252 1.1 elric [Glossary] The Unicode Consortium, "Unicode Glossary", 253 1.1 elric <http://www.unicode.org/glossary/>. 254 1.1 elric 255 1.1 elric [CharModel] Whistler, K. and M. Davis, "Unicode Technical Report 256 1.1 elric #17, Character Encoding Model", UTR17, 257 1.1 elric <http://www.unicode.org/unicode/reports/tr17/>, August 258 1.1 elric 2000. 259 1.1 elric 260 1.1 elric [SASL] Melnikov, A., Ed., "Simple Authentication and Security 261 1.1 elric Layer (SASL)", Work in Progress. 262 1.1 elric 263 1.1 elric [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", Work in 264 1.1 elric Progress. 265 1.1 elric 266 1.1 elric [DIGEST-MD5] Leach, P., Newman, C., and A. Melnikov, "Using Digest 267 1.1 elric Authentication as a SASL Mechanism", Work in Progress. 268 1.1 elric 269 1.1 elric [PLAIN] Zeilenga, K., Ed., "The Plain SASL Mechanism", Work in 270 1.1 elric Progress. 271 1.1 elric 272 1.1 elric [PR29] "Public Review Issue #29: Normalization Issue", 273 1.1 elric <http://www.unicode.org/review/pr-29.html>, February 274 1.1 elric 2004. 275 1.1 elric 276 1.1 elric Author's Address 277 1.1 elric 278 1.1 elric Kurt D. Zeilenga 279 1.1 elric OpenLDAP Foundation 280 1.1 elric 281 1.1 elric EMail: Kurt (a] OpenLDAP.org 282 1.1 elric 283 1.1 elric 284 1.1 elric 285 1.1 elric 286 1.1 elric Zeilenga Standards Track [Page 5] 287 1.1 elric 289 1.1 elric RFC 4013 SASLprep February 2005 290 1.1 elric 291 1.1 elric 292 1.1 elric Full Copyright Statement 293 1.1 elric 294 1.1 elric Copyright (C) The Internet Society (2005). 295 1.1 elric 296 1.1 elric This document is subject to the rights, licenses and restrictions 297 1.1 elric contained in BCP 78, and except as set forth therein, the authors 298 1.1 elric retain all their rights. 299 1.1 elric 300 1.1 elric This document and the information contained herein are provided on an 301 1.1 elric "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 302 1.1 elric OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 303 1.1 elric ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 304 1.1 elric INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 305 1.1 elric INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 306 1.1 elric WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 307 1.1 elric 308 1.1 elric Intellectual Property 309 1.1 elric 310 1.1 elric The IETF takes no position regarding the validity or scope of any 311 1.1 elric Intellectual Property Rights or other rights that might be claimed to 312 1.1 elric pertain to the implementation or use of the technology described in 313 1.1 elric this document or the extent to which any license under such rights 314 1.1 elric might or might not be available; nor does it represent that it has 315 1.1 elric made any independent effort to identify any such rights. Information 316 1.1 elric on the IETF's procedures with respect to rights in IETF Documents can 317 1.1 elric be found in BCP 78 and BCP 79. 318 1.1 elric 319 1.1 elric Copies of IPR disclosures made to the IETF Secretariat and any 320 1.1 elric assurances of licenses to be made available, or the result of an 321 1.1 elric attempt made to obtain a general license or permission for the use of 322 1.1 elric such proprietary rights by implementers or users of this 323 1.1 elric specification can be obtained from the IETF on-line IPR repository at 324 1.1 elric http://www.ietf.org/ipr. 325 1.1 elric 326 1.1 elric The IETF invites any interested party to bring to its attention any 327 1.1 elric copyrights, patents or patent applications, or other proprietary 328 1.1 elric rights that may cover technology that may be required to implement 329 1.1 elric this standard. Please address the information to the IETF at ietf- 330 1.1 elric ipr (a] ietf.org. 331 1.1 elric 332 1.1 elric 333 1.1 elric Acknowledgement 334 1.1 elric 335 1.1 elric Funding for the RFC Editor function is currently provided by the 336 1.1 elric Internet Society. 337 1.1 elric 338 1.1 elric 339 1.1 elric 340 341 342 343 Zeilenga Standards Track [Page 6] 344 346