One document matched: draft-ietf-ippm-ipsec-01.xml


<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

  <!ENTITY RFC5996  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5996.xml'>
      <!ENTITY RFC4656  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4656.xml'>
       <!ENTITY RFC5357  PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5357.xml'>
]>

<rfc category="std" ipr="trust200902" docName="draft-ietf-ippm-ipsec-01">
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc comments="yes"?>
<?rfc inline="yes" ?>

<front>
<title abbrev="Network Performance Measurement for IPsec">Network Performance Measurement for IPsec</title>

<author fullname="Kostas Pentikousis" initials="K.P." surname="Pentikousis" role="editor">
  <organization abbrev="EICT">EICT GmbH</organization>
  <address>
	  <postal>
		  <street>Torgauer Strasse 12-15</street>
		  <city>10829 Berlin</city>
		  <country>Germany</country>
	  </postal>
	  <email>k.pentikousis@eict.de</email>
  </address>
</author>

<author initials="Y" surname="Cui" fullname="Yang Cui">
	<organization abbrev="Huawei Technologies">Huawei Technologies </organization>
	<address>
		<postal>
			<street>Otemachi First Square 1-5-1 Otemachi </street>
			<city>Chiyoda-ku</city> 
			<region>Tokyo </region>
			<code>100-0004</code> 
			<country>Japan</country> 
		</postal>
		<email> cuiyang@huawei.com </email>
    </address>
</author> 
 
 <author initials="E" surname="Zhang" fullname="Emma Zhang">
	<organization abbrev="Huawei Technologies">Huawei Technologies </organization>
	<address>
		<postal>
			<street>Huawei Building, Q20, No.156, Rd. BeiQing</street>
			<city> Haidian District </city> 
			<region> Beijing </region>
			<code> 100095 </code> 
			<country>P. R. China</country> 
		</postal>
		<email> emma.zhanglijia@huawei.com </email>
    </address>
</author> 

<date year="2013" />

<area>Transport</area>
<workgroup>IPPM WG</workgroup>

<abstract>
<t>IPsec is a mature technology with several interoperable implementations.  Indeed, the use of IPsec tunnels is increasingly gaining popularity in several deployment scenarios, not the least in what used to be solely areas of traditional telecommunication protocols.  Wider IPsec deployment calls for mechanisms and methods that enable tunnel end-users, as well as operators, to measure one-way and two-way network performance in a standardized manner.  Unfortunately, however, standard IP performance measurement security mechanisms cannot be readily used with IPsec.  This document makes the case for employing IPsec to protect the One-way and Two-Way Active Measurement Protocols (O/TWAMP) and proposes a method which combines IKEv2 and O/TWAMP as defined in RFC 4656 and RFC 5357, respectively. This specification aims, on the one hand, to ensure that O/TWAMP can be secured with the best mechanisms we have at our disposal today while, on the other hand, it facilitates the applicability of O/TWAMP to networks that have already deployed IPsec.</t>
</abstract>

</front>

<middle>

<section title="Introduction">

<t>The One-way Active Measurement Protocol (OWAMP) <xref target="RFC4656"/> and the Two-Way Active Measurement Protocol (TWAMP) <xref target="RFC5357"/> can be used to measure network performance parameters, such as latency, bandwidth, and packet loss by sending probe packets and monitoring their experience in the network.  In order to guarantee the accuracy of network measurement results, security aspects must be considered. Otherwise, attacks may occur and the authenticity of the measurement results may be violated.  For example, if no protection is provided, an adversary in the middle may modify packet timestamps, thus altering the measurement results.</t>

<t>Cryptographic security mechanisms, such as IPsec, have been considered during the early stage of the specification of the two active measurement protocols mentioned above.  However, due to several reasons, it was decided to avoid tying the development and deployment of O/TWAMP to such security mechanisms.  In practice, for many networks, the issues listed in <xref target="RFC4656"/>, Sec. 6.6 with respect to IPsec are still valid.   However, we expect that in the near future IPsec will be deployed in many more hosts and networks than today.  For example, IPsec tunnels may be used to secure wireless channels. In this case, what we are interested in is measuring network performance specifically for the traffic carried by the secured tunnel, not over the wireless channel in general. This document makes the case that O/TWAMP should be cognizant when IPsec and other security mechanisms are in place and can be leveraged upon.  In other words, it is now time to specify how O/TWAMP is used in a network environment where IPsec is already deployed.  We expect that in such an environment, measuring IP performance over IPsec tunnels with O/TWAMP is an important tool for operators.</t>

