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