<?xml version="1.0"  encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc number="7182" submissionType="IETF" ipr="trust200902" category="std" consensus="yes" obsoletes="6622">

  <front>

    <title abbrev="ICV and Timestamp TLVs for MANETs">Integrity Check Value and Timestamp TLV Definitions for&nbsp;Mobile&nbsp;Ad&nbsp;Hoc&nbsp;Networks&nbsp;(MANETs)</title>

    <author fullname="Ulrich Herberg" initials="U" surname="Herberg">
      <organization>Fujitsu Laboratories of America</organization>
      <address>
        <postal>
          <street>1240 E. Arques Ave.</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94085</code>
          <country>USA</country>
        </postal>
        <email>ulrich@herberg.name</email>
        <uri>http://www.herberg.name/</uri>
      </address>
    </author>

    <author fullname="Thomas Heide Clausen" initials="T" surname="Clausen">
      <organization>LIX, Ecole Polytechnique</organization>
      <address>
         <postal>
          <street></street>
          <city>91128 Palaiseau Cedex</city>
          <country>France</country>
        </postal>
        <phone>+33 6 6058 9349</phone>
        <email>T.Clausen@computer.org</email>
        <uri>http://www.thomasclausen.org/</uri>
      </address>
    </author>

    <author initials="C.M." surname="Dearlove" fullname="Christopher Dearlove">
      <organization abbrev="BAE Systems ATC">BAE Systems Advanced Technology Centre</organization>
      <address>
        <postal>
          <street>
            West Hanningfield Road
          </street>
          <city>
            Great Baddow, Chelmsford
          </city>
          <country>
            United Kingdom
          </country>
        </postal>
        <phone>+44 1245 242194</phone>
        <email>chris.dearlove@baesystems.com</email>
        <uri>http://www.baesystems.com/</uri>
      </address>
    </author>
   
    <date month="April" year="2014"/>

    <workgroup>Mobile Ad hoc Networking (MANET)</workgroup>
    <keyword>MANET</keyword>



    <abstract>
      <t>
        This document revises, extends, and replaces RFC 6622. It describes general and flexible TLVs for representing cryptographic Integrity Check Values (ICVs) and timestamps, using the generalized Mobile Ad Hoc Network (MANET) packet/message format defined in RFC 5444. It defines two Packet TLVs, two Message TLVs, and two Address Block TLVs for affixing ICVs and timestamps to a packet, a message, and one or more addresses, respectively.
      </t>
    </abstract>

  </front>

  <middle>

    <section title="Introduction">
    
    	<t>This document specifies a syntactical representation of security-
   related information for use with <xref target="RFC5444"/> addresses, messages, and packets.  It also specifies IANA registrations of TLV types and type extension registries for these TLV types. This specification does not represent a stand-alone protocol, but it is intended for use by MANET routing protocols or security extensions thereof.
   		</t>

      <t>
        Specifically, this document, which revises, extends, and replaces <xref target="RFC6622"/>, specifies:
        
        <list style="symbols">
          <t>
            Two kinds of TLV: one for carrying Integrity Check Values (ICVs) and one for timestamps in packets, messages, and Address Blocks as defined by <xref target="RFC5444"/>.
          </t>

          <t>
            A generic framework for use of these TLVs, accounting for specific features of Packet, Message, and Address Block TLVs.
          </t>
          <t>
          	IANA registrations for TLVs, and registries for TLV type extensions, replacing those from <xref target="RFC6622"/>.
          </t>
        </list>
      </t>

      <t>
        This document specifies IANA registries for recording code points for ICV TLVs and TIMESTAMP TLVs, as well as timestamps, hash functions, and cryptographic functions.
      </t>

      <t>
        Moreover, in <xref target="decomposition"/>, this document defines the following:
        <list style="symbols">
          <t>
            A method for generating ICVs using a combination of a cryptographic function and a hash function and for including such ICVs in the value field of a TLV.
          </t>
        </list>
      </t>
      


      <section title="Differences from RFC 6622" anchor="diffs">

    	  <t>
          This document obsoletes <xref target="RFC6622"/>, replacing that document as the specification of two TLV types, TIMESTAMP and ICV, for packets, messages and Address Blocks. For the ICV type, this document specifies a new type extension, 2 (see <xref target="decomposition"/>), in addition to including the original type extensions (0 and 1) from <xref target="RFC6622"/>.
        </t>

        <t>
          The TLV value of an ICV TLV with type extension&nbsp;=&nbsp;2 has the same internal structure as an ICV TLV with type extension&nbsp;=&nbsp;1 but is calculated also over the source address of the IP datagram carrying the packet, message, or Address Block. The rationale for adding this type extension is that some MANET protocols, such as <xref target="RFC6130"/>, use the IP source address of the IP datagram carrying the packet, message, or Address Block, e.g., to identify links with neighbor routers. If this address is not otherwise contained in the packet, message, or Address Block payload (which is permitted, e.g., in <xref target="RFC6130"/>), then the address is not protected against tampering.
        </t>

        <t>
          This document also incorporates a number of editorial improvements over <xref target="RFC6622"/>. In particular, it makes it clear that an ICV TLV may be used to carry a truncated ICV and that a single or multivalue TIMESTAMP or ICV Address Block TLV may cover more than one address. Moreover, to be consistent with the terminology in <xref target="RFC5444"/>, the name of the TLVs specified in this document have changed from "Packet ICV TLV" to "ICV Packet TLV" and from "Packet TIMESTAMP TLV" to "TIMESTAMP Packet TLV" (and similar for Message and Address Block TLVs).
        </t>
        
        <t>A normative requirement in <xref target="timestampTLV"/> has changed from SHOULD to MUST in the following sentence: 

<list><t>If a message contains one or more TIMESTAMP TLVs and	
			one or more ICV TLVs, then the TIMESTAMP TLVs (as well as any other	
			Message TLVs) MUST be added to the message before the
ICV TLVs....</t></list></t>
      </section>
    
    </section>

    <section title="Terminology" anchor="terminology">

      <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 <xref target="RFC2119"/>.
      </t>

      <t>
        This document uses the terminology and notation defined in <xref target="RFC5444"/>. In particular, the following TLV fields and notation from <xref target="RFC5444"/> are used in this specification:
        <list style="hanging">
          <t hangText="&lt;msg-hop-limit&gt;"> is the hop limit of a message, as specified in Section&nbsp;5.2 of <xref target="RFC5444"/>.</t>
          <t hangText="&lt;msg-hop-count&gt;"> is the hop count of a message, as specified in Section&nbsp;5.2 of <xref target="RFC5444"/>.</t>
          <t hangText="&lt;length&gt;"> is the length of the value field in a TLV in octets, as specified in Section 5.4.1 of <xref target="RFC5444"/>.</t>
          <t hangText="single-length"> is the length of a single value in the value field in a TLV in octets, as specified in Section 5.4.1 of <xref target="RFC5444"/>. (It is equal to &lt;length&gt; except in a multivalue Address Block TLV.)</t>
        </list>
      </t>        

	<t>
        In addition to using the regular expressions defined in Section 2.1.1 of <xref target="RFC5444"/>, this document defines the following:
      </t>
	<t>
        + -  One or more occurrences of the preceding element or group.
      </t>
	   
    </section>

    <section title="Applicability Statement" anchor="applStatement">

      <t>
        MANET routing protocols using the format defined in <xref target="RFC5444"/> are accorded the ability to carry additional information in control messages and packets through the inclusion of TLVs. Information so included MAY be used by a MANET routing protocol, or by an extension of a MANET routing protocol, according to its specification.
      </t>

      <t>
        This document specifies how to include an ICV for a packet, a message, and addresses in an Address Block within a message, using such TLVs.  This document also specifies how to treat an empty Packet TLV Block, and "mutable" fields, specifically the &lt;msg-hop-count&gt; and &lt;msg-hop-limit&gt; fields, if present in the Message Header when calculating ICVs, such that the resulting ICV can be correctly verified by any recipient.
      </t>
      <t>
       This document describes a generic framework for creating ICVs, and how to include these ICVs in TLVs. In <xref target="decomposition"/>, an example method for calculating such ICVs is given, using a cryptographic function and a hash function, for which two TLV type extensions are allocated.
      </t>
      
      <t>This document does not specify a protocol. Protocol specifications
        that make use of the framework, specified in this document, will reference this document
        in a normative way, and they may require the implementation of
        some or all of the algorithms described in this document. As this document does not specify a protocol itself, key management and key exchange mechanisms are out of scope and may be specified in the protocol or protocol extension using this specification.</t>

    </section>
        
    <section title="Security Architecture">

      <t>
        MANET routing protocol specifications may have a clause allowing a
