<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc3985 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3985.xml'>
<!ENTITY rfc4106 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4106.xml'>
<!ENTITY rfc4306 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4306.xml'>
<!ENTITY rfc4385 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4385.xml'>
<!ENTITY rfc4447 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4447.xml'>
<!ENTITY rfc4543 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4543.xml'>

<rfc ipr='full3978' docName="draft-stein-pwe3-pwsec-00.txt">

<front>
<title abbrev="pwe3-pwsec">Pseudowire Security (PWsec)</title>

<author initials="Y(J)" surname="Stein" fullname="Yaakov (J) Stein">
<organization>RAD Data Communications</organization>
<address>
     <postal>
         <street>24 Raoul Wallenberg St., Bldg C</street>
         <city>Tel Aviv</city>
         <code>69719</code>
         <country>ISRAEL</country>
     </postal>
     <phone>+972 3 645-5389</phone>
     <email>yaakov_s@rad.com</email>
</address>
</author>

<date day="13" month="Oct" year="2006" />

<area>Transport</area>
<keyword>pseudowire</keyword>
<keyword>security</keyword>
<keyword>Internet-Draft</keyword>

<abstract>
 <t>
  This document proposes an extension to the MPLS pseudowire format to
  enhance pseudowire user-plane security. The extension, called PWsec,
  provides confidentiality, data integrity, and source authentication.
  The extension is based on the National Institute of Standards and Technology (NIST) 
  Advanced Encryption Standard (AES) using the Galois/Counter Mode (GCM).
 </t>
</abstract>
</front>

<middle>

<section title="Introduction">

 <t>
  The PWE3 architecture [RFC3985] defines a pseudowire (PW) 
  connecting customer networks over a provider network.
  The customer networks run a native service, which may be
  Ethernet, ATM, frame relay, TDM, etc.
  On both sides of the PW a customer edge (CE) connects  
  to a provider edge (PE) via an attachment circuit (AC).
  The PW itself is a tunnel that transports the native service
  data across the provider network, here assumed to be based on MPLS. 
  PW tunnels may be set up using the PWE control protocol [RFC4447].
 </t>

 <t>
  Security threats specific to pseudowires were discussed in [PW-sec-req],
  where the following nonexhaustive list of user plane threats  
  were considered:
  <list>
   <t> accidental connection to untrusted network compromising user traffic </t>
   <t> maliciously setting up a PW to gain access to a customer network </t>
   <t> forking of a PW to snoop PW packets </t>
   <t> malicious rerouting of a PW to snoop or modify PW packets </t>
   <t> unauthorized tearing down of a PW </t>
   <t> unauthorized snooping of PW packets </t>
   <t> traffic analysis of PW connectivity </t>
   <t> unauthorized deletion of PW packets </t>
   <t> unauthorized modification of PW packets </t>
   <t> unauthorized insertion of PW packets </t>
   <t> replay of PW packets </t>
   <t> denial of service or significantly impacting PW service quality. </t>
  </list>
 </t>

 <t>
  In order to counter these threats, several security measures are needed.
  State-of-the-art encryption algorithms provide data confidentiality
  in order to frustrate snooping and prevent unintended data leakage. 
  Mechanisms to ensure data integrity thwart packet insertion and 
  modification. Source authentication may prevent malicious 
  access to resources and denial of service attacks.
 </t>

 <vspace blankLines="99" />
 <t>
   In this document, the key words "MUST", "MUST NOT", "REQUIRED",
   "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
   and "OPTIONAL" are to be interpreted as described in [RFC2119].
 </t>

</section>

