<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
	  <!-- One method to get references from the online citation libraries.
	       There has to be one entity for each item to be referenced.
	       An alternate method (rfc include) is described in the references. -->
	  <!ENTITY RFC5905 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5905.xml">
	  <!ENTITY RFC5906 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5906.xml">
	  <!ENTITY RFC7821 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7821.xml">
	  <!ENTITY RFC7822 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7822.xml">
	  <!ENTITY RFC2827 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2827.xml">
	  <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
	  <!ENTITY RFC2434 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2434.xml">
	  <!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.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' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-stenn-ntp-extension-fields-09"
     ipr="trust200902" obsoletes="7822">
  <!-- category values: std, bcp, info, exp, and historic
       ipr values: full3667, noModification3667, noDerivatives3667
       you can add the attributes updates="NNNN" and obsoletes="NNNN"
       they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

    <title abbrev="NTPv4 Extension Fields">Network Time Protocol Version 4 (NTPv4) Extension Fields
    </title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Harlan Stenn" initials="H." surname="Stenn">
      <organization>Network Time Foundation</organization>

      <address>
        <postal>
          <street>P.O. Box 918</street>

          <!-- Reorder these if your country does things differently -->

          <city>Talent, OR</city>

          <region/>

          <code>97540</code>

          <country>US</country>
        </postal>

        <phone/>

        <email>stenn@nwtime.org</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="David L. Mills" initials="D." surname="Mills">
      <organization>Network Time Foundation</organization>

      <address>
        <postal>
          <street>P.O. Box 918</street>

          <!-- Reorder these if your country does things differently -->

          <city>Talent, OR</city>

          <region/>

          <code>97540</code>

          <country>US</country>
        </postal>

        <phone/>

        <email>mills@udel.edu</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <!-- other authors -->

    <date year="2019"/>

    <!-- If the month and year are both specified and are the current ones,
         xml2rfc will fill in the current day for you. If only the current
         year is specified, xml2rfc will fill in the current day and month
         for you. If the year is not the current one, it is necessary to
         specify at least a month (xml2rfc assumes day="1" if not specified
         for the purpose of calculating the expiry date).  With drafts it is
         normally sufficient to specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.
         If this element is not present, the default is "Network Working
         Group", which is used by the RFC Editor as a nod to the history of
         the IETF. -->

    <keyword>NTP</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>
	Network Time Protocol version 4 (NTPv4) defines the optional
	usage of extension fields.  An extension field, as defined in
	<xref target="RFC5905">RFC 5905</xref> and <xref
	target="RFC5906">RFC 5906</xref>, resides after the end of the
	NTP header and supplies optional capabilities or information
	that cannot be conveyed in the basic NTP packet.  This
	document updates <xref target="RFC5905">RFC 5905</xref> by
	clarifying some points regarding NTP extension fields and
	their usage with legacy Message Authentication Codes (MACs),
	and removes wasteful requirements added by <xref
	target="RFC7822">RCF 7822</xref>.
      </t>

      <t>This proposal deprecates <xref target="RFC7822">RFC 7822</xref>.</t>
      
      <t>RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH BEFORE PUBLISHING:</t>
      <t>
	The source code and issues list for this draft can be found in
	https://github.com/hstenn/ietf-ntp-extension-fields
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>
	An NTP packet consists of a set of fixed fields that may be
	followed by optional fields.  Two types of optional fields are
	defined: extension fields (EFs) as defined in Section 7.5 of
	<xref target="RFC5905">RFC 5905</xref>, and legacy Message
	Authentication Codes (legacy MACs).
      </t>

      <t>
	If a legacy MAC is used, it resides at the end of the packet.
	This field can be either a 4-octet crypto-NAK or data that has
	traditionally been 16, 20 or 24 octets long.
      </t>

      <t>
	Additional information about the content of a MAC is specified
	in <xref target="RFC5906">RFC 5906</xref>, but since that RFC
	is Informational an implementor that was not planning to
	provide Autokey would likely never read that document.  The
	result of this would be interoperability problems, at least.
	To address this problem this proposal also copies and
	clarifies some of the content of RFC 5906, putting it into RFC
	5905.  Because there is a reasonable expectation that RFC 5906
	will be deprecated, this document does not propose changes or
	updates to RFC 5906.
      </t>

      <t>
	NTP extension fields are defined in <xref target="RFC5905">RFC
	5905</xref> as a generic mechanism that allows the addition of
	future extensions and features without modifying the NTP
	header format (Section 16 of <xref target="RFC5905">RFC
	5905</xref>).
      </t>

      <t>
	With the knowledge and experience we have gained over time, it
	has become clear that simplifications, clarifications, and
	improvements can be made to the NTP specification around EFs
	and MACs.
      </t>

      <t>
	This proposal adjusts and clarifies the requirements around
	EFs and MACs, allows EFs to be on 4-octet boundaries of any
	acceptable length, and provides methods to disambiguate packet
	parsing in the unexpected and unlikely case where an
	implementation would choose to send a packet that could be
	ambiguously parsed by the receiver.
      </t>

      <t>
	This proposal deprecates <xref target="RFC7822">RFC 7822</xref>.
      </t>

      <t>
	Implementations are still free to send EFs that are padded to
	longer lengths that otherwise follow the requirements
	below.
      </t>

      <t>
	This document better specifies and clarifies extension fields
	as well as the requirements and parsing of a legacy MAC, with
	changes to address errors found after the publication of <xref
	target="RFC5905">RFC 5905</xref> with respect to extension
	fields.  Specifically, this document updates Section 7.5 of
	<xref target="RFC5905">RFC 5905</xref>, clarifying the
	relationship between extension fields and MACs, and expressly
	defines the behavior of a host that receives an unknown
	extension field.
      </t>
    </section>

    <section title="Conventions Used in This Document">
      <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 title="Terms and Abbreviations">
	<t>EF - Extension Field</t>
        <t>MAC - Message Authentication Code</t>
        <t>NTPv4 - Network Time Protocol, Version
          4 <xref target="RFC5905">RFC 5905</xref></t>
      </section>
    </section>

    <section title="NTP MAC - RFC 5906 Update">
      <t>
	This document copies and updates some information in <xref
	target="RFC5906">RFC 5906</xref> and puts it in to RFC 5905,
	as follows:
      </t>

      <section title="RFC5906 Section 4. - Autokey Cryptography">
        <t>
	  This section describes some of the cryptography aspects of
	  Autokey.  The third paragraph describes the use of 128- and
	  160-bit message digests.  The enumeration of 128- and
	  160-bit message digests is not meant to be limiting - other
	  message digest lengths MAY be implemented.  This paragraph
	  also describes some of the expected semantic ranges of the
	  key ID.  This information belongs in RFC 5905.  The key ID
	  value is particularly significant because it provides
	  additional detection and disambiguation protection when
	  deciding if the next data portion is either a legacy MAC or
	  an extension field.  [This is additional evidence that
	  although RFC 5906 is Informational, parts of its content are
	  REQUIRED for proper behavior of RFC 5905.]
	</t>
      </section>

      <section title="RFC5906 Section 10. - Autokey Protocol Messages">
        <t>
	  This section describes the extension field format, including
	  initial flag bits, a Code field, and 8-bit Field Type, and
	  the 16-bit Length.  This proposal expands and clarifies this
	  information and puts it into RFC 5905.
	</t>

        <t>
	  This section says "The reference implementation discards any
	  packet with a field length of more than 1024 characters."
	  but this is no longer true.
	</t>
      </section>

      <section title="RFC5906 Section 11.5. - Error Recovery">
        <t>
	  This section describes the crypto-NAK, which should be
	  described in RFC 5905.  A crypto-NAK is used by RFC 5905 as
	  well.  [This is additional evidence that even though RFC
	  5906 was Informational, some of its content is REQUIRED for
	  proper behavior for RFC 5095.]
	</t>
      </section>

      <section title="RFC5906 Section 13. - IANA Consideration">
        <t>
	  This section lists the Autokey-related Extension Field
	  Types, including Flag Bits, Codes, and Field Types, which
	  should be described in RFC 5905, or perhaps in some other
	  document.  [This is additional evidence that even though RFC
	  5906 is Informational, some of its content is REQUIRED for
	  proper behavior for RFC 5905.]
	</t>
      </section>
    </section>

    <section title="NTP Extension Fields - RFC 5905 Update">
      <t>
	This document updates Section 7.5 of <xref
	target="RFC5905">RFC 5905</xref> as follows:
      </t>

      <section title="OLD: 'RFC5905 7.5 - NTP Extension Field Format'">
        <t>
	  In NTPv4, one or more extension fields can be inserted after
	  the header and before the MAC, which is always present when
	  an extension field is present.  Other than defining the
	  field format, this document makes no use of the field
	  contents.  An extension field contains a request or response
	  message in the format shown in Figure 14.
	</t>

	<t><figure title="Figure 14: Extension Field Format">
            <artwork name="Figure 14: Extension Field Format"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+---------------+---------------+-------------------------------+