control message to be rejected as "badly formed" or "insecure" prior to the
message being processed or forwarded. In particular, MANET routing protocols
such as the Neighborhood Discovery Protocol (NHDP) <xref target="RFC6130"/> and
the Optimized Link State Routing Protocol version 2 <xref target="RFC7181"/> recognize external reasons (such as failure to verify an ICV) for rejecting a message that would be considered "invalid for processing".
      </t>

      <t>
        This architecture is a result of the observation that with respect to security in MANETs, "one size rarely fits all" and that MANET routing protocol deployment domains have varying security requirements ranging from "unbreakable" to "virtually none". The virtue of this approach is that MANET routing protocol specifications (and implementations) can remain "generic", with extensions providing proper security mechanisms specific to a deployment domain.
      </t>

      <t>
        The MANET routing protocol "security architecture", in which this specification situates itself, can therefore be summarized as follows:
        <list style="symbols">
          <t> 
            MANET routing protocol specifications, each with a clause allowing an extension to reject a message (prior to processing/forwarding) as "badly formed" or "insecure".
         </t>
         <t>
           MANET routing protocol security extensions, each rejecting messages as "badly formed" or "insecure", as appropriate for a given security requirement specific to a deployment domain.
         </t>
         <t>
           Code points and an exchange format for information, necessary for specification of such MANET routing protocol security extensions.
         </t>
       </list>
     </t>

     <t>
       This document addresses the last of the points above, by specifying a common exchange format for cryptographic ICVs and timestamps, making reservations from within the Packet TLV, Message TLV, and Address Block TLV registries of <xref target="RFC5444"/>, to be used by (and shared among) MANET routing protocol security extensions.
     </t>

     <t>
       For the specific decomposition of an ICV using a cryptographic function and a hash function (specified in <xref target="decomposition"/>), this document specifies two IANA registries (see <xref target="IANA"/>) for code points for hash functions and cryptographic functions.
     </t>

     <t>
       With respect to <xref target="RFC5444"/>, this document is:
       <list style="symbols">
         <t>
           Intended to be used in the non-normative, but intended, mode of use described in Appendix B of <xref target="RFC5444"/>.

         </t>
         <t>
           A specific example of the Security Considerations section of <xref target="RFC5444"/> (the authentication part).
         </t>
       </list>
     </t>

    </section>

    <section title="Overview and Functioning" anchor="overview">

      <t>              
        This document specifies a syntactical representation of security-related information for use with <xref target="RFC5444"/> addresses,
messages, and packets, and also specifies IANA registrations (see <xref target="IANA"/>) of TLV types and type extension registries for these TLV types.
      </t>

      <t>              
        Moreover, this document provides guidelines for how MANET routing protocols, and MANET routing protocol extensions using this specification, should treat ICV and Timestamp TLVs, and mutable fields in messages. This specification does not represent a stand-alone protocol. MANET routing protocols, and MANET routing protocol extensions using this specification, MUST provide instructions as to how to handle packets, messages, and addresses with security information, associated as specified in this document.
      </t>

      <t>
       This document specifies TLV type assignments (see <xref target="IANA"/>) from the registries defined for Packet, Message, and Address Block TLVs in <xref target="RFC5444"/>. When a TLV type is assigned from one of these registries, a registry for type extensions for that TLV type is created by IANA. This document specifies these type extension registries, in order to specify internal structure (and accompanying processing) of the &lt;value&gt; field of a TLV.
      </t>

      <t>
        For example, and as specified in this document, an ICV TLV with type extension&nbsp;=&nbsp;0 specifies that the &lt;value&gt; field has no predefined internal structure, but is simply a sequence of octets. An ICV TLV with type extension&nbsp;=&nbsp;1 specifies that the &lt;value&gt; field has a predefined internal structure and defines its interpretation. An ICV TLV with type extension&nbsp;=&nbsp;2 (added in this document) is the same as an ICV TLV with type extension&nbsp;=&nbsp;1, except that the integrity protection also covers the source address of the IP datagram carrying the packet, message, or Address Block.
      </t>

      <t>
        Specifically, with type extension&nbsp;=&nbsp;1 or type extension&nbsp;=&nbsp;2, the &lt;value&gt; field contains the result of combining a cryptographic function and a hash function, calculated over the contents of the packet, message, or Address Block. The &lt;value&gt; field contains sub-fields indicating which hash function and cryptographic function have been used, as specified in <xref target="decomposition"/>.
      </t>

      <t>
       Other documents can request assignments for other type extensions; if they do so, they MUST specify their internal structure (if any) and interpretation.
      </t>

    </section>

    <section title="General ICV TLV Structure" anchor="ICVTLVformat">

      <t>
        The value of the ICV TLV is:
      </t>

      <figure>
        <artwork>
   &lt;value&gt; := &lt;ICV-value&gt;+
        </artwork>
      </figure>
                
      <t>
        where:
        <list style="empty">
          <t> &lt;ICV-value&gt; is a field, of length &lt;length&gt; octets (except in a multivalue Address Block TLV, where each &lt;ICV-value&gt; is of length single-length octets) that contains the information to be interpreted by the ICV verification process, as specified by the type extension. 
          </t>
        </list>
      </t>
                
      <t>
      Note that this does not specify how to calculate the &lt;ICV-value&gt; nor
   the internal structure thereof, if any; such information MUST be
   specified by the type extension for the ICV TLV type; see <xref target="IANA"/>.
   This document specifies three such type extensions: one for ICVs
   without predefined structures and two for ICVs constructed
   combining a cryptographic function and a hash function.
      </t>

    </section>
                
    <section title="General Timestamp TLV Structure" anchor="timestampTLVformat">

      <t>
        The value of the Timestamp TLV is:
      </t>

      <figure>
        <artwork>
   &lt;value&gt; := &lt;time-value&gt;+
        </artwork>
      </figure>

      <t>
        where:
        <list style="empty">
          <t> &lt;time-value&gt; is a field, of length &lt;length&gt; octets (except in a multivalue Address Block TLV, where each &lt;time-value&gt; is of length single-length octets) that contains the timestamp.
          </t>
        </list>
                
        Note that this does not specify how to calculate the &lt;time&nbhy;value&gt; nor the internal structure thereof, if any; such information
MUST be specified by the type extension for the TIMESTAMP TLV type; see <xref target="IANA"/>.

      </t>

      <t>
        A timestamp is essentially "freshness information".  As such, its setting and interpretation are to be determined by the MANET routing protocol,
