Network Working Group                                              T. Wu
Request for Comments: 2944                          Standford University
Category: Standards Track                                 September 2000
        
Network Working Group                                              T. Wu
Request for Comments: 2944                          Standford University
Category: Standards Track                                 September 2000
        

Telnet Authentication: SRP

Telnet身份验证:SRP

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2000). All Rights Reserved.

版权所有(C)互联网协会(2000年)。版权所有。

Abstract

摘要

This document specifies an authentication scheme for the Telnet protocol under the framework described in [RFC2941], using the Secure Remote Password Protocol (SRP) authentication mechanism. The specific mechanism, SRP-SHA1, is described in [RFC2945].

本文档使用安全远程密码协议(SRP)身份验证机制,在[RFC2941]中描述的框架下,为Telnet协议指定了身份验证方案。[RFC2945]中描述了具体的机制SRP-SHA1。

1. Command Names and Codes
1. 命令名和代码

Authentication Types

身份验证类型

SRP 5

SRP 5

Suboption Commands

子选项命令

AUTH 0 REJECT 1 ACCEPT 2 CHALLENGE 3 RESPONSE 4

验证0拒绝1接受2质询3响应4

EXP 8 PARAMS 9

EXP 8参数9

2. Command Meanings
2. 命令含义

IAC SB AUTHENTICATION IS <authentication-type-pair> AUTH IAC SE

IAC SB身份验证是<AUTHENTICATION type pair>AUTH IAC SE

This command indicates that the client has supplied the username and is ready to receive that user's field parameters. There is no authentication information to be sent to the remote side of the connection yet. This should only be sent after the IAC SB AUTHENTICATION NAME command has been issued. If the modifier byte (second byte of the authentication-type-pair) has any bits other than AUTH_WHO_MASK or AUTH_HOW_MASK set, both bytes are included in the session key hash described later. This ensures that the authentication type pair was correctly negotiated, while maintaining backward-compatibility with existing software.

此命令表示客户端已提供用户名并准备好接收该用户的字段参数。尚未将身份验证信息发送到连接的远程端。只有在发出IAC SB身份验证名称命令后,才应发送此消息。如果修饰符字节(身份验证类型对的第二个字节)具有除AUTH_WHO_MASK或AUTH_HOW_MASK设置之外的任何位,则这两个字节都包含在后面描述的会话密钥哈希中。这可确保正确协商身份验证类型对,同时保持与现有软件的向后兼容性。

   IAC SB AUTHENTICATION REPLY <authentication-type-pair> PARAMS <values
   of modulus, generator, and salt> IAC SE
        
   IAC SB AUTHENTICATION REPLY <authentication-type-pair> PARAMS <values
   of modulus, generator, and salt> IAC SE
        

This command is used to pass the three parameter values used in the exponentiation to the client. These values are often called n, g, and s.

此命令用于将求幂运算中使用的三个参数值传递给客户端。这些值通常称为n、g和s。

   IAC SB AUTHENTICATION IS <authentication-type-pair> EXP <client's
   exponential residue> IAC SE
        
   IAC SB AUTHENTICATION IS <authentication-type-pair> EXP <client's
   exponential residue> IAC SE
        

This command is used to pass the client's exponential residue, otherwise known as A, computed against the parameters exchanged earlier.

此命令用于传递根据先前交换的参数计算的客户机的指数剩余值(也称为A)。

   IAC SB AUTHENTICATION REPLY <authentication-type-pair> CHALLENGE
   <server's exponential residue> IAC SE
        
   IAC SB AUTHENTICATION REPLY <authentication-type-pair> CHALLENGE
   <server's exponential residue> IAC SE
        

This command is used to pass the server's exponential residue, computed against the same parameters. This quantity is actually the sum of two residues, i.e. g^x + g^b. For details see [SRP] and [RFC2945].

此命令用于传递根据相同参数计算的服务器指数剩余值。这个量实际上是两个残基的总和,即g^x+g^b。有关详细信息,请参见[SRP]和[RFC2945]。

   IAC SB AUTHENTICATION IS <authentication-type-pair> RESPONSE
   <response from client> IAC SE
        
   IAC SB AUTHENTICATION IS <authentication-type-pair> RESPONSE
   <response from client> IAC SE
        

