<?xml version="1.0" encoding="UTF-8"?><?rfc linefile="1:xml/complete/rfc2405.xml"?>
<!-- automatically generated by xml2rfc v1.32 on 2007-05-31T23:51:41Z -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>

<!--
     ASCII to XML transformation by Invisible Worlds, Inc.
     http://invisible.net/
     Last transformation: 03-Feb-1999, 01:42:59

     Cannonical version of this document is at:
     http://info.internet.isi.edu/in-notes/rfc/files/rfc2405.txt

     Implementors should verify all content with
     cannonical version.  Failure to do so may result in
     protocol failures.
-->

<rfc number="2405"
     category="std">
<front>
<title abbrev="The ESP DES-CBC Cipher Algorithm">The ESP DES-CBC Cipher Algorithm With Explicit IV</title>
<author initials="C." surname="Madson" fullname="Cheryl Madson">
<organization>Cisco Systems, Inc.</organization>
<address>
<email>cmadson@cisco.com</email>
</address>
</author>
<author initials="N." surname="Doraswamy" fullname="Naganand Doraswamy">
<organization>Bay Networks, Inc.</organization>
<address>
<email>naganand@baynetworks.com</email>
</address>
</author>
<date month="November" year="1998"/>
<area>Security</area>
<keyword>Digital Encryption Standard</keyword>
<keyword>IP security protocol</keyword>
<keyword>cipher block chaining</keyword>
<keyword>encapsulate</keyword>
<keyword>encapsulating security payload</keyword>
<keyword>encryption</keyword>
<keyword>security</keyword>
<abstract>
<t>
   This document describes the use of the DES Cipher algorithm in Cipher
   Block Chaining Mode, with an explicit IV, as a confidentiality
   mechanism within the context of the IPSec Encapsulating Security
   Payload (ESP).
</t>
</abstract>
</front>
<middle>
<!-- RFC original section: (1.) -->
<section title="Introduction">
<t>
   This document describes the use of the DES Cipher algorithm in Cipher
   Block Chaining Mode as a confidentiality mechanism within the context
   of the Encapsulating Security Payload.
</t>
<t>
   DES is a symmetric block cipher algorithm. The algorithm is described
   in <xref target="_XREF_FIPS.46.2"/><xref target="_XREF_FIPS.74"/><xref target="_XREF_FIPS.81"/>. <xref target="_XREF_Schneier96"/> provides a general
   description of Cipher Block Chaining Mode, a mode which is applicable
   to several encryption algorithms.
</t>
<t>
   As specified in this memo, DES-CBC is not an authentication
   mechanism. [Although DES-MAC, described in <xref target="_XREF_Schneier96"/> amongst other
   places, does provide authentication, DES-MAC is not discussed here.]
</t>
<t>
   For further information on how the various pieces of ESP fit together
   to provide security services, refer to <xref target="_XREF_ESP"/> and <xref target="_XREF_road"/>.
   The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
   &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,  &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this
   document are to be interpreted as described in <xref target="_XREF_RFC.2119"/>.
</t>
</section>
<!-- RFC original section: (2.) -->
<section title="Algorithm and Mode">
<t>
   DES-CBC is a symmetric secret-key block algorithm. It has a block
   size of 64 bits.
</t>
<t>
   <xref target="_XREF_FIPS.46.2"/><xref target="_XREF_FIPS.74"/> and <xref target="_XREF_FIPS.81"/> describe the DES algorithm, while
   <xref target="_XREF_Schneier96"/> provides a good description of CBC mode.
</t>
<!-- RFC original section: (2.1) -->
<section title="Performance">
<t>
   Phil Karn has tuned DES-CBC software to achieve 10.45 Mbps with a 90
   MHz Pentium, scaling to 15.9 Mbps with a 133 MHz Pentium.  Other DES
   speed estimates may be found in <xref target="_XREF_Schneier96"/>.
</t>
</section>
</section>
<!-- RFC original section: (3.) -->
<section title="ESP Payload">
<t>
   DES-CBC requires an explicit Initialization Vector (IV) of 8 octets
   (64 bits).  This IV immediately precedes the protected (encrypted)
   payload. The IV MUST be a random value.