or MANET routing protocol extension, that uses the timestamp and can, for example, correspond to a POSIX timestamp, GPS timestamp, or a simple sequence number. Note that ensuring time synchronization in a MANET may be difficult because of the decentralized architecture as well as highly dynamic topology due to mobility or other factors. It is out of scope for this document to specify a time synchronization mechanism. 
      </t>

    </section>

    <section title="Packet TLVs" anchor="packetICVs">

      <t>
        Two Packet TLVs are defined: one for including the cryptographic ICV of a packet and one for including the timestamp indicating the time at which the cryptographic ICV was calculated.
      </t>

      <section title="ICV Packet TLV" anchor="packetICVTLV">

        <t>
          An ICV Packet TLV is an example of an ICV TLV as described in <xref target="ICVTLVformat"/>. When determining the &lt;ICV-value&gt; for a packet, and adding an ICV Packet TLV to a packet, the following considerations MUST be applied:
          <list style="symbols">
            <t>
              Because packets as defined in <xref target="RFC5444"/> are never forwarded by routers, no special considerations are required regarding mutable fields (i.e., &lt;msg-hop-count&gt; and &lt;msg-hop-limit&gt;), if present within any messages in the packet, when calculating the ICV.
            </t>
            <t>
              Any ICV Packet TLVs already present in the Packet TLV Block MUST be removed before calculating the ICV, and the Packet TLV Block size MUST be recalculated accordingly.
            </t>
            <t>
              If the Packet TLV Block now contains no Packet TLVs, the Packet TLV Block MUST be removed, and the phastlv bit in the &lt;pkt&nbhy;flags&gt; field in the Packet Header MUST be cleared ('0').
            </t>
            <t>
              Any removed ICV Packet TLVs MUST be restored after having calculated the ICV, and the Packet TLV Block size MUST be recalculated accordingly.
            </t>
            <t>
              When any removed ICV Packet TLVs, and the newly calculated ICV Packet TLV, are added to the packet, if there is no Packet TLV Block, then one MUST be added, including setting ('1') the phastlv bit in the &lt;pkt-flags&gt; field in the Packet Header.
            </t>
          </list>
        </t>

        <t>
           The rationale for removing any ICV Packet TLVs already present prior to calculating the ICV is that several ICV TLVs may be added to the same packet, e.g., using different ICV cryptographic and/or hash functions. The rationale for removing an empty Packet TLV Block is because the receiver of the packet cannot tell the difference between what was an absent Packet TLV Block, and what was an empty Packet TLV Block when removing and verifying the ICV Packet TLV if no other Packet TLVs are present.
        </t>
                          
      </section>

      <section title="TIMESTAMP Packet TLV" anchor="packettimestampTLV">

         <t>
           A TIMESTAMP Packet TLV is an example of a Timestamp TLV as described in <xref target="timestampTLVformat"/>. If a packet contains one or more TIMESTAMP TLVs and one or more ICV TLVs, then the TIMESTAMP TLVs (as well as any other Packet TLVs) MUST be added to the packet before the ICV TLVs, in order to include the timestamps and other TLVs in the calculation of the ICVs.
         </t>

      </section>

    </section>  

    <section title="Message TLVs" anchor="messageICVs">

      <t>
        Two Message TLVs are defined: one for including the cryptographic ICV of a message and one for including the timestamp indicating the time at which the cryptographic ICV was calculated.
      </t>

      <section title="ICV Message TLV" anchor="ICVTLV">

        <t>
          An ICV Message TLV is an example of an ICV TLV as described in <xref target="ICVTLVformat"/>. When determining the &lt;ICV-value&gt; for a message, the following considerations MUST be applied:
          <list style="symbols">
            <t>
              The fields &lt;msg-hop-limit&gt; and &lt;msg-hop-count&gt;, if present in the Message Header, MUST both be assumed to have the value 0
(zero) when calculating the ICV.
            </t>
            <t>
              Any ICV Message TLVs already present in the Message TLV Block MUST be removed before calculating the ICV, and the message size as well as the Message TLV Block size MUST be recalculated accordingly. Also, all relevant 
TLVs other than ICV TLVs MUST be added prior to ICV value calculation.
            </t>


            <t>
              Any removed ICV Message TLVs MUST be restored after having calculated the ICV, and the message size as well as the Message TLV Block size MUST be recalculated accordingly.
            </t>
          </list>
        </t>
                
        <t>
          The rationale for removing any ICV Message TLVs already present prior to calculating the ICV is that several ICV TLVs may be added to the
same message, e.g., using different ICV cryptographic and/or hash functions.
        </t>

      </section>

      <section title="TIMESTAMP Message TLV" anchor="timestampTLV">

        <t>
          A TIMESTAMP Message TLV is an example of a Timestamp TLV as described in <xref target="timestampTLVformat"/>. If a message contains one or more TIMESTAMP TLVs and one or more ICV TLVs, then the TIMESTAMP TLVs (as well as any other Message TLVs) MUST be added to the message before the ICV TLVs, in order to include the timestamps and other Message TLVs in the calculation of the ICV.
        </t>

      </section>
          
    </section>

    <section title="Address Block TLVs" anchor="addressblockICVs">

      <t>
        Two Address Block TLVs are defined: one for associating a cryptographic ICV to one or more addresses and their associated information and one for including the timestamp indicating the time at which the cryptographic ICV was calculated.
      </t>

      <section title="ICV Address Block TLV" anchor="addressblockICVTLV">

        <t>
          An ICV Address Block TLV is an example of an ICV TLV as described in <xref target="ICVTLVformat"/>. The ICV is calculated over one or more addresses, concatenated with any other values -- for example, other Address Block TLV &lt;value&gt; fields -- associated with those addresses. A MANET routing protocol, or MANET routing protocol extension, using ICV Address Block TLVs MUST specify how to include any such concatenated attributes of the addresses in the calculation and verification processes for the ICV. When determining an &lt;ICV&nbhy;value&gt; for one or more addresses, the following consideration MUST be applied:

          <list style="symbols">
            <t>
              If other TLV values are concatenated with the addresses for calculating the ICV, the corresponding TLVs MUST NOT be ICV Address Block TLVs already associated with any of the addresses.
            </t>
          </list>

          The rationale for not concatenating the addresses with any ICV TLV values already associated with the addresses when calculating the ICV
is that several ICVs may be added to the same address or addresses, e.g., using different ICV cryptographic and/or hash functions, and the order of addition is not known to the recipient.
        </t>

      </section>

      <section title="TIMESTAMP Address Block TLV" anchor="addressblocktimestampTLV">

        <t>
          A TIMESTAMP Address Block TLV is an example of a Timestamp TLV as described in <xref target="timestampTLVformat"/>. If one or more TIMESTAMP TLVs and one or more ICV TLVs are associated with an address, the relevant TIMESTAMP TLV &lt;time-value&gt;(s) MUST be included before calculating the value of the ICV to be contained in the ICV TLV value (i.e., concatenated with the associated addresses and any other values as described in <xref target="addressblockICVTLV"/>).
        </t>
      </section>

    </section>
   
    <section title="ICV: Basic" anchor="simple">

      <t>
        The basic ICV, represented by way of an ICV TLV with type extension&nbsp;=&nbsp;0, has as TLV value a simple bit-field without specified structure (i.e, without explicitly included hash function, crypto function, key ID or other parameters). Moreover, it is not specified how to calculate the &lt;ICV-value&gt;. It is assumed that the mechanism specifying how ICVs are calculated and verified, as well as which parameters (if any) need to be exchanged prior to using the TLV with type extension&nbsp;=&nbsp;0, is established outside of this specification, e.g., by administrative configuration or external out-of-band signaling.</t>


