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-desx-00.txt < prev    next >
Text File  |  1997-07-03  |  20KB  |  607 lines

  1.  
  2.  
  3. Network Working Group                                        W A Simpson
  4. Internet Draft                                              [DayDreamer]
  5.                                                                R Baldwin
  6.                                                      [RSA Data Security]
  7. expires in six months                                          July 1997
  8.  
  9.  
  10.                      The ESP DES-XEX3-CBC Transform
  11.                     draft-ietf-ipsec-ciph-desx-00.txt
  12.  
  13.  
  14. Status of this Memo
  15.  
  16.    This document is an Internet-Draft.  Internet Drafts are working doc-
  17.    uments of the Internet Engineering Task Force (IETF), its Areas, and
  18.    its Working Groups.  Note that other groups may also distribute work-
  19.    ing documents as Internet Drafts.
  20.  
  21.    Internet Drafts are draft documents valid for a maximum of six
  22.    months, and may be updated, replaced, or obsoleted by other documents
  23.    at any time.  It is not appropriate to use Internet Drafts as refer-
  24.    ence material, or to cite them other than as a ``working draft'' or
  25.    ``work in progress.''
  26.  
  27.    To learn the current status of any Internet-Draft, please check the
  28.    ``1id-abstracts.txt'' listing contained in the internet-drafts Shadow
  29.    Directories on:
  30.  
  31.       ftp.is.co.za (Africa)
  32.       nic.nordu.net (Europe)
  33.       ds.internic.net (US East Coast)
  34.       ftp.isi.edu (US West Coast)
  35.       munnari.oz.au (Pacific Rim)
  36.  
  37.    Distribution of this memo is unlimited.
  38.  
  39. Abstract
  40.  
  41.    This document describes the "DESX" DES-XEX3-CBC block cipher trans-
  42.    form interface used with the IP Encapsulating Security Payload (ESP).
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. Simpson & Baldwin         expires in six months                 [Page i]
  55. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  56.  
  57.  
  58. 1.  Introduction
  59.  
  60.    The Encapsulating Security Payload (ESP) [RFC-1827x] provides confi-
  61.    dentiality for IP datagrams by encrypting the payload data to be pro-
  62.    tected.  This specification describes the ESP use of a variant of the
  63.    Cipher Block Chaining (CBC) mode of the US Data Encryption Standard
  64.    (DES) algorithm [FIPS-46, FIPS-46-1, FIPS-74, FIPS-81].
  65.  
  66.    This variant, also known as "DESX", processes each block three times,
  67.    each time with a different key [Kaliski96].  The first and last pass
  68.    are a simple and fast XOR.  This was originally proposed by Ron
  69.    Rivest in May of 1984 as a computationally cheap mechanism to protect
  70.    DES against exhaustive key-search attacks.
  71.  
  72.    Although XOR of a constant value over multiple blocks would not nor-
  73.    mally be considered cryptographically secure, the use of DES-CBC in
  74.    the middle provides a background of highly random internal chaining.
  75.    The XOR values are combined with these random blocks to provide a
  76.    modest improvement in strength.
  77.  
  78.    For an explanation of the use of CBC mode with this cipher, see [RFC-
  79.    wwww].
  80.  
  81.    For more explanation and implementation information for DESX, see
  82.    [Schneier95].
  83.  
  84.    This document assumes that the reader is familiar with the related
  85.    document "Security Architecture for the Internet Protocol"
  86.    [RFC-1825x], that defines the overall security plan for IP, and pro-
  87.    vides important background for this specification.
  88.  
  89.    In this document, the key words "MAY", "MUST", "recommended",
  90.    "required", and "SHOULD", are to be interpreted as described in
  91.    [RFC-2119].
  92.  
  93.  
  94. 1.1.  Availability
  95.  
  96.    The DESX algorithm has been previously described in [Kaliski96,
  97.    Schneier95].  This algorithm is not protected by either patent or
  98.    trade secret laws, though the DESX name is a trademark of RSA Data
  99.    Security, a wholly owned subsidary of Security Dynamics Inc.  Trade-
  100.    mark fair-use laws allow vendors to label a product as being compati-
  101.    ble with DESX.  An implementation of DESX is available in RSA's BSAFE
  102.    cryptography toolkit and interoperable implementations have been cre-
  103.    ated outside of the United States.
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Simpson & Baldwin         expires in six months                 [Page 1]
  110. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  111.  
  112.  
  113. 1.2.  Performance
  114.  
  115.    The additional computational cost beyond DES is negligible.
  116.  
  117.  
  118. 2.  Description
  119. 2.1.  Block Size
  120.  
  121.    The US Data Encryption Standard (DES) algorithm operates on blocks of
  122.    64-bits (8 bytes).  This often requires padding before encrypting,
  123.    and subsequent removal of padding after decrypting.
  124.  
  125.    The output is the same number of bytes that are input.  This facili-
  126.    tates in-place encryption and decryption.
  127.  
  128.  
  129. 2.2.  Mode
  130.  
  131.                       P1             P2             Pi
  132.                       |              |              |
  133.                IV->->(X)    +>->->->(X)    +>->->->(X)
  134.                       |     ^        |     ^        |
  135.                       v     ^        v     ^        v
  136.                k1->->(X)    ^ k1->->(X)    ^ k1->->(X)
  137.                       |     ^        |     ^        |
  138.                       v     ^        v     ^        v
  139.                    +-----+  ^     +-----+  ^     +-----+
  140.                k2->|  E  |  ^ k2->|  E  |  ^ k2->|  E  |
  141.                    +-----+  ^     +-----+  ^     +-----+
  142.                       |     ^        |     ^        |
  143.                       v     ^        v     ^        v
  144.                k3->->(X)    ^ k3->->(X)    ^ k3->->(X)
  145.                       |     ^        |     ^        |
  146.                       +>->->+        +>->->+        +>->->
  147.                       |              |              |
  148.                       C1             C2             Ci
  149.  
  150.    The DES-XEX3-CBC algorithm is a simple variant of the DES-CBC algo-
  151.    rithm [RFC-wwww, RFC-1829x].
  152.  
  153.    In DES-XEX3-CBC, an Initialization Vector (IV) is XOR'd with the
  154.    first 64-bit (8 byte) plaintext block (P1), and with a block-sized
  155.    key (Xk1).  A keyed DES encryption (Ek2) is followed by another XOR
  156.    (Xk3), and generates the ciphertext (C1) for the block.  Each itera-
  157.    tion uses an independant key: k1, k2 and k3.
  158.  
  159.    For successive blocks, the previous ciphertext block is XOR'd with
  160.    the current plaintext (Pi).  The keyed DES-XEX3 encryption function
  161.  
  162.  
  163.  
  164. Simpson & Baldwin         expires in six months                 [Page 2]
  165. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  166.  
  167.  
  168.    generates the ciphertext (Ci) for that block.
  169.  
  170.    To decrypt, the order of the functions is reversed: XOR with k3,
  171.    decrypt with k2, XOR with k1, and XOR the previous ciphertext block.
  172.  
  173.  
  174. 2.3.  Interaction with Authentication
  175.  
  176.    There is no known interaction of DES with any currently specified
  177.    Authenticator algorithm.  Never-the-less, any Authenticator MUST use
  178.    a separate and independently generated key.
  179.  
  180.  
  181. 3.  Initialization Vector
  182.  
  183.    DES-XEX3-CBC requires an Initialization Vector (IV) that is 64-bits
  184.    (8 bytes) in length [RFC-wwww].
  185.  
  186.    By default, the 64-bit IV is generated from the 32-bit SPI field fol-
  187.    lowed by (concatenated with) the 32-bit Sequence Number field.  Then,
  188.    the bit-wise complement of the 32-bit Sequence Number value is XOR'd
  189.    with the first 32-bits (SPI).
  190.  
  191.       (SPI ^ -SN) || SN
  192.  
  193.    Alternative IV generation techniques MAY be specified when dynami-
  194.    cally configured via a key management protocol.
  195.  
  196.    Security Notes:
  197.  
  198.       In a dynamic environment, the same data stream might be sent with
  199.       more than one key.  Including the changed SPI in the IV generation
  200.       prevents analysis based on common leading blocks.
  201.  
  202.       Using the Sequence Number provides an easy method for preventing
  203.       IV repetition, and is sufficiently robust for practical use with
  204.       the DES algorithm.  Inclusion of the bit-wise complement ensures
  205.       that Sequence Number bit changes are reflected twice in the IV.
  206.  
  207.  
  208. 4.  Keys
  209.  
  210.    The secret DES-XEX3 key shared between the communicating parties is
  211.    effectively 184-bits long.  This key consists of three independent
  212.    quantities: a 64-bit sub-key used by an XOR, a 56-bit sub-key used by
  213.    the DES algorithm, and another 64-bit sub-key used by an XOR.  The
  214.    middle 56-bit sub-key is stored as a 64-bit (8 byte) quantity, with
  215.    the least significant bit of each byte used as a parity bit.
  216.  
  217.  
  218.  
  219. Simpson & Baldwin         expires in six months                 [Page 3]
  220. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  221.  
  222.  
  223. 4.1.  Weak Keys
  224.  
  225.    DES has 64 known weak keys, including so-called semi-weak keys and
  226.    possibly-weak keys [Schneier95, pp 280-282].  Implementations SHOULD
  227.    take care not to select weak keys [CN94], although the likelihood of
  228.    picking one at random is negligible.
  229.  
  230.  
  231. 4.2.  Manual Key Management
  232.  
  233.    When configured manually, three independently generated keys are
  234.    required, in the order used for encryption, and 64-bits (8 bytes) are
  235.    configured for each individual key.
  236.  
  237.    Keys with incorrect parity SHOULD be rejected by the configuration
  238.    utility, ensuring that the keys have been correctly configured.
  239.  
  240.    Each key is examined sequentially, in the order used for encryption.
  241.    A key that is identical to a previous key MAY be rejected.  The 64
  242.    known weak DES keys [RFC-1829x] SHOULD be rejected.
  243.  
  244.  
  245. 4.3.  Automated Key Management
  246.  
  247.    When configured via a Security Association management protocol, three
  248.    independently generated keys are required, in the order used for
  249.    encryption, and 64-bits (8 bytes) are returned for each individual
  250.    key.
  251.  
  252.    The key manager MAY be required to generate the correct parity for
  253.    the DES key.  Alternatively, the least significant bit of each key
  254.    byte is ignored, or locally set to parity by the DES implementation.
  255.  
  256.    Each key is examined sequentially, in the order used for encryption.
  257.    A key that is identical to a previous key MUST be rejected.  The 64
  258.    known weak DES keys [RFC-1829x] (for the DES key) MUST be rejected.
  259.  
  260.  
  261. 4.4.  Refresh Rate
  262.  
  263.    To prevent differential and linear cryptanalysis of collisions [RFC-
  264.    wwww], no more than 2**32 plaintext blocks SHOULD be encrypted with
  265.    the same key.  Depending on the average size of the datagrams, the
  266.    key SHOULD be changed at least as frequently as 2**30 datagrams.
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Simpson & Baldwin         expires in six months                 [Page 4]
  275. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  276.  
  277.  
  278. 5.  ESP Alterations
  279. 5.1.  ESP Sequence Number
  280.  
  281.    The Sequence Number is a 32-bit (4 byte) unsigned counter.  This
  282.    field protects against replay attacks, and may also be used for syn-
  283.    chronization by stream or block-chaining ciphers.
  284.  
  285.    When configured manually, the first value sent SHOULD be a random
  286.    number.  The limited anti-replay security of the sequence of data-
  287.    grams depends upon the unpredictability of the values.
  288.  
  289.    When configured via an automated Security Association management pro-
  290.    tocol, the first value sent is 1, unless otherwise negotiated.
  291.  
  292.    Thereafter, the value is monotonically increased for each datagram
  293.    sent.  A replacement SPI SHOULD be established before the value
  294.    repeats.  That is, no more than 2**32 datagrams SHOULD be sent with
  295.    any single key.
  296.  
  297.  
  298. 5.2.  ESP Padding
  299.  
  300.    The Padding field may be zero or more bytes in length.
  301.  
  302.    Prior to encryption, this field is filled with a series of integer
  303.    values to align the Pad Length and Payload Type fields at the end of
  304.    a 64-bit (8 byte) block boundary (measured from the beginning of the
  305.    Transform Data).
  306.  
  307.    By default, each byte contains the index of the byte.  For example,
  308.    three pad bytes would contain the values 1, 2, 3.
  309.  
  310.    After decryption, this field MAY be examined for a valid series of
  311.    integer values.  Verification of the sequence of values is at the
  312.    discretion of the receiver.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. Simpson & Baldwin         expires in six months                 [Page 5]
  330. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  331.  
  332.  
  333. Operational Considerations
  334.  
  335.    The specification provides only a few manually configurable parame-
  336.    ters:
  337.  
  338.    SPI
  339.       Manually configured SPIs are limited in range to aid operations.
  340.       Automated SPIs are pseudo-randomly distributed throughout the
  341.       remaining 2**32 values.
  342.  
  343.       Default: 0 (none).  Range: 256 to 65,535.
  344.  
  345.    SPI LifeTime (SPILT)
  346.       Manually configured LifeTimes are generally measured in days.
  347.       Automated LifeTimes are specified in seconds.
  348.  
  349.       Default: 32 days (2,764,800 seconds).  Maximum: 182 days
  350.       (15,724,800 seconds).
  351.  
  352.    Replay Window
  353.       Long term replay prevention requires automated configuration.
  354.       This check must only be used with those peers that have imple-
  355.       mented this feature.
  356.  
  357.       Default: 0 (checking off).  Range: 32 to 256.
  358.  
  359.    Pad Values
  360.       All implementations use verifiable values.
  361.  
  362.       Also, some operations desire additional padding to inhibit traffic
  363.       analysis.
  364.  
  365.       Default: 7 (checking on).  Range: 7 to 255.
  366.  
  367.    Key
  368.       A 64-bit key, a 56-bit key with parity included as appropriate,
  369.       and another 64-bit key, are configured in order as a 192-bit quan-
  370.       tity.
  371.  
  372.    Each party configures a list of known SPIs and symmetric secret-keys.
  373.  
  374.    In addition, each party configures local policy that determines what
  375.    access (if any) is granted to the holder of a particular SPI.  For
  376.    example, a party might allow FTP, but prohibit Telnet.  Such consid-
  377.    erations are outside the scope of this document.
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384. Simpson & Baldwin         expires in six months                 [Page 6]
  385. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  386.  
  387.  
  388. Security Considerations
  389.  
  390.    Users need to understand that the quality of the security provided by
  391.    this specification depends completely on the strength of the DESX
  392.    algorithm, the correctness of that algorithm's implementation, the
  393.    security of the Security Association management mechanism and its
  394.    implementation, the strength of the key [CN94], and upon the correct-
  395.    ness of the implementations in all of the participating nodes.
  396.  
  397.    The padding bytes have a predictable value.  They provide a small
  398.    measure of tamper detection on their own block and the previous block
  399.    in CBC mode.  This makes it somewhat harder to perform splicing
  400.    attacks, and avoids a possible covert channel.  This small amount of
  401.    known plaintext does not create any problems for modern ciphers.
  402.  
  403.    It has been shown that DES-XEX3 is substantially stronger than DES
  404.    alone, as it is less amenable to brute force attack with an exhaus-
  405.    tive key search.  When the number of plaintext blocks are limited to
  406.    2**32 as recommended, the time complexity of the idealized random
  407.    permutation block cipher model is increased from an order 2**86 (for
  408.    DES) to 2**134 (for DES-EXE3) [Kilian96, Rogaway96].
  409.  
  410.    It should be noted that real cryptanalysis of DES-XEX3 might not use
  411.    brute force methods at all.  Instead, it might be performed using
  412.    variants on differential [BS93] or linear [Matsui94] cryptanalysis.
  413.    It has been estimated that differential cryptanalysis is increased
  414.    from 2**47 (for DES) to 2**61 chosen-plaintext blocks, and linear
  415.    cryptanalysis is increased from 2**43 (for DES) to 2**60 known-
  416.    plaintext blocks [Kaliski96].  Although these attacks are not consid-
  417.    ered practical, this offers only a small improvement over DES alone.
  418.  
  419.    It should also be noted that no encryption algorithm is permanently
  420.    safe from brute force attack, because of the increasing speed of mod-
  421.    ern computers.
  422.  
  423.    As with all cryptosystems, those responsible for applications with
  424.    substantial risk when security is breeched should pay close attention
  425.    to developments in cryptology, and especially cryptanalysis, and
  426.    switch to other transforms should DES-XEX3 prove weak.
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439. Simpson & Baldwin         expires in six months                 [Page 7]
  440. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  441.  
  442.  
  443. Acknowledgements
  444.  
  445.    Most of the text of this specification was derived from earlier work
  446.    by Perry Metzger and William Allen Simpson in multiple Request for
  447.    Comments.
  448.  
  449.    Use of DES-XEX3 was proposed by William Allen Simpson and various
  450.    other participants in the IETF IP Security Working Group in 1995 and
  451.    1996, but was prevented from publication through disregard of the
  452.    IETF Standards Process.
  453.  
  454.  
  455. References
  456.  
  457.    [BS93]   Biham, E., and Shamir, A., "Differential Cryptanalysis of
  458.             the Data Encryption Standard", Berlin: Springer-Verlag,
  459.             1993.
  460.  
  461.    [CN94]   Carroll, J.M., and Nudiati, S., "On Weak Keys and Weak Data:
  462.             Foiling the Two Nemeses", Cryptologia, Vol. 18 No. 23 pp.
  463.             253-280, July 1994.
  464.  
  465.    [FIPS-46]
  466.             US National Bureau of Standards, "Data Encryption Standard",
  467.             Federal Information Processing Standard (FIPS) Publication
  468.             46, January 1977.
  469.  
  470.    [FIPS-46-1]
  471.             US National Bureau of Standards, "Data Encryption Standard",
  472.             Federal Information Processing Standard (FIPS) Publication
  473.             46-1, January 1988.
  474.  
  475.    [FIPS-74]
  476.             US National Bureau of Standards, "Guidelines for Implement-
  477.             ing and Using the Data Encryption Standard", Federal Infor-
  478.             mation Processing Standard (FIPS) Publication 74, April
  479.             1981.
  480.  
  481.    [FIPS-81]
  482.             US National Bureau of Standards, "DES Modes of Operation"
  483.             Federal Information Processing Standard (FIPS) Publication
  484.             81, December 1980.
  485.  
  486.    [Kaliski96]
  487.             Kaliski, B., and Robshaw, M., "Multiple Encryption: Weighing
  488.             Security and Performance", Dr. Dobbs Journal, January 1996.
  489.  
  490.  
  491.  
  492.  
  493.  
  494. Simpson & Baldwin         expires in six months                 [Page 8]
  495. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  496.  
  497.  
  498.    [Kilian96]
  499.             Kilian J., and Rogaway, P., "How to protect DES against
  500.             exhaustive key search", Advances in Cryptology -- Crypto '96
  501.             Proceedings, Berlin: Springer-Verlag, 1996,
  502.             http://wwwcsif.cs.ucdavis.edu/~rogaway.
  503.  
  504.    [Matsui94]
  505.             Matsui, M., "Linear Cryptanalysis method for DES Cipher,"
  506.             Advances in Cryptology -- Eurocrypt '93 Proceedings, Berlin:
  507.             Springer-Verlag, 1994.
  508.  
  509.    [Rogaway96]
  510.             Rogaway, P., "The Security of DESX", CryptoBytes, v 2 n 2,
  511.             RSA Laboratories, Redwood City, CA, USA, Summer 1996.
  512.  
  513.    [RFC-1825x]
  514.             Atkinson, R., "Security Architecture for the Internet Proto-
  515.             col", Naval Research Laboratory, July 1995.
  516.  
  517.    [RFC-1827x]
  518.             Simpson, W., "IP Encapsulating Security Protocol (ESP) for
  519.             implementors",
  520.  
  521.    [RFC-1829x]
  522.             Karn, P., Metzger, P., Simpson, W.A., "The ESP DES-CBC
  523.             Transform", work in progress.
  524.  
  525.    [RFC-2119]
  526.             Bradner, S., "Key words for use in RFCs to Indicate Require-
  527.             ment Levels", BCP 14, Harvard University, March 1997.
  528.  
  529.    [RFC-wwww]
  530.             Simpson, W.A, "ESP with Cipher Block Chaining (CBC)", work
  531.             in progress.
  532.  
  533.    [Schneier95]
  534.             Schneier, B., "Applied Cryptography Second Edition", John
  535.             Wiley & Sons, New York, NY, 1995.  ISBN 0-471-12845-7.
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549. Simpson & Baldwin         expires in six months                 [Page 9]
  550. DRAFT                       ESP DES-XEX3-CBC                   July 1997
  551.  
  552.  
  553. Contacts
  554.  
  555.    Comments about this document should be discussed on the ipsec@tis.com
  556.    mailing list.
  557.  
  558.    Questions about this document can also be directed to:
  559.  
  560.       William Allen Simpson
  561.       DayDreamer
  562.       Computer Systems Consulting Services
  563.       1384 Fontaine
  564.       Madison Heights, Michigan  48071
  565.  
  566.           wsimpson@UMich.edu
  567.           wsimpson@GreenDragon.com (preferred)
  568.           bsimpson@MorningStar.com
  569.  
  570.  
  571.       Robert Baldwin
  572.       RSA Data Security Inc.
  573.       100 Marine Parkway
  574.       Redwood City, California  94065
  575.  
  576.           baldwin@rsa.com
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604. Simpson & Baldwin         expires in six months                [Page 10]
  605.  
  606.  
  607.