|          Field Type           |        Field Length           |
+-------------------------------+-------------------------------+
.                                                               .
.                             Value                             .
.                                                               .
+-------------------------------+-------------------------------+
|                       Padding (as needed)                     |
+---------------------------------------------------------------+]]></artwork>
        </figure></t>
	<t>
	  All extension fields are zero-padded to a word (four octets)
	  boundary.  The Field Type field is specific to the defined
	  function and is not elaborated here.  While the minimum
	  field length containing required fields is four words (16
	  octets), a maximum field length remains to be
	  established.
	</t>

	<t>
	  The Length field is a 16-bit unsigned integer that indicates
	  the length of the entire extension field in octets,
	  including the Padding field.
	</t>
      </section>

      <section title="NEW: 'RFC5905 Section 7.5 - NTP Extension Field Format'">
        <t>
	  In NTPv4, one or more extension fields can be inserted after
	  the header and before the possibly optional legacy MAC.  A
	  MAC SHOULD be present when an extension field is present.  A
	  MAC is always present in some form when NTP packets are
	  authenticated.  This MAC SHOULD be either a legacy MAC or a
	  MAC-EF.  It MAY be both.  Other than defining the field
	  format, this document makes no use of the field contents.
	  An extension field contains a request or response message in
	  the format shown in Figure 14.
	</t>

	<t><figure title="Figure 14: Extension Field Format">
            <artwork name="Figure 14: Extension Field Format"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+---------------+---------------+-------------------------------+