<t>The &lt;ICV-value&gt;, when using type extension&nbsp;=&nbsp;0, is:
      </t>
      <figure>
        <artwork>
   &lt;ICV-value&gt; := &lt;ICV-data&gt;
        </artwork>
      </figure>

      <t>
        where:
        <list style="empty">
          <t> &lt;ICV-data&gt; is a field, of length &lt;length&gt; octets (or single-length octets in a multivalue Address Block TLV) that contains the cryptographic ICV.
          </t>
        </list>
      </t>

    </section>

    <section title="ICV: Hash Function and Cryptographic Function" anchor="decomposition">

      <t>
        One common way of calculating an ICV is combining a cryptographic function and a hash function applied to the content. This decomposition is
specified in this section, using either type extension&nbsp;=&nbsp;1 or type extension&nbsp;=&nbsp;2, in the ICV TLVs.
      </t>

      <section title="General ICV TLV Structure">

        <t>
          The following data structure allows representation of a cryptographic ICV, including specification of the appropriate hash function and
cryptographic function used for calculating the ICV:
        </t>

        <figure>
          <artwork>
   &lt;ICV-value&gt; := &lt;hash-function&gt;
                  &lt;cryptographic-function&gt;
                  &lt;key-id-length&gt;
                  &lt;key-id&gt;?
                  &lt;ICV-data&gt;
           </artwork>
        </figure>

        <t>
          where:
          <list style="empty">
            <t>&lt;hash-function&gt; is a one-octet unsigned integer field specifying the hash function. 
            </t>
            <t>&lt;cryptographic-function&gt; is a one-octet unsigned integer field specifying the cryptographic function.
            </t>
            <t>&lt;key-id-length&gt; is a one-octet unsigned integer field specifying the length of the &lt;key-id&gt; field as a number of octets. The value zero (0x00) is reserved for using a single pre-installed, shared key.
            </t>
            <t>&lt;key-id&gt; is a field specifying the key identifier of the key that was used to calculate the ICV of the message, which allows unique identification of different keys with the same originator.  It is the responsibility of each key originator to make sure that actively used keys that it issues have distinct key identifiers. If &lt;key-id-length&gt; equals zero (0x00), the &lt;key-id&gt; field is not contained in the TLV, and a single pre-installed, shared key is used.
            </t>
            <t hangText="&lt;ICV-data&gt;">
              is a field with length &lt;length&gt;&nbsp;&nbhy;&nbsp;3&nbsp;&nbhy;&nbsp;&lt;key&nbhy;id&nbhy;length&gt; octets (except in a multivalue Address Block TLV, in which it is single&nbhy;length&nbsp;&nbhy;&nbsp;3&nbsp;&nbhy;&nbsp;&lt;key&nbhy;id&nbhy;length&gt; octets) and that contains the cryptographic ICV.
            </t>                
          </list>

          The version of this TLV, specified in this section, assumes that, unless otherwise specified, calculating the ICV can be decomposed into:
          <list style="hanging">
            <t>
              ICV-value&nbsp;=&nbsp;cryptographic-function(hash-function(content))
            </t>
          </list>
          In some cases, a different combination of cryptographic function and hash function may be specified. This is the case for the Hashed Message Authentication Code (HMAC) function, which is specified as defined in <xref target="crypto-funcs"/>, using the hash function twice. Using cryptographic-function "none" is provided for symmetry and possible future use, but it SHOULD NOT be used with any currently specified hash function.
        </t>

        <t>
          The difference between the two type extensions is that in addition to the information covered by the ICV using type extension&nbsp;=&nbsp;1 (which is detailed in the following sections), the ICV using type extension&nbsp;=&nbsp;2 also MUST cover the source address of the IP datagram carrying the corresponding packet, message, or Address Block.
        </t>

        <t>
          The &lt;ICV-data&gt; field MAY be truncated after being calculated, this is
 indicated by its length, calculated as described above.  The
 truncation MUST be as specified for the relevant cryptographic
 function (and, if appropriate, hash function).
 
 			<list style="symbols">
 				<t>
 					When using truncation, the guidelines for minimal ICV length set out in <xref target="NIST-SP-800-107"/> MUST be followed.  In particular the &lt;ICV-data&gt; field when using HMAC MUST NOT be truncated below 4 octets.
    			</t>
    			<t>
    				The truncated ICV length MUST be so large that the
     probability of success of a dictionary attack is acceptably small.
     Such a success will arise if the ICV of a spoofed packet or message is
     verified.  The probability of success is a function of (a) how many routers can be attacked,
     (b) how fast a router can receive packets or messages and attempt to verify their
     ICV, (c) the truncated  ICV length, and (d) the lifetime of the network.
     If the truncated ICV length in bits is L, then 2^L  packets or messages
     are required to attack with certainty of success. With a verification rate of R
     packets/messages per second, applied to N routers over an available time of T, the
     probability of success is given by NRT/2^L.&nbsp; If this is not to exceed
     a probability of P, then L > log2(NRT/P). For example, if N is 32, R is 1000,
     T is 86400 (I day) and P is 10^-6, then L must be at least 52 bits.
     			</t>
     		</list>
        

        </t>
        
        <t>
        	Some of the cryptographic and hash functions listed in <xref target="IANA"/> require the length of the content to be digitally signed to be a multiple of a certain number of octets. As a consequence, they specify padding mechanisms, e.g., AES-CMAC <xref target="RFC4493"/> specifies a padding mechanism for message lengths that are not equal to a multiple of 16 octets. Implementations of the framework in this document MUST support appropriate padding mechanisms, as specified in the cryptographic or hash function specifications.
        </t>

        <t>
          The hash function and the cryptographic function correspond to the entries in two IANA registries, which are described in <xref target="IANA"/>.
        </t>

        <section title="Rationale" anchor="rationale">
                
          <t>
            The rationale for separating the hash function and the cryptographic function into two octets instead of having all combinations in a single octet -- possibly as a TLV type extension -- is that adding further hash functions or cryptographic functions in the future may lead to a non-contiguous
number space as well as a smaller overall space.
          </t>
                        
          <t>
            The rationale for not including a field that lists parameters of the cryptographic ICV in the TLV is that, before being able to validate a cryptographic ICV, routers have to exchange or acquire keys. Any additional parameters can be provided together with the keys in that bootstrap process. Therefore, it is not necessary, and would even entail an extra overhead, to transmit the parameters within every message.
          </t>

          <t>
              The rationale for the addition of type extension&nbsp;=&nbsp;2 is that the source
  address is used in some cases, such as when processing HELLO
  messages in <xref target="RFC6130" />.  This is applicable only to packets (which
  only ever travel one hop) and messages (and their Address Blocks)
  that only travel one hop.  It is not applicable to messages that may
  be forwarded more than one hop, such as Topology Control (TC)
  messages in <xref target="RFC7181"/>.
          </t>

        </section>
        
        <section title="Parameters" anchor="parameters">


        	<t>   As described in <xref target="rationale"/>, parameters are selected administratively on
   each router before using this framework in a MANET, in addition to
   exchanging the keys between MANET routers.  This was a design
   decision in <xref target="RFC6622" /> and is kept in this specification for reasons
   of backwards compatibility.
        	</t>
        	
        	<t>The following parameters are RECOMMENDED and SHOULD be those chosen administratively, unless there are good reasons otherwise:
        		<list style="symbols">
        			<t>For crypto function RSA:
        				<list style="symbols">
        					<t>Signature scheme: RSASSA-PSS with the default parameters: rSASSA-PSS-Default-Identifier (as defined in <xref target="RFC3447"/>)</t>
        					<t>Common exponent: 65537</t> 
        				</list>
        			
        			</t>
        			<t>For crypto function ECDSA:
        				<list style="symbols">
        					<t>Curve name: exchanged as part of key distribution</t>
        					<t>Hash function:  The hash function MUST be pinned to the curve, i.e., use SHA-256 for the p-256 curve, SHA-384 for p-384, etc.</t>					
        				</list>
        			</t>
        			<t>For crypto function AES:
        				<list style="symbols">
        					<t>Authentication algorithm: Cipher-Based Message Authentication Code (CMAC) (as defined in <xref target="RFC4493"/>)</t>
        					<t>Hash function: None</t>
        				</list>
        			</t>
        		</list>
        	</t>
        	
        </section>

      </section>  

      <section title="Considerations for Calculating the ICV">

        <t>
          The considerations listed in the following subsections MUST be applied when calculating the ICV for Packet, Message, and Address Block TLVs,
