<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4033 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4033.xml">
<!ENTITY RFC4034 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4034.xml">
<!ENTITY RFC4035 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4035.xml">
<!ENTITY RFC4509 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4509.xml">
<!ENTITY RFC5155 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5155.xml">
<!ENTITY RFC6605 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6605.xml">
<!ENTITY I-D.josefsson-eddsa-ed25519 SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.josefsson-eddsa-ed25519.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-sury-dnskey-ed25519-00" ipr="trust200902">

  <front>
    <title>Ed25519 for DNSSEC</title>

    <author fullname="Ondrej Sury" initials="O.S."
            surname="Sury">
      <organization>CZ.NIC</organization>

      <address>
        <postal>
          <street>Milesovska 1136/5</street>
          <city>Praha</city>
          <code>130 00</code>
          <country>CZ</country>
        </postal>
        <phone>+420 222 745 111</phone>
        <email>ondrej.sury@nic.cz</email>
      </address>
    </author>

    <!--
    <author fullname="Jan Vcelak" initials="J.V."
            surname="Vcelak">
      <organization>CZ.NIC</organization>

      <address>
        <postal>
          <street>Milesovska 1136/5</street>
          <city>Praha</city>
          <code>130 00</code>
          <country>CZ</country>
        </postal>
        <phone>+420 222 745 111</phone>
        <email>jan.vcelak@nic.cz</email>
      </address>
      </author>
    -->

    <date month="July" year="2015" />

    <area>Security</area>

    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>dnssec</keyword>
    <keyword>ed25519</keyword>
    <abstract>
      <t>This document describes how to specify Ed25519 keys and
      signatures in DNS Security (DNSSEC).  It uses a Ed25519 curve
      and uses the SHA-256 for public key and SHA-512 hash for
      signatures.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>DNSSEC, which is broadly defined in RFCs <xref
      target="RFC4033">4033</xref>, <xref
      target="RFC4034">4034</xref>, and <xref
      target="RFC4035">4035</xref>,, uses cryptographic keys and
      digital signatures to provide authentication of DNS data.
      Currently, the most popular signature algorithm is RSA.  <xref
      target="RFC6605">RFC 6605</xref> defines usage of Elliptic Curve
      Digital Signature Algorithm (ECDSA) for DNSSEC with curve P-256
      and SHA-256, and ECDSA with curve P-384 and SHA-384.</t>

      <t>This document defines the DNSKEY and RRSIG resource records
      (RRs) of one new signing algorithm: curve Ed25519 and SHA-256.
      (A description of Ed25519 can be found in <xref
      target="I-D.josefsson-eddsa-ed25519">EdDSA and Ed25519</xref>.)
      The DS RR for SHA-256 is already defined in <xref
      target="RFC4509">RFC 4509</xref>.</t>

      <t>Ed25519 is targeted to provide attack resistance comparable
      to quality 128-bit symmetric ciphers that is equivalent strength
      of RSA with 3072-bit keys.  Public keys are 256 bits (32 bytes)
      in length and signatures are 512 bits (64 bytes).  Using Ed25519
      curve in DNSSEC has some advantages and disadvantage relative to
      using RSA with SHA-256 and with 3072-bit keys.  Ed25519 keys are
      much shorter than RSA keys; at this size, the difference is 256
      versus 3072 bits.  Similarly, Ed25519 signatures are much shorter
      than RSA signatures; at this size, the difference is 512 versus
      vs 3072 bits.  This is relevant because DNSSEC stores and
      transmits both keys and signatures.</t>

      <t>In the signing algorithm defined in this document, the size
      of the key for the elliptic curve is matched with the size of
      the output of the hash algorithm (SHA-256).  The size of the
      signatures are also matched with size of the hashing
      algorithm (SHA-256).</t>

      <t>Signing with Ed25519 is significantly faster than with RSA (The
      reference implementation signs 109000 messages per second on a
      quad-core 2.4GHz Westmere CPU).  However, validating RSA
      signatures is significantly faster than validating Ed25519
      signatures.</t>
      
      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>
    </section>

    <section title="DNSKEY and RRSIG Resource Records for Ed25519">

      <t>The Ed25519 public keys consist of a 32-byte value that
      represents encoding of the curve point.  The generation of
      public key is defined Chapter 5.5 in <xref
      target="I-D.josefsson-eddsa-ed25519">I-D.josefsson-eddsa-ed25519</xref>.
      In DNSSEC keys, the Ed25519 public key is a simple bit string
      that represents uncompressed form of a curve point.</t>

      <t>The Ed25519 signature constist of a 64-byte value.  The
      Ed25519 signature algorithm is described Chapter 5.6 in <xref
      target="I-D.josefsson-eddsa-ed25519">I-D.josefsson-eddsa-ed25519</xref>.
      In DNSSEC keys, the Ed25519 signatures is a simple bit string
      that represents Ed25519 signature.
      </t>

      <t>The algorithm number associated with the DNSKEY and RRSIG
      resource records are fully defined in the IANA Considerations
      section.  They are:</t>

      <t><list style="symbols">
	<t>DNSKEY and RRSIG RRs signifying Ed25519 and SHA-512 use the
	algorithm number TBD.</t>
      </list></t>
    </section>

    <section title="Support for NSEC3 Denial of Existence">
      <t><xref target="RFC5155">RFC 5155</xref> defines new algorithm
      identifiers for existing signing algorithms to indicate that
      zones signed with these algorithm identifiers can use NSEC3 as
      well as NSEC records to provide denial of existence.  That
      mechanism was chosen to protect implementations predating RFC
      5155 from encountering resource records they could not know
      about.  This document does not define such algorithm aliases.</t>

      <t>A DNSSEC validator that implements the signing algorithms
      defined in this document MUST be able to validate negative
      answers in the form of both NSEC and NSEC3 with hash algorithm
      1, as defined in RFC 5155.  An authoritative server that does
      not implement NSEC3 MAY still serve zones that use the signing
      algorithms defined in this document with NSEC denial of
      existence.</t>
    </section>

    <section title="Examples">
    
      <section title="Ed25519 Example">

	<figure align="center">
	  <preamble>This needs a real example - this copied example of P-256</preamble>
	  
	  <artwork align="left"><![CDATA[
   Private-key-format: v1.2
   Algorithm: TBD (Ed25519)
   PrivateKey: ODIyNjAzODQ2MjgwODAxMjI2NDUxOTAyMDQxNDIyNjI= # coresponding to 82260384628080122645190204142262 INT

   example.net. 3600 IN DNSKEY 257 3 13 (
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX== )

   example.net. 3600 IN DS 55648 13 2 (
           b4c8c1fe2e7477127b27115656ad6256f424625bf5c1
           e2770ce6d6e37df61d17 )

   www.example.net. 3600 IN A 192.0.2.1
   www.example.net. 3600 IN RRSIG A 13 3 3600 (
           20150909100439 20150812100439 55648 example.net.
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX== )
	   ]]></artwork>

	</figure>
      </section>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Some of the material in this document is copied liberally from 
      <xref target="RFC6605">RFC 6605</xref>.
      </t>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This document updates the IANA registry "Domain Name System
      Security (DNSSEC) Algorithm Numbers".  The following entry have
      been added to the registry:</t>

      <texttable>
	<ttcol></ttcol>     <ttcol></ttcol>
	<c>Number</c>       <c>TBD</c>
	<c>Description</c>  <c>Ed25519 with SHA-512</c>
	<c>Mnemonic</c>     <c>Ed25519SHA512</c>
	<c>Zone Signing</c> <c>Y</c>
	<c>Trans. Sec.</c>  <c>*</c>
	<c>Reference</c>    <c>This document</c>

	<postamble>* There has been no determination of
	standardization of the use of this algorithm with Transaction
	Security.</postamble>
      </texttable>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Ed25519 is targeted to provide attack resistance comparable
      to quality 128-bit symmetric ciphers.  Such an assessment could,
      of course, change in the future if new attacks that work better
      than the ones known today are found.</t>
      <t>The security considerations listed in RFC 4509 apply here as well.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <references title="Normative References">
      &RFC2119;
      &RFC4033;
      &RFC4034;
      &RFC4035;
      &I-D.josefsson-eddsa-ed25519;
      &RFC5155;

      <!--
      <reference anchor="Ed25519"
		 target="http://ed25519.cr.yp.to/ed25519-20110926.pdf">
        <front>
          <title>High-speed high-security signatures</title>

          <author fullname="Daniel J. Bernstein" initials="D.J.B." surname="Bernstein">
            <organization>Department of Computer Science University of
            Illinois at Chicago,</organization>
          </author>

	  <author fullname="Niels Duif" initials="N.D." surname="Duif">
	    <organization>Department of Mathematics and Computer
	    Science Technische Universiteit Eindhoven</organization>
	  </author>

	  <author fullname="Tanja Lange" initials="T.L." surname="Lange">
	    <organization>Department of Mathematics and Computer
	    Science Technische Universiteit Eindhoven</organization>
	  </author>
	    
	  <author fullname="Peter Schwabe" initials="P.S." surname="Schwabe">
	    <organization>Department of Electrical Engineering
	    National Taiwan University</organization>
	  </author>
	  <author fullname="Bo-Yin Yang" initials="B.Y." surname="Yang">
	    <organization>Institute of Information Science Academia
	    Sinica</organization>
	  </author>
	  
          <date year="2011" />
        </front>
	</reference>
	-->
    </references>

    <references title="Informative References">

      &RFC4509;
      &RFC6605;
    </references>
  </back>
</rfc>
