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