respectively.
        </t>
         
        <section title="ICV Packet TLV">

          <t>
            When determining the &lt;ICV&nbhy;data&gt; for a packet, with type extension&nbsp;=&nbsp;1:
            <list style="symbols">
              <t>
                The ICV is calculated over the fields &lt;hash-function&gt;, &lt;cryptographic-function&gt;, &lt;key&nbhy;id&nbhy;length&gt;, and -- if present -- &lt;key&nbhy;id&gt; (in that order), followed by the entire packet, including the Packet Header, including all Packet TLVs (other than ICV Packet TLVs), and all included messages. The considerations of <xref target="packetICVTLV"/> MUST be applied. 
		  </t>
		</list>

		When determining the &lt;ICV&nbhy;data&gt; for a packet, with type extension&nbsp;=&nbsp;2:
		<list style="symbols">
              <t>
		    The same procedure as for type extension&nbsp;=&nbsp;1 is used, except that the data used consists of a representation of the source address of the IP datagram carrying the packet, followed by the remaining data (as for type extension&nbsp;=&nbsp;1). The representation of the source address consists of a single octet containing the address length, in octets, followed by that many octets containing the address in network byte order.
		  </t>
		</list>
          </t>
     
        </section>
                 
        <section title="ICV Message TLV">

          <t>
            When determining the &lt;ICV&nbhy;data&gt; for a message, with type extension&nbsp;=&nbsp;1:
            <list style="symbols">
              <t>
                The ICV is calculated over the fields &lt;hash-function&gt;, &lt;cryptographic-function&gt;, &lt;key&nbhy;id&nbhy;length&gt;, and -- if present -- &lt;key-id&gt; (in that order), followed by the entire message. The considerations in <xref target="ICVTLV"/> MUST be applied.
		  </t>
		</list>
			
		When determining the &lt;ICV&nbhy;data&gt; for a message, with type extension&nbsp;=&nbsp;2:
		<list style="symbols">
              <t>
		    The same procedure as for type extension&nbsp;=&nbsp;1 is used, except that the data used consists of a representation of the source address of the IP datagram carrying the message, followed by the remaining data (as for type extension&nbsp;=&nbsp;1). The representation of the source address consists of a single octet containing the address length, in octets, followed by that many octets containing the address in network byte order.
		  </t>
            </list>
          </t>

        </section>

        <section title="ICV Address Block TLV">

          <t>
            When determining the &lt;ICV&nbhy;data&gt; for one or more addresses, with type extension&nbsp;=&nbsp;1:
            <list style="symbols">
              <t>
                The ICV is calculated over the fields &lt;hash-function&gt;, &lt;cryptographic-function&gt;, &lt;key-id-length&gt;, and -- if present -- &lt;key-id&gt; (in that order), followed by the addresses, and followed by any other values -- for example, other Address Block TLV &lt;value&gt;s that are associated with those addresses. A MANET routing protocol, or MANET routing protocol extension, using ICV Address Block TLVs MUST specify how to include any such concatenated attribute of the addresses in the verification process of the ICV. The consideration in <xref target="addressblockICVTLV"/> MUST be applied.


              </t>
            </list>
            When determining the &lt;ICV&nbhy;data&gt; for one or more addresses, with type extension&nbsp;=&nbsp;2:
            <list style="symbols">
              <t>
		    The same procedure as for type extension&nbsp;=&nbsp;1 is used, except that the data used consists of a representation of the source address of the IP datagram carrying the Address Block, followed by the remaining data (as for type extension&nbsp;=&nbsp;1). The representation of the source address consists of a single octet containing the address length, in octets, followed by that many octets containing the address in network byte order.
		  </t>
            </list>
        </t>

        </section>

      </section>
 
      <section title="Example of a Message Including an ICV">

        <t>
          The sample message depicted in <xref target="exampleMessage"/> is derived from Appendix E of
  <xref target="RFC5444"/>.  The message contains an ICV Message TLV, with the value
  representing an ICV that is 16 octets long and
  a key identifier that is 4 octets long.  The type extension of the
  Message TLV is 1, for the specific decomposition of an ICV using a
  cryptographic function and a hash function, as specified in <xref target="decomposition"/>.
        </t>
        
<!-- [rfced] Please note that the authors request that we leave this figure on one page without a break if possible.  The legend may appear on the next page if necessary.
-->

        <figure anchor="exampleMessage" title="Example Message with ICV">
          <artwork>
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Message Type  | MF=15 | MAL=3 |      Message Length = 82      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                  Message Originator Address                   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |   Hop Limit   |   Hop Count   |    Message Sequence Number    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Message TLV Block Length = 36 |   TLV Type    |  MTLVF = 16   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Value Len = 6 |                     Value                     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                 Value (cont)                  |TLV Type = ICV |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  MTLVF = 144  |  MTLVExt = 1  |Value Len = 23 |   Hash Func   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Crypto Func  | KeyID Len = 4 |        Key Identifier         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     Key Identifier (cont)     |           ICV Value           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                       ICV Value (cont)                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                       ICV Value (cont)                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                       ICV Value (cont)                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |       ICV Value (cont)        | Num Addr = 2  |   ABF = 48    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Tail Len = 2  |             Mid 0             |     Mid 1     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Mid 1 (cont)  | Prefix Length |    ABTLV Block Length = 0     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Num Addr = 3  |   ABF = 128   | Head Len = 2  |     Head      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Head (cont)  |             Mid 0             |     Mid 1     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | Mid 1 (cont)  |             Mid 2             |ABTLV Block ...|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |... Length = 9 |   TLV Type    |  ABTLVF = 16  | Value Len = 2 |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |             Value             |   TLV Type    |  ABTLVF = 32  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Index Start  |  Index Stop   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          </artwork>
        </figure>

        <figure title="Example Message with ICV - Legend">
          <artwork>
         
