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-3des-expiv-00.txt < prev    next >
Text File  |  1997-07-21  |  13KB  |  387 lines

  1. Internet Engineering Task Force                             R. Pereira
  2. IP Security Working Group                         TimeStep Corporation
  3. Internet Draft                                               R. Thayer
  4. Expires in six months                     Sable Technology Corporation
  5.                                                          July 17, 1997
  6.  
  7.  
  8.  
  9.            The ESP 3DES-CBC Algorithm Using an Explicit IV
  10.               <draft-ietf-ipsec-ciph-3des-expiv-00.txt>
  11.  
  12.  
  13.  
  14. Status of this Memo
  15.  
  16.    This document is a submission to the IETF Internet Protocol
  17.    Security (IPSEC) Working Group. Comments are solicited and should
  18.    be addressed to the working group mailing list (ipsec@tis.com) or
  19.    to the editor.
  20.  
  21.    This document is an Internet-Draft.  Internet Drafts are working
  22.    documents of the Internet Engineering Task Force (IETF), its areas,
  23.    and its working Groups. Note that other groups may also distribute
  24.    working documents as Internet Drafts.
  25.  
  26.    Internet-Drafts draft documents are valid for a maximum of six
  27.    months and may be updated, replaced, or obsolete by other documents
  28.    at any time. It is inappropriate to use Internet-Drafts as
  29.    reference material or to cite them other than as "work in
  30.    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 "Triple" DES-EDE3-CBC block cipher
  43.    algorithm used with the IP Encapsulating Security Payload (ESP).
  44.    Use of an explicit IV is described.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. R. Pereira, R. Thayer                                         [Page 1]
  56.  
  57. Internet Draft draft-ietf-ipsec-ciph-3des-expiv-00.doc   July 17, 1997
  58.  
  59.  
  60. Table of Contents
  61.  
  62.    1. Introduction...................................................2
  63.      1.1 Specification of Requirements...............................2
  64.    2. Cipher Algorithm...............................................2
  65.      2.1 Mode........................................................3
  66.      2.2 Performance.................................................4
  67.    3. Key Sizes......................................................4
  68.      3.1 Weak Keys...................................................4
  69.    4. ESP Payload....................................................4
  70.      4.1 Block Size and Padding......................................5
  71.      4.2 Interaction with Authentication Algorithms..................5
  72.    5. Keying Material................................................5
  73.    6. Security Considerations........................................5
  74.    7. References.....................................................6
  75.    8. Acknowledgments................................................6
  76.    9. Editors' Addresses.............................................7
  77.  
  78. 1. Introduction
  79.  
  80.    The Encapsulating Security Payload (ESP) [Kent97] provides
  81.    confidentiality for IP datagrams by encrypting the payload data to
  82.    be protected.  This specification describes the ESP use of 3DES.
  83.  
  84.    It is assumed that the reader is familiar with the terms and
  85.    concepts described in the "Security Architecture for the Internet
  86.    Protocol" [Atkinson95], "IP Security Document Roadmap" [Thayer97],
  87.    and "IP Encapsulating Security Payload (ESP)" [Kent97] documents.
  88.  
  89.    Furthermore, this document is a companion to [Kent97] and MUST be
  90.    read in its context.
  91.  
  92. 1.1 Specification of Requirements
  93.  
  94.    The keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD
  95.    NOT", and "MAY" that appear in this document are to be interpreted
  96.    as described in [Bradner97].
  97.  
  98. 2. Cipher Algorithm
  99.  
  100.    This is a variant of the Cipher Block Chaining (CBC) mode of the US
  101.    Data Encryption Standard (DES) algorithm [FIPS-46].
  102.  
  103.    This variant, colloquially known as "Triple DES", processes each
  104.    block three times, each time with a different key.  This technique
  105.    of using more than one DES operation was proposed in [Tuchman79].
  106.  
  107.  
  108.  
  109.  
  110. R. Pereira, R. Thayer                                         [Page 2]
  111.  
  112. Internet Draft draft-ietf-ipsec-ciph-3des-expiv-00.doc   July 17, 1997
  113.  
  114.  
  115.    For more explanation and implementation information for Triple DES,
  116.    see [Schneier95].
  117.  
  118. 2.1 Mode
  119.  
  120.                         P1             P2             Pi
  121.                          |              |              |
  122.                   IV->->(X)    +>->->->(X)    +>->->->(X)
  123.                          v     ^        v     ^        v
  124.                       +-----+  ^     +-----+  ^     +-----+
  125.                   k1->|  E  |  ^ k1->|  E  |  ^ k1->|  E  |
  126.                       +-----+  ^     +-----+  ^     +-----+
  127.                          |     ^        |     ^        |
  128.                          v     ^        v     ^        v
  129.                       +-----+  ^     +-----+  ^     +-----+
  130.                   k2->|  D  |  ^ k2->|  D  |  ^ k2->|  D  |
  131.                       +-----+  ^     +-----+  ^     +-----+
  132.                          |     ^        |     ^        |
  133.                          v     ^        v     ^        v
  134.                       +-----+  ^     +-----+  ^     +-----+
  135.                   k3->|  E  |  ^ k3->|  E  |  ^ k3->|  E  |
  136.                       +-----+  ^     +-----+  ^     +-----+
  137.                          |     ^        |     ^        |
  138.                          +>->->+        +>->->+        +>->->
  139.                          |              |              |
  140.                          C1             C2             Ci
  141.  
  142.    The DES-EDE3-CBC algorithm is a simple variant of the DES-CBC
  143.    algorithm [RFC-1829x].  The "outer" chaining technique is used.
  144.  
  145.    In DES-EDE3-CBC, an Initialization Vector (IV) is XOR'd with the
  146.    first 64-bit (8 byte) plaintext block (P1).  The keyed DES function
  147.    is iterated three times, an encryption (Ek1) followed by a
  148.    decryption (Dk2) followed by an encryption (Ek3), and generates the
  149.    ciphertext (C1) for the block.  Each iteration uses an independant
  150.    key: k1, k2 and k3.
  151.  
  152.    For successive blocks, the previous ciphertext block is XOR'd with
  153.    the current plaintext (Pi).  The keyed DES-EDE3 encryption function
  154.    generates the ciphertext (Ci) for that block.
  155.  
  156.    To decrypt, the order of the functions is reversed: decrypt with
  157.    k3, encrypt with k2, decrypt with k1, and XOR the previous
  158.    ciphertext block.
  159.  
  160.    Note that when all three keys (k1, k2 and k3) are the same, DES-
  161.    EDE3-CBC is equivalent to DES-CBC.  This property allows the DES-
  162.  
  163.  
  164.  
  165. R. Pereira, R. Thayer                                         [Page 3]
  166.  
  167. Internet Draft draft-ietf-ipsec-ciph-3des-expiv-00.doc   July 17, 1997
  168.  
  169.  
  170.    EDE3 hardware implementations to operate in DES mode without
  171.    modification.
  172.  
  173. 2.2 Performance
  174.  
  175.    Triple DES is approximately 2.5 times slower than "single" DES
  176.    (rather than 3 times), because inner permutations may be removed.
  177.  
  178.    Phil Karn has tuned DES-EDE3-CBC software to achieve 6.22 Mbps with
  179.    a 133 MHz Pentium.  Other DES speed estimates may be found at
  180.    [Schneier95, page 279].
  181.  
  182. 3. Key Sizes
  183.  
  184.    The secret DES-EDE3 key shared between the communicating parties is
  185.    effectively 168-bits long.  This key consists of three independent
  186.    56-bit quantities used by the DES algorithm.  Each of the three 56-
  187.    bit sub-keys is stored as a 64-bit (8 byte) quantity, with the
  188.    least significant bit of each byte used as a parity bit.
  189.  
  190.    Implementations of this transform SHOULD take into consideration
  191.    the parity bits when initially accepting a new set of keys.
  192.  
  193. 3.1 Weak Keys
  194.  
  195.    DES has 64 known weak keys, including so-called semi-weak keys and
  196.    possibly-weak keys [Schneier95, pp 280-282].  The likelihood of
  197.    picking one at random is negligible.
  198.  
  199.    For DES-EDE3, there is no known need to reject weak or
  200.    complementation keys.  Any weakness is obviated by the other keys.
  201.  
  202.    However, if the first two independent 64-bit keys are equal (k1 ==
  203.    k2), then the 3DES operation is simply the same as DES.
  204.    Implementers MUST reject keys that exhibit this property.
  205.  
  206. 4. ESP Payload
  207.  
  208.    DES-EDE3-CBC requires an explicit Initialization Vector (IV) of 8
  209.    octets (64 bits).  Thus the payload is made up of the 8 octet IV
  210.    followed by raw cipher-text.  The IV SHOULD be chosen at random.
  211.    Common practice is to use random data for the first IV and the last
  212.    8 octets of encrypted data from an encryption process as the IV for
  213.    the next encryption process.
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. R. Pereira, R. Thayer                                         [Page 4]
  221.  
  222. Internet Draft draft-ietf-ipsec-ciph-3des-expiv-00.doc   July 17, 1997
  223.  
  224.  
  225.    The payload field, as defined in [Kent97], is broken down according
  226.    to the following diagram:
  227.  
  228.    +---------------+---------------+---------------+---------------+
  229.    |                                                               |
  230.    +                   Initialization Vector (IV)                  +
  231.    |                                                               |
  232.    +---------------+---------------+---------------+---------------+
  233.    |                                                               |
  234.    ~              Encrypted Payload (variable length)              ~
  235.    |                                                               |
  236.    +---------------------------------------------------------------+
  237.     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
  238.  
  239.  
  240. 4.1 Block Size and Padding
  241.  
  242.    The ESP 3DES-CBC algorithm described in this document MUST use a
  243.    block size of 8 octets (64 bits).
  244.  
  245.    When padding is required, it MUST be done according to the
  246.    conventions specified in [Kent97].
  247.  
  248. 4.2 Interaction with Authentication Algorithms
  249.  
  250.    This ESP 3DES-CBC document has no limitations on what
  251.    authentication algorithm is used in ESP.
  252.  
  253. 5. Keying Material
  254.  
  255.    The number of bits sent from the key exchange protocol to this ESP
  256.    algorithm must be equal to the key size.
  257.  
  258.    The key is taken from the first 192 bits of the keying material,
  259.    where the first 64 bits represent the first key, the next 64 bits
  260.    represent the second key and the last 64 bits represent the third
  261.    key.
  262.  
  263. 6. Security Considerations
  264.  
  265.    As with other ESP Transforms there are common security
  266.    considerations, which are not discussed here.  The ESP document and
  267.    the IPsec architecture document should be consulted.  Also, as with
  268.    any other encryption technology, one should examine the current
  269.    literature for any new attack strategies discovered after this
  270.    document was published.
  271.  
  272.  
  273.  
  274.  
  275. R. Pereira, R. Thayer                                         [Page 5]
  276.  
  277. Internet Draft draft-ietf-ipsec-ciph-3des-expiv-00.doc   July 17, 1997
  278.  
  279.  
  280.    A discussion of security considerations specific to DES is also
  281.    relevant to this cipher, see [RFC-1829x] for this discussion.
  282.  
  283.    Since Triple DES uses three times as much keying material as DES,
  284.    it places a larger burden on automatic keying systems that use such
  285.    devices as random number generators and entropy pools.  Use of
  286.    automatic keying should be carefully configured to be aware of this
  287.    impact.
  288.  
  289. 7. References
  290.  
  291.    [Atkinson95] Atkinson, R., "Security Architecture for the Internet
  292.    Protocol", draft-ietf-ipsec-arch-sec-01
  293.  
  294.    [Bradner97] Bradner, S., "Key words for use in RFCs to indicate
  295.    Requirement Levels", RFC2119, March 1997
  296.  
  297.    [Kent97] Kent, S., Atkinson, R., "IP Encapsulating Security Payload
  298.    (ESP)", draft-ietf-ipsec-new-esp-01
  299.  
  300.    [Thayer97] R. Thayer, N. Doraswamy, R. Glenn, "IP Security Document
  301.    Roadmap", draft-ietf-ipsec-doc-roadmap-00.txt
  302.  
  303.    [FIPS-46] US National Bureau of Standards, "Data Encryption
  304.    Standard", Federal Information Processing Standard (FIPS)
  305.    Publication 46, January 1977.
  306.  
  307.    [RFC-1829x] Karn, P., Metzger, P., Simpson, W.A., "The ESP DES-CBC
  308.    Transform", work in progress.
  309.  
  310.    [Schneier95] Schneier, B., "Applied Cryptography Second Edition",
  311.    John Wiley & Sons, New York, NY, 1995.  ISBN 0-471-12845-7.
  312.  
  313.    [Tuchman79] Tuchman, W, "Hellman Presents No Shortcut Solutions to
  314.    DES", IEEE Spectrum, v. 16 n. 7, July 1979, pp. 40-41.
  315.  
  316. 8. Acknowledgments
  317.  
  318.    This document is based on the IETF work described in <draft-ietf-
  319.    ipsec-ciph-3des-00.txt> with he only major differences being an
  320.    explicit IV instead of a derived one and that padding is done as
  321.    the default method states in ESP.
  322.  
  323.    Our thanks to all of the editors of the previous ESP 3DES
  324.    documents; W. Simpson, N. Doraswamy, P. Metzger, and P. Karn.
  325.  
  326.  
  327.  
  328.  
  329.  
  330. R. Pereira, R. Thayer                                         [Page 6]
  331.  
  332. Internet Draft draft-ietf-ipsec-ciph-3des-expiv-00.doc   July 17, 1997
  333.  
  334.  
  335. 9. Editors' Addresses
  336.  
  337.      Roy Pereira
  338.      rpereira@timestep.com
  339.      TimeStep Corporation
  340.      (613) 599-3610 x 4808
  341.  
  342.      Rodney Thayer
  343.      rodney@sabletech.com
  344.      Sable Technology Corporation
  345.      (617) 332-7292
  346.  
  347.    The IPSec working group can be contacted via the IPSec working
  348.    group's mailing list (ipsec@tis.com) or through its chairs:
  349.  
  350.      Robert Moskowitz
  351.      rgm@chrysler.com
  352.      Chrysler Corporation
  353.  
  354.      Theodore Y. Ts'o
  355.      tytso@MIT.EDU
  356.      Massachusetts Institute of Technology
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385. R. Pereira, R. Thayer                                         [Page 7]
  386.  
  387.