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

<rfc submissionType="IETF" category="std" consensus="yes" number="7183" ipr="trust200902" updates="6130, 7181">

<front>

<title abbrev="Integrity Protection for NHDP and OLSRv2">Integrity Protection
for the Neighborhood Discovery Protocol (NHDP) and Optimized Link State Routing
Protocol Version 2 (OLSRv2)</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, CA, 94085</city>
<region/>
<country>USA</country>
</postal>
<email>ulrich@herberg.name</email>
<uri>http://www.herberg.name/</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>

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

<date month="April" year="2014"/>
<area/>
<workgroup>Mobile Ad hoc Networking (MANET)</workgroup>
<keyword>MANET</keyword>
<keyword>OLSRv2</keyword>
<keyword>Security</keyword>
<keyword>Integrity protection</keyword>
<keyword>ICV</keyword>

<abstract>
<t>
This document specifies integrity and replay protection for the Mobile
Ad Hoc Network (MANET) Neighborhood Discovery Protocol (NHDP) and the
Optimized Link State Routing Protocol version 2 (OLSRv2). This
protection is achieved by using an HMAC-SHA-256 Integrity Check Value
(ICV) TLV and a Timestamp TLV based on Portable Operating System
Interface (POSIX) time.
</t>
<t>
The mechanism in this specification can also be used for other
protocols that use the generalized packet/message format described in
RFC 5444.
</t>
<t>
This document updates RFC 6130 and RFC 7181 by mandating the
implementation of this integrity and replay protection in NHDP and
OLSRv2.
</t>
</abstract>

</front>

<middle>
<section title="Introduction">

	<t>
		This specification updates <xref target="RFC6130"/>
   and <xref target="RFC7181"/> by defining mandatory-to-implement
   security mechanisms (for integrity and replay protection).  A
   deployment of these protocols may choose to employ an
   alternative(s) to these mechanisms; in particular, it may choose to
   protect packets rather than messages, it may choose to use an
   alternative Integrity Check Value (ICV) with preferred properties,
   and/or it may use an alternative timestamp.  A deployment may
   choose to use no such security mechanisms, but this is not
   recommended.
	</t>
	
	

	<t>
		The mechanisms specified are the use of an ICV for
		protection of the protocols' control messages and the
		use of timestamps in those messages to prevent replay
		attacks. Both use the TLV mechanism specified in
		<xref target="RFC5444"/> to add this information to
		the messages. These ICV and TIMESTAMP TLVs are defined
		in <xref target="RFC7182"/>. Different ICV TLVs are
		used for HELLO messages in NHDP and TC (Topology
		Control) messages in OLSRv2, the former also
		protecting the source address of the IP datagram that
		contains the HELLO message. This is because the IP
		datagram source address is used by NHDP to determine
		the address of a neighbor interface, and it is not
		necessarily otherwise contained in the HELLO message,
		while OLSRv2's TC message is forwarded in a new
		packet; thus, it has no single IP datagram source
		address.
	</t>

	<t>
		The mechanism specified in this document is placed in
		the packet/message processing flow as indicated in
		<xref target="schematics"/>. It exists between the
		packet parsing/generation function of
		<xref target="RFC5444"/> and the message
		processing/generation function of NHDP and OLSRv2.
	</t>

	<t>
		<figure anchor="schematics" title="Relationship with RFC 5444 and NHDP/OLSRv2">
			<artwork>
                           |                        |  
                Incoming   |                       /|\ Outgoing
                 packet   \|/                       |   packet
                           |                        |
                       +--------------------------------+
                       |                                |
                       |        RFC 5444 packet         |
                       |       parsing/generation       |
                       |                                |
                       +--------------------------------+
                           |                        |
                Messages   |                       /|\ Messages with
                          \|/                       |  added TLVs
                           |                        |
D                      +--------------------------------+
R  /__________________ |                                |
O  \      Messages     |     Mechanism specified in     |
P      (failed check)  |         this document          |
                       |                                |
                       +--------------------------------+
                           |                        |
              Messages     |                       /|\ Messages
           (passed check) \|/                       |
                           |                        |
                       +--------------------------------+
                       |                                |
                       |      NHDP/OLSRv2 message       |
                       |     processing/generation      |
                       |                                |
                       +--------------------------------+
			</artwork>
		</figure>
	</t>