MF:      Message Flags, see Section 5.2 of [RFC5444].
MAL:     Message Address Length, see Section 5.2 of [RFC5444].
MTLVF:   Message TLV Flags, see Section 5.4.1 of [RFC5444].
MTLVExt: Message TLV Type Extension, see Section 5.4.1 of [RFC5444].
AF:      Address Block Flags, see Section 5.3 of [RFC5444].
ABTLV:   Address Block TLV, see Section 5.4 of [RFC5444].
ABTLVF:  Address Block TLV Flags, see Section 5.4.1 of [RFC5444].
          </artwork>
        </figure>

      </section>

    </section>
    
    <section anchor="IANA" title="IANA Considerations">
    
      <t>
        The IANA registrations for TLV Types and the TLV type extension registries given in this specification replace the identical registrations and registries from <xref target="RFC6622"/>.
    </t>
    <t>
        This specification defines the following TLV Types, replacing the original specifications in
        <xref target="RFC6622"/>:
        <list style="symbols">
          <t>
            Two Packet TLV Types, which have been allocated from the 0-223 range of the "Packet TLV Types" repository of <xref target="RFC5444"/>, as specified in <xref target="table_IANA_packet_TLV_types"/>.
          </t>
          <t>
            Two Message TLV Types, which have been allocated from the 0-127 range of the "Message TLV Types" repository of <xref
target="RFC5444"/>, as specified in <xref target="table_IANA_message_TLV_types"/>.
          </t>
          <t>
            Two Address Block TLV Types, which have been allocated from the 0-127 range of the "Address Block TLV Types" repository of <xref target="RFC5444"/>, as specified in <xref target="table_IANA_addressblock_TLV_types"/>.
          </t>
        </list>
                
        This specification updates the following registries that were created in <xref target="RFC6622"/>:
        <list style="symbols">
          <t>
            A type extension registry for each of these TLV types with values
as listed in Tables 1, 2, and 3.
          </t>
        </list>    
      </t>


      <t>
        The following terms are used as defined in <xref target="BCP26"/>: "Namespace", "Registration", and "Designated Expert".
      </t>

      <t>
        The following policy is used as defined in <xref target="BCP26"/>: "Expert Review".
      </t>        
                
      <section title="Expert Review: Evaluation Guidelines">

        <t>
          For TLV type extensions registries where an Expert Review is required, the Designated Expert SHOULD take the same general recommendations into consideration as those specified by <xref target="RFC5444"/>.
       </t>
           
        <t>
          For both TIMESTAMP and ICV TLVs, functionally similar extensions for Packet, Message, and Address Block TLVs SHOULD be numbered identically.
        </t>

      </section>



      <section title="Packet TLV Types">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "Packet TLV Types" namespace of <xref target="RFC5444"/> for the Packet TLVs specified in <xref target="table_IANA_packet_TLV_types"/>. IANA has modified this allocation as indicated.
        </t>


        <texttable anchor="table_IANA_packet_TLV_types" title="Packet TLV Types">
          <ttcol align='center'>Type</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>5</c>
          <c>ICV</c>
          <c>RFC 7182</c>
        
          <c>6</c>
          <c>TIMESTAMP</c>
          <c>RFC 7182</c>
          
        </texttable>
      </section>
      
      
      <section title="Message TLV Types">
        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "Message TLV Types" namespace of <xref target="RFC5444"/> for the Message TLVs specified in <xref target="table_IANA_message_TLV_types"/>. IANA has modified this allocation as indicated.
        </t>
                
        <texttable anchor="table_IANA_message_TLV_types" title="Message TLV Types">
          <ttcol align='center'>Type</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>

          <c>5</c>
          <c>ICV</c>
          <c>RFC 7182</c>

          <c>6</c>        
          <c>TIMESTAMP</c>
          <c>RFC 7182</c>
        </texttable>

      </section>
      
      <section title="Address Block TLV Types">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "Address Block TLV Types" namespace of <xref target="RFC5444"/> for the Packet TLVs specified in <xref target="table_IANA_addressblock_TLV_types"/>. IANA has modified this allocation as indicated.
        </t>
                
        <texttable anchor="table_IANA_addressblock_TLV_types" title="Address Block TLV Types">
          <ttcol align='center'>Type</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
         
          <c>5</c>
          <c>ICV</c>
          <c>RFC 7182</c>
        
          <c>6</c>
          <c>TIMESTAMP</c>
          <c>RFC 7182</c>
        </texttable>
      </section>

	<section title="ICV Packet TLV Type Extensions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "ICV Packet TLV Type Extensions" namespace of <xref target="RFC6622"/> for the Packet TLVs specified in <xref target="table_IANA_ICV_packet_TLV_type_extensions"/>. IANA has modified this allocation (including defining type extension&nbsp;=&nbsp;2) as indicated.
        </t>

        <texttable anchor="table_IANA_ICV_packet_TLV_type_extensions" title="ICV Packet TLV Type Extensions">
          <ttcol align='center'>Type Extension</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>ICV of a packet</c>
          <c>RFC 7182</c>
         
          <c>1</c>
          <c>ICV, using a cryptographic function and a hash function, as specified in <xref target="decomposition"/> of this document</c>
          <c>RFC 7182</c>

          <c>2</c>
          <c>ICV, using a cryptographic function and a hash function, and including the IP datagram source address, as specified in <xref target="decomposition"/> of this document</c>
          <c>RFC 7182</c>

          <c>3-251</c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
          
    	  </texttable>
    	
    	  <t>
          More than one ICV Packet TLV with the same type extension MAY be included in a packet if these represent different ICV calculations (e.g., with type extension 1 or 2 and different cryptographic function and/or hash function or with a different key identifier). ICV Packet TLVs that carry what is declared to be the same information MUST NOT be included in the same packet.
        </t>
        
	</section>

    <section title="TIMESTAMP Packet TLV Type Extensions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "TIMESTAMP Packet TLV Type Extensions" namespace of <xref target="RFC6622"/> for the Packet TLVs specified in <xref target="table_IANA_TIMESTAMP_packet_TLV_type_extensions"/>. IANA has modified this allocation as indicated.
        </t>

        <t>
          <vspace blankLines="999"/>
        </t>

        <texttable anchor="table_IANA_TIMESTAMP_packet_TLV_type_extensions" title="TIMESTAMP Packet TLV Type Extensions">
          <ttcol align='center'>Type Extension</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>Unsigned timestamp of arbitrary length, given by the TLV Length field.&nbsp; The MANET routing protocol has to define how to interpret this timestamp</c>
          <c>RFC 7182</c>
          
          <c>1</c>
          <c>Unsigned 32-bit timestamp, as specified in <xref target="IEEE1003.1-2008"/></c>
          <c>RFC 7182</c>
          
          <c>2</c>
          <c>NTP timestamp format, as specified in <xref target="RFC5905"/></c>
          <c>RFC 7182</c>
          
          <c>3</c>
          <c>Signed timestamp of arbitrary length with no constraints such as monotonicity.&nbsp; In particular, it may represent any random value</c>
		  <c>RFC 7182</c>
		  
          <c>4-251</c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
          
    	  </texttable>
    	
    	  <t>
          More than one TIMESTAMP Packet TLV with the same type extension MUST NOT be included in a packet.
        </t>

	</section>
          
	<section title="ICV Message TLV Type Extensions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "ICV Message TLV Type Extensions" namespace of <xref target="RFC6622"/> for the Message TLVs specified in <xref target="table_IANA_ICV_message_TLV_type_extensions"/>. IANA has modified this allocation (including defining type extension&nbsp;=&nbsp;2) as indicated.
        </t>

        <texttable anchor="table_IANA_ICV_message_TLV_type_extensions" title="ICV Message TLV Type Extensions">
          <ttcol align='center'>Type Extension</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>ICV of a message</c>
          <c>RFC 7182</c>
         
          <c>1</c>
          <c>ICV, using a cryptographic function and a hash function, as specified in <xref target="decomposition"/> of this document</c>
          <c>RFC 7182</c>

          <c>2</c>
          <c>ICV, using a cryptographic function and a hash function, and including the IP datagram source address, as specified in <xref target="decomposition"/> of this document</c>
          <c>RFC 7182</c>

          <c>3-251</c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
          
    	  </texttable>
    	
    	  <t>
          More than one ICV Message TLV with the same type extension MAY be included in a message if these represent different ICV calculations (e.g., with type extension 1 or 2 and different cryptographic function and/or hash function or with a different key identifier). ICV Message TLVs that carry what is declared to be the same information MUST NOT be included in the same message.
        </t>
        
	</section>

    <section title="TIMESTAMP Message TLV Type Extensions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "TIMESTAMP Message TLV Type Extensions" namespace of <xref target="RFC6622"/> for the Message TLVs specified in <xref target="table_IANA_TIMESTAMP_message_TLV_type_extensions"/>. IANA has modified this allocation as indicated.
        </t>
        
        <texttable anchor="table_IANA_TIMESTAMP_message_TLV_type_extensions" title="TIMESTAMP Message TLV Type Extensions">
          <ttcol align='center'>Type Extension</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>Unsigned timestamp of arbitrary length, given by the TLV Length field.&nbsp; The MANET routing protocol has to define how to interpret this timestamp</c>
          <c>RFC 7182</c>
          
          <c>1</c>
          <c>Unsigned 32-bit timestamp, as specified in POSIX <xref target="IEEE1003.1-2008"/></c>
          <c>RFC 7182</c>
          
          <c>2</c>
          <c>NTP timestamp format, as specified in <xref target="RFC5905"/></c>
          <c>RFC 7182</c>
          
          <c>3</c>
          <c>Signed timestamp of arbitrary length with no constraints such as monotonicity.&nbsp; In particular, it may represent any random value</c>
		  <c>RFC 7182</c>
		  
          <c>4-251</c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
          
    	  </texttable>
    	
    	  <t>
          More than one TIMESTAMP Message TLV with the same type extension MUST NOT be included in a message.
        </t>

	</section>     

	<section title="ICV Address Block TLV Type Extensions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made allocations from the "ICV Address Block TLV Type Extensions" namespace of <xref target="RFC6622"/> for the Address Block TLVs specified in <xref target="table_IANA_ICV_address_block_TLV_type_extensions"/>. IANA has modified this allocation (including defining type extension&nbsp;=&nbsp;2) as indicated.
        </t>

        <texttable anchor="table_IANA_ICV_address_block_TLV_type_extensions" title="ICV Address Block TLV Type Extensions">
          <ttcol align='center'>Type Extension</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>ICV of an object (e.g., an address)</c>
          <c>RFC 7182</c>
         
          <c>1</c>
          <c>ICV, using a cryptographic function and a hash function, as specified in <xref target="decomposition"/> of this document</c>
          <c>RFC 7182</c>

          <c>2</c>
          <c>ICV, using a cryptographic function and a hash function, and including the IP datagram source address, as specified in <xref target="decomposition"/> of this document</c>
          <c>RFC 7182</c>

          <c>3-251</c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
          
    	  </texttable>
    	
    	  <t>
          More than one ICV Address Block TLV with the same type extension MAY be associated with an address if these represent different ICV calculations (e.g., with type extension&nbsp;=&nbsp;1 or type extension&nbsp;=&nbsp;2 and different cryptographic function and/or hash function or with a different key identifier). ICV Address Block TLVs that carry what is declared to be the same information MUST NOT be associated with the same address.
        </t>
        
	</section>

    <section title="TIMESTAMP Address Block TLV Type Extensions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, made