<t>For example, when considering the use of O/TWAMP in networks with IPsec deployed, we can take advantage of the IPsec key exchange protocol <xref target="RFC5996"/>. In particular, we note that it is not necessary to use distinct keys in OWAMP-Control and OWAMP-Test layers. One key for encryption and another for authentication is sufficient for both Control and Test layers. This obviates the need to generate two keys for each layer and reduces the complexity of O/TWAMP protocols in an IPsec environment. This observation comes from the fact that separate session keys in the OWAMP-Control and OWAMP-Test layers were designed for preventing reflection attacks when employing the current mechanism. Once IPsec is employed, such a potential threat is alleviated.</t>

<t>The remainder of this document is organized as follows. <xref target="Motivation"/> motivates this work by revisiting the arguments made in <xref target="RFC4656"/> against the use of IPsec; this section also summarizes protocol operation with respect to security. <xref target="Solution"/> presents a method of binding O/TWAMP and IKEv2 for network measurements between a sender and a receiver which both support IPsec. Finally, <xref target="Security"/> discusses the security considerations arising from the proposed mechanisms.</t>

</section>

<section title="Terminology">

<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 	"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119"/>.</t>
</section>

<section anchor="Motivation" title="Motivation" >

<t>In order to motivate the solutions proposed in this document, let us first revisit  Section 6.6 of <xref target="RFC4656"/>. As we explain below, the reasons originally listed therein may not apply in many cases today.</t>

<t>RFC 4656 opts against using IPsec and instead favors the use of "a simple cryptographic protocol (based on a block cipher in CBC mode)". The first argument justifying this decision in <xref target="RFC4656"/> is that partial authentication in OWAMP authentication mode is not possible with IPsec.  IPsec indeed cannot authenticate only a part of a packet.  However, in an environment where IPsec is already deployed and actively used, partial authentication for OWAMP contradicts the operational reasons dictating the use of IPsec.  It also increases the operational complexity of OWAMP (and TWAMP) in networks where IPsec is actively used and may in practice limit its applicability. </t>

<t>The second argument made is the need to keep separate deployment paths between OWAMP and IPsec.  In several currently deployed types of networks IPsec is widely used to protect the data and signaling planes.  For example, in mobile telecommunication networks, the deployment rate of IPsec exceeds 95% with respect to the LTE serving network.  In older technology cellular networks, such as UMTS and GSM, IPsec use penetration is lower, but still quite significant. Additionally, there is a great number of IPsec-based VPN applications which are widely used in business applications to provide end-to-end security over, for instance, publicly open or otherwise untrusted IEEE 802.11 wireless LANs.  At the same time, many IETF-standardized protocols make use of IPsec/IKE, including MIPv4/v6, HIP, SCTP, BGP, NAT and SIP, just to name a few.</t> 		

<t>The third argument in <xref target="RFC4656"/> is that, effectively, the adoption of IPsec in OWAMP may be problematic for "lightweight embedded devices." However, since the publication of RFC 4656, a large number of limited-resource and low-cost hardware, such as Ethernet switches, DSL modems, set-top boxes and other such devices come with support for IPsec "out of the box".  Therefore concerns about implementation, although likely valid a decade ago, are not well founded today.</t>

<t>Finally, everyday use of IPsec applications by field technicians and good understanding of the IPsec API by many programmers should no longer be a reason for concern.  On the contrary: By now, IPsec open source code is available for anyone who wants to use it.  Therefore, although IPsec does need a certain level of expertise to deal with it, in practice, most competent technical personnel and programmers have no problems using it on a daily basis.</t>

<t>OWAMP and TWAMP actually consist of two inter-related protocols: O/TWAMP-Control and O/TWAMP-Test. With respect to TWAMP, since "TWAMP and OWAMP use the same protocol for establishment of Control and Test procedures" <xref target="RFC5357"/> (Section 6), IPsec is also not considered. O/TWAMP-Control is used to initiate, start, and stop test sessions and to fetch their results, whereas O/TWAMP-Test is used to exchange test packets between two measurement nodes.</t>

<t>In the remainder of this section we review security for O/TWAMP-Control and O/TWAMP-Test separately and then make the case for using them over IPsec.</t>

<section title="O/TWAMP-Control Security">