This command gives the server proof of the client's authenticity with a 160-bit (20 byte) response.

此命令通过160位(20字节)响应向服务器提供客户端真实性的证明。

   IAC SB AUTHENTICATION REPLY <authentication-type-pair> ACCEPT
   <server's response> IAC SE
        
   IAC SB AUTHENTICATION REPLY <authentication-type-pair> ACCEPT
   <server's response> IAC SE
        

This command indicates that the authentication was successful. The server will construct its own proof of authenticity and include it as sub-option data.

此命令表示身份验证成功。服务器将构建自己的真实性证明,并将其作为子选项数据包含。

   IAC SB AUTHENTICATION REPLY <authentication-type-pair> REJECT
   <optional reason for rejection> IAC SE
        
   IAC SB AUTHENTICATION REPLY <authentication-type-pair> REJECT
   <optional reason for rejection> IAC SE
        

This command indicates that the authentication was not successful, and if there is any more data in the sub-option, it is an ASCII text message of the reason for the rejection.

此命令表示身份验证未成功,如果子选项中还有更多数据,则它是一条ASCII文本消息,说明拒绝的原因。

For the PARAMS command, since three pieces of data are being transmitted, each parameter is preceded by a 16-bit (two byte) length specifier in network byte order. The EXP commands do not have a count in front of the data because there is only one piece of data in that suboption. The CHALLENGE, RESPONSE, and ACCEPT data also do not have a count because they are all fixed in size.

对于PARAMS命令,由于传输了三段数据,每个参数前面都有一个16位(两字节)长度的说明符,按网络字节顺序排列。EXP命令在数据前面没有计数,因为该子选项中只有一条数据。质询、响应和接受数据也没有计数,因为它们的大小都是固定的。

3. Implementation Rules
3. 实施细则

Currently, only AUTH_CLIENT_TO_SERVER mode is supported. Although the SRP protocol effectively performs implicit mutual authentication as a result of the two-way proofs, only the AUTH_HOW_ONE_WAY authentication mode is currently defined. The AUTH_HOW_MUTUAL setting is being reserved for an explicit mutual-authentication variant of the SRP protocol to be defined in future specifications.

目前,仅支持“验证客户端到服务器”模式。尽管由于双向证明,SRP协议有效地执行隐式相互认证,但目前仅定义了AUTH_HOW_单向认证模式。AUTH_HOW_MUTUAL设置保留用于将来规范中定义的SRP协议的显式相互身份验证变体。

All large number data sent in the arguments of the PARAMS and EXP commands must be in network byte order, i.e. most significant byte first. No padding is used.

在PARAMS和EXP命令的参数中发送的所有大数据必须按网络字节顺序排列,即最高有效字节优先。不使用填充物。

The SRP-SHA1 mechanism, as described in [RFC2945] generates a 40-byte session key, which allows implementations to use different keys for incoming and outgoing traffic, increasing the security of the encrypted session. It is recommended that the Telnet ENCRYPT method, if it is used, be able to take advantage of the longer session keys.

[RFC2945]中所述的SRP-SHA1机制生成一个40字节的会话密钥,允许实现对传入和传出通信使用不同的密钥,从而提高加密会话的安全性。建议Telnet加密方法(如果使用)能够利用较长的会话密钥。

4. Examples
4. 例子

User "tjw" may wish to log in on machine "foo". The client would send IAC SB AUTHENTICATION NAME "tjw" IAC SE IAC SB AUTHENTICATION IS SRP AUTH IAC SE. The server would look up the field and salt parameters for "tjw" from its password file and send them back to the client. Client and server would then exchange exponential residues and calculate their session keys (after the client prompted "tjw" for

用户“tjw”可能希望登录计算机“foo”。客户端将发送IAC SB身份验证名称“tjw”IAC SE IAC SB身份验证为SRP AUTH IAC SE。服务器将从其密码文件中查找“tjw”的字段和salt参数,并将它们发送回客户端。然后,客户机和服务器将交换指数剩余数并计算它们的会话密钥(在客户机提示“tjw”请求后)

his password). Then, the client would send the server its proof that it knows the session key. The server would either send back an ACCEPT or a REJECT. If the server accepts authentication, it also sends its own proof that it knows the session key to the client.