allocations from the "TIMESTAMP Address Block TLV Type Extensions" namespace of
<xref target="RFC6622"/> for the Address Block TLVs specified in <xref
target="table_IANA_TIMESTAMP_address_block_TLV_type_extensions"/>. IANA has modified this allocation as indicated.
        </t>

        <t>
          <vspace blankLines="999"/>
        </t>

        <texttable anchor="table_IANA_TIMESTAMP_address_block_TLV_type_extensions" title="TIMESTAMP Address Block TLV Type Extensions">
          <ttcol align='center'>Type Extension</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>Unsigned timestamp of arbitrary length, given by the TLV Length field.&nbsp; The MANET routing protocol has to define how to interpret this timestamp</c>
          <c>RFC 7182</c>
          
          <c>1</c>
          <c>Unsigned 32-bit timestamp, as specified in POSIX <xref target="IEEE1003.1-2008"/></c>
          <c>RFC 7182</c>
          
          <c>2</c>
          <c>NTP timestamp format, as specified in <xref target="RFC5905"/></c>
          <c>RFC 7182</c>
          
          <c>3</c>
          <c>Signed timestamp of arbitrary length with no constraints such as monotonicity.&nbsp; In particular, it may represent any random value</c>
		  <c>RFC 7182</c>
		  
          <c>4-251</c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
          
    	  </texttable>
    	
    	  <t>
           More than one TIMESTAMP Address Block TLV with the same type extension MUST NOT be associated with any address.
        </t>

	</section>   

      <section title="Hash Functions">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, created a registry for hash functions that can be used when creating an ICV, as specified in <xref target="decomposition"/> of this document. The initial assignments and allocation policies are specified in <xref target="table_hash_registry"/>. IANA has modified this allocation as indicated.
        </t>

        <t>
          <vspace blankLines="999"/>
        </t>

        <texttable anchor="table_hash_registry" title="Hash Function Registry">
          <ttcol align='center'>Value</ttcol>
          <ttcol align='center'>Algorithm</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>0</c>
          <c>none</c>
          <c>The "identity function": The hash value of an object is the object itself</c>
          <c>RFC 7182</c>
          
          <c>1</c>
          <c>SHA-1</c>
          <c><xref target="NIST-FIPS-180-4"/></c>
          <c>RFC 7182</c>
       
          <c>2</c>
          <c>SHA-224</c>
          <c><xref target="NIST-FIPS-180-4"/></c>
          <c>RFC 7182</c>
       
          <c>3</c>
          <c>SHA-256</c>
          <c><xref target="NIST-FIPS-180-4"/></c>
          <c>RFC 7182</c>
       
          <c>4</c>
          <c>SHA-384</c>
          <c><xref target="NIST-FIPS-180-4"/></c>
          <c>RFC 7182</c>
       
          <c>5</c>
          <c>SHA-512</c>
          <c><xref target="NIST-FIPS-180-4"/></c>
          <c>RFC 7182</c>
       
          <c>6-251</c>
          <c></c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c></c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
        </texttable>

      </section>

      <section title="Cryptographic Functions" anchor="crypto-funcs">

        <t>
          IANA has, in accordance with <xref target="RFC6622"/>, created a registry for the cryptographic functions, as specified in <xref target="decomposition"/> of this document. Initial assignments and allocation policies are specified in <xref target="table_cryptographic_registry"/>. IANA has modified this allocation as indicated.
        </t>

        <texttable anchor="table_cryptographic_registry" title="Cryptographic Function Registry">
          <ttcol align='center'>Value</ttcol>
          <ttcol align='center'>Algorithm</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          
          <c>0</c>
          <c>none</c>
          <c>The "identity function": The value of an encrypted hash is the hash itself</c>
          <c>RFC 7182</c>
          
          <c>1</c>
          <c>RSA</c>
          <c><xref target="RFC3447"/></c>
          <c>RFC 7182</c>
          
          <c>2</c>
          <c>DSA</c>
          <c><xref target="NIST-FIPS-186-4"/></c>
          <c>RFC 7182</c>
       
          <c>3</c>
          <c>HMAC</c>
          <c><xref target="RFC2104"/></c>
          <c>RFC 7182</c>
        
          <c>4</c>
          <c>3DES</c>
          <c><xref target="NIST-SP-800-67"/></c>
          <c>RFC 7182</c>
        
          <c>5</c>
          <c>AES</c>
          <c><xref target="NIST-FIPS-197"/></c>
          <c>RFC 7182</c>

          <c>6</c>
          <c>ECDSA</c>
          <c><xref target="RFC6090"/></c>
          <c>RFC 7182</c>
        
          <c>7-251</c>
          <c></c>
          <c>Unassigned; Expert Review</c>
          <c></c>
          
          <c>252-255</c>
          <c></c>
          <c>Reserved for Experimental Use</c>
          <c>RFC 7182</c>
        </texttable>

      </section>

    </section>

    <section anchor="Security" title="Security Considerations">

      <t>
        This document does not specify a protocol. It provides a syntactical component for cryptographic ICVs of messages and packets, as defined in <xref target="RFC5444"/>. It can be used to address security issues of a MANET routing protocol or MANET routing protocol extension. As such, it has the same security considerations as <xref target="RFC5444"/>.
      </t>
              
      <t>
       In addition, a MANET routing protocol or MANET routing protocol extension that uses this specification MUST specify how to use the framework and the TLVs presented in this document.  In addition, the protection that the MANET routing protocol or MANET routing protocol extensions attain by using this framework MUST be described.
      </t>

      <t>
       As an example, a MANET routing protocol that uses this component to reject "badly formed" or "insecure" messages if a control message does not contain a valid ICV SHOULD indicate the security assumption that if the ICV is valid, the message is considered valid. It also SHOULD indicate the security issues that are counteracted by this measure (e.g., link or identity spoofing) as well as the issues that are not counteracted (e.g., compromised keys). 
      </t>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">

      <t>
        The authors would like to thank Bo Berry (Cisco), Alan Cullen (BAE Systems), Justin Dean (NRL), Paul Lambert (Marvell), Jerome Milan (Ecole Polytechnique), and Henning Rogge (FGAN) for their constructive comments on <xref target="RFC6622"/>.
      </t>

      <t>
        The authors also appreciate the detailed reviews of <xref target="RFC6622"/> from the Area Directors, in particular Stewart Bryant (Cisco), Stephen Farrell (Trinity College Dublin), and Robert Sparks (Tekelec), as well as Donald Eastlake (Huawei) from the Security Directorate.
      </t>

      <t>
        The authors would like to thank Justin Dean (NRL) and Henning Rogge (FGAN) for their constructive comments on this specification.
      </t>

    </section>

  </middle>

  <back>