</t>
<t>
   Including the IV in each datagram ensures that decryption of each
   received datagram can be performed, even when some datagrams are
   dropped, or datagrams are re-ordered in transit.
</t>
<t>
   Implementation note:
<list>
<t>
      Common practice is to use random data for the first IV and the
      last 8 octets of encrypted data from an encryption process as the
      IV for the next encryption process; this logically extends the CBC
      across the packets. It also has the advantage of limiting the
      leakage of information from the random number genrator. No matter
      which mechnism is used, the receiver MUST NOT assume any meaning
      for this value, other than that it is an IV.
</t>
<t>
      To avoid ECB encryption of very similar plaintext blocks in
      different packets, implementations MUST NOT use a counter or other
      low-Hamming distance source for IVs.
</t></list>
</t>
<t>
   The payload field, as defined in <xref target="_XREF_ESP"/>, is broken down according to
   the following diagram:
</t>
<figure><artwork>
      +---------------+---------------+---------------+---------------+
      |                                                               |
      +                   Initialization Vector (IV)                  +
      |                                                               |
      +---------------+---------------+---------------+---------------+
      |                                                               |
      ~              Encrypted Payload (variable length)              ~
      |                                                               |
      +---------------------------------------------------------------+
       1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
</artwork></figure>
<!-- RFC original section: (3.1) -->
<section title="Block Size and Padding">
<t>
   The DES-CBC algorithm described in this document MUST use a block
   size of 8 octets (64 bits).
</t>
<t>
   When padding is required, it MUST be done according to the
   conventions specified in <xref target="_XREF_ESP"/>.
</t>
</section>
</section>
<!-- RFC original section: (4.) -->
<section title="Key Material">
<t>
   DES-CBC is a symmetric secret key algorithm. The key size is 64-bits.
   [It is commonly known as a 56-bit key as the key has 56 significant
   bits; the least significant bit in every byte is the parity bit.]
</t>
<t>
   <xref target="_XREF_arch"/> describes the general mechanism to derive keying material for
   the ESP transform. The derivation of the key from some amount of
   keying material does not differ between the manually- and
   automatically-keyed security associations.
</t>
<t>
   This mechanism MUST derive a 64-bit key value for use by this cipher.
   The mechanism will derive raw key values, the derivation process
   itself is not responsible for handling parity or weak key checks.
</t>
<t>
   Weak key checks SHOULD be performed. If such a key is found, the key
   SHOULD be rejected and a new SA requested.
</t>
<t>
   Implementation note:
<list>
<t>
      If an implementation chooses to do weak key checking, it should
      recognize that the known weak keys [FIPS74] have been adjusted for
      parity. Otherwise the handling of parity is a local issue.
</t></list>
</t>
<t>
   A strong pseudo-random function MUST be used to generate the required
   key. For a discussion on this topic, reference [RFC1750].
</t>
<!-- RFC original section: (4.1) -->
<section title="Weak Keys">
<t>
   DES has 16 known weak keys, including so-called semi-weak keys.  The
   list of weak keys can be found in [FIPS74].
</t>
</section>
<!-- RFC original section: (4.2) -->
<section title="Key Lifetime">
<t>
   <xref target="_XREF_Blaze96"/> discusses the costs and key recovery time for brute force
   attacks. It presents various combinations of total cost/time to
   recover a key/cost per key recovered for 40-bit and 56-bit DES keys,
   based on late 1995 estimates.
</t>
<t>
   While a brute force search of a 56-bit DES keyspace can be considered
   infeasable for the so-called casual hacker, who is simply using spare
   CPU cycles or other low-cost resources, it is within reach of someone
   willing to spend a bit more money.
</t>
<t>
   For example, for a cost of $300,000, a 56-bit DES key can be
   recovered in an average of 19 days using off-the-shelf technology and
   in only 3 hours using a custom developed chip.
</t>
<t>
   It should be noted that there are other attacks which can recover the
   key faster, that brute force attacks are considered the &quot;worst case&quot;,
   although the easiest to implement.