</section>
<section title="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>
		Additionally, this document uses the terminology and
		notation of <xref target="RFC5444"/>,
		<xref target="RFC6130"/>, <xref target="RFC7181"/>,
		and <xref target="RFC7182"/>.
	</t>
</section>
<section title="Applicability Statement">

	<t>
		<xref target="RFC6130"/> and <xref target="RFC7181"/>
		enable specifications of extensions to recognize
		additional reasons for rejecting a message as "badly
		formed and therefore invalid for processing", and
		mention security (integrity protection) as an explicit
		example. This document specifies a mechanism that
		provides this functionality.
	</t>

	<t>
		Implementations of <xref target="RFC6130"/> and
		<xref target="RFC7181"/> MUST include this mechanism,
		and deployments of <xref target="RFC6130"/> and
		<xref target="RFC7181"/> SHOULD use this mechanism,
		except when a different security mechanism is more
		appropriate.
	</t>

	<t>
		The applicability of this mechanism is determined by
		its characteristics, which are that it:
		<list style="symbols">
			<t>
				Specifies a security mechanism that is
				required to be included in conforming
				implementations of
				<xref target="RFC6130"/> and
				<xref target="RFC7181"/>.
			</t>
			<t>
				Specifies an association of ICVs with protocol messages, and specifies how to use a missing or invalid ICV as a reason to reject a message as "badly formed and therefore invalid for processing".
			</t>
			<t>
				Specifies the implementation of an ICV Message TLV, defined in <xref target="RFC7182"/>, using a SHA-256-based Hashed Message Authentication Code (HMAC) applied to the appropriate message contents (and for HELLO messages also including the IP datagram source address). Implementations of <xref target="RFC6130"/> and <xref target="RFC7181"/> MUST support an HMAC&nbhy;SHA&nbhy;256 ICV TLV, and deployments SHOULD use it except when use of a different algorithm is more appropriate. An implementation MAY use more than one ICV TLV in a message, as long as they each use a different algorithm or key to calculate the ICV.
			</t>
			<t>
				Specifies the implementation of a TIMESTAMP Message TLV, defined in <xref target="RFC7182"/>, to provide message replay protection. Implementations of <xref target="RFC6130"/> and <xref target="RFC7181"/> using this mechanism MUST support a timestamp based on POSIX time, and deployments SHOULD use it if the clocks in all routers in the network can be synchronized with sufficient precision.
			</t>
			<t>
				Assumes that a router that is able to generate correct integrity check values is considered trusted.
			</t>
		</list>
	</t>

	<t>
		This mechanism does not:

		<list style="symbols">
			<t>
				Specify which key identifiers are to be used in a MANET in which the routers share more than one secret key. (Such keys will be differentiated using the &lt;key-id&gt; field defined in an ICV TLV in <xref target="RFC7182"/>.)
			</t>
			<t>
				Specify how to distribute cryptographic material (shared secret key(s)).
			</t>
			<t>
				Specify how to detect compromised routers with valid keys.
			</t>
			<t>
				Specify how to handle (revoke) compromised routers with valid keys.
			</t>
		</list>
	</t>

