<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC1321 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1321.xml">
<!ENTITY RFC5905 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5905.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6151 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6151.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC2104 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2104.xml">
<!ENTITY RFC7630 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7630.xml">
<!ENTITY RFC4493 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4493.xml">
<!ENTITY RFC4543 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4543.xml">
<!ENTITY RFC4106 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4106.xml">
<!ENTITY RFC7696 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7696.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.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 number="8573" category="std" submissionType="IETF" consensus="yes"
  ipr="trust200902" updates="5905">

  <front>

    <title abbrev="MAC for NTP">
    Message Authentication Code for the Network Time Protocol
    </title>

    <author fullname="Aanchal Malhotra" initials="A." surname="Malhotra">
      <organization>Boston University </organization>

      <address>
        <postal>
          <street>111 Cummington St</street>
          <city>Boston, MA</city>
          <region/>
          <code>02215</code>
          <country>United States of America</country>
        </postal>
        <phone/>
        <email>aanchal4@bu.edu</email>
      </address>
    </author>

    <author fullname="Sharon Goldberg" initials="S." surname="Goldberg">
      <organization>Boston University</organization>

      <address>
        <postal>
          <street>111 Cummington St</street>
          <city>Boston, MA</city>
          <region/>
          <code>02215</code>
          <country>United States of America</country>
        </postal>
        <phone/>
        <email>goldbe@cs.bu.edu</email>
      </address>
    </author>

  <date month="June" year="2019"/>

    <keyword>NTP</keyword>

    <abstract>
      <t>
          The Network Time Protocol (NTP), as described in RFC 5905, states
          that NTP packets should be authenticated by appending NTP data to a
	  128-bit key and hashing the result with MD5 to obtain a 128-bit
	  tag. This document deprecates MD5-based authentication, which is
	  considered too weak, and recommends the use of AES-CMAC as described
	  in RFC 4493 as a replacement. 
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
        <t> The Network Time Protocol <xref target="RFC5905"></xref> states
	that NTP packets should be authenticated by appending NTP data to
	    a 128-bit key and hashing the result with MD5 to obtain a 128-bit
	    tag. This document deprecates MD5-based authentication, which is
	    considered too weak, and recommends the use of AES-CMAC
	    <xref target="RFC4493"></xref> as a replacement. 
          </t>


      <section title="Requirements Language">
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t> 
      </section>
    </section>


    <section title="Deprecating the Use of MD5">

      <t>

      RFC 5905 <xref target="RFC5905"></xref> defines how the MD5 digest
      algorithm described in <xref target="RFC1321">RFC 1321</xref> can be
      used as a Message Authentication Code (MAC) for authenticating NTP
      packets. However, as discussed in <xref target="BCK"></xref> and 
      <xref target="RFC6151"> RFC 6151 </xref>, this is not a secure MAC and
      therefore MUST be deprecated. 
      </t>
      </section>

          <section title="Replacement Recommendation">
              <t>
                  If NTP authentication is implemented, then AES-CMAC as specified
                  in <xref target="RFC4493">RFC 4493</xref> MUST be computed over all fields
                  in the NTP header and any extension fields that are present
		  in the NTP packet as described in <xref target="RFC5905">
		  RFC 5905 </xref>. The MAC key for NTP MUST be an AES-128 key
		  that is 128 bits in length, and the resulting MAC tag MUST be at least 128
		  bits in length, as stated in Section 2.4 of <xref
		  target="RFC4493">RFC 4493</xref>. NTP makes this transition
	      possible as it supports algorithm agility as described in
	      Section 2.1 of <xref target="RFC7696">RFC 7696</xref>. </t> 
                       <t> The hosts that wish to use NTP authentication share
		       a symmetric key out of band. So they MUST implement
		       AES-CMAC and share the corresponding symmetric key. A
		       symmetric key is a triplet of ID, type (e.g., MD5 and
		       AES-CMAC) and the key itself. All three have to match
		       in order to successfully authenticate packets between
		       two hosts. Old implementations that don't support
		       AES-CMAC will not accept and will not send packets
		       authenticated with such a key. </t> 
              
                  
          </section>
          <section title="Motivation">
          <t>  AES-CMAC is recommended for the following reasons:</t>      
                  <t>
                  <list style="numbers">
                          <t>It is an IETF specification that is supported in
			  many open source implementations.</t>
                          <t>It is immune to nonce-reuse vulnerabilities 
                          (e.g., <xref target="Joux"></xref>)
                          because it does not use a nonce.</t>
                          <t>It has fine performance in terms of latency 
                          and throughput. </t>
                          <t> It benefits from native hardware support,
                          for instance, Intel's New Instruction set <xref target="GUE"> GUE </xref>. </t>
                  </list> </t>
              </section>