</t>
<t>
   <xref target="_XREF_Wiener94"/> also discusses a $1M machine which can break a DES key in
   3.5 hours (1993 estimates), using a known-plaintext attack. As
   discussed in the Security Considerations section, a known plaintext
   attack is reasonably likely.
</t>
<t>
   It should also be noted that over time, the total and average search
   costs as well as the average key recovery time will continue to drop.
</t>
<t>
   While the above does not provide specific recommendations for key
   lifetime, it does reinforce the point that for a given application
   the desired key lifetime is dependent upon the perceived threat (an
   educated guess as to the amount of resources available to the
   attacker) relative to the worth of the data to be protected.
</t>
<t>
   While there are no recommendations for volume-based lifetimes made
   here, it shoud be noted that given sufficient volume there is an
   increased probabilty that known plaintext can be accumulated.
</t>
</section>
</section>
<!-- RFC original section: (5.) -->
<section title="Interaction with Authentication Algorithms">
<t>
   As of this writing, there are no known issues which preclude the use
   of the DES-CBC algorithm with any specific authentication algorithm.
</t>
</section>
<!-- RFC original section: (6.) -->
<section title="Security Considerations">
<t>
   [Much of this section was originally written by William Allen Simpson
   and Perry Metzger.]
</t>
<t>
   Users need to understand that the quality of the security provided by
   this specification depends completely on the strength of the DES
   algorithm, the correctness of that algorithm&apos;s implementation, the
   security of the Security Association management mechanism and its
   implementation, the strength of the key <xref target="_XREF_CN94"/>, and upon the
   correctness of the implementations in all of the participating nodes.
</t>
<t>
   <xref target="_XREF_Bell95"/> and <xref target="_XREF_Bell96"/> describe a cut and paste splicing attack which
   applies to all Cipher Block Chaining algorithms. This attack can be
   addressed with the use of an authentication mechanism.
</t>
<t>
   The use of the cipher mechanism without any corresponding
   authentication mechanism is strongly discouraged. This cipher can be
   used in an ESP transform that also includes authentication; it can
   also be used in an ESP transform that doesn&apos;t include authentication
   provided there is an companion AH header. Refer to <xref target="_XREF_ESP"/>, <xref target="_XREF_AH"/>,
   <xref target="_XREF_arch"/>, and <xref target="_XREF_road"/> for more details.
</t>
<t>
   When the default ESP padding is used, the padding bytes have a
   predictable value.  They provide a small measure of tamper detection
   on their own block and the previous block in CBC mode.  This makes it
   somewhat harder to perform splicing attacks, and avoids a possible
   covert channel.  This small amount of known plaintext does not create
   any problems for modern ciphers.
</t>
<t>
   At the time of writing of this document, <xref target="_XREF_BS93"/> demonstrated a
   differential cryptanalysis based chosen-plaintext attack requiring
   2^47 plaintext-ciphertext pairs, where the size of a pair is the size
   of a DES block (64 bits). <xref target="_XREF_Matsui94"/> demonstrated a linear
   cryptanalysis based known-plaintext attack requiring only 2^43
   plaintext-ciphertext pairs.  Although these attacks are not
   considered practical, they must be taken into account.
</t>
<t>
   More disturbingly, <xref target="_XREF_Wiener94"/> has shown the design of a DES cracking
   machine costing $1 Million that can crack one key every 3.5 hours.
   This is an extremely practical attack.
</t>
<t>
   One or two blocks of known plaintext suffice to recover a DES key.
   Because IP datagrams typically begin with a block of known and/or
   guessable header text, frequent key changes will not protect against
   this attack.
   It is suggested that DES is not a good encryption algorithm for the
   protection of even moderate value information in the face of such
   equipment.  Triple DES is probably a better choice for such purposes.
</t>
<t>
   However, despite these potential risks, the level of privacy provided
   by use of ESP DES-CBC in the Internet environment is far greater than
   sending the datagram as cleartext.
</t>
<t>
   The case for using random values for IVs has been refined with the
   following summary provided by Steve Bellovin. Refer to <xref target="_XREF_Bell97"/> for
   further information.
