xref: /freebsd/crypto/heimdal/lib/wind/rfc4013.txt (revision 02e9120893770924227138ba49df1edb3896112a)
1
2
3
4
5
6
7Network Working Group                                        K. Zeilenga
8Request for Comments: 4013                           OpenLDAP Foundation
9Category: Standards Track                                  February 2005
10
11
12       SASLprep: Stringprep Profile for User Names and Passwords
13
14Status of This Memo
15
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.
21
22Copyright Notice
23
24   Copyright (C) The Internet Society (2005).
25
26Abstract
27
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.
35
361.  Introduction
37
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.
45
46   The algorithm assumes all strings are comprised of characters from
47   the Unicode [Unicode] character set.
48
49   This document defines the "SASLprep" profile of the "stringprep"
50   algorithm [StringPrep].
51
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
55
56
57
58Zeilenga                    Standards Track                     [Page 1]
59
60RFC 4013                        SASLprep                   February 2005
61
62
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).
68
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.
74
752.  The SASLprep Profile
76
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.
80
81   This profile uses Unicode 3.2 [Unicode].
82
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.
90
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
93   [CharModel].
94
952.1.  Mapping
96
97   This profile specifies:
98
99      -  non-ASCII space characters [StringPrep, C.1.2] that can be
100         mapped to SPACE (U+0020), and
101
102      -  the "commonly mapped to nothing" characters [StringPrep, B.1]
103         that can be mapped to nothing.
104
1052.2.  Normalization
106
107   This profile specifies using Unicode normalization form KC, as
108   described in Section 4 of [StringPrep].
109
110
111
112
113
114Zeilenga                    Standards Track                     [Page 2]
115
116RFC 4013                        SASLprep                   February 2005
117
118
1192.3.  Prohibited Output
120
121   This profile specifies the following characters as prohibited input:
122
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
131        [StringPrep, C.7]
132      - Change display properties or deprecated characters
133        [StringPrep, C.8]
134      - Tagging characters [StringPrep, C.9]
135
1362.4.  Bidirectional Characters
137
138   This profile specifies checking bidirectional strings as described in
139   [StringPrep, Section 6].
140
1412.5.  Unassigned Code Points
142
143   This profile specifies the [StringPrep, A.1] table as its list of
144   unassigned code points.
145
1463.  Examples
147
148   The following table provides examples of how various character data
149   is transformed by the SASLprep string preparation algorithm
150
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
160
1614.  Security Considerations
162
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.
167
168
169
170Zeilenga                    Standards Track                     [Page 3]
171
172RFC 4013                        SASLprep                   February 2005
173
174
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).
183
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.
191
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.
200
201   User names and passwords should be protected from eavesdropping.
202
203   General "stringprep" and Unicode security considerations apply.  Both
204   are discussed in [StringPrep].
205
2065.  IANA Considerations
207
208   This document details the "SASLprep" profile of the [StringPrep]
209   protocol.  This profile has been registered in the stringprep profile
210   registry.
211
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.
216
2176.  Acknowledgement
218
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.
223
224
225
226Zeilenga                    Standards Track                     [Page 4]
227
228RFC 4013                        SASLprep                   February 2005
229
230
2317.  Normative References
232
233   [StringPrep]  Hoffman, P. and M. Blanchet, "Preparation of
234                 Internationalized Strings ("stringprep")", RFC 3454,
235                 December 2002.
236
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
241                 #27: Unicode 3.1"
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/).
245
2468.  Informative References
247
248   [Glossary]    The Unicode Consortium, "Unicode Glossary",
249                 <http://www.unicode.org/glossary/>.
250
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
254                 2000.
255
256   [SASL]        Melnikov, A., Ed., "Simple Authentication and Security
257                 Layer (SASL)", Work in Progress.
258
259   [CRAM-MD5]    Nerenberg, L., "The CRAM-MD5 SASL Mechanism", Work in
260                 Progress.
261
262   [DIGEST-MD5]  Leach, P., Newman, C., and A. Melnikov, "Using Digest
263                 Authentication as a SASL Mechanism", Work in Progress.
264
265   [PLAIN]       Zeilenga, K., Ed., "The Plain SASL Mechanism", Work in
266                 Progress.
267
268   [PR29]        "Public Review Issue #29: Normalization Issue",
269                 <http://www.unicode.org/review/pr-29.html>, February
270                 2004.
271
272Author's Address
273
274   Kurt D. Zeilenga
275   OpenLDAP Foundation
276
277   EMail: Kurt@OpenLDAP.org
278
279
280
281
282Zeilenga                    Standards Track                     [Page 5]
283
284RFC 4013                        SASLprep                   February 2005
285
286
287Full Copyright Statement
288
289   Copyright (C) The Internet Society (2005).
290
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.
294
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.
302
303Intellectual Property
304
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.
313
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.
320
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-
325   ipr@ietf.org.
326
327
328Acknowledgement
329
330   Funding for the RFC Editor function is currently provided by the
331   Internet Society.
332
333
334
335
336
337
338Zeilenga                    Standards Track                     [Page 6]
339
340