</section>
<section title="Protocol Overview and Functioning">

	<t>The mechanism specified in this document provides the following functionalities for use with messages specified by <xref target="RFC6130"/> and <xref target="RFC7181"/>:
		
		<list style="symbols">
			<t>
				Generation of ICV Message TLVs (as
				defined in <xref target="RFC7182"/>)
				for inclusion in an outgoing
				message. An implementation of
				<xref target="RFC6130"/> and
				<xref target="RFC7181"/> MAY use more
				than one ICV TLV in a message, even
				with the same type extension, but
				these ICV TLVs MUST each use different
				keys or they MUST use a different
				algorithm to calculate the ICV, e.g.,
				with different hash and/or
				cryptographic functions when using
				type extension 1 or 2. An
				implementation of
				<xref target="RFC6130"/> and
				<xref target="RFC7181"/> MUST at least
				be able to generate an ICV TLV using
				HMAC&nbhy;SHA&nbhy;256 and one or more
				secret keys shared by all routers.
			</t>
			<t>
				Generation of TIMESTAMP Message TLVs
				(as defined in
				<xref target="RFC7182"/>) for
				inclusion in an outgoing message. An
				implementation of
				<xref target="RFC6130"/> and
				<xref target="RFC7181"/> MAY use more
				than one ICV TLV in a message, but it
				MUST NOT use the same type
				extension. An implementation of
				<xref target="RFC6130"/> and
				<xref target="RFC7181"/> that is able
				to synchronize the clocks in all
				routers in the network with sufficient
				precision MUST at least be able to
				generate a TIMESTAMP TLV using POSIX
				time.
			</t>
      		<t>
      			Verification of ICV Message TLVs contained in a message, in order to determine if this message MUST be rejected as "badly formed and therefore invalid for processing" <xref target="RFC6130"/> <xref target="RFC7181"/>. An implementation of <xref target="RFC6130"/> and <xref target="RFC7181"/> MUST at least be able to verify an ICV TLV using HMAC/SHA-256 and one or more secret keys shared by all routers.
      		</t>
      		<t>
      			Verification of TIMESTAMP Message TLVs (as defined in <xref target="RFC7182"/>) contained in a message, in order to determine if this message MUST be rejected as "badly formed and therefore invalid for processing" <xref target="RFC6130"/> <xref target="RFC7181"/>. An implementation of <xref target="RFC6130"/> and <xref target="RFC7181"/> that is able to synchronize the clocks in all routers in the network with sufficient precision MUST at least be able to verify a TIMESTAMP TLV using POSIX time.	

      		</t>
      	</list>
	</t>

	<t>
	  ICV Packet TLVs (as defined in <xref target="RFC7182"/>) MAY be used by a deployment of the multiplexing process defined in <xref target="RFC5444"/>, either as well as or instead of the protection of the NHDP and OLSRv2 messages. (Note that in the case of NHDP, the packet protection is equally good, and also protects the packet header. In the case of OLSRv2, the packet protection has different properties than the message protection, especially for some forms of ICV. When packets contain more than one message, the packet protection has lower overheads in space and computation time.)
	</t>

	<t>
		When a router generates a message on a MANET interface, this mechanism:
      		
      	<list style="symbols">
      		<t>
      			Specifies how to calculate an ICV for the message.
      		</t>
      		<t>
      			Specifies how to include that ICV using an ICV Message TLV.
      		</t>
      	</list>
	</t>

	<t>
		<xref target="RFC6130"/> and <xref target="RFC7181"/> allow for the rejection of incoming messages prior to processing by NHDP or OLSRv2. This mechanism, when used, specifies that a message MUST be rejected if the ICV Message TLV is absent, or its value cannot be verified. Note that this means that routers whose implementation of NHDP and/or OLSRv2 does not include this specification will be ignored by routers using this mechanism, and these two sets of routers will, by design, form disjoint MANETs. (The unsecured MANET will retain some information about the secured MANET, but be unable to use it, not having any recognized symmetric links with the secured MANET.)
 	</t>

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

	<t>The following router parameters are specified for use by the two protocols; the first is required only by NHDP, but may be visible to OLSRv2, the second is required only by OLSRv2:
		<list style="symbols">
			<t>MAX_HELLO_TIMESTAMP_DIFF - The maximum age that a
HELLO message to be validated may have. 
If the current POSIX time of the router
validating the HELLO message, minus the timestamp indicated in the TIMESTAMP
TLV of the HELLO message, is greater than MAX_HELLO_TIMESTAMP_DIFF, the HELLO
message MUST be silently discarded.</t>  
			<t>MAX_TC_TIMESTAMP_DIFF - The maximum age that a TC
message to be validated may have. If the current POSIX time of the router
validating the TC message, minus the timestamp indicated in the TIMESTAMP TLV
of the TC message, is greater than MAX_TC_TIMESTAMP_DIFF, the TC message MUST
be silently discarded.</t> 
		</list>

		The following constraints apply to these parameters:
		<list style="symbols">
			<t>MAX_HELLO_TIMESTAMP_DIFF &gt; 0</t>
			<t>MAX_TC_TIMESTAMP_DIFF &gt; 0</t>
		</list>
		
		However, these bounds are insufficient: MAX_HELLO_TIMESTAMP_DIFF and