|          Field Type           |        Field Length           |
+-------------------------------+-------------------------------+
.                                                               .
.                             Value                             .
.                                                               .
+-------------------------------+-------------------------------+
|                       Padding (as needed)                     |
+---------------------------------------------------------------+]]></artwork>
        </figure></t>

	<t>
	  The four octets that comprise the Field Type and Field
	  Length are called the Extension Field Header.  Octets beyond
	  the Extension Field Header are called the Extension Field
	  Body, or the Extension Field Payload.  The EF Body (EF
	  Payload) MAY be null in some cases.
	</t>

	<t>
	  All extension fields are zero-padded to a word (four octet)
	  boundary.  The Field Type is specific to the defined
	  functionality and detailed information about the Field Type
	  is not elaborated here.  The minimum size of an Extension
	  Field is a 32-bit word (4 octets), and while the maximum
	  extension field size MUST be 65532 octets or less, an NTP
	  packet SHOULD NOT exceed the network MTU.
	</t>

	<t>
	  The Field Length is a 16-bit unsigned integer that indicates
	  the length of the entire extension field in octets,
	  including any Padding octets.  The bottom two bits of the
	  Field Length SHOULD be zero, and the size of the extension
	  field SHOULD end on a 32-bit (4 octet) boundary.  [RFC5905
	  Section 7.5 says "All extension fields are zero-padded to a
	  word (four octets) boundary." but does not use 'MUST'
	  language.  Is it overkill to reiterate this requirement
	  here?  Should we use SHOULD or MUST regarding the bottom two
	  bits or the boundary of the EF?  It is possible, down the
	  road, that we might find some use for those bottom 2 bits,
	  even if we require a 32-bit boundary on the last octet of an
	  EF.]
	</t>

	<t>The Field Type contains the following sub-elements:</t>
	<t><figure title="Extension Field Header Format">
            <artwork name="Extension Field Header Format"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+---------------+---------------+-------------------------------+