他的密码)。然后,客户机将向服务器发送它知道会话密钥的证明。服务器将返回接受或拒绝。如果服务器接受身份验证,它还将自己知道会话密钥的证明发送给客户端。

Client Server IAC DO AUTHENTICATION IAC WILL AUTHENTICATION

客户端服务器IAC执行身份验证IAC将执行身份验证

[ The server is now free to request authentication information. ] IAC SB AUTHENTICATION SEND SRP CLIENT|ONE_WAY| ENCRYPT_USING_TELOPT SRP CLIENT|ONE_WAY IAC SE

[服务器现在可以自由请求身份验证信息。]IAC SB身份验证发送SRP客户端|单向|使用| TELOPT SRP客户端|单向IAC SE加密|

[ The server has requested SRP authentication. It has indicated a preference for ENCRYPT_USING_TELOPT, which requires the Telnet ENCRYPT option to be negotiated once authentication succeeds. If the client does not support this, the server is willing to fall back to an encryption-optional mode.

[服务器已请求SRP身份验证。它已指示使用_TELOPT加密_的首选项,这要求在身份验证成功后协商Telnet ENCRYPT选项。如果客户端不支持此操作,服务器愿意退回到加密可选模式。

The client will now respond with the name of the user that it wants to log in as. ]

客户机现在将以其想要登录的用户的名称进行响应。]

IAC SB AUTHENTICATION NAME "tjw" IAC SE IAC SB AUTHENTICATION IS SRP CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT AUTH IAC SE

IAC SB身份验证名称“tjw”IAC SE IAC SB身份验证是SRP客户端|单向|使用| TELOPT AUTH IAC SE加密|

[ The server looks up the appropriate information for "tjw" and sends back the parameters in a PARAMS command. The parameters consist of the values N, g, and s, each preceded with a two-byte size parameter. ]

[服务器查找“tjw”的适当信息,并在PARAMS命令中发回参数。参数包括值N、g和s,每个值前面都有一个两字节大小的参数。]

IAC SB AUTHENTICATION REPLY SRP CLIENT|ONE_WAY| ENCRYPT_USING_TELOPT PARAMS ss ss nn nn nn nn ... ss ss gg gg gg gg ... ss ss tt tt tt tt ... IAC SE

IAC SB身份验证回复SRP客户端|单向|使用| TELOPT参数ss nn加密|。。。ss ss gg gg gg gg。。。ss tt tt tt。。。IAC SE

[ Both sides send their exponential residues. The client sends its value A and the server sends its value B. In SRP, the CHALLENGE message may be computed but not sent before the EXP command. ]

[双方都发送其指数余数。客户端发送其值A,服务器发送其值B。在SRP中,质询消息可以计算,但不能在EXP命令之前发送。]

IAC SB AUTHENTICATION IS SRP CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT EXP aa aa aa aa aa aa aa aa ... IAC SE IAC SB AUTHENTICATION REPLY SRP CLIENT|ONE_WAY| ENCRYPT_USING_TELOPT CHALLENGE bb bb bb bb bb bb bb bb ... IAC SE

IAC SB身份验证是SRP客户端|单向|使用| TELOPT EXP aa加密|。。。IAC SE IAC SB身份验证回复SRP客户端|单向|使用| TELOPT挑战bb加密|。。。IAC SE