<t>O/TWAMP uses a simple cryptographic protocol which relies on

<list style="symbols">
<t>AES in Cipher Block Chaining (AES-CBC) for confidentiality</t>
<t>HMAC-SHA1 truncated to 128 bits for message authentication</t></list></t>

<t>Three modes of operation are supported: unauthenticated, authenticated, and encrypted.  The authenticated and encrypted modes require that endpoints possess a shared secret, typically a passphrase.  The secret key is derived from the passphrase using a password-based key derivation function PBKDF2 (PKCS#5) <xref target="RFC2898"/>.</t>	

<t>In the unauthenticated mode, the security parameters are left unused.  In the authenticated and encrypted modes, security parameters are negotiated during the control connection establishment.</t>

<t><xref target="MES" /> illustrates the initiation stage of the O/TWAMP-Control protocol between a client and the server. In short, the client opens a TCP connection to the server in order to be able to send OWAMP-Control commands.  The server responds with a Server Greeting, which contains the Modes, Challenge, Salt, Count, and MBZ fields (see Section 3.1 of <xref target="RFC4656"/>).  If the client-preferred mode is available, the client responds with a Set-Up-Response message, wherein the selected Mode, as well as the KeyID, Token and Client IV are included.  The Token is the concatenation of a 16-octet Challenge, a 16-octet AES Session-key used for encryption, and a 32-octet HMAC-SHA1 Session-key used for authentication.   The Token is encrypted using AES-CBC.</t>

<figure anchor="MES" title="Initiation of O/TWAMP-Control"><artwork><![CDATA[ 
+--------+                  +--------+
| Client |                  | Server |
+--------+                  +--------+ 
    |                           |
    |<---- TCP Connection ----->|
    |                           |
    |<---- Greeting message ----|
    |                           |
    |----- Set-Up-Response ---->|
    |                           |
    |<---- Server-Start --------|
    |                           |]]>
</artwork></figure>

<t>Encryption uses a key derived from the shared secret associated with KeyID.  In the authenticated and encrypted modes, all further communication is encrypted using the AES Session-key and authenticated with the HMAC Session-key.  The client encrypts everything it transmits through the just-established O/TWAMP-Control connection using stream encryption with Client-IV as the IV.  Correspondingly, the server encrypts its side of the connection using Server-IV as the IV.  The IVs themselves are transmitted in cleartext.  Encryption starts with the block immediately following that containing the IV.</t>

<t>The AES Session-key and HMAC Session-key are generated randomly by the client.  The HMAC Session-key is communicated along with the AES Session-key during O/TWAMP-Control connection setup.   The HMAC Session-key is derived independently of the AES Session-key.
</t>
</section>	
	
<section title="O/TWAMP-Test Security">

<t>The O/TWAMP-Test protocol runs over UDP, using the sender and receiver IP and port numbers that were negotiated during the Request-Session exchange.  O/TWAMP-Test has the same three modes as with O/TWAMP-Control (unauthenticated, authenticated, and encrypted) and all O/TWAMP-Test sessions inherit the corresponding O/TWAMP-Control session mode.</t>

<t>The O/TWAMP-Test packet format is the same in authenticated and encrypted modes.  The encryption and authentication operations are, however, different.  Similarly with the respective O/TWAMP-Control session, each O/TWAMP-Test session has two keys: an AES Session-key and an HMAC Session-key.  However, there is a difference in how the keys are obtained:

<list style="hanging" hangIndent="8">
<t hangText="O/TWAMP-Control:"> the keys are generated by the client and communicated to the server during the control connection establishment with the Set-Up-Response message (as part of the Token).</t>

<t hangText="O/TWAMP-Test:"> the keys are derived from the O/TWAMP-Control keys and the session identifier (SID), which serve as inputs of the key derivation function (KDF). The O/TWAMP-Test AES Session-key is generated using the O/TWAMP-Control AES Session-key, with the 16-octet session identifier (SID), for encrypting and decrypting the packets of the particular O/TWAMP-Test session.  The O/TWAMP-Test HMAC Session-key is generated using the O/TWAMP-Control HMAC Session-key, with the 16-octet session identifier (SID), for authenticating the packets of the particular O/TWAMP-Test session.</t>
</list></t>

</section>	
	
<section title="O/TWAMP Security Root">

<t>As discussed above, the AES Session-key and HMAC Session-key used in the O/TWAMP-Test protocol are derived from the AES Session-key and HMAC Session-key which are used in O/TWAMP-Control protocol.  The AES Session-key and HMAC Session-key used in the O/TWAMP-Control protocol are generated randomly by the client, and encrypted with the shared secret associated with KeyID.  Therefore, the security root is the shared secret key. Thus, for large deployments, key provision and management may become overly complicated. Comparatively, a certificate-based approach using IKEv2/IPsec can automatically manage the security root and solve this problem, as we explain in <xref target="Solution"></xref>.</t>
</section>	
	
<section title="O/TWAMP and IPsec">

<t>According to <xref target="RFC4656"/> the "deployment paths of IPsec and OWAMP could be separate if OWAMP does not depend on IPsec." However, the problem that arises in practice is that the security mechanism of O/TWAMP and IPsec cannot coexist at the same time without adding overhead or increasing complexity.</t>

<t>IPsec provides confidentiality and data integrity to IP datagrams. Distinct protocols are provided: Authentication Header (AH), Encapsulating Security Payload (ESP) and Internet Key Exchange (IKE v1/v2).  AH provides only integrity protection, while ESP can also provide encryption.  IKE is used for dynamical key negotiation and automatic key management.</t>

<t>When sender and receiver implement O/TWAMP over IPsec, they need to agree on a shared secret key during the IPsec tunnel establishment. Subsequently, all IP packets sent by the sender are protected.  If the AH protocol is used, IP packets are transmitted in plaintext.  The authentication part covers the entire packet.  So all test information, such as UDP port number, and the test results will be visible to any attacker, which can intercept these test packets, and introduce errors or forge packets that may be injected during the transmission.  In order to avoid this attack, the receiver must validate the integrity of these packets with the negotiated secret key.  If ESP is used, IP packets are encrypted, and hence only the receiver can use the IPsec secret key to decrypt the IP packet, and obtain the test data in order to assess the IP network performance based on the measurements.  Both the sender and receiver must support IPsec to generate the security secret key of IPsec.</t> 

<t>Currently, after the test packets are received by the receiver, it cannot execute active measurement over IPsec.  That is because the receiver knows only the shared secret key but not the IPsec key, while the test packets are protected by the IPsec key ultimately.  Therefore, it needs to be considered how to measure IP network performance in an IPsec tunnel with O/TWAMP.  Without this functionality, the use of OWAMP and TWAMP over IPsec is hindered.</t> 

<t>Of course, backward compatibility should be considered as well.  That is, the intrinsic security method based on shared key as specified in the O/TWAMP standards can also still be suitable for other network settings.  There should be no impact on the current security mechanisms defined in O/TWAMP for other use cases.  This document describes possible solutions to this problem which take advantage of the secret key derived by IPsec, in order to provision the key needed for active network measurements based on <xref target="RFC4656"/> and <xref target="RFC5357"/>.</t> 
</section>
</section>

<section anchor="Solution" title="O/TWAMP for IPsec Networks" >

<t>This section presents a method of binding O/TWAMP and IKEv2 for network measurements between a client and a server which both support IPsec. In short, the shared key used for securing O/TWAMP traffic is derived using IKEv2 <xref target="RFC5996"/>.</t>

<section anchor="SharedKeyDerivation" title="Shared Key Derivation">
<t>If the AH protocol is used, the IP packets are transmitted in plaintext, but all O/TWAMP traffic is integrity-protected by IPsec.  Therefore, even if the peers choose to opt for the unauthenticated mode, IPsec integrity protection is extended to O/TWAMP. In the authenticated and encrypted modes, the shared secret can be derived from the IKEv2 Security Association (SA), or IPsec SA.</t>

<t>If the shared secret key is derived from the IKEv2 SA, SKEYSEED must be generated firstly. SKEYSEED and its derivatives are computed as per <xref target="RFC5996"/>, where prf is a pseudorandom function:</t> 

<t><list><t>SKEYSEED = prf( Ni | Nr, g^ir )</t></list></t> 

<t>Ni and Nr are, respectively, the initiator and responder nonces, which are negotiated during the initial exchange (see Section 1.2 of <xref target="RFC5996"/>).  g^ir is the shared secret from the ephemeral Diffie-Hellman exchange and is represented as a string of octets.  Note that this SKEYSEED can be used as the O/TWAMP shared secret key directly.</t>

<t>Alternatively, the shared secret key can be generated as follows:</t>

<t><list><t>Shared secret key = PRF{ SKEYSEED, Session ID }</t></list></t> 

<t>wherein the Session ID is the O/TWAMP-Test SID.</t> 

<t>If the shared secret key is derived from the IPsec SA, instead, the shared secret key can be equal to KEYMAT, wherein</t>

<t><list><t>KEYMAT = prf+( SK_d, Ni | Nr )</t></list></t> 

<t>The term "prf+" stands for a function that outputs a pseudorandom stream based on the inputs to a prf, while SK_d is defined in <xref target="RFC5996"/> (Sections 2.13 and 1.2, respectively). The shared secret key can alternatively be generated as follows:</t>

<t><list><t>Shared secret key = PRF{ KEYMAT, Session ID }</t></list></t>

<t>wherein the session ID is is the O/TWAMP-Test SID.</t> 

<t>If rekeying for the IKE SA and IPsec SA occurs, the corresponding key of the SA is updated.  Generally, ESP and AH SAs always exist in pairs, with one SA in each direction.  If the SA is deleted, the key generated from the IKE SA or IPsec SA should also be updated.</t> 
</section>

<section anchor="ServerGreetingUpdate" title="Server Greeting Message Update">

<t>As discussed above, a binding association between the key generated from IPsec and the O/TWAMP shared secret key needs to be considered. The Security Association (SA) can be identified by the Security Parameter Index (SPI) and protocol uniquely for a given sender and receiver pair. Therefore, these parameters should be agreed upon during the initiation stage of O/TWAMP-Control. At the stage that the sender and receiver negotiate the integrity key, the IPsec protocol and SPI MUST be checked.  Only if the two parameters are matched with the IPsec information, MUST the O/TWAMP connection be established.</t>

<t>The Security Parameter Index (SPI) and protocol type (see <xref target="RFC4301"/> <xref target="RFC5996"/>) will need to be included in the Server Greeting of the O/TWAMP-Control protocol depicted in <xref target="MES" />.  After the client receives the greeting, it MUST close the connection if it receives a greeting with an erroneous SPI and protocol value (<xref target="ServerGreeting" />).   Otherwise, the client SHOULD generate the shared secret key as discussed in <xref target="SharedKeyDerivation"/> and respond with the server-expected Set-Up-Response message.</t> 

<t>The Modes field in <xref target="ServerGreeting" /> will need to allow for support of key derivation as discussed in <xref target="SharedKeyDerivation"/>. As such, pending discussion in the IPPM WG, Modes value 8 MUST be supported by compatible implementations, indicating support for IPsec. Server implementations compatible with this document MUST set the first 28 bits of the Modes field to zero. A client compatible with this specification MUST ignore the first 28 bits of the Modes field. For backward compatibility, the server is obviously allowed to indicate support for the Modes defined in <xref target="RFC4656"/> </t>

<figure anchor="ServerGreeting" title="Server Greeting format"><artwork><![CDATA[
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Protocol                            |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SPIi                                |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SPIr                                |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Modes                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Challenge (16 octets)                     |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        Salt (16 octets)                       |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Count (4 octets)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        MBZ (12 octets)                        |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]>
</artwork></figure>

<t>A compatible O/TWAMP client implementation would then interpret the originally unused 12 bits of the Server Greeting (see sec. 3.1 of <xref target="RFC4656"/>) as follows: The first 4 octets of the Server Greeting message indicate the protocol type, while the following 8 octets indicate the initiator (SPIi) and responder (SPIr) SPIs as illustrated in <xref target="ServerGreeting" />. Note that in this case, the remaining fields of the Server Greeting message remain as per <xref target="RFC4656"/>.</t>

<t><list style="hanging" hangIndent="6">
<t hangText="EDITOR'S NOTE:"><vspace />
We expect that this implementation option would pose the least backwards compatibility problems to existing O/TWAMP clients. Robust client implementations of <xref target="RFC4656"/> would disregard that the 29th Modes bit in the Server Greeting is set, and should ignore the information contained in the newly defined fields (Protocol, SPIi, SPIr). If the server supports other Modes, as one would assume, the client would then indicate any of the Modes defined in <xref target="RFC4656"/> and effectively indicate that it does not support the IPsec mode. At this point, the Server would need to use the Modes defined in <xref target="RFC4656"/> only.</t></list></t>

<t>When using ESP, all IP packets are encrypted, and therefore only the receiver can use the IPsec key to decrypt the IP active measurement packets. In this case, the IPsec tunnel between the sender and receiver provides additional security: even if the peers choose the unauthenticated mode, IPsec encryption and integrity protection is provided to O/TWAMP.  If the sender and receiver decide to use the authenticated or encrypted mode, the shared secret can also be derived from IKE SA or IPsec SA.  The method for key generation and binding association is the same discussed above for the AH protocol mode.</t>

<t>There is an encryption-only configuration in ESP, though this is not recommended due to its limitations. Since it does not produce integrity key in this case, either encryption-only ESP should be prohibited for O/TWAMP, or a decryption failure should be distinguished due to possible integrity attack.</t>

</section>

<section anchor="Optimizations" title="Session Key Derivation">

<t><xref target="SharedKeyDerivation"/> described a method for deriving the shared key for O/TWAMP by capitalizing on IPsec. This is a step forward in terms of facilitating O/TWAMP deployment at scale in IPsec networks as it allows for greater and secure automation of standardized network performance measurements. We note, however, that the O/TWAMP protocol uses distinct encryption and integrity keys for O/TWAMP-Control and O/TWAMP-Test. Consequently, four keys are generated to protect O/TWAMP-Control and O/TWAMP-Test messages.</t>

<t>In fact, once IPsec is employed, one key for encryption and another for authentication is sufficient for both the Control and Test protocols. Therefore, in an IPsec environment we can further reduce the operational complexity of O/TWAMP protocols in a straightforward manner, as discussed below.</t>

<t><list style="hanging" hangIndent="6">
<t hangText="EDITOR'S NOTE:"><vspace />
We expect that both session key derivation proposals and optimization alternatives will be discussed in the IPPM working group and we are looking forward to community comments and feedback.</t></list></t>

<section title="Alternative 1">

<t>If an IPsec SA is established between the server and the client, or both server and client support IPsec, the root key for O/TWAMP-based active network measurements can be derived from the IKE or IPsec SA.</t>

<t>If the root key that will be used in O/TWAMP network performance measurements is derived from the IKE SA, SKEYSEED must be generated first. SKEYSEED and its derivatives are computed as per <xref target="RFC5996"/>. SKEYSEED can be used as the root key of O/TWAMP directly; then the root key of O/TWAMP is equal to SKEYSEED. If the root key of O/TWAMP is derived from the IPsec SA, the shared secret key can be equal to KEYMAT. KEYMAT and its derivatives are computed as per usual <xref target="RFC5996"/>.</t>

<t>Then, the session keys for encryption and authentication can be derived from the root key of O/TWAMP, wherein:</t>

<t>Session key for enc  = PRF{ root key of O/TWAMP, "O/TWAMP enc" }</t>

<t>Session key for auth = PRF{ root key of O/TWAMP, "O/TWAMP auth" }</t>

<t>The former can provide encryption protection for O/TWAMP-Control and O/TWAMP-Test messages, while the latter can provide integrity protection.</t>

<t>Note that there are cases where rekeying the IKE SA and IPsec SA is necessary, and after which the corresponding key of SA is updated. If the SA is deleted, the O/TWAMP shared key generated from the IKE SA or IPsec SA should also be updated.</t>

<t><list style="hanging" hangIndent="6">
<t hangText="EDITOR'S NOTE:"><vspace />
In addition to optimizing session key derivation, we can also reduce the verbosity of the Server Greeting and Set-Up-Response messages, as explained below. Note, however, that such O/TWAMP message simplification poses backward compatibility challenges, which should be discussed in the IPPM WG.</t></list></t>

<t>In this optimization, the O/TWAMP-Control message exchange flow remains as per <xref target="MES" />. However, the optimized Server Greeting (<xref target="ServerGreeting1" />) can do without the Salt and Count parameters (cf. <xref target="ServerGreeting" />) since the root key of O/TWAMP is derived from IKE SA or IPsec SA. O/TWAMP security can rely on IPsec and the SPI can uniquely identify the IPsec SA from which the root key was derived from.</t>

<figure anchor="ServerGreeting1" title="Optimized Server Greeting format"><artwork><![CDATA[ 
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Protocol                            |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SPIi                                |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SPIr                                |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Modes                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Challenge (16 octets)                     |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        MBZ (12 octets)                        |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]>
</artwork></figure>

<t>The format of the Set-Up-Response is illustrated in <xref target="Response1" />. The Token carried in the Set-Up-Response is calculated as follows: </t>

<t><list><t>Token = Enc_root-key( Challenge )</t></list></t>

<t>where Challenge is the value received earlier in the Server Greeting (<xref target="ServerGreeting1" />)</t>

<figure anchor="Response1" title="Set-Up-Response in Alternative 1"><artwork><![CDATA[ 
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Mode                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                     Token (16 octets)                         |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                    Client-IV (12 octets)                      |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]>
</artwork></figure>

<t>If the server authenticates the token successfully, then the O/TWAMP-Control message exchange flow can continue.</t>

</section>

<section title="Alternative 2">

<t>Another way for optimizing the shared key use is to set the O/TWAMP session keys equal to the keys of the IPsec SA directly, i.e:</t>

<t>Session key for enc  = encryption key of the IPsec SA</t>

<t>Session key for auth = integrity key of the IPsec SA</t>

<t>The former session key can provide encryption protection for O/TWAMP-Control and O/TWAMP-Test messages, while the latter can provide integrity protection. The point made in the previous subsection about rekeying the IPsec SA applies here too.</t>

<t><list style="hanging" hangIndent="6">
<t hangText="EDITOR'S NOTE:"><vspace />
As noted in the previous subsection, here too we can reduce the verbosity of the Server Greeting and Set-Up-Response messages even further, as explained below. Note, however, that such O/TWAMP message simplification poses backward compatibility challenges, which should be discussed in the IPPM WG.</t></list></t>

<t>The O/TWAMP control message exchange flow remains the same (i.e. as per <xref target="MES" />), while the Server Greeting format is illustrated in <xref target="ServerGreeting2" />. The Challenge, Salt, and Count parameters can be eliminated since the session keys of O/TWAMP are equal to the keys of an IPsec SA directly. SPI can identify the IPsec SA where the session keys derived from. The similarly optimized Set-Up-Response message is illustrated in <xref target="Response2" />.</t>

<figure anchor="ServerGreeting2" title="Optimized Server Greeting format"><artwork><![CDATA[ 
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Protocol                            |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SPIi                                |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SPIr                                |
|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Modes                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        MBZ (12 octets)                        |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]>
</artwork></figure>

<figure anchor="Response2" title="Set-Up-Response in Alternative 2"><artwork><![CDATA[ 
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Mode                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                    Client-IV (12 octets)                      |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]>
</artwork></figure>

</section>
</section>
</section>

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

<t>As the shared secret key is derived from IPsec, the key derivation algorithm strength and limitations are as per <xref target="RFC5996"/>.  The strength of a key derived from a Diffie-Hellman exchange using any of the groups defined here depends on the inherent strength of the group, the size of the exponent used, and the entropy provided by the random number generator employed.  The strength of all keys and implementation vulnerabilities, particularly Denial of Service (DoS) attacks are as defined in <xref target="RFC5996"/>.</t>

<t><list style="hanging" hangIndent="6">
<t hangText="EDITOR'S NOTE:"><vspace />
As a general note, the IPPM community may want to revisit the arguments listed in <xref target="RFC4656"/>,  Sec. 6.6. Other widely-used Internet security mechanisms, such as TLS and DTLS, may also be considered for future use over and above of what is already specified in <xref target="RFC4656"/> <xref target="RFC5357"/>.</t></list></t>

</section>

<section anchor="iana" title="IANA Considerations">

<t>IANA may need to allocate additional values for the Modes options presented in this document. The values of the protocol field may need to be assigned from the numbering space.</t>

</section>

<section title="Acknowledgments">
	
<t>Emily Bi contributed to an earlier version of this document.</t>

<t>We thank Eric Chen and Yakov Stein for their comments on this draft, and Al Morton for the discussion on related earlier work in IPPM WG.</t>
</section>

</middle>

<back>
 
<references title="Normative References">
&RFC5996;
<?rfc include="reference.RFC.4656" ?>
<?rfc include="reference.RFC.5357" ?>
<?rfc include="reference.RFC.2119" ?>
</references>

<references title="Informative References">
<?rfc include="reference.RFC.2898" ?>
<?rfc include="reference.RFC.4301" ?>
</references>
</back>
</rfc>


PAFTECH AB 2003-20262026-04-24 12:06:59