<section title="AES/GCM">

 <t>
  From 1976 to 2000 the Data Encryption Standard (DES) was the standard block cipher.   
  In 2000, after an open competition for the selction of a successor to DES,
  the National Institute of Standards and Technology (NIST) announced that  
  Rijndael had been selected as the basis for a new standard, and in 2001 
  the Advanced Encryption Standard (AES) was published [AES].
  Agencies of the US government have certified that AES is sufficient to protect 
  SECRET and even TOP SECRET classified information. 
 </t>
  
 <t> 
  AES has a fixed block size of 128 bits and allows key sizes of 128, 192 or 256 bits.
  Like other block ciphers, in order to encrypt larger amounts of data, 
  various 'modes of operation' may be used. 
  The simplest mode is Electronic CodeBook (ECB), wherein the message 
  is segmented into blocks each of which is separately encrypted. 
  This mode is not recommended due to inherent weaknesses.
  Other modes, such as Cipher Block Chaining (CBC) and Output FeedBack (OFB) 
  provide confidentiality but do not ensure overall message integrity, 
  nor do they authenticate the claimed source. 
  Newer modes, such as Offset CodeBook (OCB) and Counter (CTR)
  are designed to address these limitations. 
 </t>

 <t>
  The Galois/Counter Mode (GCM) has numerous advantages over other proposed modes
  of operation. Its most important characteristics:
 <list>
   <t> encryption is provided by AES with a counter-type mode of operation </t>
   <t> an Integrity Check Value (ICV) verifies the payload integrity </t>
   <t> data that is not part of the packet payload (for example source identifiers) can be authenticated </t>
   <t> encryption, integrity, and source authentication are performed by a single algorithm </t>
   <t> authentication can be performed without encrypting data </t>
   <t> the Initialization Vector (IV) nonce can be of arbitrary length </t>
   <t> the algorithm can be efficiently implemented in software </t> 
   <t> the computation can be pipelined and parallelized, 
       enabling high speed hardware implementations  </t>
   <t> GCM mode is unencumbered by IPR claims. </t>
 </list>
 </t>

 <t>
  For these reasons, AES/GCM has been adopted by the IEEE
  as the default cipher suite for 802.1ae (MACsec),   
  and has been specified for IPsec ESP [RFC4106] and AH [RFC4543].
  It is also being considered by other bodies for applications
  where high-speed authenticated encryption is required.
  When used to provide security for MPLS PWs,
  we shall call it PWsec.
 </t>

 <t>
  When encrypting, AES/GCM takes the following as input:
 <list>
  <t> the plaintext to be encrypted (up to 2^36 - 32 bytes in length)</t>
  <t> the encryption key (128 or 256 bits in length) </t>
  <t> a per-packet randomly generated IV (12 bytes is recommended for efficiency) </t>
  <t> additional data to be authenticated but not encrypted (between 0 and 2^61 bytes) </t>
 </list>
 and returns the following as output 
 <list>
  <t> the ciphertext, whose length is precisely that of the plaintext </t>
  <t> the ICV (which we shall take to be 16 bytes in length). </t>
 </list>
 </t>

 <t>
  For a given encryption key IV values SHOULD NOT be repeated.
  In MACsec, the IV consists of a 4-byte Packet Number (PN) and
  a 8-byte Secure Channel Identifier (SCI).
  The PN is increased from frame to frame, 
  and a new encryption key must be supplied before the PN recycles.
  An alternative way of conforming to the requirement is selecting
  random IV values such that repetition is highly unlikely.
 </t>

 <t>
  When decrypting, AES/GCM takes the following as input:
 <list>
  <t> the ciphertext to be decrypted </t>
  <t> the encryption key </t>
  <t> the IV nonce that was used when encrypting </t>
  <t> the ICV generated during encryption </t>
 </list>
 and returns the following as output 
 <list>
  <t> a boolean value specifying whether the integrity test passed or failed </t>
  <t> if the integrity test passed, the plaintext. </t>
 </list>
 </t>

</section>

