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