RFC 2943 TELNET Authentication Using DSA September 2000
AUTH_HOW_MASK 2
AUTH_HOW_ONE_WAY 0
AUTH_HOW_MUTUAL 2
ENCRYPT_MASK 20
ENCRYPT_OFF 0
ENCRYPT_USING_TELOPT 4
ENCRYPT_AFTER_EXCHANGE 16
ENCRYPT_RESERVED 20
INI_CRED_FWD_MASK 8
INI_CRED_FWD_OFF 0
INI_CRED_FWD_ON 8
Sub-option Commands:
DSS_INITIALIZE 1
DSS_TOKENBA 2
DSS_CERTA_TOKENAB 3
DSS_CERTB_TOKENBA2 4
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 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 provides 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 this option, the
parties are then able to perform sub-option negotiations to 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
Housley, et al. Standards Track [Page 2]

RFC 2943 TELNET Authentication Using DSA September 2000
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)
DSA is also known as the Digital Signature Standard (DSS), and the
names are used interchangeably. 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
[FIPS180-1] is used with DSA [FIPS186].
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 [FIPS196], Standard for Public Key
Cryptographic Entity Authentication Mechanisms including Appendix A
on ASN.1 encoding of messages and tokens. All data that is covered
by a digital signature must be encoded using the Distinguished
Encoding Rules (DER). However, other data may use either the Basic
Encoding Rules (BER) or DER [X.208].
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. 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). All
data that is covered by a digital signature must be encoded using the
Housley, et al. Standards Track [Page 3]

RFC 2943 TELNET Authentication Using DSA September 2000
Distinguished Encoding Rules (DER). Data that is not covered by a
digital signature may use either the Basic Encoding Rules (BER) or
DER [X.208]. Figure 1 illustrates the exchanges for unilateral
authentication.
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 DSS authentication, the two-octet authentication type
pair is DSS AUTH_CLIENT_TO_SERVER | AUTH_HOW_ONE_WAY | ENCRYPT_OFF |
INI_CRED_FWD_OFF. This indicates that the DSS authentication
mechanism will be used to authenticate the client to the server and
that no encryption will be performed.
CertA is the clients certificate. Both certificates are X.509
certificates that contain DSS public keys[RFC2459]. The client must
validate the server's certificate before using the DSA public key it
contains.
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 sub-option identifier is
carried immediately after the two-octet authentication type pair.
The exchanges detailed in Figure 1 below 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, et al. Standards Track [Page 4]

RFC 2943 TELNET Authentication Using DSA September 2000
TokenId ::= SEQUENCE {
tokenType INTEGER, -- see table below
protoVerNo INTEGER } -- always 0x0001
TimeStamp ::= GeneralizedTime
The TokenId.TokenType is used to distinguish the message type and the
authentication type (either unilateral or mutual). The following
table provides the values needed to implement this specification:
Message Type Authentication Type TokenId.TokenType
MessageBA Unilateral 0x0001
Mutual 0x0011
MessageAB Unilateral 0x0002
Mutual 0x0012
MessageBA Mutual 0x0013
5. 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.
Implementations must randomly generate DSS private keys, 'k' values
used in DSS signatures, and nonces. The use of inadequate pseudo-
random number generators (PRNGs) to generate cryptographic values can
result in little or no security. An attacker may find it much easier
to reproduce the PRNG environment that produced the values, searching
the resulting small set of possibilities, rather than using a brute
force search. The generation of quality random numbers is difficult.
RFC 1750 [RFC1750] offers important guidance in this area, and
Appendix 3 of FIPS PUB 186 [FIPS186] provides one quality PRNG
technique.
6. Acknowledgements
We would like to thank William Nace for support during implementation
of this specification.
Housley, et al. Standards Track [Page 9]

RFC 2943 TELNET Authentication Using DSA September 200010. Full Copyright Statement
Copyright (C) The Internet Society (2000). All Rights Reserved.
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.
Housley, et al. Standards Track [Page 12]