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-cast128-cbc-00.txt < prev    next >
Text File  |  1997-07-03  |  11KB  |  334 lines

  1.  
  2. Internet Engineering Task Force                             R. Pereira
  3. IP Security Working Group                         TimeStep Corporation
  4. Internet Draft                                               G. Carter
  5. Expires in six months                             Entrust Technologies
  6.                                                           July 2, 1997
  7.  
  8.  
  9.  
  10.                      The ESP CAST128-CBC Algorithm
  11.               <draft-ietf-ipsec-ciph-cast128-cbc-00.txt>
  12.  
  13.  
  14.  
  15. Status of this Memo
  16.  
  17.    This document is a submission to the IETF Internet Protocol
  18.    Security (IPSEC) Working Group. Comments are solicited and should
  19.    be addressed to the working group mailing list (ipsec@tis.com) or
  20.    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
  28.    months and may be updated, replaced, or obsolete by other documents
  29.    at any time. It is inappropriate to use Internet-Drafts as
  30.    reference material or to cite them other than as "work in
  31.    progress."
  32.  
  33.    To learn the current status of any Internet-Draft, please check the
  34.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  35.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  36.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  37.    ftp.isi.edu (US West Coast).
  38.  
  39.    Distribution of this memo is unlimited.
  40.  
  41. Abstract
  42.  
  43.    This document describes the CAST-128 block cipher algorithm as to
  44.    be used with the IPSec Encapsulating Security Payload (ESP).
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. R. Pereira, G. Carter                                         [Page 1]
  57.  
  58. Internet Draft      The ESP CAST128-CBC Algorithm        July 2, 1997
  59.  
  60.  
  61. Table of Contents
  62.  
  63.    1. Introduction...................................................2
  64.      1.1 Specification of Requirements...............................2
  65.    2. Cipher Algorithm...............................................2
  66.      2.1 Rounds......................................................2
  67.      2.2 Background on CAST-128......................................3
  68.      2.3 Performance.................................................3
  69.    3. Key Sizes......................................................3
  70.      3.1 Weak Keys...................................................4
  71.    4. ESP Payload....................................................4
  72.      4.1 Block Size and Padding......................................4
  73.      4.2 Interaction with Authentication Algorithms..................4
  74.    5. Keying Material................................................5
  75.    6. Security Considerations........................................5
  76.    7. References.....................................................5
  77.    8. Acknowledgments................................................5
  78.    9. Editors' Addresses.............................................6
  79.  
  80. 1. Introduction
  81.  
  82.    This document describes how the CAST-128 cipher algorithm may be
  83.    used with the IPSec ESP protocol.
  84.  
  85.    It is assumed that the reader is familiar with the terms and
  86.    concepts described in the "Security Architecture for the Internet
  87.    Protocol" [Atkinson95] and "IP Encapsulating Security Payload
  88.    (ESP)" [Kent97] documents.
  89.  
  90.    Furthermore, this document is a companion to [Kent97] and MUST be
  91.    read in its context.
  92.  
  93. 1.1 Specification of Requirements
  94.  
  95.    The keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD
  96.    NOT", and "MAY" that appear in this document are to be interpreted
  97.    as described in [Bradner97].
  98.  
  99. 2. Cipher Algorithm
  100.  
  101.    The symmetric block cipher algorithm used to secure ESP is CAST-128
  102.    in CBC mode with a block size of 64 bits as described in [Adams97].
  103.  
  104. 2.1 Rounds
  105.  
  106.    For key sizes up to and including 80 bits (i.e., 40, 48, 56, 64,
  107.    72, and 80 bits), the algorithm is exactly as specified but MUST
  108.    use 12 rounds.
  109.  
  110.  
  111. R. Pereira, G. Carter                                         [Page 2]
  112.  
  113. Internet Draft      The ESP CAST128-CBC Algorithm        July 2, 1997
  114.  
  115.  
  116.  
  117.    For key sizes greater than 80 bits, the algorithm MUST use the full
  118.    16 rounds.
  119.  
  120. 2.2 Background on CAST-128
  121.  
  122.    The CAST design procedure was originally developed by Carlisle
  123.    Adams and Stafford Travares at Queen's University, Kingston,
  124.    Ontario, Canada. Subsequent enhancements have been made over the
  125.    years by Carlisle Adams and Michael Wiener of Entrust Technologies.
  126.    CAST-128 is the result of applying the CAST Design Procedure as
  127.    outlined in [Adams97].
  128.  
  129. 2.3 Performance
  130.  
  131.    CAST-128 runs approximately 3 times faster than a highly optimized
  132.    DES implementation and runs 5-6 times faster than the DES
  133.    implementations found in typical applications.  This is based on a
  134.    non optimized C++ implementation of CAST-128.  It can therefore be
  135.    tuned to give even higher performance, if this is required.
  136.  
  137.    The following performance tests were run on a Pentium 90 MHz
  138.    running the Windows NT operating system using 20 Kbyte buffers and
  139.    do not include file I/O.  The DES-CBC implementation was not
  140.    optimized for a 32 bit environment.
  141.  
  142.    CAST-128 64 bit key CBC encryption ........... 2,640,000 bytes/sec
  143.    DES CBC encryption ............................. 504,000 bytes/sec
  144.  
  145. 3. Key Sizes
  146.  
  147.    The CAST-128 encryption algorithm [Adams97] has been designed to
  148.    allow a key size which can vary from 40 bits to 128 bits, in 8-bit
  149.    increments (that is, the allowable key sizes are 40, 48, 56, 64,
  150.    ..., 112, 120, and 128 bits. To facilitate interoperability, it is
  151.    recommended that key sizes SHOULD be chosen from the set of 40, 64,
  152.    80 and 128.
  153.  
  154.    For key sizes less than 128 bits, the key is padded with zeros in
  155.    the rightmost, or least significant, positions out to 128 bits
  156.    since the CAST-128 key schedule assumes an input key of 128 bits.
  157.    Thus if you had a key with a size of 80 bits `3B5D831CFE', it would
  158.    be padded to produce a key with a size of 128 bits
  159.    `3B5D831CFE000000'.
  160.  
  161.    In order to avoid confusion, when variable key size operation is
  162.    used, the name CAST-128 is to be considered synonymous with the
  163.    name CAST5; this allows a keysize to be appended without ambiguity.
  164.  
  165.  
  166. R. Pereira, G. Carter                                         [Page 3]
  167.  
  168. Internet Draft      The ESP CAST128-CBC Algorithm        July 2, 1997
  169.  
  170.  
  171.    Thus, for example, CAST-128 with a 40 bit key is referred to as
  172.    CAST5-40; where a 128 bit key is explicitly intended, the name
  173.    CAST5-128 should be used.
  174.  
  175. 3.1 Weak Keys
  176.  
  177.    CAST-128 no known weak keys.
  178.  
  179. 4. ESP Payload
  180.  
  181.    CAST128-CBC requires an explicit Initialization Vector (IV) of 8
  182.    octets (64 bits).  Thus the payload is made up of the 8 octet IV
  183.    followed by raw cipher-text.  The IV SHOULD be chosen at random.
  184.    Common practice is to use random data for the first IV and the last
  185.    8 octets of encrypted data from an encryption process as the IV for
  186.    the next encryption process.
  187.  
  188.    The payload field, as defined in [Kent97], is broken down according
  189.    to the following diagram:
  190.  
  191.    +---------------+---------------+---------------+---------------+
  192.    |                                                               |
  193.    +                   Initialization Vector (IV)                  +
  194.    |                                                               |
  195.    +---------------+---------------+---------------+---------------+
  196.    |                                                               |
  197.    ~              Encrypted Payload (variable length)              ~
  198.    |                                                               |
  199.    +---------------------------------------------------------------+
  200.     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
  201.  
  202.  
  203. 4.1 Block Size and Padding
  204.  
  205.    The ESP CAST-128 algorithm described in this document MUST use a
  206.    block size of 8 octets (64 bits).
  207.  
  208.    When padding is required, it MUST be done according to the
  209.    conventions specified in [Kent97].
  210.  
  211. 4.2 Interaction with Authentication Algorithms
  212.  
  213.    This CAST-128 ESP document has no limitations on what
  214.    authentication algorithm is used in ESP.
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221. R. Pereira, G. Carter                                         [Page 4]
  222.  
  223. Internet Draft      The ESP CAST128-CBC Algorithm        July 2, 1997
  224.  
  225.  
  226. 5. Keying Material
  227.  
  228.    The minimum number of bits sent from the key exchange protocol to
  229.    this ESP algorithm must be greater or equal to the key size.
  230.  
  231.    The CAST-128 key is taken from the first <x> bits of the keying
  232.    material, where <x> represents the required key size.
  233.  
  234. 6. Security Considerations
  235.  
  236.    The ESP CAST-128 algorithm described in this document has the same
  237.    security considerations as in [Adams97].
  238.  
  239.    Care should be taken when using small key sizes.  Smaller key sizes
  240.    of 56 bits and below make brute force type attacks practical
  241.    regardless of the cipher algorithm used.  It is therefore
  242.    recommended that the ESP CAST-128 key size be at least 80 bits.
  243.    Use of key sizes less than 80 bits is permitted, but careful
  244.    considerations should be taken before its use.
  245.  
  246. 7. References
  247.  
  248.    [Adams97] Adams, C., "The CAST-128 Encryption Algorithm_, RFC2144,
  249.    1997.
  250.  
  251.    [Atkinson95] Atkinson, R., "Security Architecture for the Internet
  252.    Protocol", draft-ietf-ipsec-arch-sec-01
  253.  
  254.    [Bradner97] Bradner, S., "Key words for use in RFCs to indicate
  255.    Requirement Levels", RFC2119, March 1997
  256.  
  257.    [Kent97] Kent, S., Atkinson, R., "IP Encapsulating Security Payload
  258.    (ESP)", draft-ietf-ipsec-new-esp-01
  259.  
  260. 8. Acknowledgments
  261.  
  262.    This document is based on suggestions from Stephen Kent and
  263.    discussions from the IPSec mailing list as well as other IPSec
  264.    drafts.
  265.  
  266.    Special thanks for Carlisle Adams and Paul Van Oorschot both of
  267.    Entrust Technologies who provided input and review with respect to
  268.    CAST-128.
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276. R. Pereira, G. Carter                                         [Page 5]
  277.  
  278. Internet Draft      The ESP CAST128-CBC Algorithm        July 2, 1997
  279.  
  280.  
  281. 9. Editors' Addresses
  282.  
  283.      Roy Pereira
  284.      <rpereira@timestep.com>
  285.      TimeStep Corporation
  286.      (613) 599-3610 x 4808
  287.  
  288.      Greg Carter
  289.      <carterg@entrust.com>
  290.      Entrust Technologies
  291.      (613) 763-1358
  292.  
  293.    The IPSec working group can be contacted via the IPSec working
  294.    group's mailing list (ipsec@tis.com) or through its chairs:
  295.  
  296.      Robert Moskowitz
  297.      rgm@chrysler.com
  298.      Chrysler Corporation
  299.  
  300.      Theodore Y. Ts'o
  301.      tytso@MIT.EDU
  302.      Massachusetts Institute of Technology
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331. R. Pereira, G. Carter                                         [Page 6]
  332.  
  333.  
  334.