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

  1.  
  2. Network Working Group                                              T. Wu
  3. Internet-Draft: draft-altman-rfc2944bis-02          Standford University
  4. Obsoletes: 2944                                                J. Altman
  5.                                                      Columbia University
  6.                                                               April 2002
  7.  
  8.  
  9.                        Telnet Authentication: SRP
  10.  
  11. Status of this Memo
  12.  
  13.    This document is an Internet-Draft and is in full conformance with
  14.    all provisions of Section 10 of RFC2026.  Internet-Drafts are working
  15.    documents of the Internet Engineering Task Force (IETF), its areas,
  16.    and its working groups.  Note that other groups may also distribute
  17.    working documents as Internet-Drafts.
  18.  
  19.    Internet-Drafts are draft documents valid for a maximum of six months
  20.    and may be updated, replaced, or obsoleted by other documents at any
  21.    time.  It is inappropriate to use Internet-Drafts as reference
  22.    material or to cite them other than as "work in progress."
  23.  
  24.    The list of current Internet-Drafts can be accessed at
  25.    http://www.ietf.org/ietf/1id-abstracts.txt
  26.  
  27.    The list of Internet-Draft Shadow Directories can be accessed at
  28.    http://www.ietf.org/shadow.html.
  29.  
  30.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  31.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  32.    document are to be interpreted as described in RFC 2119.
  33.  
  34. Abstract
  35.  
  36.    This document specifies an authentication scheme for the Telnet
  37.    protocol under the framework described in [1], using the Secure
  38.    Remote Password Protocol (SRP) authentication mechanism.  The
  39.    specific mechanism, SRP-SHA1, is described in [RFC2945].
  40.  
  41.    This document updates a previous specification of the Telnet
  42.    Authentication SRP method, RFC 2944, to allow SRP Telnet authentication
  43.    to be used in conjunction with the START_TLS option [2].
  44.  
  45. 0. Changes since RFC 2944
  46.  
  47.    . Consolidates and expands the security considerations section
  48.  
  49.    . Describes integration with START_TLS 
  50.  
  51. 1. Command Names and Codes
  52.  
  53.    Authentication Types
  54.  
  55.       SRP          5
  56.  
  57.    Suboption Commands
  58.  
  59.       AUTH         0
  60.       REJECT       1
  61.       ACCEPT       2
  62.       CHALLENGE    3
  63.       RESPONSE     4
  64.  
  65.       EXP          8
  66.       PARAMS       9
  67.  
  68. 2. Command Meanings
  69.  
  70.    IAC SB AUTHENTICATION IS <authentication-type-pair> AUTH IAC SE
  71.  
  72.       This command indicates that the client has supplied the
  73.       username and is ready to receive that user's field parameters.
  74.       There is no authentication information to be sent to the remote
  75.       side of the connection yet.  This should only be sent after the
  76.       IAC SB AUTHENTICATION NAME command has been issued.  If the
  77.       modifier byte (second byte of the authentication-type-pair)
  78.       has any bits other than AUTH_WHO_MASK or AUTH_HOW_MASK set,
  79.       both bytes are included in the session key hash described later.
  80.       This ensures that the authentication type pair was correctly
  81.       negotiated, while maintaining backward-compatibility with existing
  82.       software.
  83.  
  84.       If the ENCRYPT_START_TLS bit mask is in use, the checksum must 
  85.       concatenate the TLS Client Finished Message and TLS Server Finished
  86.       Message to the authentication-type-pair in the session key hash.
  87.       This ensure that the TLS negotiation was not susceptible to a man
  88.       in the middle attack if the TLS credentials are not verified.
  89.  
  90.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> PARAMS <values
  91.    of modulus, generator, and salt> IAC SE
  92.  
  93.       This command is used to pass the three parameter values used
  94.       in the exponentiation to the client.  These values are often
  95.       called n, g, and s.
  96.  
  97.    IAC SB AUTHENTICATION IS <authentication-type-pair> EXP <client's
  98.    exponential residue> IAC SE
  99.  
  100.       This command is used to pass the client's exponential residue,
  101.       otherwise known as A, computed against the parameters exchanged
  102.       earlier.
  103.  
  104.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> CHALLENGE
  105.    <server's exponential residue> IAC SE
  106.  
  107.       This command is used to pass the server's exponential residue,
  108.       computed against the same parameters.  This quantity is actually
  109.       the sum of two residues, i.e. g^x + g^b.  For details see [SRP]
  110.       and [RFC2945].
  111.  
  112.    IAC SB AUTHENTICATION IS <authentication-type-pair> RESPONSE
  113.    <response from client> IAC SE
  114.  
  115.       This command gives the server proof of the client's authenticity
  116.       with a 160-bit (20 byte) response.
  117.  
  118.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> ACCEPT
  119.    <server's response> IAC SE
  120.  
  121.       This command indicates that the authentication was successful.
  122.       The server will construct its own proof of authenticity and
  123.       include it as sub-option data.
  124.  
  125.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> REJECT
  126.    <optional reason for rejection> IAC SE
  127.  
  128.       This command indicates that the authentication was not successful,
  129.       and if there is any more data in the sub-option, it is an ASCII
  130.       text message of the reason for the rejection.
  131.  
  132.    For the PARAMS command, since three pieces of data are being
  133.    transmitted, each parameter is preceded by a 16-bit (two byte) length
  134.    specifier in network byte order.  The EXP commands do not have a
  135.    count in front of the data because there is only one piece of data in
  136.    that suboption.  The CHALLENGE, RESPONSE, and ACCEPT data also do not
  137.    have a count because they are all fixed in size.
  138.  
  139. 3. Implementation Rules
  140.  
  141.    Currently, only AUTH_CLIENT_TO_SERVER mode is supported.  Although
  142.    the SRP protocol effectively performs implicit mutual authentication
  143.    as a result of the two-way proofs, only the AUTH_HOW_ONE_WAY
  144.    authentication mode is currently defined.  The AUTH_HOW_MUTUAL
  145.    setting is being reserved for an explicit mutual-authentication
  146.    variant of the SRP protocol to be defined in future specifications.
  147.  
  148.    All large number data sent in the arguments of the PARAMS and EXP
  149.    commands must be in network byte order, i.e. most significant byte
  150.    first.  No padding is used.
  151.  
  152.    The SRP-SHA1 mechanism, as described in [RFC2945] generates a 40-byte
  153.    session key, which allows implementations to use different keys for
  154.    incoming and outgoing traffic, increasing the security of the
  155.    encrypted session.  It is recommended that the Telnet ENCRYPT method,
  156.    if it is used, be able to take advantage of the longer session keys.
  157.  
  158. 4. Examples
  159.  
  160.    User "tjw" may wish to log in on machine "foo".  The client would
  161.    send IAC SB AUTHENTICATION NAME "tjw" IAC SE IAC SB AUTHENTICATION IS
  162.    SRP AUTH IAC SE.  The server would look up the field and salt
  163.    parameters for "tjw" from its password file and send them back to the
  164.    client.  Client and server would then exchange exponential residues
  165.    and calculate their session keys (after the client prompted "tjw" for
  166.    his password).  Then, the client would send the server its proof that
  167.    it knows the session key.  The server would either send back an
  168.    ACCEPT or a REJECT.  If the server accepts authentication, it also
  169.    sends its own proof that it knows the session key to the client.
  170.  
  171.         Client                           Server
  172.                                          IAC DO AUTHENTICATION
  173.         IAC WILL AUTHENTICATION
  174.  
  175.         [ The server is now free to request authentication information.  ]
  176.                                          IAC SB AUTHENTICATION SEND
  177.                                          SRP CLIENT|ONE_WAY|
  178.                                          ENCRYPT_USING_TELOPT
  179.                                          SRP CLIENT|ONE_WAY
  180.                                          IAC SE
  181.  
  182.         [ The server has requested SRP authentication.  It has indicated
  183.           a preference for ENCRYPT_USING_TELOPT, which requires the
  184.           Telnet ENCRYPT option to be negotiated once authentication
  185.           succeeds.  If the client does not support this, the server
  186.           is willing to fall back to an encryption-optional mode.
  187.  
  188.           The client will now respond with the name of the
  189.           user that it wants to log in as. ]
  190.  
  191.         IAC SB AUTHENTICATION NAME
  192.         "tjw" IAC SE
  193.         IAC SB AUTHENTICATION IS
  194.         SRP CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT AUTH
  195.         IAC SE
  196.  
  197.         [ The server looks up the appropriate information for "tjw" and
  198.           sends back the parameters in a PARAMS command.  The parameters
  199.           consist of the values N, g, and s, each preceded with a two-
  200.           byte size parameter. ]
  201.  
  202.                                          IAC SB AUTHENTICATION REPLY
  203.                                          SRP CLIENT|ONE_WAY|
  204.                                          ENCRYPT_USING_TELOPT PARAMS
  205.                                          ss ss nn nn nn nn ...
  206.                                          ss ss gg gg gg gg ...
  207.                                          ss ss tt tt tt tt ...
  208.                                          IAC SE
  209.  
  210.         [ Both sides send their exponential residues.  The client
  211.           sends its value A and the server sends its value B.  In SRP,
  212.           the CHALLENGE message may be computed but not sent before
  213.           the EXP command.  ]
  214.  
  215.         IAC SB AUTHENTICATION IS
  216.         SRP CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT EXP
  217.         aa aa aa aa aa aa aa aa ...
  218.         IAC SE
  219.                                          IAC SB AUTHENTICATION REPLY
  220.                                          SRP CLIENT|ONE_WAY|
  221.                                          ENCRYPT_USING_TELOPT CHALLENGE
  222.                                          bb bb bb bb bb bb bb bb ...
  223.                                          IAC SE
  224.  
  225.         [ The client sends its response to the server.  This is the
  226.           message M in the SRP protocol, which proves possession of
  227.           the session key by the client.
  228.  
  229.           Since ENCRYPT_USING_TELOPT is specified, the two octets
  230.           of the authentication-type-pair are appended to the
  231.           session key K before the hash for M is computed.  If
  232.           the client and server had agreed upon a mode without
  233.           the encryption flag set, nothing would be appended to K.
  234.  
  235.           Both this message and the server's response are as long as
  236.           the output of the hash; the length is 20 bytes for SHA-1. ]
  237.  
  238.         IAC SB AUTHENTICATION IS
  239.         SRP CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT RESPONSE
  240.         xx xx xx xx xx xx xx xx ...
  241.         IAC SE
  242.  
  243.         [ The server accepts the response and sends its own proof. ]
  244.  
  245.                                          IAC SB AUTHENTICATION REPLY
  246.                                          SRP CLIENT|ONE_WAY|
  247.                                          ENCRYPT_USING_TELOPT ACCEPT
  248.                                          yy yy yy yy yy yy yy yy ...
  249.                                          IAC SE
  250.  
  251. 5. Security Considerations
  252.  
  253.    The ability to negotiate a common authentication mechanism between
  254.    client and server is a feature of the authentication option that
  255.    should be used with caution.  When the negotiation is performed, no
  256.    authentication has yet occurred.  Therefore, each system has no way
  257.    of knowing whether or not it is talking to the system it intends.  An
  258.    intruder could attempt to negotiate the use of an authentication
  259.    system which is either weak, or already compromised by the intruder.
  260.  
  261.    Since SRP relies on the security of the underlying public-key
  262.    cryptosystem, the modulus "n" should be large enough to resist
  263.    brute-force attack.  A length of at least 1024 bits is recommended,
  264.    and implementations should reject attempts to use moduli that are
  265.    shorter than 512 bits, or attempts to use invalid moduli and
  266.    generator parameters (non-safe-prime "n" or non-primitive "g").
  267.  
  268.    As an implementation of the TELNET AUTH option [1] all of the 
  269.    Security Considerations from that RFC MUST be considered 
  270.    applicable to this sub-option.
  271.  
  272.    This mechanism does not include all of the telnet authentication 
  273.    negotiation exchanges in the integrity checksum as recommended in [2].  
  274.    This means that the selection of this option is vulnerable to downgrade
  275.    attacks when multiple authentication type pairs are offered by the
  276.    server.
  277.  
  278. 6. IANA Considerations
  279.  
  280.    The authentication type SRP and its associated suboption values are
  281.    registered with IANA.  Any suboption values used to extend the
  282.    protocol as described in this document must be registered with IANA
  283.    before use.  IANA is instructed not to issue new suboption values
  284.    without submission of documentation of their use.
  285.  
  286. 7. References
  287.  
  288.    [1] Ts'o, T. and J. Altman, "Telnet Authentication Option", 
  289.        draft-altman-rfc2941bis-??.txt.
  290.  
  291.    [2] Altman, J. and Boe, M., "TLS-based Telnet Security", 
  292.        draft-ietf-tn3270e-telnet-tls-??.txt.
  293.  
  294.    [SRP]       T. Wu, "The Secure Remote Password Protocol", In
  295.                Proceedings of the 1998 ISOC Network and Distributed
  296.                System Security Symposium, San Diego, CA, pp. 97-111.
  297.  
  298.    [RFC2945]   Wu, T., "The SRP Authentication and Key Exchange System",
  299.                RFC 2945, September 2000.
  300.  
  301. 8. Author's Address
  302.  
  303.    Thomas Wu
  304.    Stanford University
  305.    Stanford, CA 94305
  306.  
  307.    EMail: tjw@cs.Stanford.EDU
  308.  
  309.    Jeffrey Altman
  310.    Columbia University
  311.    Watson Hall Room 716
  312.    612 West 115th Street
  313.    New York NY 10025
  314.  
  315.    Phone: +1 (212) 854-1344
  316.    EMail: jaltman@columbia.edu
  317.  
  318.    Mailing List: telnet-wg@BSDI.COM
  319.  
  320. 9.  Full Copyright Statement
  321.  
  322.    Copyright (C) The Internet Society (2000).  All Rights Reserved.
  323.  
  324.    This document and translations of it may be copied and furnished to
  325.    others, and derivative works that comment on or otherwise explain it
  326.    or assist in its implementation may be prepared, copied, published
  327.    and distributed, in whole or in part, without restriction of any
  328.    kind, provided that the above copyright notice and this paragraph are
  329.    included on all such copies and derivative works.  However, this
  330.    document itself may not be modified in any way, such as by removing
  331.    the copyright notice or references to the Internet Society or other
  332.    Internet organizations, except as needed for the purpose of
  333.    developing Internet standards in which case the procedures for
  334.    copyrights defined in the Internet Standards process must be
  335.    followed, or as required to translate it into languages other than
  336.    English.
  337.  
  338.    The limited permissions granted above are perpetual and will not be
  339.    revoked by the Internet Society or its successors or assigns.
  340.  
  341.    This document and the information contained herein is provided on an
  342.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  343.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  344.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  345.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  346.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  347.  
  348. Acknowledgement
  349.  
  350.    Funding for the RFC Editor function is currently provided by the
  351.    Internet Society.
  352.  
  353.