draft-ietf-idn-idna-07.txt   draft-ietf-idn-idna-08.txt 
Internet Draft Patrik Faltstrom Internet Draft Patrik Faltstrom
draft-ietf-idn-idna-07.txt Cisco draft-ietf-idn-idna-08.txt Cisco
February 24, 2002 Paul Hoffman May 22, 2002 Paul Hoffman
Expires in six months IMC & VPNC Expires in six months IMC & VPNC
Adam M. Costello Adam M. Costello
UC Berkeley UC Berkeley
Internationalizing Domain Names in Applications (IDNA) Internationalizing Domain Names in Applications (IDNA)
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with all This document is an Internet-Draft and is in full conformance with all
provisions of Section 10 of RFC2026. provisions of Section 10 of RFC2026.
skipping to change at line 37 skipping to change at line 37
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
Abstract Abstract
Until now, there has been no standard method for domain names to use Until now, there has been no standard method for domain names to use
characters outside the ASCII repertoire. This document defines characters outside the ASCII repertoire. This document defines
internationalized domain names (IDNs) and a mechanism called IDNA for internationalized domain names (IDNs) and a mechanism called IDNA for
handling them in a standard fashion. IDNs use characters drawn from a handling them in a standard fashion. IDNs use characters drawn from a
large repertoire (Unicode), but IDNA allows the non-ASCII characters to large repertoire (Unicode), but IDNA allows the non-ASCII characters to
be represented using the same octets used in so-called host names be represented using the same octets used in so-called host names today.
today. IDNA is only meant for processing domain names, not free This representation allows IDNs to be introduced with minimal changes to
text. the existing DNS infrastructure. IDNA is only meant for processing
domain names, not free text.
1. Introduction 1. Introduction
IDNA works by allowing applications to use certain ASCII name labels IDNA works by allowing applications to use certain ASCII name labels
(beginning with a special prefix) to represent non-ASCII name labels. (beginning with a special prefix) to represent non-ASCII name labels.
Lower-layer protocols need not be aware of this; therefore IDNA does not Lower-layer protocols need not be aware of this; therefore IDNA does not
require changes to any infrastructure. In particular, IDNA does not require changes to any infrastructure. In particular, IDNA does not
require any changes to DNS servers, resolvers, or protocol elements, require any changes to DNS servers, resolvers, or protocol elements,
because the ASCII name service provided by the existing DNS is entirely because the ASCII name service provided by the existing DNS is entirely
sufficient. sufficient.
This document does not require any applications to conform to IDNA, This document does not require any applications to conform to IDNA, but
but applications can elect to use IDNA in order to support IDN while applications can elect to use IDNA in order to support IDN while
maintaining interoperability with existing infrastructure. Adding IDNA maintaining interoperability with existing infrastructure. Adding IDNA
support to an existing application entails changes to the application support to an existing application entails changes to the application
only, and leaves room for flexibility in the user interface. only, and leaves room for flexibility in the user interface.
A great deal of the discussion of IDN solutions has focused on A great deal of the discussion of IDN solutions has focused on
transition issues and how IDN will work in a world where not all of the transition issues and how IDN will work in a world where not all of the
components have been updated. Other proposals would require that user components have been updated. Proposals that were not chosen by the IDN
applications, resolvers, and DNS servers be updated in order for a user Working Group would require that user applications, resolvers, and DNS
to use an internationalized domain name. Rather than require widespread servers be updated in order for a user to use an internationalized
updating of all components, IDNA requires only user applications to be domain name. Rather than require widespread updating of all components,
updated; no changes are needed to the DNS protocol or any DNS servers or IDNA requires only user applications to be updated; no changes are
the resolvers on user's computers. needed to the DNS protocol or any DNS servers or the resolvers on user's
computers.
1.1 Interaction of protocol parts 1.1 Brief overview for application developers
Applications can use IDNA to support internationalized domain names
anywhere that ASCII domain names are already supported, including DNS
master files and resolver interfaces. (Applications can also define
protocols and interfaces that support IDNs directly using non-ASCII
representations. IDNA does not prescribe any particular representation
for new protocols, but it still defines which names are valid and how
they are compared.)
The IDNA protocol is contained completely within applications. It is not
a client-server or peer-to-peer protocol: everything is done inside the
application itself. When used with a DNS resolver library, IDNA is
inserted as a "shim" between the application and the resolver library.
When used for writing names into a DNS zone, IDNA is used just before
the name is committed to the zone.
There are two operations described in section 4 of this document:
- The ToASCII operation is used before sending an IDN to something that
expects ASCII names (such as a resolver) or writing an IDN into a place
that expects ASCII names (such as a DNS master file).
- The ToUnicode operation is used when displaying names to users, for
example names obtained from a DNS zone.
It is important to note that the ToASCII operation can fail. If it fails
when processing a domain name, that domain name cannot be used as an
internationalized domain name and the application has to have some
method of dealing with this failure.
IDNA requires that implementations process input strings with Nameprep IDNA requires that implementations process input strings with Nameprep
[NAMEPREP], which is a profile of Stringprep [STRINGPREP], and then with [NAMEPREP], which is a profile of Stringprep [STRINGPREP], and then with
Punycode [PUNYCODE]. Implementations of IDNA MUST fully implement Punycode [PUNYCODE]. Implementations of IDNA MUST fully implement
Nameprep and Punycode; neither Nameprep nor Punycode are optional. Nameprep and Punycode; neither Nameprep nor Punycode are optional.
2 Terminology 2 Terminology
The key words "MUST", "SHALL", "REQUIRED", "SHOULD", "RECOMMENDED", and The key words "MUST", "SHALL", "REQUIRED", "SHOULD", "RECOMMENDED", and
"MAY" in this document are to be interpreted as described in RFC 2119 "MAY" in this document are to be interpreted as described in RFC 2119
skipping to change at line 88 skipping to change at line 119
A code point is an integral value associated with a character in a coded A code point is an integral value associated with a character in a coded
character set. character set.
Unicode [UNICODE] is a coded character set containing tens of thousands Unicode [UNICODE] is a coded character set containing tens of thousands
of characters. A single Unicode code point is denoted by "U+" followed of characters. A single Unicode code point is denoted by "U+" followed
by four to six hexadecimal digits, while a range of Unicode code points by four to six hexadecimal digits, while a range of Unicode code points
is denoted by two hexadecimal numbers separated by "..", with no is denoted by two hexadecimal numbers separated by "..", with no
prefixes. prefixes.
ASCII means US-ASCII, a coded character set containing 128 characters ASCII means US-ASCII [USASCII], a coded character set containing 128
associated with code points in the range 0..7F. Unicode is an extension characters associated with code points in the range 0..7F. Unicode is an
of ASCII: it includes all the ASCII characters and associates them with extension of ASCII: it includes all the ASCII characters and associates
the same code points. them with the same code points.
The term "LDH code points" is defined in this document to mean the code The term "LDH code points" is defined in this document to mean the code
points associated with ASCII letters, digits, and the hyphen-minus; that points associated with ASCII letters, digits, and the hyphen-minus; that
is, U+002D, 30..39, 41..5A, and 61..7A. "LDH" is an abbreviation for is, U+002D, 30..39, 41..5A, and 61..7A. "LDH" is an abbreviation for
"letters, digits, hyphen". "letters, digits, hyphen".
[STD13] talks about "domain names" and "host names", but many people use [STD13] talks about "domain names" and "host names", but many people use
the terms interchangeably. Further, because [STD13] was not terribly the terms interchangeably. Further, because [STD13] was not terribly
clear, many people who are sure they know the exact definitions of each clear, many people who are sure they know the exact definitions of each
of these terms disagree on the definitions. of these terms disagree on the definitions. In this document the term
"domain name" is used in general. When referring explicitly to the
syntax restrictions for host names in [STD3], the term "host name
syntax" is used.
A label is an individual part of a domain name. Labels are usually shown A label is an individual part of a domain name. Labels are usually shown
separated by dots; for example, the domain name "www.example.com" is separated by dots; for example, the domain name "www.example.com" is
composed of three labels: "www", "example", and "com". (The zero-length composed of three labels: "www", "example", and "com". (The zero-length
root label that is implied in domain names, as described in [STD13], is root label described in [STD13], which can be explicit as in
not considered a label in this specification.) Throughout this document "www.example.com." or implicit as in "www.example.com", is not
the term "label" is shorthand for "text label", and "every label" means considered a label in this specification.) Throughout this document the
term "label" is shorthand for "text label", and "every label" means
"every text label". In IDNA, not all text strings can be labels. "every text label". In IDNA, not all text strings can be labels.
An "internationalized domain name" (IDN) is a domain name for which the An "internationalized domain name" (IDN) is a domain name for which the
ToASCII operation (see section 4) can be applied to each label without ToASCII operation (see section 4) can be applied to each label without
failing. This document does not attempt to define an "internationalized failing. This document does not attempt to define an "internationalized
host name". It is expected that protocols and name-handling bodies will host name". It is expected that some name-handling bodies, such as large
zone administrators and groups of affiliated zone administrators, will
want to limit the characters allowed in IDNs further than what is want to limit the characters allowed in IDNs further than what is
specified in this document, such as to prohibit additional characters specified in this document, such as to prohibit additional characters
that they feel are unneeded or harmful in registered domain names. that they feel are unneeded or harmful in registered domain names.
In IDNA, equivalence of labels is defined in terms of the ToASCII
operation, which constructs an ASCII form for a given label. Labels are
defined to be equivalent if and only if their ASCII forms produced by
ToASCII match using a case-insensitive ASCII comparison. Traditional
ASCII labels already have a notion of equivalence: upper case and lower
case are considered equivalent. The IDNA notion of equivalence is an
extension of the old notion. Equivalent labels in IDNA are treated as
alternate forms of the same label, just as "foo" and "Foo" are treated
as alternate forms of the same label.
An "internationalized label" is a label composed of characters from the An "internationalized label" is a label composed of characters from the
Unicode character set; note, however, that not every string of Unicode Unicode character set; note, however, that not every string of Unicode
characters can be an internationalized label. To allow internationalized characters can be an internationalized label.
labels to be handled by existing applications, IDNA uses an "ACE label"
(ACE stands for ASCII Compatible Encoding), which can be represented To allow internationalized labels to be handled by existing
using only ASCII characters but is equivalent to a label containing applications, IDNA uses an "ACE label" (ACE stands for ASCII Compatible
non-ASCII characters. More rigorously, an ACE label is defined to be any Encoding), which can be represented using only ASCII characters but is
label that the ToUnicode operation would alter (see section 4.2). For equivalent to a label containing non-ASCII characters. More rigorously,
every internationalized label that cannot be directly represented in an ACE label is defined to be any label that the ToUnicode operation
ASCII, there is an equivalent ACE label. The conversion of labels to and would alter. For every internationalized label that cannot be directly
from the ACE form is specified in section 4. represented in ASCII, there is an equivalent ACE label. An ACE label
always begins with the ACE prefix defined in section 5. The conversion
of labels to and from the ACE form is specified in section 4.
The "ACE prefix" is defined in this document to be a string of ASCII The "ACE prefix" is defined in this document to be a string of ASCII
characters that appears at the beginning of every ACE label. It is characters that appears at the beginning of every ACE label. It is
specified in section 5. specified in section 5.
A "domain name slot" is defined in this document to be a protocol element A "domain name slot" is defined in this document to be a protocol
or a function argument or a return value (and so on) explicitly element or a operation argument or a return value (and so on) explicitly
designated for carrying a domain name. Examples of domain name slots designated for carrying a domain name. Examples of domain name slots
include: the QNAME field of a DNS query; the name argument of the include: the QNAME field of a DNS query; the name argument of the
gethostbyname() library function; the part of an email address following gethostbyname() library function; the part of an email address following
the at-sign (@) in the From: field of an email message header; and the host the at-sign (@) in the From: field of an email message header; and the
portion of the URI in the src attribute of an HTML <IMG> tag. host portion of the URI in the src attribute of an HTML <IMG> tag.
General text that just happens to contain a domain name is not a domain name General text that just happens to contain a domain name is not a domain
slot; for example, a domain name appearing in the plain text body of an name slot; for example, a domain name appearing in the plain text body
email message is not occupying a domain name slot. of an email message is not occupying a domain name slot.
An "internationalized domain name slot" is defined in this document to An "IDN-aware domain name slot" is defined in this document to be a
be a domain name slot explicitly designated for carrying an domain name slot explicitly designated for carrying an internationalized
internationalized domain name as defined in this document. The domain name as defined in this document. The designation may be static
designation may be static (for example, in the specification of the (for example, in the specification of the protocol or interface) or
protocol or interface) or dynamic (for example, as a result of dynamic (for example, as a result of negotiation in an interactive
negotiation in an interactive session). session).
A "generic domain name slot" is defined in this document to be any An "IDN-unaware domain name slot" is defined in this document to be any
domain name slot that is not an internationalized domain name slot. domain name slot that is not an IDN-aware domain name slot. Obviously,
Obviously, this includes any domain name slot whose specification this includes any domain name slot whose specification predates IDNA.
predates IDNA.
3. Requirements 3. Requirements
IDNA conformance means adherence of the following three requirements: IDNA conformance means adherence to the following four requirements:
1) Whenever a domain name is put into a generic domain name slot (see 1) Whenever dots are used as label separators, the following characters
section 2), every label MUST contain only ASCII characters. Given an MUST be recognized as dots: U+002E (full stop), U+3002 (ideographic full
internationalized domain name (IDN), an equivalent domain name stop), U+FF0E (fullwidth full stop), U+FF61 (halfwidth ideographic full
stop).
2) Whenever a domain name is put into an IDN-unaware domain name slot
(see section 2), it MUST contain only ASCII characters, and, if dots are
used as label separators, changing all the label separators to U+002E.
Given an internationalized domain name (IDN), an equivalent domain name
satisfying this requirement can be obtained by applying the ToASCII satisfying this requirement can be obtained by applying the ToASCII
operation (see section 4) to each label. operation (see section 4) to each label.
2) ACE labels obtained from domain name slots SHOULD be hidden from 3) ACE labels obtained from domain name slots SHOULD be hidden from
users except when the use of the non-ASCII form would cause problems or users except when the use of the non-ASCII form would cause problems or
when the ACE form is explicitly requested. Given an internationalized when the ACE form is explicitly requested. Given an internationalized
domain name, an equivalent domain name containing no ACE labels can be domain name, an equivalent domain name containing no ACE labels can be
obtained by applying the ToUnicode operation (see section 4) to each obtained by applying the ToUnicode operation (see section 4) to each
label. When requirements 1 and 2 both apply, requirement 1 takes label. When requirements 2 and 3 both apply, requirement 1 takes
precedence. precedence.
3) Whenever two labels are compared, they MUST be considered to 4) Whenever two labels are compared, they MUST be considered to match if
match if and only if their ASCII forms (obtained by applying ToASCII) and only if they are equivalent, that is, their ASCII forms (obtained by
match using a case-insensitive ASCII comparison. applying ToASCII) match using a case-insensitive ASCII comparison.
Whenever two names are compared, they MUST be considered to match if and
only if their corresponding labels match, regardless of whether the
names use the same forms of label separators.
4. Conversion operations 4. Conversion operations
This section specifies the ToASCII and ToUnicode operations. Each one An application converts a domain name put into an IDN-unaware slot or
operates on a sequence of Unicode code points (but remember that all displayed to a user. This section specifies the steps to perform in the
ASCII code points are also Unicode code points). When domain names are conversion, and the ToASCII and ToUnicode operations.
represented using character sets other than Unicode and ASCII, they will
need to first be transcoded to Unicode before these operations can be The input to ToASCII or ToUnicode is a single label that is a sequence
applied, and might need to be transcoded back afterwards. of Unicode code points (remember that all ASCII code points are also
Unicode code points). If a domain name is represented using a character
set other than Unicode or US-ASCII, it will first need to be transcoded
to Unicode.
Starting from a whole domain name, the steps that an application takes
to do the conversions are:
1) Decide whether the domain name is a "stored string" or a "query
string" as described in [STRINGPREP]. If this conversion follows the
"queries" rule from [STRINGPREP], set the flag called "AllowUnassigned".
2) Split the domain name into individual labels as described in section
3. The labels do not include the separator.
3) Decide whether or not to enforce the restrictions on ASCII characters
in host names [STD3]. If the restrictions are to be enforced, set the
flag called "UseSTD3ASCIIRules".
4) Process each label with either the ToASCII or the ToUnicode
operation. Use the ToASCII operation/function if you are about to put
the name into an IDN-unaware slot. Use the ToUnicode operation if you
are displaying the name to a user.
5) If ToASCII was applied in step 4 and dots are used as label
separators, change all the label separators to U+002E (full stop).
The following two subsections define the ToASCII and ToUnicode
operations that are used in step 4.
4.1 ToASCII 4.1 ToASCII
The ToASCII operation takes a sequence of Unicode code points and The ToASCII operation takes a sequence of Unicode code points that make
transforms it into a sequence of code points in the ASCII range (0..7F). up one label and transforms it into a sequence of code points in the
The original sequence and the resulting sequence are equivalent labels. ASCII range (0..7F). If ToASCII succeeds, the original sequence and the
(If the original is an internationalized label that cannot be directly resulting sequence are equivalent labels.
represented in ASCII, the result will be the equivalent ACE label.)
ToASCII fails if any step of it fails. If any step fails, the original It is important to note that the ToASCII operation can fail. If the
sequence MUST NOT be used as a label in an IDN. ToASCII operation fails on any label in a domain name, that domain name
MUST NOT be used as an internationalized domain name. The application
needs to have some method of dealing with this failure.
The inputs to ToASCII are a sequence of code points; a flag indicating The inputs to ToASCII are a sequence of code points; the AllowUnassigned
whether to prohibit unassigned code points (see [STRINGPREP]); and a flag; and the UseSTD3ASCIIRules flag. The output of ToASCII is either a
flag indicating whether to apply the host name syntax rules. The output sequence of ASCII code points or a failure condition.
of ToASCII is either a sequence of ASCII code points or a failure
condition.
ToASCII never alters a sequence of code points that are all in the ASCII ToASCII never alters a sequence of code points that are all in the ASCII
range to begin with (although it could fail). range to begin with (although it could fail). Applying the ToASCII
operation multiple times has exactly the same effect as applying it just
once.
ToASCII consists of the following steps: ToASCII consists of the following steps:
1. If all code points in the sequence are in the ASCII range (0..7F) 1. If all code points in the sequence are in the ASCII range (0..7F)
then skip to step 3. then skip to step 3.
2. Perform the steps specified in [NAMEPREP] and fail if there is 2. Perform the steps specified in [NAMEPREP] and fail if there is
an error. an error. The AllowUnassigned flag is used in [NAMEPREP].
3. If the label is part of a host name (or is subject to the host 3. If the UseSTD3ASCIIRules flag is set, then perform these checks:
name syntax rules) then perform these checks:
(a) Verify the absence of non-LDH ASCII code points; that is, (a) Verify the absence of non-LDH ASCII code points; that is,
the absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F. the absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F.
(b) Verify the absence of leading and trailing hyphen-minus; (b) Verify the absence of leading and trailing hyphen-minus;
that is, the absence of U+002D at the beginning and end of that is, the absence of U+002D at the beginning and end of
the sequence. the sequence.
4. If all code points in the sequence are in the ASCII range (0..7F), 4. If all code points in the sequence are in the ASCII range
then skip to step 8. (0..7F), then skip to step 8.
5. Verify that the sequence does NOT begin with the ACE prefix. 5. Verify that the sequence does NOT begin with the ACE prefix.
6. Encode the sequence using the encoding algorithm in [PUNYCODE]. 6. Encode the sequence using the encoding algorithm in [PUNYCODE]
and fail if there is an error.
7. Prepend the ACE prefix. 7. Prepend the ACE prefix.
8. Verify that the number of code points is in the range 1 to 63 8. Verify that the number of code points is in the range 1 to 63
inclusive. inclusive.
4.2 ToUnicode 4.2 ToUnicode
The ToUnicode operation takes a sequence of Unicode code points and The ToUnicode operation takes a sequence of Unicode code points that
returns a sequence of Unicode code points. If the input sequence is a make up one label and returns a sequence of Unicode code points. If the
label in ACE form, then the result is an equivalent internationalized input sequence is a label in ACE form, then the result is an equivalent
label that is not in ACE form, otherwise the original sequence is internationalized label that is not in ACE form, otherwise the original
returned unaltered. sequence is returned unaltered.
ToUnicode never fails. If any step fails, then the original input ToUnicode never fails. If any step fails, then the original input
sequence is returned immediately in that step. sequence is returned immediately in that step.
The inputs to ToUnicode are a sequence of code points; a flag indicating The inputs to ToUnicode are a sequence of code points; the
whether to prohibit unassigned code points (see [STRINGPREP]); and a AllowUnassigned flag; and the UseSTD3ASCIIRules flag. The output of
flag indicating whether to apply the host name syntax rules. The output ToUnicode is always a sequence of Unicode code points.
of ToUnicode is always a sequence of Unicode code points.
1. If all code points in the sequence are in the ASCII range (0..7F) 1. If all code points in the sequence are in the ASCII range (0..7F)
then skip to step 3. then skip to step 3.
2. Perform the steps specified in [NAMEPREP] and fail if there is an 2. Perform the steps specified in [NAMEPREP] and fail if there is an
error. (If step 3 of ToASCII is also performed here, it will not error. (If step 3 of ToASCII is also performed here, it will not
affect the overall behavior of ToUnicode, but it is not affect the overall behavior of ToUnicode, but it is not
necessary.) necessary.) The AllowUnassigned flag is used in [NAMEPREP].
3. Verify that the sequence begins with the ACE prefix, and save a 3. Verify that the sequence begins with the ACE prefix, and save a
copy of the sequence. copy of the sequence.
4. Remove the ACE prefix. 4. Remove the ACE prefix.
5. Decode the sequence using decoding algorithm in [PUNYCODE]. Save 5. Decode the sequence using the decoding algorithm in [PUNYCODE]
a copy of the result of this step. and fail if there is an error. Save a copy of the result of
this step.
6. Apply ToASCII. 6. Apply ToASCII.
7. Verify that the sequence matches the saved copy from step 3, using 7. Verify that the result of step 6 matches the saved copy from
a case-insensitive ASCII comparison. step 3, using a case-insensitive ASCII comparison.
8. Return the saved copy from step 5. 8. Return the saved copy from step 5.
5. ACE prefix 5. ACE prefix
[[ Note to the IESG and Internet Draft readers: The two uses of the [[ Note to the IESG and Internet Draft readers: The two uses of the
string "IESG--" below are to be changed at time of publication to a string "IESG--" below are to be changed at time of publication to a
prefix which fulfills the requirements in the first paragraph. ]] prefix which fulfills the requirements in the first paragraph. IANA will
assign this value. ]]
The ACE prefix, used in the conversion operations (section 4), is two The ACE prefix, used in the conversion operations (section 4), is two
alphanumeric ASCII characters followed by two hyphen-minuses. It cannot alphanumeric ASCII characters followed by two hyphen-minuses. It cannot
be any of the prefixes already used in earlier documents, which includes be any of the prefixes already used in earlier documents, which includes
the following: "bl--", "bq--", "dq--", "lq--", "mq--", "ra--", "wq--" the following: "bl--", "bq--", "dq--", "lq--", "mq--", "ra--", "wq--"
and "zq--". The ToASCII and ToUnicode operations MUST recognize the ACE and "zq--". The ToASCII and ToUnicode operations MUST recognize the ACE
prefix in a case-insensitive manner. prefix in a case-insensitive manner.
The ACE prefix for IDNA is "IESG--". The ACE prefix for IDNA is "IESG--".
This means that an ACE label might be "IESG--de-jg4avhby1noc0d", where This means that an ACE label might be "IESG--de-jg4avhby1noc0d", where
"de-jg4avhby1noc0d" is the part of the ACE label that is generated by "de-jg4avhby1noc0d" is the part of the ACE label that is generated by
the encoding steps in [PUNYCODE]. the encoding steps in [PUNYCODE].
While all ACE labels begin with the ACE prefix, not all labels beginning
with the ACE prefix are necessarily ACE labels. Non-ACE labels that
begin with the ACE prefix will confuse users and SHOULD NOT be allowed
in DNS zones.
6. Implications for typical applications using DNS 6. Implications for typical applications using DNS
In IDNA, applications perform the processing needed to input In IDNA, applications perform the processing needed to input
internationalized domain names from users, display internationalized internationalized domain names from users, display internationalized
domain names to users, and process the inputs and outputs from DNS and domain names to users, and process the inputs and outputs from DNS and
other protocols that carry domain names. other protocols that carry domain names.
The components and interfaces between them can be represented The components and interfaces between them can be represented
pictorially as: pictorially as:
+------+ +------+
| User | | User |
+------+ +------+
^ ^
| Input and display: local interface methods | Input and display: local interface methods
| (pen, keyboard, glowing phosphorus, ...) | (pen, keyboard, glowing phosphorus, ...)
+-------------------|-------------------------------+ +-------------------|-------------------------------+
| v | | v |
| +-----------------------------+ | | +-----------------------------+ |
| | Application | | | | Application | |
| | (conversion between local | | | | (ToASCII and ToUnicode | |
| | character set and Unicode | | | | operations may be | |
| | is done here) | | | | called here) | |
| +-----------------------------+ | | +-----------------------------+ |
| ^ ^ | End system | ^ ^ | End system
| | | | | | | |
| Call to resolver: | | Application-specific | | Call to resolver: | | Application-specific |
| ACE | | protocol: | | ACE | | protocol: |
| v | predefined by the | | v | ACE unless the |
| +----------+ | protocol or defaults | | +----------+ | protocol is updated |
| | Resolver | | to ACE | | | Resolver | | to handle other |
| +----------+ | | | +----------+ | encodings |
| ^ | | | ^ | |
+-----------------|----------|----------------------+ +-----------------|----------|----------------------+
DNS protocol: | | DNS protocol: | |
ACE | | ACE | |
v v v v
+-------------+ +---------------------+ +-------------+ +---------------------+
| DNS servers | | Application servers | | DNS servers | | Application servers |
+-------------+ +---------------------+ +-------------+ +---------------------+
The box labeled "Application" is where the application splits a host
name into labels, sets the appropriate flags, and performs the ToASCII
and ToUnicode operations. This is described in section 4.
6.1 Entry and display in applications 6.1 Entry and display in applications
Applications can accept domain names using any character set or sets Applications can accept domain names using any character set or sets
desired by the application developer, and can display domain names in any desired by the application developer, and can display domain names in
charset. That is, the IDNA protocol does not affect the interface any charset. That is, the IDNA protocol does not affect the interface
between users and applications. between users and applications.
An IDNA-aware application can accept and display internationalized An IDNA-aware application can accept and display internationalized
domain names in two formats: the internationalized character set(s) domain names in two formats: the internationalized character set(s)
supported by the application, and as an ACE label. ACE labels that are supported by the application, and as an ACE label. ACE labels that are
displayed or input MUST always include the ACE prefix. Applications MAY displayed or input MUST always include the ACE prefix. Applications MAY
allow input and display of ACE labels, but are not encouraged to do so allow input and display of ACE labels, but are not encouraged to do so
except as an interface for special purposes, possibly for debugging. ACE except as an interface for special purposes, possibly for debugging. ACE
encoding is opaque and ugly, and should thus only be exposed to users encoding is opaque and ugly, and should thus only be exposed to users
who absolutely need it. The optional use, especially during a transition who absolutely need it. The optional use, especially during a transition
period, of ACE encodings in the user interface is described in section period, of ACE encodings in the user interface is described in section
6.4. Because name labels encoded as ACE name labels can be rendered 6.4. Because name labels encoded as ACE name labels can be rendered
either as the encoded ASCII characters or the proper decoded characters, either as the encoded ASCII characters or the proper decoded characters,
the application MAY have an option for the user to select the preferred the application MAY have an option for the user to select the preferred
method of display; if it does, rendering the ACE SHOULD NOT be the method of display; if it does, rendering the ACE SHOULD NOT be the
default. default.
Domain names are often stored and transported in many places. For example, Domain names are often stored and transported in many places. For
they are part of documents such as mail messages and web pages. They are example, they are part of documents such as mail messages and web pages.
transported in many parts of many protocols, such as both the They are transported in many parts of many protocols, such as both the
control commands and the RFC 2822 body parts of SMTP, and the headers control commands and the RFC 2822 body parts of SMTP, and the headers
and the body content in HTTP. It is important to remember that domain and the body content in HTTP. It is important to remember that domain
names appear both in domain name slots and in the content that is passed names appear both in domain name slots and in the content that is passed
over protocols. over protocols.
In protocols and document formats that define how to handle In protocols and document formats that define how to handle
specification or negotiation of charsets, labels can be encoded in any specification or negotiation of charsets, labels can be encoded in any
charset allowed by the protocol or document format. If a protocol or charset allowed by the protocol or document format. If a protocol or
document format only allows one charset, the labels MUST be given in document format only allows one charset, the labels MUST be given in
that charset. that charset.
skipping to change at line 399 skipping to change at line 494
resolver libraries through a programming interface (API). resolver libraries through a programming interface (API).
Because these resolver libraries today expect only domain names in Because these resolver libraries today expect only domain names in
ASCII, applications MUST prepare labels that are passed to the resolver ASCII, applications MUST prepare labels that are passed to the resolver
library using the ToASCII operation. Labels received from the resolver library using the ToASCII operation. Labels received from the resolver
library contain only ASCII characters; internationalized labels that library contain only ASCII characters; internationalized labels that
cannot be represented directly in ASCII use the ACE form. ACE labels cannot be represented directly in ASCII use the ACE form. ACE labels
always include the ACE prefix. always include the ACE prefix.
IDNA-aware applications MUST be able to work with both IDNA-aware applications MUST be able to work with both
non-internationalized labels (those that conform to [STD13] non-internationalized labels (those that conform to [STD13] and [STD3])
and [STD3]) and internationalized labels. and internationalized labels.
It is expected that new versions of the resolver libraries in the future It is expected that new versions of the resolver libraries in the future
will be able to accept domain names in other formats than ASCII, and will be able to accept domain names in other formats than ASCII, and
application developers might one day pass not only domain names in application developers might one day pass not only domain names in
Unicode, but also in local script to a new API for the resolver Unicode, but also in local script to a new API for the resolver
libraries in the operating system. libraries in the operating system. Thus the ToASCII and ToUnicode
operations might be performed inside these new versions of the resolver
libraries.
Domain names stored in zones follow the rules for "stored strings" from
[STRINGPREP]. DNS requests follow the rules for "queries" from
[STRINGPREP].
6.3 DNS servers 6.3 DNS servers
An operating system might have a set of libraries for performing the An operating system might have a set of libraries for performing the
ToASCII operation. The input to such a library might be in one or more ToASCII operation. The input to such a library might be in one or more
charsets that are used in applications (UTF-8 and UTF-16 are likely charsets that are used in applications (UTF-8 and UTF-16 are likely
candidates for almost any operating system, and script-specific charsets candidates for almost any operating system, and script-specific charsets
are likely for localized operating systems). are likely for localized operating systems).
For internationalized labels that cannot be represented directly in For internationalized labels that cannot be represented directly in
ASCII, DNS servers MUST use the ACE form produced by the ToASCII ASCII, DNS servers MUST use the ACE form produced by the ToASCII
operation. All IDNs served by DNS servers MUST contain only ASCII operation. All IDNs served by DNS servers MUST contain only ASCII
characters. characters.
If a signalling system which makes negotiation possible between old and If a signaling system which makes negotiation possible between old and
new DNS clients and servers is standardized in the future, the encoding new DNS clients and servers is standardized in the future, the encoding
of the query in the DNS protocol itself can be changed from ACE to of the query in the DNS protocol itself can be changed from ACE to
something else, such as UTF-8. The question whether or not this should something else, such as UTF-8. The question whether or not this should
be used is, however, a separate problem and is not discussed in this be used is, however, a separate problem and is not discussed in this
memo. memo.
6.4 Avoiding exposing users to the raw ACE encoding 6.4 Avoiding exposing users to the raw ACE encoding
All applications that might show the user a domain name obtained from a All applications that might show the user a domain name obtained from a
domain name slot, such as from gethostbyaddr or part of a mail header, domain name slot, such as from gethostbyaddr or part of a mail header,
skipping to change at line 455 skipping to change at line 556
positions where characters cannot be displayed. positions where characters cannot be displayed.
The ToUnicode operation does not alter labels that are not valid ACE The ToUnicode operation does not alter labels that are not valid ACE
labels, even if they begin with the ACE prefix. After ToUnicode has been labels, even if they begin with the ACE prefix. After ToUnicode has been
applied, if a label still begins with the ACE prefix, then it is not a applied, if a label still begins with the ACE prefix, then it is not a
valid ACE label, and is not equivalent to any of the intermediate valid ACE label, and is not equivalent to any of the intermediate
Unicode strings constructed by ToUnicode. Unicode strings constructed by ToUnicode.
6.5 Bidirectional text in domain names 6.5 Bidirectional text in domain names
The display of domain names that contain bidirectional text is not covered The display of domain names that contain bidirectional text is not
in this document. It may be covered in a future version of this covered in this document. It may be covered in a future version of this
document, or may be covered in a different document. document, or may be covered in a different document.
For developers interested in displaying domain names that have For developers interested in displaying domain names that have
bidirectional text, the Unicode standard has an extensive discussion of bidirectional text, the Unicode standard has an extensive discussion of
how to deal with reorder glyphs for display when dealing with how to deal with reorder glyphs for display when dealing with
bidirectional text such as Arabic or Hebrew. See [UAX9] for more bidirectional text such as Arabic or Hebrew. See [UAX9] for more
information. In particular, all Unicode text is stored in logical order. information. In particular, all Unicode text is stored in logical order.
6.6 DNSSEC authentication of IDN domain names 6.6 DNSSEC authentication of IDN domain names
skipping to change at line 483 skipping to change at line 584
the information to the top of the DNS hierarchy. the information to the top of the DNS hierarchy.
IDNA specifies that all internationalized domain names served by DNS IDNA specifies that all internationalized domain names served by DNS
servers that cannot be represented directly in ASCII must use the ACE servers that cannot be represented directly in ASCII must use the ACE
form produced by the ToASCII operation. This operation must be performed form produced by the ToASCII operation. This operation must be performed
prior to a zone being signed by the private key for that zone. Because prior to a zone being signed by the private key for that zone. Because
of this ordering, it is important to recognize that DNSSEC authenticates of this ordering, it is important to recognize that DNSSEC authenticates
the ASCII domain name, not the Unicode form or the mapping between the the ASCII domain name, not the Unicode form or the mapping between the
Unicode form and the ASCII form. In other words, the output of ToASCII Unicode form and the ASCII form. In other words, the output of ToASCII
is the canonical name. In the presence of DNSSEC, this is the name that is the canonical name. In the presence of DNSSEC, this is the name that
MUST be signed in the zone and MUST be validated against. It also SHOULD MUST be signed in the zone and MUST be validated against.
be used for other name comparisons, such as when a browser wants to
indicate that a URL has been previously visited.
One consequence of this for sites deploying IDNA in the presence of One consequence of this for sites deploying IDNA in the presence of
DNSSEC is that any special purpose proxies or forwarders used to DNSSEC is that any special purpose proxies or forwarders used to
transform user input into IDNs must be earlier in the resolution flow transform user input into IDNs must be earlier in the resolution flow
than DNSSEC authenticating nameservers for DNSSEC to work. than DNSSEC authenticating nameservers for DNSSEC to work.
6.7 Limitations of IDNA 6.7 Limitations of IDNA
The IDNA protocol does not solve all linguistic issues with users The IDNA protocol does not solve all linguistic issues with users
inputting names in different scripts. Many important language-based and inputting names in different scripts. Many important language-based and
script-based mappings are not covered in IDNA and must be handled script-based mappings are not covered in IDNA and must be handled
outside the protocol. For example, names that are entered in a mix of outside the protocol. For example, names that are entered in a mix of
traditional and simplified Chinese characters will not be mapped to a traditional and simplified Chinese characters will not be mapped to a
single canonical name. Another example is Scandinavian names that are single canonical name. Another example is Scandinavian names that are
entered with U+00F6 (LATIN SMALL LETTER O WITH DIAERESIS) will not be entered with U+00F6 (LATIN SMALL LETTER O WITH DIAERESIS) will not be
mapped to U+00F8 (LATIN SMALL LETTER O WITH STROKE). mapped to U+00F8 (LATIN SMALL LETTER O WITH STROKE).
7. Name Server Considerations 7. Name Server Considerations
Internationalized domain name data in zone files (as specified by section Internationalized domain name data in zone files (as specified by
5 of RFC 1035) MUST be processed with ToASCII before it is entered in section 5 of RFC 1035) MUST be processed with ToASCII before it is
the zone files. entered in the zone files.
It is imperative that there be only one ASCII encoding for a particular It is imperative that there be only one ASCII encoding for a particular
domain name. ACE is an encoding for domain name labels that use non-ASCII domain name. Thus, a primary master name server MUST NOT contain an
characters. Thus, a primary master name server MUST NOT contain an
ACE-encoded label that decodes to an ASCII label. The ToASCII operation ACE-encoded label that decodes to an ASCII label. The ToASCII operation
assures that no such names are ever output from the operation. assures that no such names are ever output from the operation.
Name servers MUST NOT serve records with domain names that contain Name servers MUST NOT serve records with domain names that contain
non-ASCII characters; such names MUST be converted to ACE form by the non-ASCII characters; such names MUST be converted to ACE form by the
ToASCII operation in order to be served. If names that are not processed ToASCII operation in order to be served. If names that are not processed
by ToASCII are passed to an application, it will result in unpredictable by ToASCII are passed to an application, it will result in unpredictable
behavior. Note that [STRINGPREP] describes how to handle versioning of behavior. Note that [STRINGPREP] describes how to handle versioning of
unallocated codepoints. unallocated codepoints.
8. Root Server Considerations 8. Root Server Considerations
IDNs are likely to be somewhat longer than current host names, so the IDNs are likely to be somewhat longer than current host names, so the
bandwidth needed by the root servers should go up by a small amount. bandwidth needed by the root servers should go up by a small amount.
Also, queries and responses for IDNs will probably be somewhat longer Also, queries and responses for IDNs will probably be somewhat longer
than typical queries today, so more queries and responses may be forced than typical queries today, so more queries and responses may be forced
to go to TCP instead of UDP. to go to TCP instead of UDP.
9. Security Considerations 9. References
Security on the Internet partly relies on the DNS. Thus, any
change to the characteristics of the DNS can change the security of much
of the Internet.
This memo describes an algorithm which encodes characters that are not
valid according to STD3 and STD13 into octet values that are valid. No
security issues such as string length increases or new allowed values
are introduced by the encoding process or the use of these encoded
values, apart from those introduced by the ACE encoding itself.
Domain names are used by users to connect to Internet servers. The
security of the Internet would be compromised if a user entering a
single internationalized name could be connected to different servers
based on different interpretations of the internationalized domain name.
Because this document normatively refers to [NAMEPREP], it includes the
security considerations from that document as well.
A. References
[PUNYCODE] Adam Costello, "Punycode", draft-ietf-idn-punycode.
[DNSSEC] Don Eastlake, "Domain Name System Security Extensions", RFC 9.1 Normative references
2535, March 1999.
[NAMEPREP] Paul Hoffman and Marc Blanchet, "Preparation of [PUNYCODE] Adam Costello, "Punycode: An encoding of Unicode for use with
Internationalized Domain Names", draft-ietf-idn-nameprep. IDNA", draft-ietf-idn-punycode.
[RFC2119] Scott Bradner, "Key words for use in RFCs to Indicate [NAMEPREP] Paul Hoffman and Marc Blanchet, "Nameprep: A Stringprep
Requirement Levels", March 1997, RFC 2119. Profile for Internationalized Domain Names", draft-ietf-idn-nameprep.
[STD3] Bob Braden, "Requirements for Internet Hosts -- Communication [STD3] Bob Braden, "Requirements for Internet Hosts -- Communication
Layers" (RFC 1122) and "Requirements for Internet Hosts -- Application Layers" (RFC 1122) and "Requirements for Internet Hosts -- Application
and Support" (RFC 1123), STD 3, October 1989. and Support" (RFC 1123), STD 3, October 1989.
[STD13] Paul Mockapetris, "Domain names - concepts and facilities" (RFC [STD13] Paul Mockapetris, "Domain names - concepts and facilities" (RFC
1034) and "Domain names - implementation and specification" (RFC 1035), 1034) and "Domain names - implementation and specification" (RFC 1035),
STD 13, November 1987. STD 13, November 1987.
[STRINGPREP] Paul Hoffman and Marc Blanchet, "Preparation of [STRINGPREP] Paul Hoffman and Marc Blanchet, "Preparation of
Internationalized Strings ("stringprep")", draft-hoffman-stringprep, Internationalized Strings ("stringprep")", draft-hoffman-stringprep,
work in progress work in progress
.
9.2 Informative references
[DNSSEC] Don Eastlake, "Domain Name System Security Extensions", RFC
2535, March 1999.
[RFC2119] Scott Bradner, "Key words for use in RFCs to Indicate
Requirement Levels", March 1997, RFC 2119.
[UAX9] Unicode Standard Annex #9, The Bidirectional Algorithm, [UAX9] Unicode Standard Annex #9, The Bidirectional Algorithm,
<http://www.unicode.org/unicode/reports/tr9/>. <http://www.unicode.org/unicode/reports/tr9/>.
[UNICODE] The Unicode Standard, Version 3.1.0: The Unicode Consortium. [UNICODE] The Unicode Standard, Version 3.1.0: The Unicode Consortium.
The Unicode Standard, Version 3.0. Reading, MA, Addison-Wesley The Unicode Standard, Version 3.0. Reading, MA, Addison-Wesley
Developers Press, 2000. ISBN 0-201-61633-5, as amended by: Unicode Developers Press, 2000. ISBN 0-201-61633-5, as amended by: Unicode
Standard Annex #27: Unicode 3.1, Standard Annex #27: Unicode 3.1,
<http://www.unicode.org/unicode/reports/tr27/tr27-4.html>. <http://www.unicode.org/unicode/reports/tr27/tr27-4.html>.
B. Authors' Addresses [USASCII] Vint Cerf, "ASCII format for Network Interchange", October
1969, RFC 20.
10. Security Considerations
Security on the Internet partly relies on the DNS. Thus, any change to
the characteristics of the DNS can change the security of much of the
Internet.
This memo describes an algorithm which encodes characters that are not
valid according to STD3 and STD13 into octet values that are valid. No
security issues such as string length increases or new allowed values
are introduced by the encoding process or the use of these encoded
values, apart from those introduced by the ACE encoding itself.
Domain names are used by users to connect to Internet servers. The
security of the Internet would be compromised if a user entering a
single internationalized name could be connected to different servers
based on different interpretations of the internationalized domain name.
Because this document normatively refers to [NAMEPREP], it includes the
security considerations from that document as well.
11. Authors' Addresses
Patrik Faltstrom Patrik Faltstrom
Cisco Systems Cisco Systems
Arstaangsvagen 31 J Arstaangsvagen 31 J
S-117 43 Stockholm Sweden S-117 43 Stockholm Sweden
paf@cisco.com paf@cisco.com
Paul Hoffman Paul Hoffman
Internet Mail Consortium and VPN Consortium Internet Mail Consortium and VPN Consortium
127 Segre Place 127 Segre Place
 End of changes. 54 change blocks. 
155 lines changed or deleted 261 lines changed or added

This html diff was produced by rfcdiff 1.33. The latest version is available from http://tools.ietf.org/tools/rfcdiff/