<list>
<t>
      &quot;The problem arises if you use a counter as an IV, or some other
      source with a low Hamming distance between successive IVs, for
      encryption in CBC mode.  In CBC mode, the &quot;effective plaintext&quot;
      for an encryption is the XOR of the actual plaintext and the
      ciphertext of the preceeding block.  Normally, that&apos;s a random
      value, which means that the effective plaintext is quite random.
      That&apos;s good, because many blocks of actual plaintext don&apos;t change
      very much from packet to packet, either.
</t>
<t>
      For the first block of plaintext, though, the IV takes the place
      of the previous block of ciphertext.  If the IV doesn&apos;t differ
      much from the previous IV, and the actual plaintext block doesn&apos;t
      differ much from the previous packet&apos;s, then the effective
      plaintext won&apos;t differ much, either.  This means that you have
      pairs of ciphertext blocks combined with plaintext blocks that
      differ in just a few bit positions.  This can be a wedge for
      assorted cryptanalytic attacks.&quot;
</t></list>
</t>
<t>
   The discussion on IVs has been updated to require that an
   implementation not use a low-Hamming distance source for IVs.
</t>
</section>
<!-- RFC original section: (7.) -->
<section title="References (BOILERPLATE)">
<t>
This RFC contained boilerplate in this section which has been moved
to the RFC2223-compliant unnumbered section &quot;References.&quot;
</t>
</section>
<!-- RFC original section: (8.) -->
<section title="Acknowledgments">
<t>
   Much of the information provided here originated with various ESP-DES
   documents authored by Perry Metzger and William Allen Simpson,
   especially the Security Considerations section.
</t>
<t>
   This document is also derived in part from previous works by Jim
   Hughes, those people that worked with Jim on the combined DES-
   CBC+HMAC-MD5 ESP transforms, the ANX bakeoff participants, and the
   members of the IPsec working group.
</t>
<t>
   Thanks to Rob Glenn for assisting with the nroff formatting.
</t>
<t>
   The IPSec working group can be contacted via the IPSec working
   group&apos;s mailing list (ipsec@tis.com) or through its chairs:
<list>
<t>
     Robert Moskowitz
     International Computer Security Association
</t>
<t>
     EMail: rgm@icsa.net
</t>
<t>
     Theodore Y. Ts&apos;o
     Massachusetts Institute of Technology
</t>
<t>
     EMail: tytso@MIT.EDU
