home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / id-dc-03.txt < prev    next >
Text File  |  2020-01-01  |  8KB  |  226 lines

  1. Network Working Group                                    T. Ts'o, Editor
  2. Internet-Draft                                          VA Linux Systems
  3. draft-tso-telnet-enc-des-cfb-03.txt                          August 1999
  4.  
  5.  
  6.              Telnet Encryption: DES 64 bit Cipher Feedback
  7.  
  8. Status of this Memo
  9.  
  10.    This document is an Internet-Draft and is in full conformance with
  11.    all provisions of Section 10 of RFC2026.  Internet-Drafts are working
  12.    documents of the Internet Engineering Task Force (IETF), its areas,
  13.    and its working groups.  Note that other groups may also distribute
  14.    working documents as Internet-Drafts.
  15.  
  16.    Internet-Drafts are draft documents valid for a maximum of six months
  17.    and may be updated, replaced, or obsoleted by other documents at any
  18.    time.  It is inappropriate to use Internet-Drafts as reference
  19.    material or to cite them other than as "work in progress."
  20.  
  21.    The list of current Internet-Drafts can be accessed at
  22.    http://www.ietf.org/ietf/1id-abstracts.txt
  23.  
  24.    The list of Internet-Draft Shadow Directories can be accessed at
  25.    http://www.ietf.org/shadow.html.
  26.  
  27.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  28.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  29.    document are to be interpreted as described in RFC 2119.
  30.  
  31. 0.  Abstract
  32.  
  33.    This document specifies how to use the DES encryption algorithm in
  34.    cipher feedback mode with the telnet encryption option.
  35.  
  36. 1.  Command Names and Codes
  37.  
  38.    Encryption Type
  39.  
  40.       DES_CFB64        1
  41.  
  42.    Suboption Commands
  43.  
  44.       CFB64_IV         1
  45.       CFB64_IV_OK      2
  46.       CFB64_IV_BAD     3
  47.  
  48.  
  49.  
  50.                          Expires February 19100                 [Page 1]
  51.  
  52. Internet-Draft         DES 64 bit Cipher Feedback            August 1999
  53.  
  54.  
  55.  
  56. 2.  Command Meanings
  57.  
  58.    IAC SB ENCRYPT IS DES_CFB64 CFB64_IV <initial vector> IAC SE
  59.  
  60.       The sender of this command generates a random 8 byte initial vec-
  61.       tor, and sends it to the other side of the connection using the
  62.       CFB64_IV command.  The initial vector is sent in clear text.  Only
  63.       the side of the connection that is WILL ENCRYPT may send the
  64.       CFB64_IV command.
  65.  
  66.    IAC SB ENCRYPT REPLY DES_CFB64 CFB64_IV_OK IAC SE
  67.    IAC SB ENCRYPT REPLY DES_CFB64 CFB64_IV_BAD IAC SE
  68.  
  69.       The sender of these commands either accepts or rejects the initial
  70.       vector received in a CFB64_IV command.  Only the side of the con-
  71.       nection that is DO ENCRYPT may send the CFB64_IV_OK and
  72.       CFB64_IV_BAD commands.  The CFB64_IV_OK command MUST be sent for
  73.       backwards compatibility with existing implementations; there real-
  74.       ly isn't any reason why a sender would need to send the
  75.       CFB64_IV_BAD command except in the case of a protocol violation
  76.       where the IV sent was not of the correct length (i.e., 8 bytes).
  77.  
  78. 3.  Implementation Rules
  79.  
  80.    Once a CFB64_IV_OK command has been received, the WILL ENCRYPT side
  81.    of the connection should do keyid negotiation using the ENC_KEYID
  82.    command.  Once the keyid negotiation has successfully identified a
  83.    common keyid, then START and END commands may be sent by the side of
  84.    the connection that is WILL ENCRYPT.  Data will be encrypted using
  85.    the DES 64 bit Cipher Feedback algorithm.
  86.  
  87.    If encryption (decryption) is turned off and back on again, and the
  88.    same keyid is used when re-starting the encryption (decryption), the
  89.    intervening clear text must not change the state of the encryption
  90.    (decryption) machine.
  91.  
  92.    If a START command is sent (received) with a different keyid, the en-
  93.    cryption (decryption) machine must be re-initialized immediately fol-
  94.    lowing the end of the START command with the new key and the initial
  95.    vector sent (received) in the last CFB64_IV command.
  96.  
  97.    If a new CFB64_IV command is sent (received), and encryption (decryp-
  98.    tion) is enabled, the encryption (decryption) machine must be re-ini-
  99.    tialized immediately following the end of the CFB64_IV command with
  100.    the new initial vector, and the keyid sent (received) in the last
  101.    START command.
  102.  
  103.    If encryption (decryption) is not enabled when a CFB64_IV command is
  104.    sent (received), the encryption (decryption) machine must be re-ini-
  105.  
  106.  
  107.  
  108.                          Expires February 19100                 [Page 2]
  109.  
  110. Internet-Draft         DES 64 bit Cipher Feedback            August 1999
  111.  
  112.  
  113.    tialized after the next START command, with the keyid sent (received)
  114.    in that START command, and the initial vector sent (received) in this
  115.    CFB64_IV command.
  116.  
  117. 4.  Algorithm
  118.  
  119.    Given that V[i] is the initial 64 bit vector, V[n] is the nth 64 bit
  120.    vector, D[n] is the nth chunk of 64 bits of data to encrypt (de-
  121.    crypt), and O[n] is the nth chunk of 64 bits of encrypted (decrypted)
  122.    data, then:
  123.  
  124.       V[0] = DES(V[i], key)
  125.       O[n] = D[n] <exclusive or> V[n]
  126.       V[n+1] = DES(O[n], key)
  127.  
  128.  
  129. 5.  Integration with the AUTHENTICATION telnet option
  130.  
  131.    As noted in the telnet ENCRYPTION option specifications, a keyid val-
  132.    ue of zero indicates the default encryption key, as might be derived
  133.    from the telnet AUTHENTICATION option.  If the default encryption key
  134.    negotiated as a result of the telnet AUTHENTICATION option contains
  135.    less than 8 bytes, then the DES_CFB64 option may not be offered or
  136.    used as a valid telnet encryption option.  If the encryption key ne-
  137.    gotiated as a result of the telnet AUTHENTICATION option is greater
  138.    than 16 bytes the first 8 bytes of the key should be used as keyid 0
  139.    for data sent from the telnet server to the telnet client, and the
  140.    second 8 bytes of the key should be used as keyid 0 for data sent by
  141.    the telnet client to the telnet server.  Otherwise, the first 8 bytes
  142.    of the encryption key is used as keyid zero for the telnet ENCRYPTION
  143.    option in both directions (with the client as WILL ENCRYPT and the
  144.    server as WILL ENCRYPT).
  145.  
  146.    In all cases, if the key negotiated by the telnet AUTHENTICATION op-
  147.    tion was not a DES key, the key used by the DES_CFB64 must have its
  148.    parity corrected after it is detrmined using the above algorithm.
  149.  
  150.    Note that the above algorithm assumes that it is safe to use a non-
  151.    DES key (or part of a non-DES key) as a DES key.  This is not neces-
  152.    sarily true of all cipher systems, but we specify this behaviour as
  153.    the default since it is true for most authentication systems in popu-
  154.    lar use today, and for compatibility with existing implementations.
  155.    New telnet AUTHENTICATION mechanisms may specify althernative methods
  156.    for determining the keys to be used for this cipher suite in their
  157.    specification, if the session key negotiated by that authentication
  158.    mechanism is not a DES key and and where this algorithm may not be
  159.    safely used.
  160.  
  161. 6.  Security considerations
  162.  
  163.  
  164.  
  165.  
  166.                          Expires February 19100                 [Page 3]
  167.  
  168. Internet-Draft         DES 64 bit Cipher Feedback            August 1999
  169.  
  170.  
  171.    Encryption using Cipher Feedback does not ensure data integrity; the
  172.    active attacker has a limited ability to modify text, if he can pre-
  173.    dict the clear-text that was being transmitted.  The limitations
  174.    faced by the attacker (that only 8 bytes can be modified at a time,
  175.    and the following 8-byte block of data will be corrupted, thus making
  176.    detection likely) are significant, but it is possible that an active
  177.    attacker still might be able to exploit this weakness.
  178.  
  179.    The tradeoff here is that adding a message authentication code (MAC)
  180.    will significantly increase the number of bytes needed to send a sin-
  181.    gle character in the telnet protocol, which will impact performance
  182.    on slow (i.e. dialup) links.
  183.  
  184. 7.  Acknowledgments
  185.  
  186.    This document was originally written by Dave Borman of Cray Research
  187.    with the assistance of the IETF Telnet Working Group.
  188.  
  189. Author's Address
  190.  
  191.    Theodore Ts'o, Editor
  192.    VA Linux Systems
  193.    43 Pleasant St.
  194.    Medford, MA 02155
  195.  
  196.    Phone: (781) 391-3464
  197.  
  198.    EMail: tytso@valinux.com
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.                                                                 [Page 4]
  225.  
  226.