<section title="PWsec encapsulation">
 <t>
  PWsec may be employed whether or not the control word [RFC4385] is used.
  If the control word is used, it is not encrypted. 
  If an RTP header is used [RFC3985], it is encrypted.
  The format of a PWsec encrypted packet is given in Figure 1.
  Note that unlike MACsec, PWsec does not use the sequence number
  as part of the IV.
 </t>

 <figure align="center">
  <artwork align="left">
     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  
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |            Tunnel Label               | EXP |S|     TTL       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |              PW label                 | EXP |1|     TTL       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |0 0 0 0| flags |FRG|  Length   |         Sequence Number       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |                 Initialization Vector (IV)                    |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |                      Encrypted Payload                        |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    |                 Integrity Check Value (ICV)                   |
    |                                                               |
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  </artwork>
  <postamble>Figure 1. PWsec Packet Format </postamble>
 </figure>

 <t>
  PWsec performs source authentication by using an identifier that 
  uniquely identifies the source as additional data to be authenticated 
  but not encrypted. If the control word is used and the sequence
  number is nonzero, the sequence number is authenticated in this way
  as well. 
 </t>

 <t>
  If the PW is set up using the PWE control protocol [RFC4447]
  using FEC 128, then the source identifier can be taken to be the 
  source PE identifier plus the 4-byte Group ID plus the 4-byte PW ID.
  If the PW is set up using the PWE control protocol using FEC 129, 
  then the source identifier can be taken to be the source PE identifier 
  plus the Attachment Identifier (AI); where the latter will usually
  consist of the Attachment Group Identifier (AGI) 
  plus the Source Attachment Individual Identifier (SAII).
  For both cases, the entire contents of the FEC element MAY be authenticated.
  If the PW is statically provisioned, then a unique source identifier
  MUST be provisioned.
  </t>

</section>

<section title="PWsec signaling">
 <t>
  When setting up a PW to use PWsec using the PWE3 control protocol, 
  a new TLV, called the PWsec TLV MUST be used in the LDP label mapping message.
  This TLV specifies the parameters of the encryption and authentication,
  including a code indicating the use of AES/GCM,
  the encryption key length (128 or 256 bits),
  the length of the IV (here a constant 12 bytes), 
  the length of the ICV (here a constant 16 bytes),
  and the additional data to be authenticated.
  The format of this TLV will be specified in the next revision
  of this document.
 </t>

 <t>
  The key used to encrypt and decrypt PW packets should be regularly changed.
  Methods for key distribution are beyond the scope of this document,
  but mechanisms such as the Internet Key Exchange (IKE) [RFC4306] are appropriate
  for this task.
 </t>

</section>

<section title="Security Considerations" >

 <t>
  This document proposes a security mechanism for the MPLS PW user plane
  based on symmetric key cryptography.
  The mechanism is based on AES in GCM mode, which has been adopted by the IEEE
  as the default cipher suite for MACsec 
  and has been specified for IPsec ESP [RFC4106] and AH [RFC4543].
  Mechanisms for key distribution will be required, but were not specified.
 </t>

 <t>
  Our discussion has focused on the PW user plane. To complement
  the proposed mechanism, security solutions for the PWE3 control protocol
  and for the management plane will be required.
 </t>

</section>

<section title="IANA Considerations" >

 <t>
  In order to signal the use of PWsec,
  a new TLV to be used in the LDP label mapping message
  of the PWE3 control protocol [RFC4447]
  will be required.
 </t>
 <vspace blankLines="99" />

</section>

</middle>

<back>
<references title="Normative References">
 &rfc2119;
 &rfc4106;
 &rfc4447;
 &rfc4543;
 <reference anchor='AES'>
  <front>
    <title>Advanced Encryption Standard (AES)</title>
    <author>
	 <organization>NIST</organization>
    </author>
    <date month='November' year='2001' />
  </front>
  <seriesInfo name='FIPS PUB' value='197' />
 </reference>
 <reference anchor='GCM'>
  <front>
    <title>The Galois/Counter Mode of Operation (GCM)</title>
    <author initials='D' surname='McGrew'/>
    <author initials='J' surname='Viega'/>
    <date month='January' year='2004' />
  </front>
  <annotation>
    Downloadable from http://csrc.nist.gov/CryptoToolkit/modes/proposedmodes/gcm/gcm-spec.pdf
  </annotation>
 </reference>

</references>

<references title="Informative References">		
 &rfc3985;
 &rfc4306;
 &rfc4385;
 <reference anchor='PW-sec-req'>
  <front>
    <title>Requirements for PW Security</title>
    <author initials='Y(J)' surname='Stein'/>
    <date month='February' year='2006' />
  </front>
  <seriesInfo name='Internet-Draft' value='draft-stein-pwe3-sec-req-00.txt' />
 </reference>
</references>

</back>

</rfc>


  
 