[ The client sends its response to the server. This is the message M in the SRP protocol, which proves possession of the session key by the client.

[客户端向服务器发送其响应。这是SRP协议中的消息M,它证明客户端拥有会话密钥。

Since ENCRYPT_USING_TELOPT is specified, the two octets of the authentication-type-pair are appended to the session key K before the hash for M is computed. If the client and server had agreed upon a mode without the encryption flag set, nothing would be appended to K.

由于指定了ENCRYPT_USING_TELOPT,因此在计算M的哈希之前,身份验证类型对的两个八位字节被附加到会话密钥K。如果客户机和服务器在没有设置加密标志的情况下同意了一种模式,则不会向K追加任何内容。

Both this message and the server's response are as long as the output of the hash; the length is 20 bytes for SHA-1. ]

此消息和服务器的响应都与散列的输出一样长;SHA-1的长度为20字节。]

IAC SB AUTHENTICATION IS SRP CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT RESPONSE xx xx xx xx xx xx xx xx ... IAC SE

IAC SB身份验证是SRP客户端|单向|使用| TELOPT响应| xx xx xx xx xx xx xx xx xx加密|。。。IAC SE

[ The server accepts the response and sends its own proof. ]

[服务器接受响应并发送自己的证明。]

IAC SB AUTHENTICATION REPLY SRP CLIENT|ONE_WAY| ENCRYPT_USING_TELOPT ACCEPT yy yy yy yy yy yy yy yy ... IAC SE

IAC SB身份验证回复SRP客户端|单向|使用| TELOPT加密|接受yy yy yy yy yy yy yy yy。。。IAC SE

5. Security Considerations
5. 安全考虑

The ability to negotiate a common authentication mechanism between client and server is a feature of the authentication option that should be used with caution. When the negotiation is performed, no authentication has yet occurred. Therefore, each system has no way of knowing whether or not it is talking to the system it intends. An intruder could attempt to negotiate the use of an authentication system which is either weak, or already compromised by the intruder.

在客户机和服务器之间协商通用身份验证机制的能力是身份验证选项的一项功能,应谨慎使用。执行协商时,尚未发生身份验证。因此,每个系统都无法知道它是否正在与它想要的系统对话。入侵者可能会尝试协商身份验证系统的使用,该系统要么很弱,要么已经被入侵者破坏。

Since SRP relies on the security of the underlying public-key cryptosystem, the modulus "n" should be large enough to resist brute-force attack. A length of at least 1024 bits is recommended, and implementations should reject attempts to use moduli that are shorter than 512 bits, or attempts to use invalid moduli and generator parameters (non-safe-prime "n" or non-primitive "g").

由于SRP依赖于底层公钥密码系统的安全性,因此模数“n”应足够大,以抵抗暴力攻击。建议长度至少为1024位,实现应拒绝尝试使用小于512位的模,或尝试使用无效的模和生成器参数(非安全素数“n”或非原语“g”)。

6. IANA Considerations
6. IANA考虑

The authentication type SRP and its associated suboption values are registered with IANA. Any suboption values used to extend the protocol as described in this document must be registered with IANA before use. IANA is instructed not to issue new suboption values without submission of documentation of their use.

身份验证类型SRP及其关联的子选项值在IANA中注册。如本文档所述,用于扩展协议的任何子选项值必须在使用前向IANA注册。IANA被指示在未提交使用文件的情况下不得发布新的子选项值。

7. References
7. 工具书类

[RFC2941] Ts'o, T. and J. Altman, "Telnet Authentication Option", RFC 2941, September 2000.

[RFC2941]Ts'o,T.和J.Altman,“Telnet认证选项”,RFC 29412000年9月。

[SRP] T. Wu, "The Secure Remote Password Protocol", In Proceedings of the 1998 ISOC Network and Distributed System Security Symposium, San Diego, CA, pp. 97-111.

[SRP]T.Wu,“安全远程密码协议”,1998年ISOC网络和分布式系统安全研讨会论文集,加利福尼亚州圣地亚哥,第97-111页。

[RFC2945] Wu, T., "The SRP Authentication and Key Exchange System", RFC 2945, September 2000.

[RFC2945]Wu,T.,“SRP认证和密钥交换系统”,RFC 29452000年9月。

8. Author's Address
8. 作者地址

Thomas Wu Stanford University Stanford, CA 94305

托马斯·吴斯坦福大学加利福尼亚州斯坦福94305

   EMail: tjw@cs.Stanford.EDU
        
   EMail: tjw@cs.Stanford.EDU
        
9. Full Copyright Statement
9. 完整版权声明

Copyright (C) The Internet Society (2000). All Rights Reserved.

版权所有(C)互联网协会(2000年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。