MAX_TC_TIMESTAMP_DIFF MUST be  least as great as the maximum expected
"age" of a message (i.e., the time difference between a message has been sent
by a router and received by all intended destinations). For HELLO messages, this
needs only cover a single hop, but TC messages may have been forwarded a
number of times. In particular, for TC messages, if using jitter as specified in
<xref target="RFC7181"/> and <xref target="RFC5148"/>, the largest contribution
the age may be a delay of up to F_MAXJITTER per hop (except the final hop) that
the message has traveled. Other factors in the delay of both message types, per
hop, may include the link-layer that is used in the MANET, and CPU and memory
resources of routers (e.g., queuing delays, and delays for processing ICVs). An
implementation MAY set lower and/or upper bounds on these parameters, if
so, then these MUST allow values meeting these requirements. An implementation
MAY make its value of MAX_TC_TIMESTAMP_DIFF dependent on the number
of hops that a TC message has traveled.
</t>

 <t>
The above constraints assume ideal time synchronization of the clock
in all routers in the network. The parameters MAX_HELLO_TIMESTAMP_DIFF
and MAX_TC_TIMESTAMP_DIFF (and any constraints on them) MAY be
increased to allow for expected timing differences between routers (between
neighboring routers for MAX_HELLO_TIMESTAMP_DIFF, allowing for greater
separation, but usually not per hop, for MAX_TC_TIMESTAMP_DIFF).
</t>

<t>
Note that excessively large values of these parameters defeats their
objectives, so these parameters SHOULD be as large as is required, but
not significantly larger.
</t>


<t>Using POSIX time allows a resolution of no more than one second.  In
   many MANET use cases, time synchronization much below
   one second is not possible because of unreliable and high-delay
   channels, mobility, interrupted communication, and possible 
   resource limitations.
</t>

 <t>
   In addition, when using the default message intervals and
   validity times as specified in <xref target="RFC6130"/> and <xref target="RFC7181"/>, where the
   shortest periodic message interval is 2 seconds,
   repeating the message within a second is actually beneficial rather
   than harmful (at a small bandwidth cost).  Also, the use
   of <xref target="RFC5148"/> jitter can cause a message to take that long or longer to
   traverse the MANET, thus even in a perfectly synchronized network,
   the TC maximum delay would usually be greater than 1 second.
 </t>

<t>
   A finer granularity than 1 second, and thus the use of an alternative
   timestamp, is however RECOMMENDED in cases where, possibly due to fast
   moving routers, message validity times are below 1 second.
</t>


</section>
<section title="Message Generation and Processing" anchor="Messages">

	<t>
		This section specifies how messages are generated and processed by <xref target="RFC6130"/> and <xref target="RFC7181"/> when using this mechanism.
	</t>

	<section title="Message Content" anchor="MessageContent">
		<t>
			Messages MUST have the content specified in <xref target="RFC6130"/> and <xref target="RFC7181"/>, respectively. In addition, messages