<?rfc rfcedstyle="no"?>
    <references title="Normative References">


      <reference anchor="BCP26">

<front>
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
<author initials='T.' surname='Narten' fullname='T. Narten'>
<organization /></author>
<author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'>
<organization /></author>
<date year='2008' month='May' />
<abstract>
<t>Many protocols make use of identifiers consisting of constants and other well-known values. Even after a protocol has been defined and deployment has begun, new values may need to be assigned (e.g., for a new option type in DHCP, or a new encryption or authentication transform for IPsec). To ensure that such quantities have consistent values and interpretations across all implementations, their assignment must be administered by a central authority. For IETF protocols, that role is provided by the Internet Assigned Numbers Authority (IANA).&lt;/t>&lt;t> In order for IANA to manage a given namespace prudently, it needs guidelines describing the conditions under which new values can be assigned or when modifications to existing values can be made. If IANA is expected to play a role in the management of a namespace, IANA must be given clear and concise instructions describing that role. This document discusses issues that should be considered in formulating a policy for assigning values to a namespace and provides guidelines for authors on the specific text that must be included in documents that place demands on IANA.&lt;/t>&lt;t> This document obsoletes RFC 2434. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract></front>

<seriesInfo name='BCP' value='26' />
<seriesInfo name='RFC' value='5226' />
<format type='TXT' octets='66160' target='http://www.rfc-editor.org/rfc/rfc5226.txt' />
</reference>


      <reference anchor="NIST-FIPS-186-4">
        <front>
          <title>Digital Signature Standard (DSS)</title>
          <author><organization>National Institute of Standards and Technology
          </organization></author>
          <date month="July" year="2013"/>
        </front>
        <seriesInfo name="FIPS" value="186-4" />
      </reference>
      
      	<reference anchor="NIST-FIPS-197">
        <front>
          <title>Specification for the Advanced Encryption Standard
(AES)</title>
          <author><organization>National Institute of Standards and Technology
          </organization></author>
          <date month="November" year="2001"/>
        </front>
        <seriesInfo name="FIPS" value="197" />
      </reference>
  
  
  	   <reference anchor="NIST-SP-800-107">
        <front>
          <title>Recommendation for Applications Using Approved Hash
Algorithms</title>
          <author><organization>National Institute of Standards and Technology
          </organization></author>
          <date month="August" year="2012"/>
        </front>
        <seriesInfo name="SP" value="800-107, Revision 1" />
      </reference>

     
<?rfc include="reference.RFC.2104.xml"?>
<?rfc include="reference.RFC.2119.xml"?>
<?rfc include="reference.RFC.3447.xml"?>
<?rfc include="reference.RFC.4493.xml"?>
<?rfc include="reference.RFC.5444.xml"?>
<?rfc include="reference.RFC.5905.xml"?>
<?rfc include="reference.RFC.6090.xml"?>
  

      <reference anchor="NIST-SP-800-67">
        <front>
          <title>Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher</title>

          <author><organization>National Institute of Standards and Technology
          </organization></author>

          <date month="January" year="2012"/>
        </front>
        <seriesInfo name="Special Publication" value="800-67, Revision 1" />
      </reference>

      <reference anchor="NIST-FIPS-180-4">
        <front>
          <title>Secure Hash Standard (SHS)</title>

          <author><organization>National Institute of Standards and Technology
          </organization></author>

          <date month="March" year="2012"/>
        </front>
         <seriesInfo name="FIPS" value="180-4" />
      </reference>
  
      <reference anchor="IEEE1003.1-2008">
        <front>
          <title>Portable Operating System Interface (POSIX)</title>
          <author><organization>IEEE</organization></author>
          <date month="December" year="2008"/>
        </front>
           <seriesInfo name="IEEE" value="1003.1-2008"/>
           <seriesInfo name="Base Specifications," value="Issue 7"/>
      </reference>
    
    </references>

    <references title="Informative References">

<?rfc include="reference.RFC.6130.xml"?>
<?rfc include="reference.RFC.6622.xml"?>
		
<!--draft-ietf-manet-olsrv2-19 in C193 -->
      <reference anchor="RFC7181">
<front>
<title>The Optimized Link State Routing Protocol Version 2</title>

<author initials='T' surname='Clausen' fullname='Thomas Clausen'>
    <organization />
</author>

<author initials='C' surname='Dearlove' fullname='Christopher Dearlove'>
    <organization />
</author>

<author initials='P' surname='Jacquet' fullname='Philippe Jacquet'>
    <organization />
</author>

<author initials='U' surname='Herberg' fullname='Ulrich Herberg'>
    <organization />
</author>

<date month='April' year='2014' />

</front>

<seriesInfo name='RFC' value='7181' />

</reference>


    </references>
<?rfc rfcedstyle="yes"?>
  </back>

</rfc>
