draft-ietf-sasl-saslprep-10.txt   rfc4013.txt 
INTERNET-DRAFT Kurt D. Zeilenga Network Working Group K. Zeilenga
Intended Category: Standards Track OpenLDAP Foundation Request for Comments: 4013 OpenLDAP Foundation
Expires: January 2005 18 July 2004 Category: Standards Track February 2005
SASLprep: Stringprep profile for user names and passwords
<draft-ietf-sasl-saslprep-10.txt>
Status of Memo
This document is intended to be, after appropriate review and
revision, submitted to the RFC Editor as a Standards Track document.
Distribution of this memo is unlimited. Technical discussion of this
document will take place on the IETF SASL mailing list
<ietf-sasl@imc.org>. Please send editorial comments directly to the
document editor <Kurt@OpenLDAP.org>.
By submitting this Internet-Draft, I accept the provisions of Section
4 of RFC 3667. By submitting this Internet-Draft, I certify that any
applicable patent or other IPR claims of which I am aware have been
disclosed, or will be disclosed, and any of which I become aware will
be disclosed, in accordance with RFC 3668.
Internet-Drafts are working documents of the Internet Engineering Task SASLprep: Stringprep Profile for User Names and Passwords
Force (IETF), its areas, and its working groups. Note that other
groups may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Status of This Memo
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference material
or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at This document specifies an Internet standards track protocol for the
<http://www.ietf.org/ietf/1id-abstracts.txt>. The list of Internet community, and requests discussion and suggestions for
Internet-Draft Shadow Directories can be accessed at improvements. Please refer to the current edition of the "Internet
<http://www.ietf.org/shadow.html>. Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright (C) The Internet Society (2004). All Rights Reserved. Copyright Notice
Please see the Full Copyright section near the end of this document Copyright (C) The Internet Society (2005).
for more information.
Abstract Abstract
This document describes how to prepare Unicode strings representing This document describes how to prepare Unicode strings representing
user names and passwords for comparison. The document defines the user names and passwords for comparison. The document defines the
"SASLprep" profile of the "stringprep" algorithm to be used for both "SASLprep" profile of the "stringprep" algorithm to be used for both
user names and passwords. This profile is intended to be used by user names and passwords. This profile is intended to be used by
Simple Authentication and Security Layer (SASL) mechanisms (such as Simple Authentication and Security Layer (SASL) mechanisms (such as
PLAIN, CRAM-MD5, and DIGEST-MD5) as well as other protocols exchanging PLAIN, CRAM-MD5, and DIGEST-MD5), as well as other protocols
simple user names and/or passwords. exchanging simple user names and/or passwords.
1. Introduction 1. Introduction
The use of simple user names and passwords in authentication and The use of simple user names and passwords in authentication and
authorization is pervasive on the Internet. To increase the authorization is pervasive on the Internet. To increase the
likelihood that user name and password input and comparison work in likelihood that user name and password input and comparison work in
ways that make sense for typical users throughout the world, this ways that make sense for typical users throughout the world, this
document defines rules for preparing internationalized user names and document defines rules for preparing internationalized user names and
passwords for comparison. For simplicity and implementation ease, a passwords for comparison. For simplicity and implementation ease, a
single algorithm is defined for both user names and passwords. single algorithm is defined for both user names and passwords.
The algorithm assumes all strings are comprised of characters from the The algorithm assumes all strings are comprised of characters from
Unicode [Unicode] character set. the Unicode [Unicode] character set.
This document defines the "SASLprep" profile of the "stringprep" This document defines the "SASLprep" profile of the "stringprep"
algorithm [StringPrep]. algorithm [StringPrep].
The profile is designed for use in Simple Authentication and Security The profile is designed for use in Simple Authentication and Security
Layer ([SASL]) mechanisms such as [PLAIN]. It may be applicable Layer ([SASL]) mechanisms, such as [PLAIN], [CRAM-MD5], and
elsewhere simple user names and passwords are used. This profile is [DIGEST-MD5]. It may be applicable where simple user names and
not intended to be used to prepare identity strings which are not passwords are used. This profile is not intended for use in
simple user names (e.g., email addresses, domain names, distinguished preparing identity strings that are not simple user names (e.g.,
names), or where identity or password strings which are not character email addresses, domain names, distinguished names), or where
data, or require different handling (e.g., case folding). identity or password strings that are not character data, or require
different handling (e.g., case folding).
This document by itself does not alter the technical specification any This document does not alter the technical specification of any
existing protocols. Any specification that wishes to use the existing protocols. Any specification that wishes to use the
algorithm described in this document needs to explicitly incorporate algorithm described in this document needs to explicitly incorporate
this document and provide precise details as to where and how this this document and provide precise details as to where and how this
algorithm is used by implementations of that specification. algorithm is used by implementations of that specification.
2. The SASLprep profile 2. The SASLprep Profile
This section defines the "SASLprep" profile of the "stringprep" This section defines the "SASLprep" profile of the "stringprep"
algorithm [StringPrep]. This profile is intended to be used to algorithm [StringPrep]. This profile is intended for use in
prepare strings representing simple user names and passwords. preparing strings representing simple user names and passwords.
This profile uses Unicode 3.2 [Unicode]. This profile uses Unicode 3.2 [Unicode].
Character names in this document use the notation for code points and Character names in this document use the notation for code points and
names from the Unicode Standard [Unicode]. For example, the letter names from the Unicode Standard [Unicode]. For example, the letter
"a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>. "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 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 left off to make the lists easier to read. The comments for
ranges are shown in square brackets (such as "[CONTROL CHARACTERS]") character ranges are shown in square brackets (such as "[CONTROL
and do not come from the standard. CHARACTERS]") and do not come from the standard.
Note: a glossary of terms used in Unicode can be found in [Glossary]. Note: A glossary of terms used in Unicode can be found in [Glossary].
Information on the Unicode character encoding model can be found in Information on the Unicode character encoding model can be found in
[CharModel]. [CharModel].
2.1. Mapping 2.1. Mapping
This profile specifies: This profile specifies:
- non-ASCII space characters [StringPrep, C.1.2] be mapped to SPACE
(U+0020), and
- the "commonly mapped to nothing" characters [StringPrep, B.1] be - non-ASCII space characters [StringPrep, C.1.2] that can be
mapped to nothing. mapped to SPACE (U+0020), and
- the "commonly mapped to nothing" characters [StringPrep, B.1]
that can be mapped to nothing.
2.2. Normalization 2.2. Normalization
This profile specifies using Unicode normalization form KC, as This profile specifies using Unicode normalization form KC, as
described in Section 4 of [StringPrep]. described in Section 4 of [StringPrep].
2.3. Prohibited Output 2.3. Prohibited Output
This profile specifies the following characters: This profile specifies the following characters as prohibited input:
- Non-ASCII space characters [StringPrep, C.1.2],
- ASCII control characters [StringPrep, C.2.1],
- Non-ASCII control characters [StringPrep, C.2.2],
- Private Use [StringPrep, C.3],
- Non-character code points [StringPrep, C.4],
- Surrogate code points [StringPrep, C.5],
- Inappropriate for plain text [StringPrep, C.6],
- Inappropriate for canonical representation [StringPrep, C.7],
- Change display properties or are deprecated [StringPrep, C.8], and
- Tagging characters [StringPrep, C.9].
are prohibited output. - Non-ASCII space characters [StringPrep, C.1.2]
- ASCII control characters [StringPrep, C.2.1]
- Non-ASCII control characters [StringPrep, C.2.2]
- Private Use characters [StringPrep, C.3]
- Non-character code points [StringPrep, C.4]
- Surrogate code points [StringPrep, C.5]
- Inappropriate for plain text characters [StringPrep, C.6]
- Inappropriate for canonical representation characters
[StringPrep, C.7]
- Change display properties or deprecated characters
[StringPrep, C.8]
- Tagging characters [StringPrep, C.9]
2.4. Bidirectional characters 2.4. Bidirectional Characters
This profile specifies checking bidirectional strings as described in This profile specifies checking bidirectional strings as described in
[StringPrep, Section 6]. [StringPrep, Section 6].
2.5. Unassigned Code Points 2.5. Unassigned Code Points
This profile specifies [StringPrep, A.1] table as its list of This profile specifies the [StringPrep, A.1] table as its list of
unassigned code points. unassigned code points.
3. Examples 3. Examples
The following table provides examples of how various character data is The following table provides examples of how various character data
transformed by SASLprep string preparation algorithm is transformed by the SASLprep string preparation algorithm
# Input Output Comments # Input Output Comments
- ----- ------ -------- - ----- ------ --------
1 I<U+00AD>X IX SOFT HYPHEN mapped to nothing 1 I<U+00AD>X IX SOFT HYPHEN mapped to nothing
2 user user no transformation 2 user user no transformation
3 USER USER case preserved, will not match #2 3 USER USER case preserved, will not match #2
4 <U+00AA> a output is NFKC, input in ISO 8859-1 4 <U+00AA> a output is NFKC, input in ISO 8859-1
5 <U+2168> IX output is NFKC, will match #1 5 <U+2168> IX output is NFKC, will match #1
6 <U+0007> Error - prohibited character 6 <U+0007> Error - prohibited character
7 <U+0627><U+0031> Error - bidirectional check 7 <U+0627><U+0031> Error - bidirectional check
4. Security Considerations 4. Security Considerations
This profile is intended to be used to prepare simple user names and This profile is intended to prepare simple user name and password
passwords strings for comparison or use in cryptographic functions strings for comparison or use in cryptographic functions (e.g.,
(e.g., message digests). The preparation algorithm was specifically message digests). The preparation algorithm was specifically
designed such that its output is canonical, and it is well-formed. designed such that its output is canonical, and it is well-formed.
However, due to an anomaly [PR29] in the specification of Unicode However, due to an anomaly [PR29] in the specification of Unicode
normalization, canonical equivalence is not guaranteed for a select normalization, canonical equivalence is not guaranteed for a select
few character sequences. These sequences, however, do not appear in few character sequences. These sequences, however, do not appear in
well-formed text. This specification was published despite this known well-formed text. This specification was published despite this
technical problem. It is expected that this specification will be known technical problem. It is expected that this specification will
revised before further progression on the Standards Track (after be revised before further progression on the Standards Track (after
[Unicode] and/or [StringPrep] specifications have been updated to [Unicode] and/or [StringPrep] specifications have been updated to
address this problem). address this problem).
It is not intended to be used for to prepare identity strings which It is not intended for preparing identity strings that are not simple
are not simple user names (e.g., distinguished names, domain names), user names (e.g., distinguished names, domain names), nor is the
nor is the profile intended to be used for simple user names which profile intended for use of simple user names that require different
require different handling (such as case folding). Protocols (or handling (such as case folding). Protocols (or applications of those
applications of those protocols) which have application-specific protocols) that have application-specific identity forms and/or
identity forms and/or comparison algorithms should use mechanisms comparison algorithms should use mechanisms specifically designed for
specifically designed for these forms and algorithms. these forms and algorithms.
Application of string preparation may have an impact upon the Application of string preparation may have an impact upon the
feasibility of brute force and dictionary attacks. While the number feasibility of brute force and dictionary attacks. While the number
of possible prepared strings is less than the number of possible of possible prepared strings is less than the number of possible
Unicode strings, the number of usable names and passwords is greater Unicode strings, the number of usable names and passwords is greater
than if only ASCII was used. Though SASLprep eliminates some of than as if only ASCII was used. Though SASLprep eliminates some
Unicode code point sequences as possible prepared strings, that Unicode code point sequences as possible prepared strings, that
elimination generally makes the (canonical) output forms practicable elimination generally makes the (canonical) output forms practicable
and prohibits nonsensical inputs. and prohibits nonsensical inputs.
User names and passwords should be protected from eavesdropping. User names and passwords should be protected from eavesdropping.
General "stringprep" and Unicode security considerations apply. Both General "stringprep" and Unicode security considerations apply. Both
are discussed in [StringPrep]. are discussed in [StringPrep].
5. IANA Considerations 5. IANA Considerations
This document details the "SASLprep" profile of [StringPrep] protocol. This document details the "SASLprep" profile of the [StringPrep]
Upon Standards Action the profile should be registered in the protocol. This profile has been registered in the stringprep profile
stringprep profile registry. registry.
Name of this profile: SASLprep Name of this profile: SASLprep
RFC in which the profile is defined: This RFC RFC in which the profile is defined: RFC 4013
Indicator whether or not this is the newest version of the Indicator whether or not this is the newest version of the
profile: This is the first version of the SASPprep profile. profile: This is the first version of the SASPprep profile.
6. Acknowledgment 6. Acknowledgement
This document borrows text from "Preparation of Internationalized This document borrows text from "Preparation of Internationalized
Strings ('stringprep')" and "Nameprep: A Stringprep Profile for Strings ('stringprep')" and "Nameprep: A Stringprep Profile for
Internationalized Domain Names", both by Paul Hoffman and Marc Internationalized Domain Names", both by Paul Hoffman and Marc
Blanchet. Blanchet. This document is a product of the IETF SASL WG.
This document is a product of the IETF SASL WG.
7. Normative References 7. Normative References
[StringPrep] Hoffman, P. and M. Blanchet, "Preparation of [StringPrep] Hoffman, P. and M. Blanchet, "Preparation of
Internationalized Strings ('stringprep')", RFC 3454, Internationalized Strings ("stringprep")", RFC 3454,
December 2002. December 2002.
[Unicode] The Unicode Consortium, "The Unicode Standard, Version [Unicode] The Unicode Consortium, "The Unicode Standard, Version
3.2.0" is defined by "The Unicode Standard, Version 3.0" 3.2.0" is defined by "The Unicode Standard, Version
(Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), 3.0" (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-
as amended by the "Unicode Standard Annex #27: Unicode 61633-5), as amended by the "Unicode Standard Annex
3.1" (http://www.unicode.org/reports/tr27/) and by the #27: Unicode 3.1"
(http://www.unicode.org/reports/tr27/) and by the
"Unicode Standard Annex #28: Unicode 3.2" "Unicode Standard Annex #28: Unicode 3.2"
(http://www.unicode.org/reports/tr28/). (http://www.unicode.org/reports/tr28/).
8. Informative References 8. Informative References
[Glossary] The Unicode Consortium, "Unicode Glossary", [Glossary] The Unicode Consortium, "Unicode Glossary",
<http://www.unicode.org/glossary/>. <http://www.unicode.org/glossary/>.
[CharModel] Whistler, K. and M. Davis, "Unicode Technical Report [CharModel] Whistler, K. and M. Davis, "Unicode Technical Report
#17, Character Encoding Model", UTR17, #17, Character Encoding Model", UTR17,
<http://www.unicode.org/unicode/reports/tr17/>, August <http://www.unicode.org/unicode/reports/tr17/>, August
2000. 2000.
[SASL] Melnikov, A. (Editor), "Simple Authentication and [SASL] Melnikov, A., Ed., "Simple Authentication and Security
Security Layer (SASL)", Layer (SASL)", Work in Progress.
draft-ietf-sasl-rfc2222bis-xx.txt, a work in progress.
[CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", Work in
draft-ietf-sasl-crammd5-xx.txt, a work in progress. Progress.
[DIGEST-MD5] Leach, P., C. Newman, and A. Melnikov, "Using Digest [DIGEST-MD5] Leach, P., Newman, C., and A. Melnikov, "Using Digest
Authentication as a SASL Mechanism", Authentication as a SASL Mechanism", Work in Progress.
draft-ietf-sasl-rfc2831bis-xx.txt, a work in progress.
[PLAIN] Zeilenga, K. (Editor), "The Plain SASL Mechanism", [PLAIN] Zeilenga, K., Ed., "The Plain SASL Mechanism", Work in
draft-ietf-sasl-plain-xx.txt, a work in progress. Progress.
[PR29] "Public Review Issue #29: Normalization Issue", [PR29] "Public Review Issue #29: Normalization Issue",
<http://www.unicode.org/review/pr-29.html>, February <http://www.unicode.org/review/pr-29.html>, February
2004. 2004.
9. Author's Address Author's Address
Kurt D. Zeilenga Kurt D. Zeilenga
OpenLDAP Foundation OpenLDAP Foundation
Email: Kurt@OpenLDAP.org EMail: Kurt@OpenLDAP.org
Intellectual Property Rights Full Copyright Statement
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, 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 The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights 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 might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be found on the IETF's procedures with respect to rights in IETF Documents can
in BCP 78 and BCP 79. be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an 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 attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this specification such proprietary rights by implementers or users of this
can be obtained from the IETF on-line IPR repository at specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr. http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at this standard. Please address the information to the IETF at ietf-
ietf-ipr@ietf.org. ipr@ietf.org.
Full Copyright
Copyright (C) The Internet Society (2004). This document is subject Acknowledgement
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an Funding for the RFC Editor function is currently provided by the
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS Internet Society.
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.
 End of changes. 

This html diff was produced by rfcdiff 1.25, available from http://www.levkowetz.com/ietf/tools/rfcdiff/