<?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 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-02" 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="November" 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 instances: 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 Section 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 Section 5.2.5 in <xref
        target="I-D.irtf-cfrg-eddsa"/>.
      </t>
    </section>

    <section title="RRSIG Resource Records">
      
      <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 Section 5.1.6 and verification of the Ed25519
        signature is described in Section5.1.7 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 Section 5.2.6 and verification of the Ed448
        signature is described in Section 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 TBD1.  The algorithm
        number associated with the use of Ed448 in DS, DNSKEY and
        RRSIG resource records is TBD2.  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
          number for Ed25519 is assigned.</preamble>
          <artwork align="left"><![CDATA[
Private-key-format: v1.2
Algorithm: TBD1 (ED25519)
PrivateKey: ODIyNjAzODQ2MjgwODAxMjI2NDUxOTAyMDQxNDIyNjI=

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

example.com. 3600 IN DS 3613 TBD1 2 (
             3aa5ab37efce57f737fc1627013fee07bdf241bd10f3b1964ab55c78e79
             a304b )

example.com. 3600 IN MX 10 mail.example.com.

example.com. 3600 IN RRSIG MX 3 3600 (
             1440021600 1438207200 3613 example.com. (
             Edk+IB9KNNWg0HAjm7FazXyrd5m3Rk8zNZbvNpAcM+eysqcUOMIjWoevFkj
             H5GaMWeG96GUVZu6ECKOQmemHDg== )
         ]]></artwork>
        </figure>
        <figure align="center">
          <preamble>This section needs an update after the algorithm
          number for Ed25519 is assigned.</preamble>
          <artwork align="left"><![CDATA[
Private-key-format: v1.2
Algorithm: TBD1 (ED25519)
PrivateKey: DSSF3o0s0f+ElWzj9E/Osxw8hLpk55chkmx0LYN5WiY=

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

example.com. 3600 IN DS 35217 TBD1 2 (
             401781b934e392de492ec77ae2e15d70f6575a1c0bc59c5275c04ebe80c
             6614c )

example.com. 3600 IN MX 10 mail.example.com.

example.com. 3600 IN RRSIG MX 3 3600 (
             1440021600 1438207200 35217 example.com. (
             5LL2obmzdqjWI+Xto5eP5adXt/T5tMhasWvwcyW4L3SzfcRawOle9bodhC+
             oip9ayUGjY9T/rL4rN3bOuESGDA== )
         ]]></artwork>
        </figure>
      </section>
      <section title="Ed448 Examples">
        <figure align="center">
          <preamble>This section needs an update after the algorithm
          number for Ed448 is assigned.</preamble>
          <artwork align="left"><![CDATA[
Private-key-format: v1.2
Algorithm: TBD2 (ED448)
PrivateKey: xZ+5Cgm463xugtkY5B0Jx6erFTXp13rYegst0qRtNsOYnaVpMx0Z/c5EiA9x
            8wWbDDct/U3FhYWA

example.com. 3600 IN DNSKEY 257 3 TBD2 (
             3kgROaDjrh0H2iuixWBrc8g2EpBBLCdGzHmn+G2MpTPhpj/OiBVHHSfPodx
             1FYYUcJKm1MDpJtIA )

example.com. 3600 IN DS 9713 TBD2 2 (
             6ccf18d5bc5d7fc2fceb1d59d17321402f2aa8d368048db93dd811f5cb2
             b19c7 )

example.com. 3600 IN MX 10 mail.example.com.

example.com. 3600 IN RRSIG MX 3 3600 (
             1440021600 1438207200 9713 example.com. (
             Nmc0rgGKpr3GKYXcB1JmqqS4NYwhmechvJTqVzt3jR+Qy/lSLFoIk1L+9e3
             9GPL+5tVzDPN3f9kAwiu8KCuPPjtl227ayaCZtRKZuJax7n9NuYlZJIusX0
             SOIOKBGzG+yWYtz1/jjbzl5GGkWvREUCUA )
         ]]></artwork>
        </figure>
        <figure align="center">
          <preamble>This section needs an update after the algorithm
          number for Ed448 is assigned.</preamble>
          <artwork align="left"><![CDATA[
Private-key-format: v1.2
Algorithm: TBD2 (ED448)
PrivateKey: WEykD3ht3MHkU8iH4uVOLz8JLwtRBSqiBoM6fF72+Mrp/u5gjxuB1DV6NnPO
            2BlZdz4hdSTkOdOA

example.com. 3600 IN DNSKEY 257 3 TBD2 (
             kkreGWoccSDmUBGAe7+zsbG6ZAFQp+syPmYUurBRQc3tDjeMCJcVMRDmgcN
             Lp5HlHAMy12VoISsA )

example.com. 3600 IN DS 38353 TBD2 2 (
             645ff078b3568f5852b70cb60e8e696cc77b75bfaaffc118cf79cbda1ba
             28af4 )

example.com. 3600 IN MX 10 mail.example.com.

example.com. 3600 IN RRSIG MX 3 3600 (
             1440021600 1438207200 38353 example.com. (
             +JjANio/LIzp7osmMYE5XD3H/YES8kXs5Vb9H8MjPS8OAGZMD37+LsCIcjg
             5ivt0d4Om/UaqETEAsJjaYe56CEQP5lhRWuD2ivBqE0zfwJTyp4WqvpULbp
             vaukswvv/WNEFxzEYQEIm9+xDlXj4pMAMA )
         ]]></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, Kees Monshouwer, Simon Josefsson, Paul Hoffman and
        others 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>TBD1</c>          <c>TBD2</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="Security" title="Security Considerations">
      <t>
        Ed25519 and Ed448 offers improved security properties and
        implementation characteristics compared to RSA and ECDSA
        algorithms, and the introduction of these algorithms are thus
        expected to improve security of DNSSEC.
      </t>
      <t>
        The security considerations of <xref target="I-D.irtf-cfrg-eddsa"/>
        and <xref target="RFC7748"/>are inherited in the usage of
        Ed25519 and Ed448 in DNSSEC.
      </t>
      <t>
        Ed25519 is intended to operate at around the 128-bit security
        level, and Ed448 at around the 224-bit security level.  A
        sufficiently large quantum computer would be able to break
        both.  Reasonable projections of the abilities of classical
        computers conclude that Ed25519 is perfectly safe.  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>
        These assessments could, of course, change in the future if
        new attacks that work better than the ones known today are
        found.
      </t>
      <t>
	A private key used for a DNSSEC zone MUST NOT be used for any
	other purpose than for that zone.  Otherwise cross-protocol or
	cross-application attacks are possible.
      </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;
      <!--
      <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>
