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

  1. Secure TELNET Working Group                    Russell Housley (SPYRUS)
  2.                                                   Todd Horting (SPYRUS)
  3. Internet-Draft                                       Peter Yee (SPYRUS)
  4.                                                               July 1999
  5.  
  6.               TELNET Authentication Using KEA and SKIPJACK
  7.  
  8.                 <draft-housley-telnet-auth-keasj-03.txt>
  9.  
  10. Status of this Memo
  11.  
  12.    This document is an Internet-Draft and is in full conformance with
  13.    all provisions of Section 10 of RFC2026.
  14.  
  15.    Internet-Drafts are working documents of the Internet Engineering
  16.    Task Force (IETF), its areas, and its working groups.  Note that
  17.    other groups may also distribute working documents as Internet-
  18.    Drafts.
  19.  
  20.    Internet-Drafts are draft documents valid for a maximum of six months
  21.    and may be updated, replaced, or obsoleted by other documents at any
  22.    time.  It is inappropriate to use Internet-Drafts as reference
  23.    material or to cite them other than as "work in progress."
  24.  
  25.    The list of current Internet-Drafts can be accessed at
  26.    http://www.ietf.org/ietf/1id-abstracts.txt
  27.  
  28.    The list of Internet-Draft Shadow Directories can be accessed at
  29.    http://www.ietf.org/shadow.html.
  30.  
  31.    Distribution of this memo is unlimited.  Please send comments to the
  32.    <telnet-ietf@bsdi.com> mailing list.
  33.  
  34. Abstract
  35.  
  36.    This document defines a method to authenticate TELNET [1,5] using the
  37.    Key Exchange Algorithm (KEA)[4], and encryption of the TELNET stream
  38.    using SKIPJACK[4].  Two encryption modes are specified; one provides
  39.    data integrity and the other does not.  It relies on the TELNET
  40.    Authentication Option [2].
  41.  
  42.                                                                 [Page 1]
  43.  
  44. INTERNET DRAFT                                                 July 1999
  45.  
  46. 1. Introduction
  47.  
  48.    The TELNET protocol [1,5] provides no protocol security. TELNET
  49.    servers may require users to login.  This is typically a host-level
  50.    login consisting of a user name and a password, transmitted in the
  51.    clear.
  52.  
  53.    The mechanism specified in this document relies on the TELNET
  54.    Authentication Option [2].
  55.  
  56. 2. Command Names and Codes
  57.  
  58.    AUTHENTICATION           37
  59.  
  60.      Authentication Commands:
  61.  
  62.        IS                       0
  63.        SEND                     1
  64.        REPLY                    2
  65.        NAME                     3
  66.  
  67.      Authentication Types:
  68.  
  69.        KEA_SJ                  12
  70.        KEA_SJ_INTEG            13
  71.  
  72.      Modifiers:
  73.  
  74.        AUTH_WHO_MASK            1
  75.        AUTH_CLIENT_TO_SERVER    0
  76.        AUTH_SERVER_TO CLIENT    1
  77.  
  78.        AUTH_HOW_MASK            2
  79.        AUTH_HOW_ONE_WAY         0
  80.        AUTH_HOW_MUTUAL          2
  81.  
  82.        ENCRYPT_MASK            20
  83.        ENCRYPT_OFF              0
  84.        ENCRYPT_USING_TELOPT     4
  85.        ENCRYPT_AFTER_EXCHANGE  16
  86.        ENCRYPT_RESERVED        20
  87.  
  88.        INI_CRED_FWD_MASK        8
  89.        INI_CRED_FWD_OFF         0
  90.        INI_CRED_FWD_ON          8
  91.  
  92.                                                                 [Page 2]
  93.  
  94. INTERNET DRAFT                                                 July 1999
  95.  
  96.      Sub-option Commands:
  97.  
  98.        KEA_CERTA_RA             1
  99.        KEA_CERTB_RB_IVB_NONCEB  2
  100.        KEA_IVA_RESPONSEB_NONCEA 3
  101.        KEA_RESPONSEA            4
  102.  
  103. 3. TELNET Security Extensions
  104.  
  105.    TELNET, as a protocol, has no concept of security.  Without
  106.    negotiated options, it merely passes characters back and forth
  107.    between the NVTs represented by the two TELNET processes.  In its
  108.    most common usage as a protocol for remote terminal access (TCP port
  109.    23), TELNET normally connects to a server that requires user-level
  110.    authentication through a user name and password in the clear.  The
  111.    server does not authenticate itself to the user.
  112.  
  113.    The TELNET Authentication Option provides for:
  114.  
  115.      *  User authentication -- replacing or augmenting the normal host
  116.         password mechanism;
  117.      *  Server authentication -- normally done in conjunction with user
  118.         authentication;
  119.      *  Session parameter negotiation -- in particular, encryption key
  120.         and attributes;
  121.      *  Session protection -- primarily encryption of the data and
  122.         embedded command stream, but the encryption algorithm may also
  123.         provide data integrity.
  124.  
  125.    In order to support these security services, the two TELNET entities
  126.    must first negotiate their willingness to support the TELNET
  127.    Authentication Option.  Upon agreeing to support this option, the
  128.    parties are then able to perform suboptions to determine the
  129.    authentication protocol to be used, and possibly the remote user name
  130.    to be used for authorization checking. Encryption is negotiated along
  131.    with the type of the authentication.
  132.  
  133.    Authentication and parameter negotiation occur within an unbounded
  134.    series of exchanges.  The server proposes a preference-ordered list
  135.    of authentication types (mechanisms) that it supports.  In addition
  136.    to listing the mechanisms it supports, the server qualifies each
  137.    mechanism with a modifier that specifies whether the authentication
  138.    is to be unilateral or mutual, and in which direction the
  139.    authentication is to be performed, and if encryption of data is
  140.    desired.  The client selects one mechanism from the list and responds
  141.    to the server indicating its choice and the first set of
  142.    authentication data needed for the selected authentication type.  The
  143.  
  144.                                                                 [Page 3]
  145.  
  146. INTERNET DRAFT                                                 July 1999
  147.  
  148.    client may ignore a request to encrypt data and so indicate, but the
  149.    server may also terminate the connection if the client refuses
  150.    encryption.  The server and the client then proceed through whatever
  151.    number of iterations is required to arrive at the requested
  152.    authentication.
  153.  
  154.    Encryption is started immediately after the Authentication options
  155.    are completed.
  156.  
  157. 4. Use of Key Exchange Algorithm (KEA)
  158.  
  159.    This paper specifies the method in which KEA is used to achieve
  160.    TELNET Authentication.  KEA (in conjunction with SKIPJACK) [4]
  161.    provides authentication, integrity, and confidentiality.
  162.  
  163.    TELNET entities may use KEA to provide mutual authentication and
  164.    support for the setup of data encryption keys.  A simple token format
  165.    and set of exchanges delivers these services.
  166.  
  167.    NonceA and NonceB used in this exchange are 64-bit bit strings.  The
  168.    client generates NonceA, and the server generates NonceB.  The nonce
  169.    value is selected randomly.  The nonce is sent in a big endian form.
  170.    The encryption of the nonce will be done with the same mechanism that
  171.    the session will use, detailed in the next section.
  172.  
  173.    RA and RB used in this exchange are 1024 bit strings and are defined
  174.    by the KEA SKIPJACK Algorithm[4].
  175.  
  176.    CertA the clients certificate and CertB the server's certificate are
  177.    X.509 certificates[6,7].
  178.  
  179.    On completing these exchanges, the parties have a common SKIPJACK
  180.    key.  Mutual authentication is provided by verification of the
  181.    certificates used to establish the SKIPJACK encryption key and
  182.    successful use of the derived SKIPJACK session key.  To protect from
  183.    an active attacker, encryption will take place after successful
  184.    authentication.  There will be no way to turn off encryption and
  185.    safely turn it back on; repeating the entire authentication is the
  186.    only safe way to restart it.  If the user does not want to use
  187.    encryption, he will have to logoff and logon with the desired
  188.    security mechanism.
  189.  
  190. 4.1.  SKIPJACK Modes
  191.  
  192.    There are two distinct modes for encrypting TELNET streams; one
  193.    provides integrity and the other does not.  Because TELNET is
  194.    normally operated in a character-by-character mode, the KEA SKIPJACK
  195.    with stream integrity mechanism requires the transmission of 4 bytes
  196.  
  197.                                                                 [Page 4]
  198.  
  199. INTERNET DRAFT                                                 July 1999
  200.  
  201.    for every TELNET data byte.  However, a simplified mode KEA SKIPJACK
  202.    without integrity mechanism will only require the transmission of one
  203.    byte for every TELNET data byte.
  204.  
  205.    The cryptographic mode for KEA SKIPJACK with stream integrity is
  206.    Cipher Feedback on 32 bits of data (CFB-32) and the mode of KEA
  207.    SKIPJACK is Cipher Feedback on 8 bits of data (CFB-8).
  208.  
  209. 4.1.1.  SKIPJACK without stream integrity
  210.  
  211.    The first and least complicated mode is the SKIPJACK CFB-8.  This
  212.    mode provides no stream integrity.
  213.  
  214.    For SKIPJACK without stream integrity, the two-octet authentication
  215.    type pair is "KEA_SJ CLIENT_TO_SERVER AUTH_HOW_MUTUAL
  216.    ENCRYPT_AFTER_EXCHANGE INI_CRED_FWD_OFF".  This indicates that the
  217.    KEA SKIPJACK without integrity mechanism will be used for mutual
  218.    authentication and TELNET stream encryption.  Figure 1 illustrates
  219.    the authentication mechanism of KEA SKIPJACK without stream
  220.    integrity.
  221.  
  222.    ---------------------------------------------------------------------
  223.     Client (Party A)                   Server (Party B)
  224.  
  225.                                        <-- IAC DO AUTHENTICATION
  226.  
  227.     IAC WILL AUTHENTICATION        -->
  228.  
  229.                                        <-- IAC SB AUTHENTICATION SEND
  230.                                            <list of authentication options>
  231.                                            IAC SE
  232.  
  233.     IAC SB AUTHENTICATION
  234.     NAME <user name>               -->
  235.  
  236.     IAC SB AUTHENTICATION IS
  237.     KEA_SJ
  238.     CLIENT_TO_SERVER |
  239.         AUTH_HOW_MUTUAL |
  240.         ENCRYPT_AFTER_EXCHANGE |
  241.         INI_CRED_FWD_OFF
  242.     KEA_CERTA_RA
  243.     CertA||Ra IAC SE    -->
  244.  
  245.                                                                 [Page 5]
  246.  
  247. INTERNET DRAFT                                                 July 1999
  248.  
  249.                                        <-- IAC SB AUTHENTICATION REPLY
  250.                                            KEA_SJ
  251.                                            CLIENT_TO_SERVER |
  252.                                                AUTH_HOW_MUTUAL |
  253.                                                ENCRYPT_AFTER_EXCHANGE |
  254.                                                INI_CRED_FWD_OFF
  255.                                            IVA_RESPONSEB_NONCEA
  256.                                            KEA_CERTB_RB_IVB_NONCEB
  257.                                            CertB||Rb||IVb||
  258.                                                       Encrypt( NonceB )
  259.                                            IAC SE
  260.  
  261.     IAC SB AUTHENTICATION IS
  262.     KEA_SJ
  263.     CLIENT_TO_SERVER |
  264.         AUTH_HOW_MUTUAL |
  265.         ENCRYPT_AFTER_EXCHANGE |
  266.         INI_CRED_FWD_OFF
  267.     KEA_IVA_RESPONSEB_NONCEA
  268.     IVa||Encrypt( NonceB XOR 0x0C12||NonceA )
  269.     IAC SE                         -->
  270.  
  271.                                        <-- IAC SB AUTHENTICATION REPLY
  272.                                            KEA_SJ
  273.                                            CLIENT_TO_SERVER |
  274.                                                AUTH_HOW_MUTUAL |
  275.                                                ENCRYPT_AFTER_EXCHANGE |
  276.                                                INI_CRED_FWD_OFF
  277.                                            KEA_RESPONSEA
  278.                                            Encrypt( NonceA XOR 0x0C12 )
  279.                                            IAC SE
  280.    ---------------------------------------------------------------------
  281.                                  Figure 1.
  282.  
  283. 4.1.2.  SKIPJACK with stream integrity
  284.  
  285.    SKIPJACK with stream integrity is more complicated.  It uses the
  286.    SHA-1 [3] one-way hash function to provide integrity of the
  287.    encryption stream as follows:
  288.  
  289.        Set H0 to be the SHA-1 hash of a zero-length string.
  290.        Cn is the nth character in the TELNET stream.
  291.        Hn = SHA-1( Hn-1||Cn ), where Hn is the hash value
  292.             associated with the nth character in the stream.
  293.        ICVn is set to the three most significant bytes of Hn.
  294.        Transmit Encrypt( Cn||ICVn ).
  295.  
  296.                                                                 [Page 6]
  297.  
  298. INTERNET DRAFT                                                 July 1999
  299.  
  300.    The ciphertext that is transmitted is the SKIPJACK CFB-32 encryption
  301.    of ( Cn||ICVn ).  The receiving end of the TELNET link reverses the
  302.    process, first decrypting the ciphertext, separating Cn and ICVn,
  303.    recalculating Hn, recalculating ICVn, and then comparing the received
  304.    ICVn with the recalculated ICVn.  Integrity is indicated if the
  305.    comparison succeeds, and Cn can then be processed normally as part of
  306.    the TELNET stream.  Failure of the comparison indicates some loss of
  307.    integrity, whether due to active manipulation or loss of
  308.    cryptographic synchronization.  In either case, the only recourse is
  309.    to drop the TELNET connection and start over.
  310.  
  311.    For SKIPJACK with stream integrity, the two-octet authentication type
  312.    pair is "KEA_SJ_INTEG CLIENT_TO_SERVER AUTH_HOW_MUTUAL
  313.    ENCRYPT_AFTER_EXCHANGE INI_CRED_FWD_OFF".  This indicates that the
  314.    KEA SKIPJACK with integrity mechanism will be used for mutual
  315.    authentication and TELNET stream encryption.  Figure 2 illustrates
  316.    the authentication mechanism of KEA SKIPJACK with stream integrity.
  317.  
  318.    ---------------------------------------------------------------------
  319.     Client (Party A)                   Server (Party B)
  320.  
  321.                                        <-- IAC DO AUTHENTICATION
  322.  
  323.     IAC WILL AUTHENTICATION        -->
  324.  
  325.                                        <-- IAC SB AUTHENTICATION SEND
  326.                                            <list of authentication options>
  327.                                            IAC SE
  328.  
  329.     IAC SB AUTHENTICATION
  330.     NAME <user name>               -->
  331.  
  332.     IAC SB AUTHENTICATION IS
  333.     KEA_SJ_INTEG
  334.     CLIENT_TO_SERVER |
  335.         AUTH_HOW_MUTUAL |
  336.         ENCRYPT_AFTER_EXCHANGE |
  337.         INI_CRED_FWD_OFF
  338.     KEA_CERTA_RA
  339.     CertA||Ra IAC SE    -->
  340.  
  341.                                                                 [Page 7]
  342.  
  343. INTERNET DRAFT                                                 July 1999
  344.  
  345.                                        <-- IAC SB AUTHENTICATION REPLY
  346.                                            KEA_SJ_INTEG
  347.                                            CLIENT_TO_SERVER |
  348.                                                AUTH_HOW_MUTUAL |
  349.                                                ENCRYPT_AFTER_EXCHANGE |
  350.                                                INI_CRED_FWD_OFF
  351.                                            IVA_RESPONSEB_NONCEA
  352.                                            KEA_CERTB_RB_IVB_NONCEB
  353.                                            CertB||Rb||IVb||
  354.                                                       Encrypt( NonceB )
  355.                                            IAC SE
  356.  
  357.     IAC SB AUTHENTICATION IS
  358.     KEA_SJ_INTEG
  359.     CLIENT_TO_SERVER |
  360.         AUTH_HOW_MUTUAL |
  361.         ENCRYPT_AFTER_EXCHANGE |
  362.         INI_CRED_FWD_OFF
  363.     KEA_IVA_RESPONSEB_NONCEA
  364.     IVa||Encrypt( NonceB XOR 0x0D12||NonceA )
  365.     IAC SE                         -->
  366.  
  367.                                        <-- IAC SB AUTHENTICATION REPLY
  368.                                            KEA_SJ_INTEG
  369.                                            CLIENT_TO_SERVER |
  370.                                                AUTH_HOW_MUTUAL |
  371.                                                ENCRYPT_AFTER_EXCHANGE |
  372.                                                INI_CRED_FWD_OFF
  373.                                            KEA_RESPONSEA
  374.                                            Encrypt( NonceA XOR 0x0D12 )
  375.                                            IAC SE
  376.    ---------------------------------------------------------------------
  377.                                  Figure 2
  378.  
  379. 5.0.  Security Considerations
  380.  
  381.    This entire memo is about security mechanisms.  For KEA to provide
  382.    the authentication discussed, the implementation must protect the
  383.    private key from disclosure.  Likewise, the SKIPJACK keys must be
  384.    protected from disclosure.
  385.  
  386.    By linking the enabling of encryption as a side effect of successful
  387.    authentication, protection is provided against an active attacker.
  388.    If encryption were enabled as a separate negotiation, it would
  389.    provide a window of vulnerability from when the authentication
  390.    completes, up to and including the negotiation to turn on encryption.
  391.    The only safe way to restart encryption, if it is turned off, is to
  392.    repeat the entire authentication process.
  393.  
  394.                                                                 [Page 8]
  395.  
  396. INTERNET DRAFT                                                 July 1999
  397.  
  398. 6.0.  Acknowledgements
  399.  
  400.    We would like to thank William Nace for support during implementation
  401.    of this specification.
  402.  
  403. 7.0.  References
  404.  
  405.    [1] - Postel, J., Reynolds, J., "TELNET Protocol Specification".
  406.          RFC 854.  May 1983.
  407.  
  408.    [2] - T. Ts'o, "TELNET Authentication Option".
  409.          <draft-tso-telnet-auth-enc-02.txt>, July 1999.
  410.  
  411.    [3] - Secure Hash Standard. FIPS Pub 180-1. April 17, 1995.
  412.  
  413.    [4] - "SKIPJACK and KEA Algorithm Specification", Version 2.0,
  414.          May 29, 1998. Available from
  415.          http://csrc.nist.gov/encryption/skipjack-kea.htm
  416.  
  417.    [5] - Postel, J., Reynolds, J., "TELNET Option Specifications".
  418.          RFC 855.  May 1983.
  419.  
  420.    [6] - Housley, R., Ford, W., Polk, W. and D. Solo, "Internet
  421.          X.509 Public Key Infrastructure: X.509 Certificate and CRL
  422.          Profile", RFC 2459, January 1999.
  423.  
  424.    [7] - Housley, R., Polk, W. "Internet X.509 Public Key
  425.          Infrastructure Profile", RFC 2528, March 1999.
  426.  
  427. 8.0.  Authors' Addresses
  428.  
  429.    Russell Housley
  430.    SPYRUS
  431.    381 Elden Street, Suite 1120
  432.    Herndon, VA 20170 USA
  433.    Email: housley@spyrus.com
  434.  
  435.    Todd Horting
  436.    SPYRUS
  437.    381 Elden Street, Suite 1120
  438.    Herndon, VA 20170 USA
  439.    Email: thorting@spyrus.com
  440.  
  441.    Peter Yee
  442.    SPYRUS
  443.    5303 Betsy Ross Drive
  444.    Santa Clara, CA 95054 USA
  445.    Email: yee@spyrus.com
  446.  
  447.                                                                 [Page 9]
  448.  
  449. INTERNET DRAFT                                                 July 1999
  450.  
  451.                                                                [Page 10]
  452.