Debian Codegraph @

rfc2951.html

raw
1 <pre>Network Working Group R. Housley
2 Request for Comments: 2951 T. Horting
3 Category: Informational P. Yee
4 SPYRUS
5 September 2000
6
7
8 <span class="h1">TELNET Authentication Using KEA and SKIPJACK</span>
9
10 Status of this Memo
11
12 This memo provides information for the Internet community. It does
13 not specify an Internet standard of any kind. Distribution of this
14 memo is unlimited.
15
16 Copyright Notice
17
18 Copyright (C) The Internet Society (2000). All Rights Reserved.
19
20 Abstract
21
22 This document defines a method to authenticate TELNET using the Key
23 Exchange Algorithm (KEA), and encryption of the TELNET stream using
24 SKIPJACK. Two encryption modes are specified; one provides data
25 integrity and the other does not. The method relies on the TELNET
26 Authentication Option.
27
28 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Command Names and Codes</span>
29
30 AUTHENTICATION 37
31
32 Authentication Commands:
33
34 IS 0
35 SEND 1
36 REPLY 2
37 NAME 3
38
39 Authentication Types:
40
41 KEA_SJ 12
42 KEA_SJ_INTEG 13
43
44 Modifiers:
45
46 AUTH_WHO_MASK 1
47 AUTH_CLIENT_TO_SERVER 0
48 AUTH_SERVER_TO CLIENT 1
49
50
51
52 <span class="grey">Housley, et al. Informational [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
55
56
57 AUTH_HOW_MASK 2
58 AUTH_HOW_ONE_WAY 0
59 AUTH_HOW_MUTUAL 2
60
61 ENCRYPT_MASK 20
62 ENCRYPT_OFF 0
63 ENCRYPT_USING_TELOPT 4
64 ENCRYPT_AFTER_EXCHANGE 16
65 ENCRYPT_RESERVED 20
66
67 INI_CRED_FWD_MASK 8
68 INI_CRED_FWD_OFF 0
69 INI_CRED_FWD_ON 8
70
71 Sub-option Commands:
72
73 KEA_CERTA_RA 1
74 KEA_CERTB_RB_IVB_NONCEB 2
75 KEA_IVA_RESPONSEB_NONCEA 3
76 KEA_RESPONSEA 4
77
78 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. TELNET Security Extensions</span>
79
80 TELNET, as a protocol, has no concept of security. Without
81 negotiated options, it merely passes characters back and forth
82 between the NVTs represented by the two TELNET processes. In its
83 most common usage as a protocol for remote terminal access (TCP port
84 23), TELNET normally connects to a server that requires user-level
85 authentication through a user name and password in the clear. The
86 server does not authenticate itself to the user.
87
88 The TELNET Authentication Option provides for:
89
90 * User authentication -- replacing or augmenting the normal host
91 password mechanism;
92 * Server authentication -- normally done in conjunction with user
93 authentication;
94 * Session parameter negotiation -- in particular, encryption key
95 and attributes;
96 * Session protection -- primarily encryption of the data and
97 embedded command stream, but the encryption algorithm may also
98 provide data integrity.
99
100 In order to support these security services, the two TELNET entities
101 must first negotiate their willingness to support the TELNET
102 Authentication Option. Upon agreeing to support this option, the
103 parties are then able to perform sub-option negotiations to determine
104
105
106
107
108 <span class="grey">Housley, et al. Informational [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
111
112
113 the authentication protocol to be used, and possibly the remote user
114 name to be used for authorization checking. Encryption is negotiated
115 along with the type of the authentication.
116
117 Authentication and parameter negotiation occur within an unbounded
118 series of exchanges. The server proposes a preference-ordered list
119 of authentication types (mechanisms) that it supports. In addition
120 to listing the mechanisms it supports, the server qualifies each
121 mechanism with a modifier that specifies whether encryption of data
122 is desired. The client selects one mechanism from the list and
123 responds to the server indicating its choice and the first set of
124 authentication data needed for the selected authentication type. The
125 client may ignore a request to encrypt data and so indicate, but the
126 server may also terminate the connection if the client refuses
127 encryption. The server and the client then proceed through whatever
128 number of iterations is required to arrive at the requested
129 authentication.
130
131 Encryption is started immediately after the Authentication Option is
132 completed.
133
134 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Use of Key Exchange Algorithm (KEA)</span>
135
136 This paper specifies the method in which KEA is used to achieve
137 TELNET Authentication. KEA (in conjunction with SKIPJACK) [<a href="#ref-4" title="&quot;SKIPJACK and KEA Algorithm Specification&quot;">4</a>]
138 provides authentication and confidentiality. Integrity may also be
139 provided.
140
141 TELNET entities may use KEA to provide mutual authentication and
142 support for the setup of data encryption keys. A simple token format
143 and set of exchanges delivers these services.
144
145 NonceA and NonceB used in this exchange are 64-bit bit strings. The
146 client generates NonceA, and the server generates NonceB. The nonce
147 value is selected randomly. The nonce is sent in a big endian form.
148 The encryption of the nonce will be done with the same mechanism that
149 the session will use, detailed in the next section.
150
151 Ra and Rb used in this exchange are 1024 bit strings and are defined
152 by the KEA Algorithm [<a href="#ref-4" title="&quot;SKIPJACK and KEA Algorithm Specification&quot;">4</a>].
153
154 The IVa and IVb are 24 byte Initialization Vectors. They are
155 composed of "THIS IS NOT LEAF" followed by 8 random bytes.
156
157
158
159
160
161
162
163
164 <span class="grey">Housley, et al. Informational [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
167
168
169 CertA is the client's certificate. CertB is the server's
170 certificate. Both certificates are X.509 certificates [<a href="#ref-6" title="&quot;Internet X.509 Public Key Infrastructure: X.509 Certificate and CRL Profile&quot;">6</a>] that
171 contain KEA public keys [<a href="#ref-7" title="&quot;Internet X.509 Public Key Infrastructure - Representation of Key Exchange Algorithm (KEA) Keys in Internet X.509 Public Key Infrastructure Certificates&quot;">7</a>]. The client must validate the server's
172 certificate before using the KEA public key it contains. Likewise,
173 the server must validate the client's certificate before using the
174 KEA public key it contains.
175
176 On completing these exchanges, the parties have a common SKIPJACK
177 key. Mutual authentication is provided by verification of the
178 certificates used to establish the SKIPJACK encryption key and
179 successful use of the derived SKIPJACK session key. To protect
180 against active attacks, encryption will take place after successful
181 authentication. There will be no way to turn off encryption and
182 safely turn it back on; repeating the entire authentication is the
183 only safe way to restart it. If the user does not want to use
184 encryption, he may disable encryption after the session is
185 established.
186
187 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. SKIPJACK Modes</span>
188
189 There are two distinct modes for encrypting TELNET streams; one
190 provides integrity and the other does not. Because TELNET is
191 normally operated in a character-by-character mode, the SKIPJACK with
192 stream integrity mechanism requires the transmission of 4 bytes for
193 every TELNET data byte. However, a simplified mode SKIPJACK without
194 integrity mechanism will only require the transmission of one byte
195 for every TELNET data byte.
196
197 The cryptographic mode for SKIPJACK with stream integrity is Cipher
198 Feedback on 32 bits of data (CFB-32) and the mode of SKIPJACK is
199 Cipher Feedback on 8 bits of data (CFB-8).
200
201 <span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a>. SKIPJACK without stream integrity</span>
202
203 The first and least complicated mode uses SKIPJACK CFB-8. This mode
204 provides no stream integrity.
205
206 For SKIPJACK without stream integrity, the two-octet authentication
207 type pair is KEA_SJ AUTH_CLIENT_TO_SERVER | AUTH_HOW_MUTUAL |
208 ENCRYPT_AFTER_EXCHANGE | INI_CRED_FWD_OFF. This indicates that the
209 SKIPJACK without integrity mechanism will be used for mutual
210 authentication and TELNET stream encryption. Figure 1 illustrates
211 the authentication mechanism of KEA followed by SKIPJACK without
212 stream integrity.
213
214
215
216
217
218
219
220 <span class="grey">Housley, et al. Informational [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
223
224
225 ---------------------------------------------------------------------
226 Client (Party A) Server (Party B)
227
228 &lt;-- IAC DO AUTHENTICATION
229
230 IAC WILL AUTHENTICATION --&gt;
231
232 &lt;-- IAC SB AUTHENTICATION SEND
233 &lt;list of authentication options&gt;
234 IAC SE
235
236 IAC SB AUTHENTICATION
237 NAME &lt;user name&gt; --&gt;
238
239 IAC SB AUTHENTICATION IS
240 KEA_SJ
241 AUTH_CLIENT_TO_SERVER |
242 AUTH_HOW_MUTUAL |
243 ENCRYPT_AFTER_EXCHANGE |
244 INI_CRED_FWD_OFF
245 KEA_CERTA_RA
246 CertA||Ra IAC SE --&gt;
247
248 &lt;-- IAC SB AUTHENTICATION REPLY
249 KEA_SJ
250 AUTH_CLIENT_TO_SERVER |
251 AUTH_HOW_MUTUAL |
252 ENCRYPT_AFTER_EXCHANGE |
253 INI_CRED_FWD_OFF
254 IVA_RESPONSEB_NONCEA
255 KEA_CERTB_RB_IVB_NONCEB
256 CertB||Rb||IVb||
257 Encrypt( NonceB )
258 IAC SE
259
260 IAC SB AUTHENTICATION IS
261 KEA_SJ
262 AUTH_CLIENT_TO_SERVER |
263 AUTH_HOW_MUTUAL |
264 ENCRYPT_AFTER_EXCHANGE |
265 INI_CRED_FWD_OFF
266 KEA_IVA_RESPONSEB_NONCEA
267 IVa||Encrypt( (NonceB XOR 0x0C12)||NonceA )
268 IAC SE --&gt;
269
270
271
272
273
274
275
276 <span class="grey">Housley, et al. Informational [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
279
280
281 Client (Party A) Server (Party B)
282
283 &lt;client begins encryption&gt;
284 &lt;-- IAC SB AUTHENTICATION REPLY
285 KEA_SJ
286 AUTH_CLIENT_TO_SERVER |
287 AUTH_HOW_MUTUAL |
288 ENCRYPT_AFTER_EXCHANGE |
289 INI_CRED_FWD_OFF
290 KEA_RESPONSEA
291 Encrypt( NonceA XOR 0x0C12 )
292 IAC SE
293
294 &lt;server begins encryption&gt;
295 ---------------------------------------------------------------------
296 Figure 1.
297
298 <span class="h4"><a class="selflink" id="section-3.1.2" href="#section-3.1.2">3.1.2</a>. SKIPJACK with stream integrity</span>
299
300 SKIPJACK with stream integrity is more complicated. It uses the
301 SHA-1 [<a href="#ref-3">3</a>] one-way hash function to provide integrity of the
302 encryption stream as follows:
303
304 Set H0 to be the SHA-1 hash of a zero-length string.
305 Cn is the nth character in the TELNET stream.
306 Hn = SHA-1( Hn-1||Cn ), where Hn is the hash value
307 associated with the nth character in the stream.
308 ICVn is set to the three most significant bytes of Hn.
309 Transmit Encrypt( Cn||ICVn ).
310
311 The ciphertext that is transmitted is the SKIPJACK CFB-32 encryption
312 of ( Cn||ICVn ). The receiving end of the TELNET link reverses the
313 process, first decrypting the ciphertext, separating Cn and ICVn,
314 recalculating Hn, recalculating ICVn, and then comparing the received
315 ICVn with the recalculated ICVn. Integrity is indicated if the
316 comparison succeeds, and Cn can then be processed normally as part of
317 the TELNET stream. Failure of the comparison indicates some loss of
318 integrity, whether due to active manipulation or loss of
319 cryptographic synchronization. In either case, the only recourse is
320 to drop the TELNET connection and start over.
321
322 For SKIPJACK with stream integrity, the two-octet authentication type
323 pair is KEA_SJ_INTEG AUTH_CLIENT_TO_SERVER | AUTH_HOW_MUTUAL |
324 ENCRYPT_AFTER_EXCHANGE | INI_CRED_FWD_OFF. This indicates that the
325 KEA SKIPJACK with integrity mechanism will be used for mutual
326 authentication and TELNET stream encryption. Figure 2 illustrates
327 the authentication mechanism of KEA SKIPJACK with stream integrity.
328
329
330
331
332 <span class="grey">Housley, et al. Informational [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
335
336
337 ---------------------------------------------------------------------
338 Client (Party A) Server (Party B)
339
340 &lt;-- IAC DO AUTHENTICATION
341
342 IAC WILL AUTHENTICATION --&gt;
343
344 &lt;-- IAC SB AUTHENTICATION SEND
345 &lt;list of authentication options&gt;
346 IAC SE
347
348 IAC SB AUTHENTICATION
349 NAME &lt;user name&gt; --&gt;
350
351 IAC SB AUTHENTICATION IS
352 KEA_SJ_INTEG
353 AUTH_CLIENT_TO_SERVER |
354 AUTH_HOW_MUTUAL |
355 ENCRYPT_AFTER_EXCHANGE |
356 INI_CRED_FWD_OFF
357 KEA_CERTA_RA
358 CertA||Ra IAC SE --&gt;
359
360 &lt;-- IAC SB AUTHENTICATION REPLY
361 KEA_SJ_INTEG
362 AUTH_CLIENT_TO_SERVER |
363 AUTH_HOW_MUTUAL |
364 ENCRYPT_AFTER_EXCHANGE |
365 INI_CRED_FWD_OFF
366 IVA_RESPONSEB_NONCEA
367 KEA_CERTB_RB_IVB_NONCEB
368 CertB||Rb||IVb||
369 Encrypt( NonceB )
370 IAC SE
371
372 IAC SB AUTHENTICATION IS
373 KEA_SJ_INTEG
374 AUTH_CLIENT_TO_SERVER |
375 AUTH_HOW_MUTUAL |
376 ENCRYPT_AFTER_EXCHANGE |
377 INI_CRED_FWD_OFF
378 KEA_IVA_RESPONSEB_NONCEA
379 IVa||Encrypt( (NonceB XOR 0x0D12)||NonceA )
380 IAC SE --&gt;
381
382
383
384
385
386
387
388 <span class="grey">Housley, et al. Informational [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
391
392
393 Client (Party A) Server (Party B)
394
395 &lt;client begins encryption&gt;
396 &lt;-- IAC SB AUTHENTICATION REPLY
397 KEA_SJ_INTEG
398 AUTH_CLIENT_TO_SERVER |
399 AUTH_HOW_MUTUAL |
400 ENCRYPT_AFTER_EXCHANGE |
401 INI_CRED_FWD_OFF
402 KEA_RESPONSEA
403 Encrypt( NonceA XOR 0x0D12 )
404 IAC SE
405
406 &lt;server begins encryption&gt;
407 ---------------------------------------------------------------------
408 Figure 2
409
410 <span class="h3"><a class="selflink" id="section-4.0" href="#section-4.0">4.0</a>. Security Considerations</span>
411
412 This entire memo is about security mechanisms. For KEA to provide
413 the authentication discussed, the implementation must protect the
414 private key from disclosure. Likewise, the SKIPJACK keys must be
415 protected from disclosure.
416
417 Implementations must randomly generate KEA private keys,
418 initialization vectors (IVs), and nonces. The use of inadequate
419 pseudo-random number generators (PRNGs) to generate cryptographic
420 keys can result in little or no security. An attacker may find it
421 much easier to reproduce the PRNG environment that produced the keys,
422 searching the resulting small set of possibilities, rather than brute
423 force searching the whole key space. The generation of quality
424 random numbers is difficult. <a href="./rfc1750">RFC 1750</a> [<a href="#ref-8" title="&quot;Randomness Recommendations for Security&quot;">8</a>] offers important guidance
425 in this area, and Appendix 3 of FIPS Pub 186 [9] provides one quality
426 PRNG technique.
427
428 By linking the enabling of encryption as a side effect of successful
429 authentication, protection is provided against an active attacker.
430 If encryption were enabled as a separate negotiation, it would
431 provide a window of vulnerability from when the authentication
432 completes, up to and including the negotiation to turn on encryption.
433 The only safe way to restart encryption, if it is turned off, is to
434 repeat the entire authentication process.
435
436
437
438
439
440
441
442
443
444 <span class="grey">Housley, et al. Informational [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
447
448
449 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
450
451 The authentication types KEA_SJ and KEA_SJ_INTEG and their associated
452 suboption values are registered with IANA. Any suboption values used
453 to extend the protocol as described in this document must be
454 registered with IANA before use. IANA is instructed not to issue new
455 suboption values without submission of documentation of their use.
456
457 <span class="h3"><a class="selflink" id="section-6.0" href="#section-6.0">6.0</a>. Acknowledgements</span>
458
459 We would like to thank William Nace for support during implementation
460 of this specification.
461
462 <span class="h3"><a class="selflink" id="section-7.0" href="#section-7.0">7.0</a>. References</span>
463
464 [<a id="ref-1">1</a>] Postel, J. and J. Reynolds, "TELNET Protocol Specification", ASTD
465 8, <a href="./rfc854">RFC 854</a>, May 1983.
466
467 [<a id="ref-2">2</a>] Ts'o, T. and J. Altman, "Telnet Authentication Option", <a href="./rfc2941">RFC 2941</a>,
468 September 2000.
469
470 [<a id="ref-3">3</a>] Secure Hash Standard. FIPS Pub 180-1. April 17, 1995.
471
472 [<a id="ref-4">4</a>] "SKIPJACK and KEA Algorithm Specification", Version 2.0, May 29,
473 1998. Available from <a href="http://csrc.nist.gov/encryption/skipjack-kea.htm">http://csrc.nist.gov/encryption/skipjack-</a>
474 <a href="http://csrc.nist.gov/encryption/skipjack-kea.htm">kea.htm</a>
475
476 [<a id="ref-5">5</a>] Postel, J. and J. Reynolds, "TELNET Option Specifications", STD
477 8, <a href="./rfc855">RFC 855</a>, May 1983.
478
479 [<a id="ref-6">6</a>] Housley, R., Ford, W., Polk, W. and D. Solo, "Internet X.509
480 Public Key Infrastructure: X.509 Certificate and CRL Profile",
481 <a href="./rfc2459">RFC 2459</a>, January 1999.
482
483 [<a id="ref-7">7</a>] Housley, R. and W. Polk, "Internet X.509 Public Key
484 Infrastructure - Representation of Key Exchange Algorithm (KEA)
485 Keys in Internet X.509 Public Key Infrastructure Certificates",
486 <a href="./rfc2528">RFC 2528</a>, March 1999.
487
488 [<a id="ref-8">8</a>] Eastlake, D., Crocker, S. and J. Schiller, "Randomness
489 Recommendations for Security", <a href="./rfc1750">RFC 1750</a>, December 1994.
490
491 [9) National Institute of Standards and Technology. FIPS Pub 186:
492 Digital Signature Standard. 19 May 1994.
493
494
495
496
497
498
499
500 <span class="grey">Housley, et al. Informational [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
503
504
505 <span class="h3"><a class="selflink" id="section-8.0" href="#section-8.0">8.0</a>. Authors' Addresses</span>
506
507 Russell Housley
508 SPYRUS
509 381 Elden Street, Suite 1120
510 Herndon, VA 20170
511 USA
512
513 EMail: [email protected]
514
515
516 Todd Horting
517 SPYRUS
518 381 Elden Street, Suite 1120
519 Herndon, VA 20170
520 USA
521
522 EMail: [email protected]
523
524
525 Peter Yee
526 SPYRUS
527 5303 Betsy Ross Drive
528 Santa Clara, CA 95054
529 USA
530
531 EMail: [email protected]
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556 <span class="grey">Housley, et al. Informational [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc2951">RFC 2951</a> TELNET Authentication Using KEA &amp; SKIPJACK September 2000</span>
559
560
561 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Full Copyright Statement</span>
562
563 Copyright (C) The Internet Society (2000). All Rights Reserved.
564
565 This document and translations of it may be copied and furnished to
566 others, and derivative works that comment on or otherwise explain it
567 or assist in its implementation may be prepared, copied, published
568 and distributed, in whole or in part, without restriction of any
569 kind, provided that the above copyright notice and this paragraph are
570 included on all such copies and derivative works. However, this
571 document itself may not be modified in any way, such as by removing
572 the copyright notice or references to the Internet Society or other
573 Internet organizations, except as needed for the purpose of
574 developing Internet standards in which case the procedures for
575 copyrights defined in the Internet Standards process must be
576 followed, or as required to translate it into languages other than
577 English.
578
579 The limited permissions granted above are perpetual and will not be
580 revoked by the Internet Society or its successors or assigns.
581
582 This document and the information contained herein is provided on an
583 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
584 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
585 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
586 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
587 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
588
589 Acknowledgement
590
591 Funding for the RFC Editor function is currently provided by the
592 Internet Society.
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612 Housley, et al. Informational [Page 11]
613 </pre>