that conform to this mechanism MUST contain:
		
			<list style="symbols">

				<t>
					At least one ICV Message TLV (as
specified in <xref target="RFC7182"/>), generated according to <xref
target="msg-gen"/>. Implementations of <xref target="RFC6130"/> and <xref
target="RFC7181"/> MUST support the following version of the ICV TLV, but other
versions MAY be used instead, or in addition, in a deployment, if more appropriate:
					<list style="symbols">
						<t>For TC messages:
							<list style="symbols">
								<t>type-extension := 1</t>								
							</list></t>
						<t>For HELLO messages:
							<list style="symbols">
								<t>type-extension := 2</t>					
							</list></t>
					
						<t>hash-function := 3 (SHA-256)</t>
						<t>cryptographic-function := 3 (HMAC)</t>
					</list>
					The ICV Value MAY be truncated as specified in <xref target="RFC7182"/>; the selection of an appropriate length MAY be administratively configured.
					
					A message MAY contain several ICV Message TLVs.
				</t>

				<t>
					At least one TIMESTAMP Message TLV (as
specified in <xref target="RFC7182"/>), generated according to <xref
target="msg-gen"/>. Implementations of <xref target="RFC6130"/> and <xref
target="RFC7181"/> using this mechanism MUST support the following version of
the TIMESTAMP TLV, but other versions MAY be used instead, or in addition, in a deployment, if more appropriate:
					<list style="symbols">
						<t>type-extension := 1</t>
					</list>
				</t>

			</list>
		</t>
	</section>

	<section title="Message Generation" anchor="msg-gen">

		<t>
			After message generation (Section 11.1 of <xref target="RFC6130"/> and Section 16.1. of <xref target="RFC7181"/>) and before message transmission (Section 11.2 of <xref target="RFC6130"/> and Section 16.2 of <xref target="RFC7181"/>),  the additional TLVs specified in <xref target="MessageContent"/> MUST (unless already present) be added to an outgoing message when using this mechanism.
		</t>
		
		<t>
			The following processing steps (when using a single timestamp version and a single ICV algorithm) MUST be performed for a cryptographic algorithm that is used for generating an ICV for a message:
			<list style="numbers">
				<t>
					All ICV TLVs (if any) are temporarily removed from the message. Any temporarily removed ICV TLVs MUST be stored, in order to be reinserted into the message in step 5. The message size and Message TLV Block size are updated accordingly.
				</t>
				<t>
					&lt;msg-hop-count&gt; and &lt;msg-hop-limit&gt;, if present, are temporarily set to 0.
				</t>
				<t>
					A TLV of type TIMESTAMP, as specified in <xref target="MessageContent"/>, is added to the Message TLV Block. The message size and Message TLV Block size are updated accordingly.
				</t>
				<t>
					A TLV of type ICV, as specified in <xref target="MessageContent"/>, is added to the Message TLV Block. The message size and Message TLV Block size are updated accordingly.
				</t>
				<t>
					All ICV TLVs that were temporary removed in step 1, are restored. The message size and Message TLV Block size are updated accordingly.
				</t>
				<t>
					&lt;msg-hop-count&gt; and &lt;msg-hop-limit&gt;, if present, are restored to their previous values.
				</t>
			</list>
			
			An implementation MAY add either alternative TIMESTAMP and/or ICV TLVs or more than one TIMESTAMP and/or ICV TLVs. All TIMESTAMP TLVs MUST be inserted before adding ICV TLVs.
		</t>

	</section>
	
	<section title="Message Processing" anchor="MessageProcessing">

		<t>
			Both <xref target="RFC6130"/> and <xref target="RFC7181"/> specify that:

			<list style="hanging">
				<t>
					On receiving a ... message, a router MUST first check if the message is invalid for processing by this router
				</t>
			</list>

			<xref target="RFC6130" /> and <xref target="RFC7181"/> proceed to give a number of conditions that,
   each, will lead to a rejection of the message as "badly formed and
   therefore invalid for processing".  When using a single timestamp
   version, and a single ICV algorithm, add the following conditions to that
   list, each of which, if true, MUST cause NHDP or OLSRv2 (as
   appropriate) to consider the message as invalid for processing when
   using this mechanism:
			<list style="numbers">
				<t>
					The Message TLV Block of the message does not contain exactly one TIMESTAMP TLV of the selected version. This version specification includes the type extension. (The Message TLV Block may also contain TIMESTAMP TLVs of other versions.)
				</t>
				<t>
					The Message TLV Block does not contain exactly one ICV TLV using the selected algorithm and key identifier. This algorithm specification includes the type extension, and for type extensions 1 and 2, the hash function and cryptographic function. (The Message TLV Block may also contain ICV TLVs using other algorithms and key identifiers.)
				</t>
				<t>
					Validation of the identified (in step 1) TIMESTAMP TLV in the Message TLV Block of the message fails, as according to <xref target="validate-timestamp"/>.
				</t>
				<t>
					Validation of the identified (in step 2) ICV TLV in the Message TLV Block of the message fails, as according to <xref target="validate-icv"/>.
				</t>
			</list>

			An implementation MAY check the existence of, and