</t></list>
</t>
</section>
<!-- RFC original section: (9.) -->
<section title="Editors&apos; Addresses (BOILERPLATE)">
<t>
This RFC contained boilerplate in this section which has been moved
to the RFC2223-compliant unnumbered section &quot;Author&apos;s Address.&quot;
</t>
</section>
<!-- RFC original section: (10.) -->
<section title="Full Copyright Statement (BOILERPLATE)">
<t>
This RFC contained boilerplate in this section which has been moved
to the RFC2223-compliant unnumbered section &quot;Full Copyright Statement.&quot;
</t>
</section>
</middle>
<back>
<!-- BEGIN INCLUDE REFERENCES ** DO NOT REMOVE -->
<references>
<reference anchor="_XREF_Bell95">
<front>
<title abbrev="An Issue With DES-CBC When Used Without">An Issue With DES-CBC When Used Without Strong Integrity,  Presentation at the 32nd Internet Engineering Task Force, Danvers Massachusetts</title>
<author initials="S." surname="Bellovin" fullname="S. Bellovin">
<organization/>
</author>
<date month="April" year="1995"/>
</front>
</reference>
<reference anchor="_XREF_Bell96">
<front>
<title abbrev="Problem Areas for the IP Security">Problem Areas for the IP Security Protocols,  Proceedings of the Sixth Usenix Security Symposium</title>
<author initials="S." surname="Bellovin" fullname="S. Bellovin">
<organization/>
</author>
<date month="July" year="1996"/>
</front>
</reference>
<reference anchor="_XREF_Bell97" target="http://www.research.att.com/~smb/papers/probtxt.ps">
<front>
<title abbrev="Probable Plaintext Cryptanalysis of">Probable Plaintext Cryptanalysis of the IP Security Protocols,  Proceedings of the Symposium on Network and Distributed System Security, San Diego, CA, pp. 155-160, (also http://www.research.att.com/~smb/papers/probtxt.ps, pdf</title>
<author initials="S." surname="Bellovin" fullname="S. Bellovin">
<organization/>
</author>
<date month="February" year="1997"/>
</front>
</reference>
<reference anchor="_XREF_BS93">
<front>
<title abbrev="Differential Cryptanalysis of the Data">Differential Cryptanalysis of the Data Encryption Standard,  Berlin: Springer-Verlag</title>
<author initials="E." surname="Biham" fullname="E. Biham">
<organization/>
</author>
<author initials="A." surname="Shamir" fullname="A. Shamir">
<organization/>
</author>
<date month="" year="1993"/>
</front>
</reference>
<reference anchor="_XREF_Blaze96" target="http://www.bsa.org/policy/encryption/cryptographers.html">
<front>
<title abbrev="Minimal Key Lengths for Symmetric Ciphers">Minimal Key Lengths for Symmetric Ciphers to Provide Adequate Commercial Security,  currently available at http://www.bsa.org/policy/encryption/cryptographers.html</title>
<author initials="M." surname="Blaze" fullname="M. Blaze">
<organization/>
</author>
<author initials="W." surname="Diffie" fullname="W. Diffie">
<organization/>
</author>
<author initials="R." surname="Rivest" fullname="R. Rivest">
<organization/>
</author>
<author initials="B." surname="Schneier" fullname="B. Schneier">
<organization/>
</author>
<author initials="T." surname="Shimomura" fullname="T. Shimomura">
<organization/>
</author>
<author initials="E." surname="Thompson" fullname="E. Thompson">
<organization/>
</author>
<author initials="M." surname="Wiener" fullname="M. Wiener">
<organization/>
</author>
<date month="" year=""/>
</front>
</reference>
<reference anchor="_XREF_CN94">
<front>
<title abbrev="On Weak Keys and Weak Data:  Foiling">On Weak Keys and Weak Data:  Foiling the Two Nemeses,  Cryptologia, Vol. 18 No. 23 pp.  253-280</title>
<author initials="J.M." surname="Carroll" fullname="J.M. Carroll">
<organization/>
</author>
<author initials="S." surname="Nudiati" fullname="S. Nudiati">
<organization/>
</author>
<date month="July" year="1994"/>
</front>
</reference>
<reference anchor="_XREF_FIPS.46.2" target="http://www.itl.nist.gov/div897/pubs/fip46-2.htm">
<front>
<title abbrev="US National Bureau of Standards">US National Bureau of Standards, Data Encryption Standard Federal Information Processing Standard (FIPS) Publication 46-2, http://www.itl.nist.gov/div897/pubs/fip46-2.htm (supercedes FIPS-46-1</title>
<author>
<organization/>
</author>
<date month="December" year="1993"/>
</front>
</reference>
<reference anchor="_XREF_FIPS.74" target="http://www.itl.nist.gov/div897/pubs/fip74.htm">
<front>
<title abbrev="US National Bureau of Standards">US National Bureau of Standards, Guidelines for Implementing and Using the Data Encryption Standard Federal Information Processing Standard (FIPS) Publication 74, http://www.itl.nist.gov/div897/pubs/fip74.htm</title>
<author>
<organization/>
</author>
<date month="April" year="1981"/>
</front>
</reference>
<reference anchor="_XREF_FIPS.81" target="http://www.itl.nist.gov/div897/pubs/fip81.htm">
<front>
<title abbrev="US National Bureau of Standards">US National Bureau of Standards, DES Modes of Operation Federal Information Processing Standard (FIPS) Publication 81, http://www.itl.nist.gov/div897/pubs/fip81.htm</title>
<author>
<organization/>
</author>
<date month="December" year="1980"/>
</front>
</reference>
<reference anchor="_XREF_Matsui94">
<front>
<title abbrev="Linear Cryptanalysis method for DES Cipher">Linear Cryptanalysis method for DES Cipher,  Advances in Cryptology -- Eurocrypt &apos;93 Proceedings, Berlin:  Springer-Verlag</title>
<author initials="M." surname="Matsui" fullname="M. Matsui">
<organization/>
</author>
<date month="" year="1994"/>
</front>
</reference>
<reference anchor="_XREF_RFC.1750">
<front>
<title>Randomness Recommendations for Security</title>
<author initials="D." surname="Eastlake" fullname="D. Eastlake">
<organization/>
</author>
<author initials="S." surname="Crocker" fullname="S. Crocker">
<organization/>
</author>
<author initials="J." surname="Schiller" fullname="J. Schiller">
<organization/>
</author>
<date month="December" year="1994"/>
</front>
<seriesInfo>RFC 1750</seriesInfo>
</reference>
<reference anchor="_XREF_RFC.2119">
<front>
<title abbrev="Key words for use in RFCs to Indicate">Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials="S." surname="Bradner" fullname="S. Bradner">
<organization/>
</author>
<date month="March" year="1997"/>
</front>
<seriesInfo>BCP 14</seriesInfo>
<seriesInfo>RFC 2119</seriesInfo>
</reference>
<reference anchor="_XREF_Schneier96">
<front>
<title abbrev="Applied Cryptography Second Edition">Applied Cryptography Second Edition,  John Wiley &amp; Sons, New York, NY, ISBN 0-471-12845-7</title>
<author initials="B." surname="Schneier" fullname="B. Schneier">
<organization/>
</author>
<date month="" year="1996"/>
</front>
</reference>
<reference anchor="_XREF_Wiener94" target="ftp://ripem.msu.edu/pub/crypt/docs/des-key-search.ps">
<front>
<title abbrev="Efficient DES Key Search">Efficient DES Key Search,  School of Computer Science, Carleton University, Ottawa, Canada, TR-244, Presented at the Rump Session of Crypto &apos;93. [Reprinted in Practical Cryptography for Data Internetworks W.Stallings, IEEE Computer Society Press, pp.31-79 (1996).  Currently available at ftp://ripem.msu.edu/pub/crypt/docs/des-key-search.ps</title>
<author initials="M.J." surname="Wiener" fullname="M.J. Wiener">
<organization/>
</author>
<date month="May" year="1994"/>
</front>
</reference>
<reference anchor="_XREF_ESP">
<front>
<title>IP Encapsulating Security Payload (ESP</title>
<author initials="S." surname="Kent" fullname="S. Kent">
<organization/>
</author>
<author initials="R." surname="Atkinson" fullname="R. Atkinson">
<organization/>
</author>
<date month="November" year="1998"/>
</front>
<seriesInfo>RFC 2406</seriesInfo>
</reference>
<reference anchor="_XREF_AH">
<front>
<title>IP Authentication Header (AH</title>
<author initials="S." surname="Kent" fullname="S. Kent">
<organization/>
</author>
<author initials="R." surname="Atkinson" fullname="R. Atkinson">
<organization/>
</author>
<date month="November" year="1998"/>
</front>
<seriesInfo>RFC 2402</seriesInfo>
</reference>
<reference anchor="_XREF_arch">
<front>
<title abbrev="Security Architecture for the Internet">Security Architecture for the Internet Protocol</title>
<author initials="S." surname="Kent" fullname="S. Kent">
<organization/>
</author>
<author initials="R." surname="Atkinson" fullname="R. Atkinson">
<organization/>
</author>
<date month="November" year="1998"/>
</front>
<seriesInfo>RFC 2401</seriesInfo>
</reference>
<reference anchor="_XREF_road">
<front>
<title>IP Security Document Roadmap</title>
<author initials="R." surname="Thayer" fullname="R. Thayer">
<organization/>
</author>
<author initials="N." surname="Doraswamy" fullname="N. Doraswamy">
<organization/>
</author>
<author initials="R." surname="Glenn" fullname="R. Glenn">
<organization/>
</author>
<date month="November" year="1998"/>
</front>
<seriesInfo>RFC 2411</seriesInfo>
</reference>
</references>
<!-- END INCLUDE REFERENCES ** DO NOT REMOVE -->
</back>
</rfc>

