<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC1034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1034.xml">
<!ENTITY RFC1035 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1035.xml">
<!ENTITY RFC1928 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1928.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2308 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2308.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC4648 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4648.xml">
<!ENTITY RFC6761 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6761.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc strict="yes" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="info"
     docName="draft-grothoff-iesg-special-use-p2p-i2p-00"
     ipr="trust200902">

  <front>
    <title abbrev="Special-Use I2P Names">
      Special-Use Domain Names for I2P
    </title>

    <author fullname="Christian Grothoff" initials="C.G." surname="Grothoff">
      <organization>INRIA</organization>
      <address>
        <postal>
          <street>&Eacute;quipe D&eacute;centralis&eacute;e</street>
          <street>INRIA Rennes Bretagne Atlantique</street>
          <street>263 avenue du G&eacute;n&eacute;ral Leclerc</street>
          <street>Campus Universitaire de Beaulieu</street>
          <city>Rennes</city>
          <region>Bretagne</region>
	  <code>F-35042</code>
          <country>FR</country>
        </postal>
        <email>christian@grothoff.org</email>
      </address>
    </author>

    <author fullname="Matthias Wachs" initials="M.W." surname="Wachs">
      <organization>Technische Universit&auml;t M&uuml;nchen</organization>
      <address>
        <postal>
          <street>Free Secure Network Systems Group</street>
          <street>Lehrstuhl fuer Netzarchitekturen und Netzdienste</street>
          <street>Boltzmannstrasse 3</street>
          <street>Technische Universitaet Muenchen</street>
          <code>D-85748</code>
          <city>Garching bei Muenchen</city>
          <region>Bayern</region>
          <country>DE</country>
        </postal>
        <email>wachs@net.in.tum.de</email>
      </address>
    </author>

    <author fullname="Hellekin O. Wolf" initials="H.O.W." role="editor"
            surname="Wolf">
      <organization>GNU consensus</organization>
      <address>
        <email>hellekin@gnu.org</email>
      </address>
    </author>

    <author fullname="Jacob Appelbaum" initials="J.A." surname="Appelbaum">
      <organization>Tor Project Inc.</organization>
      <address>
        <email>jacob@appelbaum.net</email>
      </address>
    </author>

    <author fullname="Leif Ryge" initials="L.R." surname="Ryge">
      <organization>Tor Project Inc.</organization>
      <address>
        <email>leif@synthesize.us</email>
      </address>
    </author>

    <date day="30" month="June" year="2015" />

    <!-- Meta-data Declarations -->
    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>

    <keyword>special-use</keyword>
    <keyword>peer-to-peer</keyword>
    <keyword>domain names</keyword>
    <keyword>I2P</keyword>

    <abstract>

      <t>This document registers a Special-Use Domain Name for
      use with the I2P Peer-to-Peer system, as per RFC6761.</t>

    </abstract>

  </front>

  <middle>

    <section anchor="introduction"
	     title="Introduction">

      <t>The Domain Name System (DNS) is primarily used to map
      human-memorable names to IP addresses, which are used for
      routing but generally not meaningful for humans.</t>

      <t>The Invisible Internet Project (I2P)
      Peer-to-Peer (P2P) system uses a specific decentralized
      mechanism to allocate, register, manage, and resolve names.
      The I2P Name System operates
      entirely outside of DNS, independently from the DNS root and
      delegation tree.</t>

      <t>As compatibility with applications using domain names is
      desired, the I2P overlay network defines an exclusive
      alternative Top-Level Domain to avoid conflict between the I2P
      namespace and the DNS hierarchy.</t>

      <t>In order to avoid interoperability issues with DNS as well as
      to address security and privacy concerns, this document
      registers the &quot;I2P&quot; Special-Use Domain Names for use with the I2P
      systems.</t>

      <t>I2P uses this pTLD to realize fully-decentralized and
      censorship-resistant naming.</t>

    </section>

    <section anchor="applicability"
	     title="Applicability">

      <t><xref target="RFC6761"/> Section 3 states:</t>

      <t><list style="empty"><t>&quot;[I]f a domain name has special
      properties that affect the way hardware and software
      implementations handle the name, that apply universally
      regardless of what network the implementation may be connected
      to, then that domain name may be a candidate for having the IETF
      declare it to be a Special-Use Domain Name and specify what
      special treatment implementations should give to that name. On
      the other hand, if declaring a given name to be special would
      result in no change to any implementations, then that suggests
      that the name may not be special in any material way, and it may
      be more appropriate to use the existing DNS mechanisms <xref
      target="RFC1034"/> to provide the desired delegation, data, or
      lack-of-data, for the name in question. Where the desired
      behaviour can be achieved via the existing domain name
      registration processes, that process should be used. Reservation
      of a Special-Use Domain Name is not a mechanism for
      circumventing normal domain name registration
      processes.&quot;</t></list></t>

      <t>The Special-Use Domain Name for the I2P System
      (pTLDs) reserved by this document meets this requirement, as it
      has the following specificities:</t>

      <t><list style="symbols">
	<t>The &quot;I2P&quot; pTLD is not manageable by some designated administration.
	Instead, it is managed according to various alternate
	strategies as described in the I2P documentation.</t>

	<t>The &quot;I2P&quot; pTLD does not depend on the DNS context for its
	resolution.  It uses I2P-specific logic for name resolution,
	covered by the respective system documentation.</t>

	<t>To resolve &quot;I2P&quot; names, the
	implementation MUST intercept queries for the pTLD to ensure
	I2P names cannot leak into the DNS.</t>

	<t>The appropriate resolution procedure can be implemented in
	existing software libraries and APIs to extend regular DNS
	operation and enable I2P name resolution.  However, the default
	hierarchical DNS response to any request to any pTLD MUST be
	NXDOMAIN.</t>

	<t>Finally, in order to maximally protect the security
        and privacy expectation of I2P users, this document
        specifies desirable changes in
	existing DNS software and DNS operations.</t>
      </list></t>

    </section>

    <section anchor="terminology-and-conventions"
	     title="Terminology and Conventions Used in This Document">

      <t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;,
      &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
      &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;,
      &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and
      &quot;OPTIONAL&quot; in this document are to be interpreted as
      described in <xref target="RFC2119"/>.</t>

      <t>The word &quot;peer&quot; is used in the meaning of a
      individual system on the network.</t>

      <t>The abbreviation &quot;pTLD&quot; is used in this document to
      mean a pseudo Top-Level Domain, i.e., a Special-Use Domain Name
      per <xref target="RFC6761"/> reserved to P2P Systems in this
      document.  A pTLD is mentioned in capitals, and within double
      quotes to mark the difference with a regular DNS gTLD.</t>

      <t>In this document, &quot;.tld&quot; (lowercase, with quotes)
      means: any domain or hostname within the scope of a given pTLD,
      while .tld (lowercase, without quotes) refers to an adjective
      form.  For example, a collection of &quot;.i2p&quot; peers in
      &quot;I2P&quot;, but an .i2p URL. [TO REMOVE: in the IANA
      Considerations section, we use the simple .tld format to request
      TLD reservation for consistency with previous RFCs].</t>

      <t>The word &quot;NXDOMAIN&quot; refers to an alternate
      expression for the &quot;Name Error&quot; RCODE as described in
      section 4.1.1 of <xref target="RFC1035"/>.  When referring to
      &quot;NXDOMAIN&quot; and negative caching <xref
      target="RFC2308"/> response, this document means an
      authoritative (AA=1) name error (RCODE=3) response
      exclusively.</t>

    </section>

    <section anchor="dot-i2p"
             title="The &quot;I2P&quot; Addressbook pTLD">

          <t>&quot;I2P&quot; provides accessibility to hidden
          services within the I2P network <xref target="zzz2009"/>.
          I2P is a scalable, self-organizing, resilient packet
          switched anonymous network layer, upon which any number of
          different anonymity or security-conscious applications can
          operate, using any protocol.</t>

	  <t>I2P hidden services and clients are identified by
	  Destinations, anonymous analogues of IP addresses.  The
	  &quot;I2P&quot; pTLD, chosen in 2003 <xref
	  target="I2P-CHOICE"/>, houses two methods for looking up
	  Destinations:</t>

	  <t><list>
	    <!-- I2P: description of the addressbook -->
	    <t>A local table called the addressbook stores a map of
	    .i2p addresses to Destinations.  Each user maintains their
	    own mappings that can be shared with others, allowing them
	    to &quot;discover&quot; new names by importing published
	    addressbooks of peers, and they can emulate traditional
	    DNS by choosing to treat these peers as name servers.  The
	    comparison however stops here, as only local uniqueness is
	    mandated.  As the system is decentralized,
	    &quot;example.i2p&quot; may resolve differently for
	    different peers depending on the state of their respective
	    addressbooks.</t>
	    <!-- B32.I2P: description of globally unique names -->
	    <t>To address globally unique names, the I2P developers
	    dedicated the &quot;B32.I2P&quot; subdomain to hold
	    Base32-encoded <xref target="RFC4648"/> references to
	    Destinations.  Like .onion addresses, .b32.i2p addresses
	    are self-authenticating.  The details of the encoding are
	    out of scope for this document, and documented in <xref
	    target="I2P-NAMING"/>.  The purpose of .b32.i2p addresses
	    is similar to &quot;.zkey&quot;, that is to enable
	    (reverse) mapping for a globally unique hidden service
	    that may not have a defined entry in the local
	    addressbook.</t>
	  </list></t>

	  <t>The &quot;I2P&quot; domain is special in the following
	  ways:</t>

	  <t><list style="numbers">
	    <!-- 1. Users Considerations -->
	    <t>Users can use these names as they would other domain
	    names, entering them anywhere that they would otherwise
	    enter a conventional DNS domain name.
	    <vspace blankLines="1"/>
	    Since there is no central authority responsible for
	    assigning .i2p names, and that the ultimate mapping is
	    decided by the local peer, users need to be aware of that
	    specificity.
	    <vspace blankLines="1"/>
	    </t>

	    <!-- 2. Application software Considerations -->
	    <t>Application software SHOULD recognize .i2p domains as
	    special and SHOULD NOT use them as they would other
	    domains.
	    <vspace blankLines="1"/>
	    Applications SHOULD NOT pass requests for .i2p domains to
	    DNS resolvers and libraries.
	    <vspace blankLines="1"/>
	    As mentioned in points 4 and 5 below, regular DNS
	    resolution is expected to respond with NXDOMAIN.
	    Therefore, if it can differentiate between DNS and P2P
	    name resolution, application software can expect such a
	    response, and can choose to treat other responses from
	    resolvers and libraries as errors.
	    <vspace blankLines="1"/>
	    </t>

	    <!-- 3. Name Resolution APIs and Libraries Considerations -->
	    <t>Name resolution APIs and libraries SHOULD either
	    respond to requests for .i2p names by resolving them via
	    the I2P protocol, or respond with NXDOMAIN.
	    <vspace blankLines="1"/>
	    </t>

	    <!-- 4. Caching DNS Servers Considerations -->
	    <!-- TODO: specify negative responses -->
	    <t>Caching DNS servers SHOULD recognize .i2p names as
	    special and SHOULD NOT attempt to look up NS records for
	    them, or otherwise query authoritative DNS servers in an
	    attempt to resolve .i2p names.  Instead, caching DNS
	    servers SHOULD generate immediate negative responses for
	    all such queries.
	    <vspace blankLines="1"/>
	    </t>

	    <!-- 5. Authoritative DNS Servers Considerations -->
	    <t>Authoritative DNS servers are not expected to treat
	    .i2p domain requests specially.  In practice, they MUST
	    answer with NXDOMAIN, as &quot;I2P&quot; is not available
	    via global DNS resolution, and not doing so MAY put users'
	    privacy at risk (see item 6).
	    <vspace blankLines="1"/>
	    </t>

	    <!-- 6. DNS Server Operators Considerations -->
	    <t>DNS server operators SHOULD be aware that .i2p names
	    are reserved for use with I2P, and MUST NOT override their
	    resolution (e.g., to redirect users to another service or
	    error information).
	    <vspace blankLines="1"/>
	    </t>

	    <!-- 7. DNS Registries/Registrars Considerations -->
	    <t>DNS registries/registrars MUST NOT grant any request to
	    register .i2p names.  This helps avoid conflicts <xref
	    target="SAC45"/>. These names are defined by the I2P
	    protocol specification, and they fall outside the set of
	    names available for allocation by registries/registrars.
	    <vspace blankLines="1"/>
	    </t>
	  </list></t>

    </section>

    <section anchor="security-considerations"
	     title="Security Considerations">

      <t>Specific software performs the resolution of the I2P
      Special-Use Domain Names presented in this document; this
      resolution process happens outside of the scope of DNS.  Leakage
      of requests to such domains to the global operational DNS can
      cause interception of traffic that might be misused to monitor,
      censor, or abuse the user's trust, and lead to privacy issues
      with potentially tragic consequences for the user.</t>

      <t>This document reserves these Top-Level Domain names to
      minimize the possibility of confusion, conflict, and especially
      privacy risks for users.</t>

      <t>In the introduction of this document, there's a requirement
      that DNS operators do not override resolution of the I2P Names.
      This is a regulatory measure and cannot prevent such malicious
      abuse in practice.  Its purpose is to limit any information leak
      that would result from incorrectly configured systems, and to
      avoid that resolvers make unnecessary contact to the DNS Root
      Zone for such domains.  Verisign, Inc., as well as several
      Internet service providers (ISPs) have notoriously abused their
      position to override NXDOMAIN responses to their customers in
      the past <xref target="SSAC-NXDOMAIN-Abuse"/>.  For example, if
      a DNS operator would decide to override NXDOMAIN and send
      advertising to leaked .onion sites, the information leak to the
      DNS would extend to the advertising server, with unpredictable
      consequences. Thus, implementors should be aware that any
      positive response coming from DNS must be considered with extra
      care, as it suggests a leak to DNS has been made, contrary to
      user's privacy expectations.</t>

      <t>The reality of X.509 Certificate Authorities (CAs) creating
      misleading certificates for I2P pTLDs due to ignorance
      stresses the need to document their special use.  Given the
      nature of &quot;B32.I2P&quot;,
      X.509 Certificate Authorities MAY create certificates for
      such domains given CSRs signed with the respective private keys
      corresponding to the respective names.</t>

    </section>

    <section anchor="iana-considerations"
	     title="IANA Considerations">

      <t>The Internet Assigned Numbers Authority (IANA) reserved the
      following entries in the Special-Use Domain Names registry <xref
      target="RFC6761"/>:</t>

      <t><list>
        <t>  .i2p</t>
      </list></t>

      <t>[TO REMOVE: the assignement URL is
      https://www.iana.org/assignments/special-use-domain-names/ ]</t>

    </section>

    <section anchor="acknowledgements"
	     title="Acknowledgements">

      <t>The authors thank the I2P and Namecoin developers for their
      constructive feedback, as well as Mark Nottingham for his
      proof-reading and valuable feedback.  The authors also thank the
      members of DNSOP WG for their critiques and suggestions.</t>

    </section>

  </middle>

  <back>

    <references title="Normative References">

      &RFC1034;

      &RFC1035;

      &RFC2119;

      &RFC2308;

      &RFC6761;

    </references>

    <references title="Informative References">

      <reference anchor="I2P-CHOICE"
		 target="https://geti2p.net/en/meetings/059">
	<front>
	  <title>I2P Dev Meeting 059</title>
	  <author initials="J.R.H." fullname="J. Random Hacker" surname="Hacker" />
	  <author>
	    <organization>The I2P Community</organization>
	  </author>
	  <date month="September" year="2003" />
	</front>
      </reference>

      <reference anchor="I2P-NAMING"
                 target="https://geti2p.net/en/docs/naming">
        <front>
          <title>Naming in I2P and Addressbook</title>
          <author initials="J.R.H." fullname="J. Random Hacker" surname="Hacker" />
	  <author>
	    <organization>The I2P Community</organization>
	  </author>
          <date month="April" year="2014" />
        </front>
      </reference>

      &RFC4648;

      <reference anchor="SSAC-NXDOMAIN-Abuse"
		 target="http://www.icann.org/committees/security/ssac-report-09jul04.pdf">
	<front>
	  <title>Redirection in the COM and NET Domains</title>
	  <author>
            <organization>ICANN Security and Stability Advisory
            Committee</organization>
          </author>
          <date month="July" year="2004"/>
        </front>
      </reference>

      <reference anchor="SAC45"
                   target="http://www.icann.org/en/groups/ssac/documents/sac-045-en.pdf">
        <front>
          <title>Invalid Top Level Domain Queries at the Root
          Level of the Domain Name System</title>
          <author>
            <organization>ICANN Security and Stability Advisory
            Committee</organization>
          </author>
          <date month="November" year="2010"/>
        </front>
      </reference>

      <reference anchor="zzz2009"
		 target="https://geti2p.net/_static/pdf/I2P-PET-CON-2009.1.pdf">
	<front>
	  <title>Peer Profiling and Selection in the I2P Anonymous Network</title>
	  <author fullname="zzz (pseudonym)">
	    <organization>The I2P Project</organization>
	  </author>
	  <author initials="L.S." fullname="Lars Schimmer" surname="Schimmer">
	    <organization>The I2P Project</organization>
	  </author>
	  <date year="2009" month="January" />
	</front>
      </reference>
    </references>

    <!-- Change Log

v00 2013-11-13  HOW   Initial version

v01 2013-12-05  HOW   First XML version
                      - Fix conformance issues
                      - Shorten abstract
                      - Remove appendix on Tor reference
                      - Add .bit
                      - Reorder references
                      - Integrate community feedback

v02 2014-02-15  HOW   Second XML version
                      - Split Reservation Considerations for each pTLD
                      - Revise abstract
                      - Explain .exit exceeded length unpredictability
                      - Integrate community feedback

v03 2014-12-21  HOW   Third XML version
                      - Shorten abstract and focus scope
		      - Expand security considerations:
		        - Add reference to SSL certificates for non-DNS domains
		        - Add reference to SSAC recommendations on name collisions
		      - Update GNUnet references
		      - Update I2P reference
		      - Update Namecoin reference
		      - Update Tor references
		      - Remove alternate use of dot-tld notation
		      - Added Leif as author
		      - Integrate community feedback

v04 2015-01-24  HOW   Fourth XML version
                      - Move I2P under geographic anonymity section
                      - Integrate I2P developers comments
                      - Integrate Namecoin developers comments
                      - Add security considerations
                      - Integrate community feedback

v05 2015-06-22  CG    First split version
                      - split into separate drafts for each name system
                      - Removed .onion as that's already a separate draft
    -->
  </back>
</rfc>