|R|E|      Code |       Type    |       (Field Length)          |
+-------------------------------+-------------------------------+]]></artwork>
        </figure></t>
	<t>Where the following Field Type flags are defined:
	  <list>
            <t> R: 0 for "Information/Query", 1 for a "Response"</t>
            <t> E: 0 for "OK", 1 for an "Error".  Unused, and will be deprecated.</t>
	</list></t>

	<t>
	  [The 'R' flag is currently used by <xref
	  target="RFC5906">Autokey</xref>, and by the proposed <xref
	  target="DRAFT-I-DO">I-DO</xref> extension field.  This flag
	  is used after the packet is accepted.]
	</t>

	<t>
	  [The 'E' flag was proposed for use by Autokey, after the
	  packet was accepted.  As it was never used and no other
	  use-cases have been identified, we are recommending this
	  flag be deprecated at some point in the future.]
	</t>

	<t>
	  [The EF Code subtype is currently used by <xref
	  target="RFC5906">RFC 5906, Autokey</xref>, by the proposed
	  <xref target="DRAFT-EXTENDED-INFORMATION">Extended
	  Information</xref>, <xref target="DRAFT-I-DO">I-DO</xref>,
	  and is expected to be used by the NTS Extension Field, at
	  least.]
	</t>

	<t>
	  The Autokey EF currently uses the most Code values - 10 of
	  them, which equates to the least-significant 4 bits of the
	  high-order octet.  It is possible that additional flag bits
	  will be allocated; in the past, the high-order 2 bits were
	  reserved, and for a time two additional bits were proposed.
	  Make no assumptions about the unused bits in this octet.
	</t>

	<t>
	  The EF Header and Body fields (the Flags, Code, Type, and
	  Length, and any Value or Padding) are specific to the
	  defined functionality and are not elaborated here;
	  appropriate Field Type Flags, the EF Code, and EF Type
	  values are defined in an IANA registry, and the Length,
	  Value, and Padding values are defined by the document
	  referred to by the registry.  If a host receives an
	  extension field with an unknown Field Type, the host SHOULD
	  ignore the extension field and MAY drop the packet
	  altogether, depending on local policy.
	</t>

	<t>
	  The Length field is a 16-bit unsigned integer that indicates
	  the length of the entire extension field in octets,
	  including any Padding.
	</t>

	<t>
	  While the minimum field length of an EF that contains no
	  value or padding fields is one word (four octets), and the
	  minimum field length of an EF that contains required fields
	  is two words (8 octets), the maximum field length MUST NOT
	  be longer than 65532 octets due to the maximum size of the
	  data represented by the Length field, and SHOULD be small
	  enough that the size of the NTP packet received by the
	  client does not exceed the smallest MTU between the sender
	  and the recipient.  The bottom two bits of the Field Length
	  SHOULD be zero and the EF data SHOULD be aligned to a 32-bit
	  (4 octet) boundary.
	</t>
      </section>

      <section title="NEW: 'RFC5905 Section 7.5.1 - Extension Fields and MACs'">
        <t>
	  With the inclusion of additional Extension Fields, there is
	  now a potential that a poorly-designed implementation would
	  produce an ambiguous parsing in the presence of a legacy
	  MAC.  What follows are two possibly independent ways to
	  prevent this situation from ever happening.
	</t>

	<t>
	  Note well that to-date, there are only two defined Extension
	  Field Types: Autokey, defined by <xref target="RFC5906">RFC
	  5906</xref>, and the Experimental UDP Checksum Complement in
	  the Network Time Protocol, defined by <xref
	  target="RFC7821">RFC 7821</xref>.
	</t>

	<t>
	  In spite of its known serious problems, Autokey is still in
	  use by some and is a legacy case that is easily supported.
	  Old systems will still work.  An old system will still be
	  able to open a properly-configured Autokey association to a
	  new system, a new system will still be able to open a
	  properly-configured Autokey association with an old system,
	  and two new systems will be able to open a
	  properly-configured Autokey association.
	</t>

	<t>
	  The UDP Checksum Complement extension field forbids the use
	  of a legacy MAC, so any packet that uses it CANNOT be using
	  a legacy MAC.  [We could list the detailed and specific
	  reasons why traffic using this EF is immune to EF/legacy MAC
	  problems, but I fear that would just be confusing to most
	  people.]
	</t>

	<t>
	  The first and best way to prevent ambiguous parsing is to
	  use the <xref target="DRAFT-I-DO">I-DO</xref> extension
	  field.
	</t>

	<t>
	  By definition any NTP client or server that handles any
	  other Extension Fields is "new code" and can completely
	  prevent ambiguity by the initiating side sending a packet
	  containing an <xref target="DRAFT-I-DO">I-DO</xref>
	  extension field followed by an optional <xref
	  target="DRAFT-MAC-LAST-EF">MAC-EF</xref> followed by an
	  optional legacy MAC.  The inclusion of any MAC would be
	  dictated by the authentication requirements of the
	  association.
	</t>

	<t>
	  Note that NTP traffic works perfectly well without using any
	  other extension fields.  Newer extension fields offer
	  additional capabilities, but these capabilities are not
	  required for operation.  [Even in the case of NTS or SNT,
	  we're talking about "new code" that can be expected to be
	  aware of issues with new extension fields an legacy MACs.]
	</t>

	<t>
	  If the initiating side sends an <xref
	  target="DRAFT-I-DO">I-DO</xref> packet and gets no response,
	  it operates as if the other side cannot handle new extension
	  fields and simply continues the association without sending
	  any new extension fields.  At any point in the future a
	  packet can be sent with an I-DO extension field to see if
	  the other side will respond.
	</t>

	<t>
	  An NTP implementation that receives a packet with an I-DO
	  extension field may respond with a packet that may or may
	  not contain an I-DO Response.  If it does not respond, the
	  other side SHOULD assume that the receiver does not
	  understand new EFs.  If it responds without sending an I-DO
	  Response extension field, the sending side knows it should
	  not send any new extension fields to this server.  If the
	  system that receives an I-DO extension field responds with
	  an I-DO Response, it's telling the sender exactly what
	  capabilities it is currently willing to exchange.
	</t>

	<t>
	  The second way to prevent ambiguous parsing is to use the
	  <xref target="DRAFT-MAC-LAST-EF">LAST-EF</xref> extension
	  field.
	</t>

	<t>
	  By definition, if I-DO is used and each side agrees to
	  support LAST-EF then LAST-EF will prevent any ambiguity.
	</t>

	<t>
	  If, however, I-DO is not used then one side can simply send
	  a packet with a LAST-EF.  The LAST-EF extension field could
	  be four-octet extension field, it could be a 28 octet
	  extension field, or some other length that ends on a 32-bit
	  boundary.  If the other side responds appropriately then all
	  is well.  If the other side does not respond appropriately
	  the sender should proceed without sending any new extension
	  fields.
	</t>

	<t>
	  Parties interested in additional reasons for and approaches
	  to understanding why there is no reason to be concerned
	  about potential ambiguities with new code that would use new
	  extension fields and legacy MACs can look at the the drafts
	  that preceded this document.
	</t>

      </section>

      <section title="OLD: 'RFC5905 Section 9.2. - Peer Process Operations'">
	<t>...</t>
	<t>
	  FXMIT. ... This message includes the normal NTP header data
	  shown in Figure 8, but with a MAC consisting of four octets
	  of zeros. ...
	</t>
      </section>

      <section title="NEW: 'RFC5905 Section 9.2. - Peer Process Operations'">
	<t>...</t>
	<t>
	  FXMIT. ... This message includes the normal NTP header data
	  shown in Figure 8, but with a MAC consisting of four octets
	  of zeros.  This MAC can be a legacy MAC or a MAC-EF.  If
	  it's a MAC-EF, the crypto-NAK MUST be the only MAC in the
	  MAC-EF payload.  ...
	</t>
      </section>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>
	The authors wish to acknowledge the contributions of Sam
	Weiler, Danny Mayer, and Tal Mizrahi.
      </t>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>
	This memo requests IANA to update the NTP Extension Field
	Types table in the NTP Parameters document as follows.  The
	following is expected to be a functional superset of the
	existing information:
      </t>

      <figure title="NTP Extension Field Type Format">
        <artwork name="NTP Extension Field Type Format"><![CDATA[
  0                   1
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
 +---------------+---------------+
 |R|E|      Code |       Type    |
 +-------------------------------+]]></artwork>
      </figure>
      <t>Where the following Field Type flags are defined:
	<list>
          <t> R: 0 for "Information/Query", 1 for a "Response"</t>
          <t> E: 0 for "OK", 1 for an "Error".  Unused, and will be deprecated.</t>
	</list>
      </t>

      <t>
	<figure title="Current Extension Fields">
          <artwork name="Current Extension Fields"><![CDATA[
+------------+----------------------------------------------+
| Field Type |  Meaning                                     |
+------------+----------------------------------------------+
|   0x0000   | crypto-NAK (with Field Length of 0)          |
|   0x0000   | RESERVED: Permanently Unassigned             |
|   0x0001   | RESERVED: Unassigned                         |
|   0x0002   | Autokey: No-Operation Request                |
|   0x8002   | Autokey: No-Operation Response               |
|   0x0102   | Autokey: Association Message Request         |
|   0x8102   | Autokey: Association Message Response        |
|   0x0202   | Autokey: Certificate Message Request         |
|   0x8202   | Autokey: Certificate Message Response        |
|   0x0302   | Autokey: Cookie Message Request              |
|   0x8302   | Autokey: Cookie Message Response             |
|   0x0402   | Autokey: Autokey Message Request             |
|   0x8402   | Autokey: Autokey Message Response            |
|   0x0502   | Autokey: Leapseconds Value Message Request   |
|   0x8502   | Autokey: Leapseconds Value Message Response  |
|   0x0602   | Autokey: Sign Message Request                |
|   0x8602   | Autokey: Sign Message Response               |
|   0x0702   | Autokey: IFF Identity Message Request        |
|   0x8702   | Autokey: IFF Identity Message Response       |
|   0x0802   | Autokey: GQ Identity Message Request         |
|   0x8802   | Autokey: GQ Identity Message Response        |
|   0x0902   | Autokey: MV Identity Message Request         |
|   0x8902   | Autokey: MV Identity Message Response        |
|   0x0003   | * MAC                                        |
|   0x0104   | * NTS Unique Identifier Request              |
|   0x8104   | * NTS Unique Identifier Response             |
|   0x0204   | * NTS Cookie                                 |
|   0x0304   | * NTS Cookie Placeholder                     |
|   0x0404   | * NTS AEEF Request                           |
|   0x8404   | * NTS AEEF Response                          |
|   0x0005   | Checksum Complement                          |
|   0x2005   | Checksum Complement (deprecated flag 0x2000) |
|   0x0006   | * Suggest REFID                              |
|   0x0007   | * I-DO                                       |
|   0x0008   | * LAST-EF                                    |
|   0x0009   | * Extended Information                       |
|   0x00FF   | * thru                                       |
|   0xFDFF   | * RESERVED for future I-DO Payloads          |
|   0xFEFF   | * I-DO Payload: Leap Smear REFIDs            |
|   0xFFFF   | * I-DO Payload: IPv6 REFID hash              |
+------------+----------------------------------------------+

* Tentative Reservation
]]></artwork>
	</figure>
      </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The authors know of no adverse consequences of adopting this proposal.</t>
    </section>
  </middle>

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

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

      <!-- There are 2 ways to insert reference entries from the citation libraries:
	   1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
	   2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
	   (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

	   Both are cited textually in the same manner: by using xref elements.
	   If you use the PI option, xml2rfc will, by default, try to find included files in the same
	   directory as the including file. You can also define the XML_LIBRARY environment variable
	   with a value containing a set of directories to search.  These can be either in the local
	   filing system or remote ones accessed by http (http://domain/dir/... ).-->

      <references title="Normative References">
	<!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

	&RFC2119;

	<!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5905.xml"?-->

	&RFC5905;

	<!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5906.xml"?-->

	&RFC5906;

	&RFC7821;

	&RFC7822;
      </references>

      <!-- Here we use entities that we defined at the beginning. -->

      <references title="Informative References">
	<!--
	&RFC3552;

	&I-D.narten-iana-considerations-rfc2434bis;
	-->

      <reference anchor="DRAFT-EXTENDED-INFORMATION">
	<front>
	  <title>draft-stenn-ntp-extended-information</title>
	  <author initials="H." surname="Stenn"><organization /></author>
	  <date year="2019" />
	</front>
      </reference>

      <reference anchor="DRAFT-I-DO">
	<front>
	  <title>draft-stenn-ntp-i-do</title>
	  <author initials="H." surname="Stenn"><organization /></author>
	  <date year="2019" />
	</front>
      </reference>

      <reference anchor="DRAFT-MAC-LAST-EF">
	<front>
	  <title>draft-stenn-ntp-mac-last-ef</title>
	  <author initials="H." surname="Stenn"><organization /></author>
	  <date year="2019" />
	</front>
      </reference>

      </references>

      <!--
	  <section anchor="app-additional" title="Additional Stuff">
	    <t>This becomes an Appendix.</t>
	  </section>
	  -->

      <!-- Change Log

	   v02 2016-10-29  HMS: Updates
	   v03 2018-08-21  HMS: Updates
	   2018-11-29  HMS: Err32whatever to RFC7822.  Expand on various reasonings.
	   v06 2018-03-21  HMS: Updates
	-->
    </back>
  </rfc>
