home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / id-do-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-ofb-03.txt                          August 1999
  4.  
  5.  
  6.              Telnet Encryption: DES 64 bit Output 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.    output feedback mode with the telnet encryption option.
  35.  
  36. 1.  Command Names and Codes
  37.  
  38.    Encryption Type
  39.  
  40.       DES_OFB64        2
  41.  
  42.    Suboption Commands
  43.  
  44.       OFB64_IV         1
  45.       OFB64_IV_OK      2
  46.       OFB64_IV_BAD     3
  47.  
  48.  
  49.  
  50.                          Expires February 19100                 [Page 1]
  51.  
  52. Internet-Draft         DES 64 bit Output Feedback            August 1999
  53.  
  54.  
  55.  
  56. 2.  Command Meanings
  57.  
  58.    IAC SB ENCRYPT IS DES_OFB64 OFB64_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.       OFB64_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.       OFB64_IV command
  65.  
  66.    IAC SB ENCRYPT REPLY DES_OFB64 OFB64_IV_OK IAC SE
  67.    IAC SB ENCRYPT REPLY DES_OFB64 OFB64_IV_BAD IAC SE
  68.  
  69.       The sender of these commands either accepts or rejects the initial
  70.       vector received in a OFB64_IV command.  Only the side of the con-
  71.       nection that is DO ENCRYPT may send the OFB64_IV_OK and
  72.       OFB64_IV_BAD commands.  The OFB64_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.       OFB64_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.  
  79. 3.  Implementation Rules
  80.  
  81.    Once a OFB64_IV_OK command has been received, the WILL ENCRYPT side
  82.    of the connection should do keyid negotiation using the ENC_KEYID
  83.    command.  Once the keyid negotiation has successfully identified a
  84.    common keyid, then START and END commands may be sent by the side of
  85.    the connection that is WILL ENCRYPT.  Data will be encrypted using
  86.    the DES 64 bit Output Feedback algorithm.
  87.  
  88.    If encryption (decryption) is turned off and back on again, and the
  89.    same keyid is used when re-starting the encryption (decryption), the
  90.    intervening clear text must not change the state of the encryption
  91.    (decryption) machine.
  92.  
  93.    If a START command is sent (received) with a different keyid, the en-
  94.    cryption (decryption) machine must be re-initialized immediately fol-
  95.    lowing the end of the START command with the new key and the initial
  96.    vector sent (received) in the last OFB64_IV command.
  97.  
  98.    If a new OFB64_IV command is sent (received), and encryption (decryp-
  99.    tion) is enabled, the encryption (decryption) machine must be re-ini-
  100.    tialized immediately following the end of the OFB64_IV command with
  101.    the new initial vector, and the keyid sent (received) in the last
  102.    START command.
  103.  
  104.    If encryption (decryption) is not enabled when a OFB64_IV command is
  105.  
  106.  
  107.  
  108.                          Expires February 19100                 [Page 2]
  109.  
  110. Internet-Draft         DES 64 bit Output Feedback            August 1999
  111.  
  112.  
  113.    sent (received), the encryption (decryption) machine must be re-ini-
  114.    tialized after the next START command, with the keyid sent (received)
  115.    in that START command, and the initial vector sent (received) in this
  116.    OFB64_IV command.
  117.  
  118. 4.  Algorithm
  119.  
  120.    Given that V[i] is the initial 64 bit vector, V[n] is the nth 64 bit
  121.    vector, D[n] is the nth chunk of 64 bits of data to encrypt (de-
  122.    crypt), and O[n] is the nth chunk of 64 bits of encrypted (decrypted)
  123.    data, then:
  124.  
  125.       V[0] = DES(V[i], key)
  126.       V[n+1] = DES(V[n], key)
  127.       O[n] = D[n] <exclusive or> V[n]
  128.  
  129.  
  130. 5.  Integration with the AUTHENTICATION telnet option
  131.  
  132.    As noted in the telnet ENCRYPTION option specifications, a keyid val-
  133.    ue of zero indicates the default encryption key, as might be derived
  134.    from the telnet AUTHENTICATION option.  If the default encryption key
  135.    negotiated as a result of the telnet AUTHENTICATION option contains
  136.    less than 8 bytes, then the DES_OFB64 option may not be offered or
  137.    used as a valid telnet encryption option.  If the encryption key ne-
  138.    gotiated as a result of the telnet AUTHENTICATION option is greater
  139.    than 16 bytes the first 8 bytes of the key should be used as keyid 0
  140.    for data sent from the telnet server to the telnet client, and the
  141.    second 8 bytes of the key should be used as keyid 0 for data sent by
  142.    the telnet client to the telnet server.  Otherwise, the first 8 bytes
  143.    of the encryption key is used as keyid zero for the telnet ENCRYPTION
  144.    option in both directions (with the client as WILL ENCRYPT and the
  145.    server as WILL ENCRYPT).
  146.  
  147.    In all cases, if the key negotiated by the telnet AUTHENTICATION op-
  148.    tion was not a DES key, the key used by the DES_CFB64 must have its
  149.    parity corrected after it is detrmined using the above algorithm.
  150.  
  151.    Note that the above algorithm assumes that it is safe to use a non-
  152.    DES key (or part of a non-DES key) as a DES key.  This is not neces-
  153.    sarily true of all cipher systems, but we specify this behaviour as
  154.    the default since it is true for most authentication systems in popu-
  155.    lar use today, and for compatibility with existing implementations.
  156.    New telnet AUTHENTICATION mechanisms may specify althernative methods
  157.    for determining the keys to be used for this cipher suite in their
  158.    specification, if the session key negotiated by that authentication
  159.    mechanism is not a DES key and and where this algorithm may not be
  160.    safely used.
  161.  
  162. 6.  Security considerations
  163.  
  164.  
  165.  
  166.                          Expires February 19100                 [Page 3]
  167.  
  168. Internet-Draft         DES 64 bit Output Feedback            August 1999
  169.  
  170.  
  171.    Encryption using Output Feedback does not ensure data integrity; an
  172.    active attacker may be able to substitute text, if he can predict the
  173.    clear-text that was being transmitted.
  174.  
  175.    This option was originally drafted back when CPU speeds where not
  176.    necessarily fast enough to do allow use of CFB.  Since then, CPU's
  177.    have gotten much faster.  Given the inherent weaknesses in Output
  178.    Feedback mode, perhaps it should be deprecated in favor of CFB modes?
  179.  
  180. 7.  Acknowledgments
  181.  
  182.    This document was originally written by Dave Borman of Cray Research
  183.    with the assistance of the IETF Telnet Working Group.
  184.  
  185. Author's Address
  186.  
  187.    Theodore Ts'o, Editor
  188.    VA Linux Systems
  189.    43 Pleasant St.
  190.    Medford, MA 02155
  191.  
  192.    Phone: (781) 391-3464
  193.  
  194.    EMail: tytso@valinux.com
  195.  
  196.  
  197.  
  198.  
  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.                          Expires February 19100                 [Page 4]
  225.  
  226.