<section title="Test Vectors">
    <t> For test vectors and their outputs, refer to Section 4 of <xref
    target="RFC4493">RFC 4493</xref>.
    </t>
</section>
    <section anchor="IANA" title="IANA Considerations">
      <t>This document has no IANA actions.</t>
    </section>


<section title="Security Considerations">
      <t>Refer to Appendices A, B, and C of the <xref target = "NIST">NIST
      document</xref> for a recommendation for the CMAC mode of
      authentication; see the Security Considerations of <xref target="RFC4493">RFC
      4493</xref> for discussion on security guarantees of AES-CMAC.</t> 
    </section>

</middle>


  <back>
    <references title="Normative References">

      &RFC2119;

      &RFC5905;

      &RFC4493;
      <reference anchor="NIST" target="https://www.nist.gov/publications/recommendation-block-cipher-modes-operation-cmac-mode-authentication-0">
          <front>
              <title>Recommendation for Block Cipher Modes of Operation: The CMAC Mode for Authentication</title>
              <author initials="M." surname="Dworkin"><organization>NIST</organization></author>
              <date month="October" day="6" year="2016"/>
          </front>
          <seriesInfo name="NIST Special Publication" value="800-38B" />
         <seriesInfo name="DOI" value="10.6028/NIST.SP.800-38B"/>

      </reference>
      
      &RFC8174;      
           </references>

    <references title="Informative References">

      <reference anchor="BCK">
          <front>
              <title>Keying Hash Functions and Message Authentication</title>
              <author initials="M." surname="Bellare"><organization /></author>
              <author initials="R." surname="Canetti"><organization /></author>
              <author initials="H." surname="Krawczyk"><organization /></author>
              <date year="1996" />
          </front>
          <seriesInfo name="Advances in Cryptology -" value="Crypto 96
							     Proceedings"/>
          <seriesInfo name="Lecture Notes in Computer Science, Vol. 1109,
			    N. Koblitz ed," value="Springer-Verlag"/>

      </reference>
      &RFC1321;
      &RFC6151;
      &RFC7696;

      <reference anchor="Joux" target="http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/comments/800-38_Series-Drafts/GCM/Joux_comments.pdf">
          <front>
              <title>Authentication Failures in NIST version of GCM</title>
              <author initials="A." surname="Joux"><organization /></author>
              <date/>
          </front>
      </reference>

<reference anchor="GUE" target="https://www.intel.com/content/dam/doc/white-paper/advanced-encryption-standard-new-instructions-set-paper.pdf">
          <front>
              <title>Intel Advanced Encryption Standard (AES) New Instructions Set</title>
              <author initials="S." surname="Geuron"><organization /></author>
              <date month="May" year="2010"/>
          </front>
      </reference>




    </references>
   <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors wish to acknowledge useful discussions with Leen Alshenibr,
      Daniel Franke, Ethan Heilman, Kenny Paterson, Leonid Reyzin, Harlan Stenn,
      and Mayank Varia.</t>
    </section>


  </back>
</rfc>
