home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_i / draft-ietf-ipsec-ciph-des-expiv-00.txt < prev    next >
Text File  |  1997-07-02  |  16KB  |  432 lines

  1. Network Working Group                                IPsec Working Group
  2. INTERNET DRAFT                                                 C. Madson
  3. Expires in six months                                Cisco Systems, Inc.
  4.                                                             N. Doraswamy
  5.                                                       Bay Networks, Inc.
  6.                                                                July 1997
  7.  
  8.  
  9.                     The ESP DES-CBC Cipher Algorithm
  10.                             With Explicit IV
  11.                 <draft-ietf-ipsec-ciph-des-expiv-00.txt>
  12.  
  13.  
  14.  
  15.  
  16. Status of this Memo
  17.  
  18.    This document is a submission to the IETF Internet Protocol Security
  19.    (IPSEC) Working Group. Comments are solicited and should be addressed
  20.    to the working group mailing list (ipsec@tis.com) or to the editor.
  21.  
  22.    This document is an Internet-Draft.  Internet Drafts are working
  23.    documents of the Internet Engineering Task Force (IETF), its areas,
  24.    and its working Groups. Note that other groups may also distribute
  25.    working documents as Internet Drafts.
  26.  
  27.    Internet-Drafts draft documents are valid for a maximum of six months
  28.    and may be updated, replaced, or obsolete by other documents at any
  29.    time. It is inappropriate to use Internet-Drafts as reference
  30.    material or to cite them other than as "work in progress."
  31.  
  32.    To learn the current status of any Internet-Draft, please check the
  33.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  34.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  35.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  36.    ftp.isi.edu (US West Coast).
  37.  
  38.    Distribution of this memo is unlimited.
  39.  
  40. Abstract
  41.  
  42.    This document describes the use of the DES Cipher algorithm in Cipher
  43.    Block Chaining Mode, with an explicit IV, as a confidentiality
  44.    mechanism within the context of the IPSec Encapsulating Security
  45.    Payload (ESP).
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Madson, Doraswamy                                               [Page 1]
  59.  
  60. INTERNET DRAFT                 July 1997            Expires January 1998
  61.  
  62.  
  63. 1. Introduction
  64.  
  65.    This document describes the use of the DES Cipher algorithm in Cipher
  66.    Block Chaining Mode as a confidentiality mechanism within the context
  67.    of the Encapsulating Security Payload.
  68.  
  69.    DES is a symmetric block cipher algorithm. The algorithm is described
  70.    in [FIPS-46][FIPS-46-1][FIPS-74][FIPS-81]. [Simpson97a] provides a
  71.    general description of Cipher Block Chaining Mode, a mode which is
  72.    applicable to several encryption algorithms.
  73.  
  74.    As specified in this draft, DES-CBC is not an authentication
  75.    mechanism. [Although DES-MAC, described in [Schneier96] amongst other
  76.    places, does provide authentication, DES-MAC is not discussed here.]
  77.  
  78.    For further information on how the various pieces of ESP fit together
  79.    to provide security services, refer to [ESP] and [Thayer97a].
  80.  
  81.    In this document, the keywords "MAY", "MUST", "optional",
  82.    "recommended", "required", "SHOULD", and "SHOULD NOT", are to be
  83.    interpreted as described in [RFC-2119].
  84.  
  85. 2. Algorithm and Mode
  86.  
  87.    DES-CBC is a symmetric secret-key block algorithm. It has a block
  88.    size of 64 bits.
  89.  
  90.    [FIPS-46][FIPS-46-1][FIPS-74] and [FIPS-81] describe the DES
  91.    algorithm, while [Simpson97a] provides a good description of CBC
  92.    mode.
  93.  
  94. 2.1 Performance
  95.  
  96.    Phil Karn has tuned DES-CBC software to achieve 10.45 Mbps with a 90
  97.    MHz Pentium, scaling to 15.9 Mbps with a 133 MHz Pentium.  Other DES
  98.    speed estimates may be found in [Schneier96].
  99.  
  100. 3. ESP Payload
  101.  
  102.    DES-CBC requires an explicit Initialization Vector (IV) of 8 octets
  103.    (64 bits).  This IV immediately precedes the protected (encrypted)
  104.    payload. The IV SHOULD be chosen at random.
  105.  
  106.    Including the IV in each datagram ensures that decryption of each
  107.    received datagram can be performed, even when some datagrams are
  108.    dropped, or datagrams are re-ordered in transit.
  109.  
  110.    Implementation note:
  111.  
  112.       Common practice is to use random data for the first IV and the
  113.       last 8 octets of encrypted data from an encryption process as the
  114.       IV for the next encryption process; this logically extends the CBC
  115.       across the packets. It also has the advantage of limiting the
  116.       leakage of information from the random number genrator. No matter
  117.  
  118.  
  119.  
  120. Madson, Doraswamy                                               [Page 2]
  121.  
  122. INTERNET DRAFT                 July 1997            Expires January 1998
  123.  
  124.  
  125.       which mechnism is used, the receiver MUST NOT assume any meaning
  126.       for this value, other than that it is an IV.
  127.  
  128.    The payload field, as defined in [ESP], is broken down according to
  129.    the following diagram:
  130.  
  131.       +---------------+---------------+---------------+---------------+
  132.       |                                                               |
  133.       +                   Initialization Vector (IV)                  +
  134.       |                                                               |
  135.       +---------------+---------------+---------------+---------------+
  136.       |                                                               |
  137.       ~              Encrypted Payload (variable length)              ~
  138.       |                                                               |
  139.       +---------------------------------------------------------------+
  140.        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
  141.  
  142. 3.1 Block Size and Padding
  143.  
  144.    The DES-CBC algorithm described in this document MUST use a block
  145.    size of 8 octets (64 bits).
  146.  
  147.    When padding is required, it SHOULD be done according to the
  148.    conventions specified in [ESP].
  149.  
  150. 4. Key Material
  151.  
  152.    DES-CBC is a symmetric secret key algorithm. The key size is 64-bits.
  153.    [It is commonly known as a 56-bit key as the key has 56 significant
  154.    bits; these 56 bits are stored in an 8-byte (64- bit) value, where
  155.    each byte has seven significant bits from the 56-bit value and the
  156.    least significant bit is used as a parity bit.]
  157.  
  158.    [some document] describes the general mechanism to derive keying
  159.    material for the ESP transform. The derivation of the key from some
  160.    amount of keying material does not differ between the manually- and
  161.    automatically-keyed security associations.
  162.  
  163.    The mechanism MUST derive a 64-bit key value for use by this cipher.
  164.    This derived value MUST be adjusted for parity as necessary. Weak key
  165.    checks will be performed and << behavior to be defined>>
  166.  
  167. 4.1 Weak Keys
  168.  
  169.    DES has 64 known weak keys, including so-called semi-weak keys and
  170.    possibly-weak keys (from [Schneier96], shown here in hex with parity
  171.    bits):
  172.  
  173.       0101 0101  0101 0101
  174.       1f1f 1f1f  0e0e 0e0e
  175.       e0e0 e0e0  f1f1 f1f1
  176.       fefe fefe  fefe fefe
  177.  
  178.  
  179.  
  180.  
  181.  
  182. Madson, Doraswamy                                               [Page 3]
  183.  
  184. INTERNET DRAFT                 July 1997            Expires January 1998
  185.  
  186.  
  187.       semi-weak key pairs:
  188.  
  189.       01fe 01fe  01fe 01fe    fe01 fe01  fe01 fe01
  190.       1fe0 1fe0  0ef1 0ef1    e0f1 e0f1  f10e f10e
  191.       01e0 01e0  01f1 01f1    e001 e001  f101 f101
  192.       1ffe 1ffe  0efe 0efe    fe1f fe1f  fe0e fe0e
  193.       011f 011f  010e 010e    1f01 1f01  0e01 0e01
  194.       e0fe e0fe  f1fe f1fe    fee0 fee0  fef1 fef1
  195.  
  196.       possibly-weak keys:
  197.  
  198.       1f1f 0101  0e0e 0101    e001 01e0  f101 01f1
  199.       011f 1f01  010e 0e01    fe1f 01e0  fe0e 01f1
  200.       1f01 011f  0e01 010e    fe01 1fe0  fe01 0ef1
  201.       0101 1f1f  0101 0e0e    e01f 1fe0  f10e 0ef1
  202.       --------------------
  203.       e0e0 0101  f1f1 0101    fe01 01fe  fe01 01fe
  204.       fefe 0101  fefe 0101    e01f 01fe  f10e 01fe
  205.       fee0 1f01  fef1 0e01    e001 1ffe  f101 0efe
  206.       e0fe 1f01  f1fe 0e01    fe1f 1ffe  fe0e 0efe
  207.                               --------------------
  208.       fee0 011f  fef1 010e    1ffe 01e0  0efe 01f1
  209.       e0fe 011f  f1fe 010e    01fe 1fe0  01fe 0ef1
  210.       e0e0 1f1f  f1f1 0e0e    1fe0 01fe  0ef1 01fe
  211.       fefe 1f1f  fefe 0e0e    01e0 1ffe  01f1 0efe
  212.  
  213.  
  214.       fe1f e001  fe0e f101    0101 e0e0  0101 f1f1
  215.       e01f fe01  f10e fe01    1f1f e0e0  0e0e f1f1
  216.       fe01 e01f  fe01 f1e0    1f01 fee0  0e01 fef1
  217.       e001 fe1f  f101 fe0e    011f fee0  010e fef1
  218.       --------------------
  219.       01e0 e001  01f1 f101    1f01 e0fe  0e01 f1fe
  220.       1ffe e001  0efe f101    011f e0fe  010e f1fe
  221.       1fe0 fe01  0ef1 fe01    0101 fefe  0101 fefe
  222.       01fe fe01  01fe fe01    1f1f fefe  0e0e fefe
  223.                               --------------------
  224.       1fe0 e01f  0ef1 f10e    fefe e0e0  fefe f1f1
  225.       01fe e01f  01fe f10e    e0fe fee0  f1fe fef1
  226.       01e0 fe1f  01f1 fe0e    fee0 e0fe  fef1 f1fe
  227.       1ffe fe1f  0efe fe0e    e0e0 fefe  f1f1 fefe
  228.  
  229.    Implementations SHOULD take care not to select weak keys [CN94],
  230.    although the likelihood of picking one at random is negligible.
  231.  
  232. 4.2 Key Lifetime
  233.  
  234.    [Simpson97a] discusses collisions, which can provide information that
  235.    an attacker can use to recover the key.
  236.  
  237.    [***need reference info here***] The maximum key lifetime is 2**32
  238.    64-byte blocks. The recommended key lifetime is ***** bytes and *****
  239.    seconds.
  240.  
  241.  
  242.  
  243.  
  244. Madson, Doraswamy                                               [Page 4]
  245.  
  246. INTERNET DRAFT                 July 1997            Expires January 1998
  247.  
  248.  
  249. 5. Interaction with Authentication Algorithms
  250.  
  251.    As of this writing, there are no known issues which preclude the use
  252.    of the DES-CBC algorithm with any specific authentication algorithm.
  253.  
  254. 6. Security Considerations
  255.  
  256.    [Much of this section was originally written by William Allen Simpson
  257.    and Perry Metzger.]
  258.  
  259.    Users need to understand that the quality of the security provided by
  260.    this specification depends completely on the strength of the DES
  261.    algorithm, the correctness of that algorithm's implementation, the
  262.    security of the Security Association management mechanism and its
  263.    implementation, the strength of the key [CN94], and upon the correct-
  264.    ness of the implementations in all of the participating nodes.
  265.  
  266.    The security considerations section of [Simpson97a] discusses the cut
  267.    and paste splicing attack described by [Bell95, Bell96], as it
  268.    applies to all Cipher Block Chaining algorithms.
  269.  
  270.    The use of the cipher mechanism without any corresponding
  271.    authentication mechanism is strongly discouraged. This cipher can be
  272.    used in an ESP transform that also includes authentication; it can
  273.    also be used in an ESP transform that doesn't include authentication
  274.    provided there is an companion AH header. Refer to [ESP], [AH],
  275.    [arch], and [Thayer97a] for more details.
  276.  
  277.    [***the following paragraph edited slightly***] If self-describing
  278.    padding is used, the padding bytes have a predictable value.  They
  279.    provide a small measure of tamper detection on their own block and
  280.    the previous block in CBC mode.  This makes it somewhat harder to
  281.    perform splicing attacks, and avoids a possible covert channel.  This
  282.    small amount of known plaintext does not create any problems for
  283.    modern ciphers.  [*** ISSUE: can't assume that SDP is in use, so the
  284.    bytes won't be predictable***]
  285.  
  286.    [***the following paragraph edited slightly***] At the time of
  287.    writing of this document, [BS93] demonstrated a dif- ferential
  288.    cryptanalysis based chosen-plaintext attack requiring 2^47
  289.    plaintext-ciphertext pairs, where the size of a pair is the size of a
  290.    DES block (64 bits). [Matsui94] demonstrated a linear cryptanalysis
  291.    based known-plaintext attack requiring only 2^43 plain- text-
  292.    ciphertext pairs.  Although these attacks are not considered
  293.    practical, they must be taken into account.
  294.  
  295.    More disturbingly, [Weiner94] has shown the design of a DES cracking
  296.    machine costing $1 Million that can crack one key every 3.5 hours.
  297.    This is an extremely practical attack.
  298.  
  299.    One or two blocks of known plaintext suffice to recover a DES key.
  300.    Because IP datagrams typically begin with a block of known and/or
  301.    guessable header text, frequent key changes will not protect against
  302.    this attack.
  303.  
  304.  
  305.  
  306. Madson, Doraswamy                                               [Page 5]
  307.  
  308. INTERNET DRAFT                 July 1997            Expires January 1998
  309.  
  310.  
  311.    It is suggested that DES is not a good encryption algorithm for the
  312.    protection of even moderate value information in the face of such
  313.    equipment.  Triple DES is probably a better choice for such purposes.
  314.  
  315.    However, despite these potential risks, the level of privacy provided
  316.    by use of ESP DES-CBC in the Internet environment is far greater than
  317.    sending the datagram as cleartext.
  318.  
  319. 7. References
  320.  
  321.       [Bell95]  Bellovin, S., "An Issue With DES-CBC When Used Without
  322.       Strong Integrity", Presentation at the 32nd Internet Engineering
  323.       Task Force, Danvers Massachusetts, April 1995.
  324.  
  325.       [Bell96]  Bellovin, S., "Problem Areas for the IP Security Protocols",
  326.       Proceedings of the Sixth Usenix Security Symposium, July 1996.
  327.  
  328.       [BS93]  Biham, E., and Shamir, A., "Differential Cryptanalysis of
  329.       the Data Encryption Standard", Berlin: Springer-Verlag, 1993.
  330.  
  331.       [CN94]  Carroll, J.M., and Nudiati, S., "On Weak Keys and Weak Data:
  332.       Foiling the Two Nemeses", Cryptologia, Vol. 18 No. 23 pp.
  333.       253-280, July 1994.
  334.  
  335.       [FIPS-46]  US National Bureau of Standards, "Data Encryption Standard",
  336.       Federal Information Processing Standard (FIPS) Publication 46,
  337.       January 1977.
  338.  
  339.       [FIPS-46-1]  US National Bureau of Standards, "Data Encryption Standard",
  340.       Federal Information Processing Standard (FIPS) Publication 46-1,
  341.       January 1988.
  342.  
  343.       [FIPS-74]  US National Bureau of Standards, "Guidelines for
  344.       Implementing and Using the Data Encryption Standard", Federal
  345.       Information Processing Standard (FIPS) Publication 74, April 1981.
  346.  
  347.       [FIPS-81]  US National Bureau of Standards, "DES Modes of Operation"
  348.       Federal Information Processing Standard (FIPS) Publication 81,
  349.       December 1980.
  350.  
  351.       [Matsui94]  Matsui, M., "Linear Cryptanalysis method for DES Cipher,"
  352.       Advances in Cryptology -- Eurocrypt '93 Proceedings, Berlin:
  353.       Springer-Verlag, 1994.
  354.  
  355.       [RFC-2119]  Bradner, S., "Key words for use in RFCs to Indicate
  356.       Requirement Levels", RFC-2119/BCP 14, March, 1997.
  357.  
  358.       [Schneier96] Schneier, B., "Applied Cryptography Second Edition",
  359.       John Wiley & Sons, New York, NY, 1996.  ISBN 0-471-12845-7.
  360.  
  361.       [Weiner94]  Wiener, M.J., "Efficient DES Key Search", School of
  362.       Computer Science, Carleton University, Ottawa, Canada, TR-244, May
  363.       1994.  Presented at the Rump Session of Crypto '93.
  364.  
  365.  
  366.  
  367.  
  368. Madson, Doraswamy                                               [Page 6]
  369.  
  370. INTERNET DRAFT                 July 1997            Expires January 1998
  371.  
  372.  
  373.       [ESP]  Kent, S., Atkinson, R., "IP Encapsulating Security Payload
  374.       (ESP)", draft-ietf-ipsec-esp-04.txt, work in progress, May 30, 1997.
  375.  
  376.       [AH]  Kent, S., Atkinson, R., "IP Authentication Header (AH)",
  377.       draft-ietf-ipsec-auth-05.txt, work in progress, May 30, 1997.
  378.  
  379.       [arch] the security architecture doc
  380.  
  381.       [Simpson97a] Bill's CBC doc
  382.  
  383.       [Thayer97a] the framework draft
  384.  
  385. 8. Acknowledgments
  386.  
  387.    Much of the information provided here originated with various ESP-DES
  388.    documents authored by Perry Metzger and William Allen Simpson,
  389.    including the data entry of the known weak key values, and especially
  390.    the Security Considerations section.
  391.  
  392.    This document is also derived in part from previous works by Jim
  393.    Hughes, those people that worked with Jim on the combined DES-
  394.    CBC+HMAC-MD5 ESP transforms, the ANX bakeoff participants, and the
  395.    members of the IPsec working group.
  396.  
  397.    Thanks also to Rob Glenn for assisting with the nroff formatting.
  398.  
  399.    The IPSec working group can be contacted via the IPSec working
  400.    group's mailing list (ipsec@tis.com) or through its chairs:
  401.  
  402.         Robert Moskowitz
  403.         <rgm@chrysler.com>
  404.         Chrysler Corporation
  405.  
  406.         Theodore Y. Ts'o
  407.         <tytso@MIT.EDU>
  408.         Massachusetts Institute of Technology
  409.  
  410.  
  411. 9. Editors' Addresses
  412.  
  413.         Cheryl Madson
  414.         <cmadson@cisco.com>
  415.         Cisco Systems, Inc.
  416.  
  417.         Naganand Doraswamy
  418.         <naganand@baynetworks.com>
  419.         Bay Networks, Inc.
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430. Madson, Doraswamy                                               [Page 7]
  431.  
  432.