Secure Telnet Working Group Russell Housley (SPYRUS) Todd Horting (SPYRUS) Internet-Draft Peter Yee (SPYRUS) Expire in six months February 1998 Telnet Authentication Using DSA Status of this Memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are Draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as ''work in progress.'' To learn the current status of any Internet-Draft, please check the "1id-abstRacts.txt" listing contained in the Internet-Drafts Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). Distribution of this memo is unlimited. Please send comments to the mailing list. Abstract This document defines a method to authenticate telnet using the Digital Signature Algorithm (DSA) [2]. It relies on the Telnet Authentication Option [1]. 1 Introduction The Telnet protocol provides no protocol security. Telnet servers may require users to login. This is typically a host level login consisting of a user name and a password, transmitted in the clear. The mechanism specified in this document relies on the Telnet Authentication Option [1]. Housley, Horting & Yee [Page 1] INTERNET DRAFT February 1998 2 Telnet Security Extensions Telnet, as a protocol, has no concept of security. Without negotiated options, it merely passes characters back and forth between the NVTs represented by the two Telnet processes. In its most common usage as a protocol for remote terminal access (TCP port 23), Telnet normally connects to a server that requires user-level authentication through a user name and password in the clear. The server does not authenticate itself to the user. The Telnet Authentication Option provide for user authentication and server authentication. User authentication replaces or augments the normal host password mechanism. Server authentication is normally done in conjunction with user authentication. In order to support these security services, the two Telnet entities must first negotiate their willingness to support the Telnet Authentication Option. Upon agreeing to support these options, the parties are then able to perform subnegotiations to determine the authentication protocol to be used, and possibly the remote user name to be used for authorization checking. Authentication and parameter negotiation occur within an unbounded series of exchanges. The server proposes a preference-ordered list of authentication types (mechanisms) which it supports. In addition to listing the mechanisms it supports, the server qualifies each mechanism with a modifier that specifies whether the authentication is to be one-way or mutual, and in which direction the authentication is to be performed. The client selects one mechanism from the list and responds to the server indicating its choice and the first set of authentication data needed for the selected authentication type. The server and the client then proceed through whatever number of iterations are required to arrive at the requested authentication. 3 Use of Digital Signature Algorithm (DSA) This paper specifies a method in which DSA may be used to achieve certain security services when used in conjunction with the Telnet Authentication Option. SHA-1 [3] is used with DSA [2]. DSA may provide either unilateral or mutual authentication. Due to Telnet's character-by-character nature, it is not well-suited to the application of integrity-only services, therefore use of the DSA profile provides authentication but it does not provide session integrity. This specification follows the token and exchanges defined in NIST FIPS PUB 196 [4], Standard for Public Key Cryptographic Entity Authentication Mechanisms, draft of 28 February 1995, including Appendix A on ASN.1 encoding of messages and tokens. Housley, Horting & Yee [Page 2] INTERNET DRAFT February 1998 3.1 Unilateral Authentication with DSA Unilateral authentication must be done client-to-server. What follows are the protocol steps necessary to perform DSA authentication as specified in FIPS PUB 196 under the Telnet Authentication Option framework. Where failure modes are encountered, the return codes follow those specified in the Telnet Authentication Option. They are not enumerated here, as they are invariant among the mechanisms used. FIPS PUB 196 employs a set of exchanges that are transferred to provide authentication. Each exchange employs various fields and tokens, some of which are optional. In addition, each token has several subfields that are optional. A conformant subset of the fields and subfields have been selected. Therefore, the exchanges below do not show the FIPS PUB 196 notations indicating optional fields, as all subfields used are mandatory. The tokens are ASN.1 encoded as defined in Appendix A of FIPS PUB 196, and each token is named to indicate the direction in which it flows (e.g., TokenBA flows from Party B to Party A). In Figure 1, the client binds the last transmission (token identifier, certificate, and token) together as an ASN.1 SEQUENCE. During authentication, the client may provide the user name to the server by using the authentication name sub-option. If the name sub- option is not used, the server will generally prompt for a name and password in the clear. The name sub-option must be sent after the server sends the list of authentication types supported and before the client finishes the authentication exchange, this ensures that the server will not prompt for a user name and password. In figure 1, the name sub-option is sent immediately after the server presents the list of authentication types supported. For one-way DSA authentication, the two-octet authentication type pair is "DSA CLIENT-TO-SERVER ONE-WAY ENCRYPT_OFF INI_CRED_FWD_OFF." This is encoded as two-octets: '0B01' in hexadecimal. This indicates that the DSA authentication mechanism will be used to authenticate the client to the server, and that no encryption will be performed. Within the unbounded authentication exchange, implementation is greatly simplified if each portion of the exchange carries a unique identifier. For this reason, a single octet suboption identifier is carried immediately after the two-octet authentication type pair. The exchanges detailed below, in Figure 1, presume knowledge of FIPS PUB 196 and the Telnet Authentication Option. The client is Party A, while the server is Party B. At the end of the exchanges, the client is authenticated to the server. Housley, Horting & Yee [Page 3] INTERNET DRAFT February 1998 --------------------------------------------------------------------- Client (Party A) Server (Party B) <-- IAC DO AUTHENTICATION IAC WILL AUTHENTICATION --> <-- IAC SB AUTHENTICATION SEND IAC SE IAC SB AUTHENTICATION NAME --> IAC SB AUTHENTICATION IS '0B01' '1' IAC SE --> <-- IAC SB AUTHENTICATION REPLY '0B01' '2' Base64( Sequence( TokenID, TokenBA ) ) IAC SE IAC SB AUTHENTICATION IS '0B01' '3' Base64( Sequence( TokenID, CertA, TokenAB ) ) IAC SE --> --------------------------------------------------------------------- Figure 1 3.2 Mutual Authentication with DSA Mutual authentication is slightly more complex. Figure 2 illustrates the exchanges. For mutual DSA authentication, the two-octet authentication type pair is "DSA CLIENT-TO-SERVER MUTUAL ENCRYPT_OFF INI_CRED_FWD_OFF." This is encoded as two-octets: '0B03' in hexadecimal. This indicates that the DSA authentication mechanism will be used to mutually authenticate the client and the server, and that no encryption will be performed. Housley, Horting & Yee [Page 4] INTERNET DRAFT February 1998 --------------------------------------------------------------------- Client (Party A) Server (Party B) IAC WILL AUTHENTICATION --> <-- IAC DO AUTHENTICATION <-- IAC SB AUTHENTICATION SEND IAC SE IAC SB AUTHENTICATION NAME --> IAC SB AUTHENTICATION IS '0B03' '1' IAC SE --> <-- IAC SB AUTHENTICATION REPLY '0B03' '2' Base64( Sequence( TokenID, TokenBA ) ) IAC SE IAC SB AUTHENTICATION IS '0B03' '3' Base64( Sequence( TokenID, CertA, TokenAB ) ) IAC SE --> <-- IAC SB AUTHENTICATION REPLY '0B03' '4' Base64( Sequence( TokenID, CertB, TokenBA2 ) ) IAC SE --------------------------------------------------------------------- Figure 2 4.0 Security Considerations This entire memo is about security mechanisms. For DSA to provide the authentication discussed, the implementation must protect the private key from disclosure. 5.0 Acknowledgements We would like to thank William Nace for support during implementation of this specification. Housley, Horting & Yee [Page 5] INTERNET DRAFT February 1998 6.0 References [1] - Borman, David A. "Telnet Authentication Option". RFC 1416. February 1993. [2] - Digital Signature Standard (DSS). FIPS Pub 186. May 19, 1994. [3] - Secure Hash Standard. FIPS Pub 180-1. April 17, 1995. [4] - Standard for Entity Authentication Using Public Key Cryptography. FIPS Pub 196. February 18, 1997. 7.0 Author's Address Russell Housley SPYRUS PO Box 1198 Herndon, VA 20172 USA Phone: +1 703 435-7344 Email: housley@spyrus.com Todd Horting SPYRUS PO Box 1198 Herndon, VA 20172 USA Phone: +1 703 435-4711 Email: thorthing@spyrus.com Peter Yee SPYRUS 2460 N. First Street Suite 100 San Jose, CA 95131-1023 USA Phone: +1 408 432-8180 Email: yee@spyrus.com Housley, Horting & Yee [Page 6]