<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4033 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4033.xml">
<!ENTITY RFC4034 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4034.xml">
<!ENTITY RFC4035 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4035.xml">
<!ENTITY RFC5933 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5933.xml">
<!ENTITY RFC6605 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6605.xml">
<!ENTITY RFC6982 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6982.xml">
<!ENTITY RFC7748 PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml">
<!ENTITY EDDSA   PUBLIC "" "http://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.irtf-cfrg-eddsa.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-ietf-curdle-dnskey-eddsa-01" ipr="trust200902">

  <front>
    <title>EdDSA 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>
        <email>ondrej.sury@nic.cz</email>
      </address>
    </author>

    <author fullname="Robert Edmonds" initials="R.E."
            surname="Edmonds">
      <organization>Fastly</organization>
      <address>
        <postal>
	  <street></street>
          <city>Atlanta</city>
          <region>Georgia</region>
	  <code></code>
          <country>US</country>
        </postal>
        <email>edmonds@mycre.ws</email>
      </address>
    </author>

    <date month="October" year="2016" />

    <area>Security</area>

    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>dnssec</keyword>
    <keyword>eddsa</keyword>
    <keyword>ed25519</keyword>
    <keyword>ed448</keyword>
    <abstract>
      <t>
        This document describes how to specify EdDSA keys and
        signatures in DNS Security (DNSSEC).  It uses the
        Edwards-curve Digital Security Algorithm (EdDSA) with the
        choice of two curves, Ed25519 and Ed448.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">

      <t>
        DNSSEC, which is broadly defined in <xref target="RFC4033"/>,
        <xref target="RFC4034"/>, and <xref target="RFC4035"/>, uses
        cryptographic keys and digital signatures to provide
        authentication of DNS data.  Currently, the most popular
        signature algorithm in use is RSA.  GOST (<xref
        target="RFC5933"/>) and NIST-specified elliptic curve
        cryptography (<xref target="RFC6605"/>) are also standardized.
      </t>
      
      <t>
	<xref target="I-D.irtf-cfrg-eddsa"/> describes the elliptic
	curve signature system EdDSA and recommends two curves,
	Ed25519 and Ed448.
      </t>

      <t>
        This document defines the use of DNSSEC's DS, DNSKEY, and
        RRSIG resource records (RRs) with a new signing algorithm,
        Edwards-curve Digital Signature Algorithm (EdDSA) using a
        choice of two curves, Ed25519 and Ed448.
      </t>

      <!--
      <t>
        Concerns about the real-world security of elliptic curve
        cryptography have emerged since ECDSA was standardized for
        DNSSEC. The only two curves standardized for use with ECDSA in
        DNSSEC, NIST P-256 and NIST P-384, fail several of the <xref
        target="SafeCurves"/> security criteria and are considered
        "unsafe". This document adds an additional elliptic curve
        algorithm and parameter choice to DNSSEC, allowing additional
        flexibility.
      </t>

      <t>
        There are three main advantages of the EdDSA algorithm: It does not
        require the use of a unique random number for each signature, there
        are no padding or truncation issues as with ECDSA, and it is more
        resilient to side-channel attacks.
      </t>
      
      <t>
        Ed25519 has a 128-bit security target, which is considered to be
        equivalent in strength to RSA with ~3000-bit keys.  Ed25519 public keys
        are 256 bits (32 bytes) long while signatures are 512 bits (64 bytes)
        long.
      </t>
      
      <t>
        Ed448 has a 224-bit security target, which is considered to be
        equivalent in strength to RSA with ~15000-bit keys.  Ed448
        public keys are 456 bits (57 bytes) long while signatures are
        912 bits (114 bytes) long.  Ed448 is provided for those
        applications with relaxed performance requirements and where
        there is a desire to hedge against analytical attacks on
        elliptic curves.
      </t>

      <t>
        The usage of elliptic curve cryptography in DNSSEC has
        advantages and disadvantages relative to RSA as already
        described in <xref target="RFC6605"/>.  Even when compared to
        the use of RSA at reduced relative strengths (for instance,
        1024- or 2048-bit RSA), Ed25519 and Ed448 still requires
        substantially smaller keys and signatures.  The authors of the
        study <xref target="ECCSIZE">Making the Case for Elliptic
        Curves in DNSSEC</xref> came to the conclusion that using
        elliptic curve cryptography rather than RSA in DNSSEC can
        effectively prevent fragmentation of DNSSEC responses as well
        as significantly reduce the amplification attack potential in
        DNSSEC.
      </t>

      <t>
        Signing with Ed25519 and Ed448 is significantly faster than
        signing with either equivalently strong RSA.  The validation
        of RSA signatures is still significantly faster than the
        validation of Ed25519 and Ed448 signatures.
      </t>

      <t>
	Existing reference Ed25519 implementation is faster for
	signing and validation than the implementation of ECDSA P-256
	algorithm in OpenSSL.  Existing reference Ed448 implementation is faster
	for signing and validation than the implementation of ECDSA
	P-384 algorithm in OpenSSL.
      </t>

      <t>
	However, the authors of <xref target="ECCSPEED">The
	Performance Impact of Elliptic Curve Cryptography on DNSSEC
	Validation</xref> study came to the conclusion that even if
	the deployment of elliptic curve cryptography in DNSSEC grows
	to cover 100% of the name space, a resolver will still be able
	to perform validation using a single CPU core.
      </t>
      -->
      
    </section>

    <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"/>.
      </t>
    </section>

    <section title="DNSKEY Resource Records">
      <t>
        An Ed25519 public key consists of a 32-octet value, which is
        encoded into the Public Key field of a DNSKEY resource record
        as a simple bit string.  The generation of a public key is
        defined in Chapter 5.1.5 in <xref
        target="I-D.irtf-cfrg-eddsa"/>.
      </t>

      <t>
        An Ed448 public key consists of a 57-octet value, which is
        encoded into the Public Key field of a DNSKEY resource record
        as a simple bit string.  The generation of a public key is
        defined in Chapter 5.2.5 in <xref
        target="I-D.irtf-cfrg-eddsa"/>.
      </t>
    </section>

    <section title="RRSIG Resource Records">

      <t>
	In Chapter 10.3 in <xref target="I-D.irtf-cfrg-eddsa"/>, the
	use of a context label is described.  EdDSA signatures in this
	scheme use the 12-octet context label 'DNSSECRRSIG\0' (where
	\0 represents a zero-valued octet).
      </t>
      
      <t>
        An Ed25519 signature consists of a 64-octet value, which is
        encoded into the Signature field of an RRSIG resource record
        as a simple bit string.  The Ed25519 signature algorithm is
        described in Chapter 5.1.6 in <xref
        target="I-D.irtf-cfrg-eddsa"/>.
      </t>

      <t>
        An Ed448 signature consists of a 114-octet value, which is
        encoded into the Signature field of an RRSIG resource record
        as a simple bit string.  The Ed448 signature algorithm is
        described in Chapter 5.2.6 and verification of the Ed448
        signature is described in Chapter 5.2.7 in <xref
        target="I-D.irtf-cfrg-eddsa"/>.
      </t>
    </section>

    <section title="Algorithm Number for DS, DNSKEY and RRSIG Resource Records">
      <t>
        The algorithm number associated with the use of Ed25519 in DS,
        DNSKEY and RRSIG resource records is TBD.  The algorithm
        number associated with the use of Ed448 in DS, DNSKEY and
        RRSIG resource records is TBD.  This registration is fully
        defined in the IANA Considerations section.
      </t>
    </section>

    <section title="Examples">
      <section title="Ed25519 Examples">
	<figure align="center">
          <preamble>This section needs an update after the algorithm
          for Ed25519 is assigned.</preamble>

          <artwork align="left"><![CDATA[
 Private-key-format: v1.2
 Algorithm: TBD (ED25519)
 PrivateKey: ODIyNjAzODQ2MjgwODAxMjI2NDUxOTAyMDQxNDIyNjI=
 # corresponding to 82260384628080122645190204142262 INT

 example.com. 3600 IN DNSKEY 257 3 TBD (
         l02Woi0iS8Aa25FQkUd9RMzZHJpBoRQwAQEX1SxZJA4= )

 example.com. 3600 IN DS 3613 TBD 2 (
         3aa5ab37efce57f737fc1627013fee07bdf241bd10f3
         b1964ab55c78e79a304b )

 www.example.com. 3600 IN A 192.0.2.1
 www.example.com. 3600 IN RRSIG A TBD 3 3600 (
         20150820000000 20150730000000 3613 example.com.
         cvTRVrU7dwnemQuBq9/E4tlIiRpvWcEmYdzqs6SCQxw6
         qmczBBQGldssMx1TCJnwsEs9ZuA2phPzuJNoon9BCA== )
         ]]></artwork>

	</figure>

	<figure>
          <artwork align="left"><![CDATA[
 Private-key-format: v1.2
 Algorithm: TBD (ED25519)
 PrivateKey: DSSF3o0s0f+ElWzj9E/Osxw8hLpk55chkmx0LYN5WiY=

 example.com. 3600 IN DNSKEY 257 3 TBD (
         zPnZ/QwEe7S8C5SPz2OfS5RR40ATk2/rYnE9xHIEijs= )

 example.com. 3600 IN DS 55648 TBD 2 (
         96401675bc7ecdd541ec0f70d69238c7b95d3bd4de1e
         231a068ceb214d02a4ed )

 www.example.com. 3600 IN A 192.0.2.1
 www.example.com. 3600 IN RRSIG A TBD 3 3600 (
         20150820000000 20150730000000 35452 example.com.
         yuGb9rCNIuhDaRJbuhYHj89Y/3Pi8KWUm7lOt00ivVRGvgulmVX8DgpE
         AFyMP2MKXJrqYJr+ViiCIDwcOIbPAQ==)
         ]]></artwork>
	</figure>
      </section>
      <section title="Ed448 Example">
	<figure align="center">
          <preamble>This section needs an update after the algorithm
          for Ed448 is assigned.</preamble>

          <artwork align="left"><![CDATA[
 Private-key-format: v1.2
 Algorithm: TBD (ED448)
 PrivateKey: TBD

 example.com. 3600 IN DNSKEY 257 3 TBD (
         TBD )

 example.com. 3600 IN DS 3613 TBD 2 (
         TBD )

 www.example.com. 3600 IN A 192.0.2.1
 www.example.com. 3600 IN RRSIG A TBD 3 3600 (
         20150820000000 20150730000000 3613 example.com.
         TBD )
         ]]></artwork>

	</figure>

	<figure>
          <artwork align="left"><![CDATA[
 Private-key-format: v1.2
 Algorithm: TBD (ED448)
 PrivateKey: TBD

 example.com. 3600 IN DNSKEY 257 3 TBD (
         TBD )

 example.com. 3600 IN DS 55648 TBD 2 (
         TBD )

 www.example.com. 3600 IN A 192.0.2.1
 www.example.com. 3600 IN RRSIG A TBD 3 3600 (
         20150820000000 20150730000000 35452 example.com.
         TBD )
         ]]></artwork>
	</figure>
      </section>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>
        Some of the material in this document is copied liberally from 
        <xref target="RFC6605"/>.
      </t>
      <t>
        The authors of this document wish to thank Jan Vcelak, Pieter
        Lexis and Kees Monshouwer for a review of this document.
      </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 has
      been added to the registry:</t>

      <texttable>
        <ttcol></ttcol>     <ttcol></ttcol>      <ttcol></ttcol>
        <c>Number</c>       <c>TBD</c>           <c>TBD</c>
        <c>Description</c>  <c>Ed25519</c>       <c>Ed448</c>
        <c>Mnemonic</c>     <c>ED25519</c>       <c>Ed448</c>
        <c>Zone Signing</c> <c>Y</c>             <c>Y</c>
        <c>Trans. Sec.</c>  <c>*</c>             <c>*</c>
        <c>Reference</c>    <c>This document</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="Implementation" title="Implementation Status">
      <t>
        (Note to the RFC Editor: please remove this entire section as well as the reference to RFC 6982 before publication.)
      </t>

      <t>
        This section records the status of known implementations of
        the protocol defined by this specification at the time of
        posting of this Internet-Draft, and is based on a proposal
        described in <xref target="RFC6982"/>.  The description of
        implementations in this section is intended to assist the IETF
        in its decision processes in progressing drafts to RFCs.
        Please note that the listing of any individual implementation
        here does not imply endorsement by the IETF.  Furthermore, no
        effort has been spent to verify the information presented here
        that was supplied by IETF contributors.  This is not intended
        as, and must not be construed to be, a catalog of available
        implementations or their features.  Readers are advised to
        note that other implementations may exist.
      </t>

      <t>
        According to <xref target="RFC6982"/>, "this will allow
        reviewers and working groups to assign due consideration to
        documents that have the benefit of running code, which may
        serve as evidence of valuable experimentation and feedback
        that have made the implemented protocols more mature.  It is
        up to the individual working groups to use this information as
        they see fit".
      </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>
	The security level of Ed25519 is slightly under the standard
	128-bit level and the security level of Ed448 is slightly
	under the standard 224-bit level (<xref target="RFC7748"/>).
	Security considerations listed in <xref target="RFC7748"/>
	also apply to the usage of Ed25519 and Ed448 in DNSSEC.  Such
	an assessment could, of course, change in the future if new
	attacks that work better than the ones known today are found.
      </t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <references title="Normative References">
      &RFC2119;
      &RFC4033;
      &RFC4034;
      &RFC4035;
      &RFC7748;
      &EDDSA;
    </references>

    <references title="Informative References">
      &RFC5933;
      &RFC6605;
      &RFC6982;
      <!--
      <reference anchor="ECCSIZE" target="http://www.sigcomm.org/ccr/papers/2015/October/0000000.0000002">
	<front>
	  <title>Making the Case for Elliptic Curves in DNSSEC</title>
	  <author fullname="Roland van Rijswijk-Deij" initials="R." surname="van Rijswijk-Deij" />
	  <author fullname="Anna Speroto" initials="A." surname="Speroto" />
	  <author fullname="Aiko Pras" initials="A." surname="Pras" />
	  <date year="2015" />
	</front>
      </reference>
      <reference anchor="ECCSPEED" target="http://ieeexplore.ieee.org/document/7574360/">
	<front>
	  <title>Performance Impact of Elliptic Curve Cryptography on DNSSEC Validation</title>
	  <author fullname="Roland van Rijswijk-Deij" initials="R." surname="van Rijswijk-Deij" />
	  <author fullname="Kaspar Hageman" initials="K." surname="Hageman" />
	  <author fullname="Anna Speroto" initials="A." surname="Speroto" />
	  <author fullname="Aiko Pras" initials="A." surname="Pras" />
	  <date year="2016" />
	</front>
	<seriesInfo name="IEEE/ACM Transactions on Networking" value="DOI: 10.1109/TNET.2016.2605767" />
      </reference>
      <reference anchor="SafeCurves" target="http://safecurves.cr.yp.to/">
        <front>
          <title>SafeCurves: choosing safe curves for elliptic-curve cryptography</title>
          <author fullname="Daniel J. Bernstein" initials="D.J." surname="Bernstein"/>
          <author fullname="Tanja Lange" initials="T." surname="Lange"/>
          <date year="2016" />
        </front>
      </reference>
      -->
    </references>
  </back>
</rfc>