verify, either an alternative TIMESTAMP and/or ICV TLVs or more than one TIMESTAMP and/or ICV TLVs.
		</t>

		<section title="Validating a Message Based on Timestamp" anchor="validate-timestamp">

			<t>
				For a TIMESTAMP Message TLV with type extension 1 (POSIX time) identified as described in <xref target="msg-gen"/>:
				
				<list style="numbers">
					<t>
						If the current POSIX time minus the value of that TIMESTAMP TLV is greater than MAX_HELLO_TIMESTAMP_DIFF (for a HELLO message) or MAX_TC_TIMESTAMP_DIFF (for a TC message), then the message validation fails.
					</t>
					<t>
						Otherwise, the message validation succeeds.
					</t>
				</list>
			</t>
			
			<t>
				If a deployment chooses to use a different type extension from 1, appropriate measures MUST be taken to verify freshness of the message.
			</t>

		</section>

		<section title="Validating a Message Based on Integrity Check" anchor="validate-icv">
			<t>
				For an ICV Message TLV identified as described in <xref target="msg-gen"/>:
				<list style="numbers">
					<t>
						All ICV Message TLVs (including the identified ICV Message TLV) are temporarily removed from the message, and the message size and Message TLV Block size are updated accordingly.
					</t>
					<t>
						The message's &lt;msg-hop-count&gt; and &lt;msg-hop-limit&gt; fields are temporarily set to 0.
					</t>
					<t>
						Calculate the ICV for the parameters specified in the identified ICV Message TLV, as specified in <xref target="RFC7182"/>.
					</t>
					<t>
						If this ICV differs from the value of &lt;ICV&nbhy;data&gt; in the ICV Message TLV, then the message validation fails. If the &lt;ICV-data&gt; has been truncated (as specified in <xref target="RFC7182"/>, the ICV calculated in the previous step MUST be truncated to the TLV length of the ICV Message TLV before comparing it with the &lt;ICV-data&gt;.
					</t>			
					<t>
						Otherwise, the message validation succeeds. The message's &lt;msg&nbhy;hop&nbhy;count&gt; and &lt;msg&nbhy;hop&nbhy;limit&gt; fields are restored to their previous value, and the ICV Message TLVs are returned to the message, whose size is updated accordingly.
					</t>
				</list>
			</t>

		</section>

	</section>

</section>
<section title="Provisioning of Routers">
	<t>

		Before a router using this mechanism is able to generate ICVs or validate messages, it MUST acquire the shared secret key(s) to be used by all routers that are to participate in the network. This specification does not define how a router acquires secret keys. Once a router has acquired suitable key(s), it MAY be configured to use, or not use, this mechanism. Section 23.6 of <xref target="RFC7181"/> provides a rationale based on <xref target="BCP107"/> why no key management is specified for OLSRv2.
	</t>
</section>

<section anchor="Security" title="Security Considerations">
	<t>
		This document specifies a security mechanism for use with NHDP and OLSRv2 that allows for mitigating several security threats.
	</t>
	
	<section title="Mitigated Attacks">
		<t>
			This section briefly summarizes security threats that are mitigated by the mechanism presented in this document.
		</t>
		
		<section anchor="identity_spoofing" title="Identity Spoofing">
			<t>
				As only routers possessing the selected shared secret key are able to add a valid ICV TLV to a message, identity spoofing, where an attacker falsely claims an identity of a valid router, is countered. When using one or more shared keys for all routers in the MANET, it is only possible to determine  that it is a valid router in the network, not to discern particular routers. Therefore, a malicious router in possession of valid keys (e.g., a compromised router) may still spoof the identity of another router using the same key.
			</t>
		</section>
			
		<section title="Link Spoofing">
			<t>
				Link spoofing, where an attacker falsely represents the existence of a nonexistent link, or otherwise misrepresents a link's state, is countered by the mechanism specified in this document, using the same argument as in <xref target="identity_spoofing"/>.
			</t>
		</section>

		<section title="Replay Attack">
			<t>
				Replay attacks are partly countered by the mechanism specified in this document, but this depends on synchronized clocks of all routers in the MANET. An attacker that records messages to replay them later can only do so in the selected time interval after the timestamp that is contained in message. As an attacker cannot modify the content of this timestamp (as it is protected by the identity check value), an attacker cannot replay messages after this time. Within this time interval, it is still possible to perform replay attacks; however, the limits on the time interval are specified so that this will have a limited effect on the operation of the protocol.
			</t>
		</section>
	</section>
			
	<section title="Limitations">
	
		<t>
			If no synchronized clocks are available in the MANET, replay attacks cannot be countered by the mechanism provided by this document. An alternative version of the TIMESTAMP TLV defined in <xref target="RFC7182"/>, with a monotonic sequence number, may have some partial value in this case, but will necessitate adding state to record observed message sequence number information.
		</t>
			
		<t>
			The mechanism provided by this document does not avoid or detect security attacks by routers possessing the shared secret key that is used to generate integrity check values for messages.
		</t>
			
		<t>
			This mechanism relies on an out-of-band protocol or mechanism for distributing the shared secret key(s) (and if an alternative integrity check value is used, any additional cryptographic parameters).
		</t>
		
		<t>
			This mechanism does not provide a key management mechanism. Refer to Section 23.6 of <xref target="RFC7181"/> for a detailed discussion why the automated key management requirements specified in <xref target="BCP107"/> do not apply for OLSRv2 and NHDP.
		</t>
	</section>

</section>
<section anchor="acknowledgements" title="Acknowledgments">

  <t>
    The authors would like to gratefully acknowledge the following people:  Justin Dean (NRL) and Henning Rogge (Frauenhofer FKIE).
  </t>

</section>
</middle>

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


<!-- <?rfc include="reference.RFC.2119.xml"?> -->
<reference anchor='RFC2119'>

<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date year='1997' month='March' />
<area>General</area>
<keyword>keyword</keyword>
</front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='TXT' octets='4723' target='http://www.rfc-editor.org/rfc/rfc2119.txt' />
<format type='HTML' octets='17970' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5777' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>




<?rfc include="reference.RFC.5444.xml"?>
<?rfc include="reference.RFC.6130.xml"?>

<!--draft-ietf-manet-rfc6622-bis-02; Companion Document listed as RFC 7182 -->
			<reference anchor="RFC7182">
			<front>
				<title>Integrity Check Value and Timestamp TLV Definitions for Mobile Ad Hoc Networks (MANETs)</title>
				<author fullname="Ulrich Herberg" initials="U" surname="Herberg">
					<organization>Fujitsu Laboratories of America</organization>
				</author>
				<author fullname="Thomas Heide Clausen" initials="T" surname="Clausen">
					<organization>LIX, Ecole Polytechnique</organization>
				</author>
				<author initials="C." surname="Dearlove">
				</author>
				<date year="2014" month="April"/>
			</front>
				<seriesInfo name="RFC" value="7182"/>
			</reference>

<!--draft-ietf-manet-olsrv2-19; Companion Document listed as RFC 7181 -->

			<reference anchor="RFC7181">
				<front>
					<title>The Optimized Link State Routing
Protocol Version 2</title>
					<author initials="T." surname="Clausen">
					</author>
					<author initials="C." surname="Dearlove">
					</author>
					<author initials="P." surname="Jacquet">
					</author>
					<author initials="U." surname="Herberg">
					</author>
					<date month="April" year="2014" />
				</front>
				<seriesInfo name="RFC" value="7181" />
			</reference>

		</references>

		<references title="Informative References">
<!-- <?rfc include="reference.RFC.4107.xml"?> -->

<reference anchor='BCP107'>

<front>
<title>Guidelines for Cryptographic Key Management</title>
<author initials='S.' surname='Bellovin' fullname='S. Bellovin'>
<organization /></author>
<author initials='R.' surname='Housley' fullname='R. Housley'>
<organization /></author>
<date year='2005' month='June' />
<abstract>
<t>The question often arises of whether a given security system requires some form of automated key management, or whether manual keying is sufficient.  This memo provides guidelines for making such decisions.  When symmetric cryptographic mechanisms are used in a protocol, the presumption is that automated key management is generally but not always needed.  If manual keying is proposed, the burden of proving that automated key management is not required falls to the proposer.  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='107' />
<seriesInfo name='RFC' value='4107' />
<format type='TXT' octets='14752' target='http://www.rfc-editor.org/rfc/rfc4107.txt' />
</reference>


<?rfc include="reference.RFC.5148.xml"?>

	</references>

</back>
</rfc>
