6 INTERNET-DRAFT Clifford Neuman
7 <draft-ietf-cat-kerberos-passwords-03.txt> ISI
8 Updates: RFC 1510 Glen Zorn
9 August 6, 1998 Microsoft Corporation
17 Integrating Single-use Authentication Mechanisms with Kerberos
20 0. Status Of this Memo
21 This document is an Internet-Draft. Internet-Drafts are working
22 documents of the Internet Engineering Task Force (IETF), its areas,
23 and its working groups. Note that other groups may also distribute
24 working documents as Internet-Drafts.
26 Internet-Drafts are draft documents valid for a maximum of six
27 months and may be updated, replaced, or obsoleted by other docu-
28 ments at any time. It is inappropriate to use Internet-Drafts as
29 reference material or to cite them other than as ``work in pro-
32 To learn the current status of any Internet-Draft, please check the
33 ``1id-abstracts.txt'' listing contained in the Internet-Drafts Sha-
34 dow Directories on ftp.ietf.org (US East Coast), nic.nordu.net
35 (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
38 The distribution of this memo is unlimited. It is filed as
39 <draft-ietf-cat-kerberos-passwords-03.txt>, and expires Feburary
40 11, 1999. Please send comments to the authors.
44 This document defines extensions to the Kerberos protocol specifi-
45 cation [RFC1510] which provide a method by which a variety of
46 single-use authentication mechanisms may be supported within the
47 protocol. The method defined specifies a standard fashion in which
48 the preauthentication data and error data fields in Kerberos mes-
49 sages may be used to support single-use authentication mechanisms.
53 To simplify the following discussion, we will define those terms
54 which may be unfamiliar to the audience or specific to the discus-
57 Single-use Preauthentication Data (SPD): Data sent in the padata-
58 value field of a Kerberos V5 message proving that knowledge of cer-
59 tain unique information is held by a principal. This information
63 Neuman, Zorn, Hornstein [Page 1]
69 INTERNET-DRAFT August 6, 1998
72 may or may not be identical to the single-use authentication data
73 input to the client. For example, in the case of S/Key, the prin-
74 cipal might input a one-time password (in any of several forms);
75 the knowledge of this one-time password is taken to indicate
76 knowledge of the principal's secret passphrase. Similarly, the SPD
77 may or may not contain the provided single-use authentication data.
78 For instance, if a given single-use authentication mechanism
79 includes a token which generates an encryption key for a supported
80 cryptosystem, that key could be used to encrypt portions of the SPD
81 before transmission. As long as the verification process of the
82 mechanism was capable of independently generating the same key, the
83 successful decryption of the SPD would provide assurance that the
84 originator of the message was in possession of the token, as well
85 as whatever information the token required to generate the encryp-
88 Single-use Authentication Mechanism (SAM): A system for generating
89 and verifying authentication data which is usable only once.
91 Single-use Authentication Data (SAD): SAM-specific data provided by
92 a principal as input to client software to be used in the creation
96 3. Motivation and Scope
97 Several single-use authentication mechanisms are currently in
98 widespread use, including hardware-based schemes from vendors such
99 as Enigma Logic, Digital Pathways and Security Dynamics and
100 software-based methods like S/Key [RFC1760]. The hardware-based
101 schemes typically require that the authenticating user carry a
102 small, credit-card-sized electronic device (called a token) which
103 is used to generate unique authentication data. Some tokens
104 require the user to enter data into the device. This input may
105 take the form of a Personal Identification Number (PIN), a server-
106 generated challenge string or both. Other tokens do not use a
107 challenge-response technique, instead spontaneously generating new
108 and unique authentication data every few seconds. These tokens are
109 usually time-synchronized with a server. The use of one-time pass-
110 words and token cards as an authentication mechanism has steadily
111 increased over the past few years; in addition, the Internet Archi-
112 tecture Board has encouraged the use of SAMs to improve Internet
115 The widespread acceptance of Kerberos within the Internet community
116 has produced considerable demand for the integration of SAM tech-
117 nology with the authentication protocol. Several currently avail-
118 able implementations of Kerberos include support for some types of
119 token cards, but the implementations are either not interoperable,
120 or would require the release of source code (not always an option)
121 to make them interoperate. This memo attempts to remedy that prob-
122 lem by specifying a method in which SAM data may be securely tran-
123 sported in Kerberos V5 messages in a standard, extensible fashion.
124 This document does not, however, attempt to precisely specify
125 either the generation or verification of SAM data, since this is
129 Neuman, Zorn, Hornstein [Page 2]
135 INTERNET-DRAFT August 6, 1998
138 likely to be SAM-specific; nor does it dictate the conditions under
139 which SAM data must be included in Kerberos messages, since we con-
140 sider this to be a matter of local policy.
143 4. Generic Approach - Two Models
144 As outlined above, there are essentially two types of single-use
145 authentication mechanisms: challenge/response and time-based. In
146 order to support challenge/response mechanisms, the Kerberos Key
147 Distribution Center (KDC) must communicate the appropriate chal-
148 lenge string to the user, via the client software. Furthermore,
149 some challenge/response mechanisms require tight synchronization
150 between all instances of the KDC and the client. One example is
151 S/Key and its variants. If the KDC and client do not perform the
152 same number of message digest iterations, the protocol will fail;
153 worse, it might be possible for an eavesdopping attacker to capture
154 a valid S/Key passcode and replay it to a KDC replica which had an
155 outdated iteration number. In the time-based case, no challenge is
156 required. This naturally gives rise to two modes of client
157 behavior, described below.
160 4.1 Challenge/Response Model
161 The client begins with an initial KRB_AS_REQ message to the KDC,
162 possibly using existing preauthentication methods (PA-ENC-TIMESTAMP
163 (encrypted timestamp), PA-OSF-DCE (DCE), etc.). Depending on
164 whether preauthentication is used, the user may or may not be
165 prompted at this time for a Kerberos password. If (for example)
166 encrypted timestamp preauthentication is used, then the user will
167 be prompted; on the other hand, if no preauthentication is in use
168 the prompt for the password may be deferred (possibly forever).
169 Note that the use of preauthentication here may allow an offline
170 guessing attack against the Kerberos password separate from the
171 SPD, but if the use of a SAM is required, then the password by
172 itself is not sufficient for authentication.
174 The KDC will determine in an implementation- and policy-dependent
175 fashion if the client is required to utilize a single-use authenti-
176 cation mechanism. For example, the implementation may use IP
177 address screening to require principals authenticating from outside
178 a firewall to use a SAM, while principals on the inside need not.
179 If SAM usage is required, then the KDC will respond with a
180 KRB_ERROR message, with the error-code field set to
181 KDC_ERR_PREAUTH_REQUIRED and the e-data field containing the ASN.1
182 structure that is a sequence of PA-DATA fields.
184 If the type of one of the PA-DATA fields is PA-SAM-REDIRECT, the
185 client should re-execute the authentication protocol from the
186 beginning, directing messages to another of the KDCs for the realm.
187 This is done to allow some methods to require that a single KDC be
188 used for SAM authentication when tight synchronization is needed
189 between all replicas and the KDC database propagation code does not
190 provide such synchronization. The corresponding padata-value will
191 contain an encoded sequence of host addresses [RFC1510], from which
195 Neuman, Zorn, Hornstein [Page 3]
201 INTERNET-DRAFT August 6, 1998
204 the client must choose the KDC to be contacted next.
206 Otherwise, if one of the PA-DATA fields has the type PA-SAM-
207 CHALLENGE, the exchange will continue as described in section 5,
212 For mechanisms where no challenge is required, the user (or the
213 client software being utilized) may or may not know a priori
214 whether SAM usage is required. If it does not know, then the ini-
215 tial exchange may proceed as above. If it is known that a use of a
216 single-use authentication mechanism is required then the first
217 exchange can be skipped and the authentication will continue as
221 5. Authentication Using Passcodes
222 Prior to performing preauthentication using a single-use authenti-
223 cation mechanism, the client must know whether a challenge is
224 required (if the client doesn't have this information prior to its
225 sending the first KRB_AS_REQ message, it will be informed of the
226 requirement by the KDC, as described in section 4.1). The client
227 does NOT need to know the specific type of SAM in use. If a chal-
228 lenge is required the client will be sent the challenge by the KDC.
229 This means that a client supporting SAMs will be able to work with
230 new methods without modification. The challenge, as well as all
231 other prompts mentioned herein, can be internationalized by the KDC
232 on a per-principal basis.
234 If a KRB_ERROR message is received from the KDC indicating that SAM
235 usage is required, that message will include in its e-data field a
236 PA-DATA structure that encodes information about the SAM to be
237 used. This includes whether a challenge is required, and if so,
238 the challenge itself; and informational data about the type of SAM
239 that is in use, and how to prompt for the SAD. The SAM type is
240 informational only and does not affect the behavior of the client.
241 The prompt is also informational and may be presented to the user
242 by the client, or it may be safely ignored.
261 Neuman, Zorn, Hornstein [Page 4]
267 INTERNET-DRAFT August 6, 1998
270 The ASN.1 definition for the SAM challenge is:
272 PA-SAM-CHALLENGE ::= SEQUENCE {
274 sam-flags[1] SAMFlags,
275 sam-type-name[2] GeneralString OPTIONAL,
276 sam-track-id[3] GeneralString OPTIONAL,
277 sam-challenge-label[4] GeneralString OPTIONAL,
278 sam-challenge[5] GeneralString OPTIONAL,
279 sam-response-prompt[6] GeneralString OPTIONAL,
280 sam-pk-for-sad[7] EncryptionKey OPTIONAL,
281 sam-nonce[8] INTEGER OPTIONAL,
282 sam-cksum[9] Checksum OPTIONAL
285 SAMFlags ::= BIT STRING {
287 send-encrypted-sad[1],
288 must-pk-encrypt-sad[2]
291 The sam-type field is informational only, but it must be specified
292 and sam-type values must be registered with the IANA.
294 Initially defined values of the sam-type codes are:
296 PA_SAM_TYPE_ENIGMA 1 -- Enigma Logic
297 PA_SAM_TYPE_DIGI_PATH 2 -- Digital Pathways
298 PA_SAM_TYPE_SKEY_K0 3 -- S/key where KDC has key 0
299 PA_SAM_TYPE_SKEY 4 -- Traditional S/Key
300 PA_SAM_TYPE_SECURID 5 -- Security Dynamics
301 PA_SAM_TYPE_CRYPTOCARD 6 -- CRYPTOCard
303 PA_SAM_TYPE_SECURID, PA_SAM_TYPE_DIGI_PATH, PA_SAM_TYPE_ENIGMA, and
304 PA_SAM_TYPE_CRYPTOCARD are popular token cards. PA_SAM_TYPE_SKEY
305 is the traditional S/Key protocol, in which the SAD verifier does
306 not have knowledge of the principal's S/Key secret.
307 PA_SAM_TYPE_SKEY_K0 is a variant of S/Key that uses the same SAD
308 and PC software or hardware device, but where the zeroth key (the
309 S/Key secret) is actually stored on, and can be used by, the SAD
310 verifier to independently generate the correct authentication data.
312 Note that using PA_SAM_TYPE_SKEY_K0 gives up one advantage of
313 S/Key, viz., that the information required to generate the SAD need
314 not be stored on the host; but since the SAD verifier (which may be
315 the KDC) is assumed to be more secure than other hosts on the net-
316 work, it may be acceptable to give up this advantage in some situa-
317 tions. The advantage of using this S/Key variant is that the secu-
318 rity of the network protocol is strengthened since the SAD need not
319 be sent from the client to the KDC. Thus, the SAD can be used as
320 part of the key used to encrypt the encrypted parts of both the SPD
321 and the KRB_AS_REP message, rather than being sent protected by the
322 principal's Kerberos secret key which may have been previously
323 exposed to an attacker (see section 6, below). In any case, there
327 Neuman, Zorn, Hornstein [Page 5]
333 INTERNET-DRAFT August 6, 1998
336 is a definite advantage to being interoperable with the S/Key algo-
339 Due to the volatility of, and rapid developments in, the area of
340 single-use authentication mechanisms (both software-only and
341 hardware supported), any subsequently defined sam-type codes will
342 be maintained by the IANA.
344 The sam-flags field indicates whether the SAD is known by the KDC
345 (in which case it can be used as part of the encryption key for the
346 ensuing KRB_AS_REP message), or if it must be provided to the KDC
347 in a recoverable manner. If it is known to the KDC, use-sad-as-key
348 indicates that the SAD alone will be used to generate the encryp-
349 tion key for the forthcoming KRB_AS_REQ and KRB_AS_REP messages,
350 and that the user will not need to also enter a password. We
351 recommend that this option not be used, and that the principal also
352 enter the Kerberos password, but for some situations, presentation
353 of the SAD alone may be acceptable. If the single-use authentica-
354 tion data is not known (and cannot be generated or discovered) by
355 the KDC, then send-encrypted-sad flag will be set, indicating that
356 the SAD must be sent to the KDC encrypted under the principal's
357 secret key. If neither use-sad-as-key nor send-encrypted-sad are
358 set, the client may assume that the KDC knows the SAD, but the Ker-
359 beros password should be used along with the passcode in the
360 derivation of the encryption key (see below). The must-pk-
361 encrypt-sad flag is reserved for future use. If this flag is set
362 and a client does not support the must-pk-encrypt-sad option (to be
363 defined in a separate document), the client will not be able to
364 complete the authentication and must notify the user.
366 Note that there are specific constraints on the integrity of the
367 PA-SAM-CHALLENGE when some of these options are specified. In par-
368 ticular, if any of these flags are set, a cryptographic checksum
369 must be present and verified. If absent, or the checksum does not
370 match the request, the challenge must be considered invalid and the
373 The optional sam-type-name field is informational only. It may be
374 used by the client to display a short description of the type of
375 single-use authentication mechanism to be used.
377 The optional sam-track-id field may be returned by the KDC in the
378 KRB_ERROR message. If present, the client should copy this field
379 into the corresponding field of the SAM response sent in the subse-
380 quent KRB_AS_REQ message. This field may be used by the KDC to
381 match challenges and responses. It might be a suitably encoded
382 integer, or even be encrypted data with the KDC state encoded so
383 that the KDC doesn't have to maintain the state internally.
385 The sam-challenge-label field is informational and optional. If
386 present, a client may choose to precede the presentation of the
387 challenge with this string. For example, if the challenge is
388 135773 and the string in the sam-challenge-label field is "Enter
389 the following number on your card", the client may choose to
393 Neuman, Zorn, Hornstein [Page 6]
399 INTERNET-DRAFT August 6, 1998
404 Enter the following number on your card: 135773
406 If no challenge label was presented, or if the client chooses to
407 ignore it, the client might display instead:
409 Challenge from authentication server: 135773
411 If the sam-checksum field is empty the sam-challenge-label should
412 be ignored, since in that case it may have been modified by an
413 adversary. Internationalization is supported by allowing customi-
414 zation of the challenge label and other strings on a per-principal
417 The optional sam-challenge field contains a string that will be
418 needed by the user to generate a suitable response. If the sam-
419 challenge field is left out, it indicates that the SAM in use does
420 not require a challenge, and that the authorized user should be
421 able to produce the correct SAD without one. If the sam-challenge
422 field is present, it is the data that is used by the SAD generator
423 to create the SAD to be used in the production of the SPD to be
424 included in the response.
426 The sam-response-prompt field is informational and optional. If
427 present, a client may choose to precede the prompt for the response
428 with the specified string; however, it should not be used if the
429 sam-checksum field is empty, since in that case the prompt may have
430 been modified by an adversary. If this field is empty the prompt
431 displayed will be hardcoded into the application, such as
435 sam-pk-for-sad is an optional field. It is included in the
436 interest of future extensability of the protocol to the use of
437 public-key cryptography.
439 The sam-nonce field is optional. If present, it should conform to
440 the specification of the nonce field in a KRB_KDC_REQ message
443 The optional sam-cksum field contains a cryptographic checksum of
444 the preceding fields, protected using the same key as that used for
445 preauthentication in the intial KRB_AS_REQ message. While any
446 secure checksum method may be used, the RSA-MD5-DES type is recom-
447 mended and must be supported by the client. This field should
448 always be present if the initial KRB_AS_REQ message included a form
449 of cryptographic preauthentication (such as PA_ENC_TIMESTAMP). If
450 the intial message included preauthentication, but this field is
451 missing in the response, the client should reject the response. If
452 this field is present, the client should verify its correctness: if
453 the sam-cksum field is present in the KRB_ERROR message, but not
454 verified by the client, then an attacker can change the message
455 contents at will. Such a change could cause unexpected
459 Neuman, Zorn, Hornstein [Page 7]
465 INTERNET-DRAFT August 6, 1998
468 instructions to be displayed to the user in the prompt string, or
469 allow the denial of service through the presentation of an invalid
470 challenge. Another effect of a change might be to effect a limited
471 chosen plaintext attack on the Kerberos password where the attacker
472 picks the nonce, and the challenge.
474 Note that it is possible for the KDC to generate a cryptographic
475 checksum for this message using the users' secret key even though
476 no cryptographic preauthentication was present in the initial
477 AS_REQ message. Doing so, however, makes material available which
478 enables an offline guessing attack against that key.
480 If the client is performing SAM preauthentication in the initial
481 message, without receipt of a PA-SAM-CHALLENGE (i.e. without wait-
482 ing for the KRB_ERROR message), and the SAM in use does not require
483 a challenge, the client will prompt for the SAD in an application-
486 Once the user has been prompted for and entered the SAD (and possi-
487 bly the Kerberos password), the client will derive a key to be used
488 to encrypt the preauthentication data for a KRB_AS_REQ message.
489 This key will be determined as follows:
491 By default, the key is derived from the password and the SAD
492 by running each through the string_to_key function [RFC1510]
493 separately; i.e., K1 = string_to_key(password) and K2 =
494 string_to_key(SAD). The K1 and K2 are then combined to form
495 a single key K in a manner specific to the type of key being
496 generated. For DES keys, K will be formed by XORing K1 and
497 K2, then correcting the parity of K. If the result matches
498 a "weak" or "semiweak" key as described in the DES specifi-
499 cation, it is XORed with the hexadecimal constant
502 If the send-encrypted-sad flag is set, the key will be
503 derived by running the Kerberos password though the
504 string_to_key function in the normal fashion.
506 If the use-sad-as-key flag is set and the integrity of the
507 PA-SAM-CHALLENGE PADATA field can be verified using the
508 sam-cksum field, then the SAD is run through the
509 string_to_key function and the result is used as the encryp-
510 tion key for the request. WARNING: the use of single-use
511 authentication data in this manner is NOT recommended unless
512 the range of the SAD is large enough to make an exhaustive
513 off-line search impractical and the risks involved in the
514 use of SAD alone are fully considered. Also, note that
515 without the availabilty to the KDC of a relatively static,
516 unique secret key shared with the user, the only mechanisms
517 that can be used to protect the integrity of the PA-SAM-
518 CHALLENGE PADATA field are based on either public key cryp-
519 tography or the KDC's a priori knowledge of the SAD itself.
520 In the latter case, the client must obtain the SAD from the
521 user and use it to verify the integrity of the challenge
525 Neuman, Zorn, Hornstein [Page 8]
531 INTERNET-DRAFT August 6, 1998
534 before the new KRB_AS_REQ message is sent.
536 The sam-pk-for-sad field is reserved for future use. If
537 this field is not empty and the client does not support the
538 use of public-key encryption for SAD (to be defined in a
539 separate document), the client will not be able to complete
540 the authentication and must notify the user.
542 The client will then send another KRB_AS_REQ message to the KDC,
543 but with a padata field with padata-type equal to PA-SAM-RESPONSE
544 and padata-value defined as follows:
546 PA-SAM-RESPONSE ::= SEQUENCE {
548 sam-flags[1] SAMFlags,
549 sam-track-id[2] GeneralString OPTIONAL,
550 sam-enc-key[3] EncryptedData
552 sam-enc-nonce-or-ts[4] EncryptedData
553 -- PA-ENC-SAM-RESPONSE-ENC,
554 sam-nonce[5] INTEGER OPTIONAL,
555 sam-patimestamp[6] KerberosTime OPTIONAL
558 PA-ENC-SAM-KEY ::= SEQUENCE {
559 sam-key[0] EncryptionKey
562 PA-ENC-SAM-RESPONSE-ENC ::= SEQUENCE {
563 sam-nonce[0] INTEGER OPTIONAL,
564 sam-timestamp[1] KerberosTime OPTIONAL,
565 sam-usec[2] INTEGER OPTIONAL,
566 sam-passcode[3] GeneralString OPTIONAL
569 The source of the data included in the PA-SAM-RESPONSE structure
570 depends upon whether or not a KRB_ERROR message was received by the
573 If an error reply was received, the sam-type and sam-flags fields
574 will contain copies of the same fields from the error message. If
575 the sam-nonce field was present in the KRB_ERROR message, then the
576 PA-ENC-PASSCODE-RESPONSE-ENC structure returned to the KDC will
577 include that value, encrypted as described above, the otpc_nonce
578 field in the KRB_AS_REQ message will contain a plaintext copy of
579 the same value and the sam-patimestamp field of the message will be
580 empty. If a KRB_ERROR message was received but the sam-nonce field
581 was omitted from it, the encrypted data will contain a timestamp
582 encrypted in the same manner, the sam-patimestamp field will con-
583 tain an unencrypted copy of the same value, and the sam-nonce field
584 will be empty. In either case, if the send-encrypted-sad flag is
585 set in the sam-flags field of the error message, the sam-sad field
586 must contain the entered single-use authentication data.
591 Neuman, Zorn, Hornstein [Page 9]
597 INTERNET-DRAFT August 6, 1998
600 If no error reply was received (i.e., the client knows that a
601 single-use authentication mechanism is to be used), the sam-type
602 field must be set to a value chosen from the list of registered
605 The value of the sam-flags field may vary depending upon the type
606 of SAM in use, but in all cases the must-pk-encrypt-sad flag must
607 be zero. If the send-encrypted-sad flag is set, the sam-sad field
608 must contain the entered single-use authentication data.
610 The sam-enc-key field is reserved for future use.
612 Upon receipt the KDC validates this PADATA in much the same way
613 that it validates the PA-ENC-TS preauthentication method except
614 that it uses the SAD (if available, and possibly in conjunction
615 with saved state information or portions of the preauthentication
616 data) to determine the correct key(s) required to verify the
617 encrypted data. Note that if the KDC uses the sam-track-id field
618 to encode its state, the KDC is responsible for including informa-
619 tion in that field to detect modification or replay by an attacker.
621 The rest of the processing of the request proceeds normally, except
622 that instead of being encrypted in the users password, the
623 KRB_AS_REP message is encrypted in the key obtained above. Note,
624 however, that some single-use authentication mechanisms may require
625 further KRB_AS_REQ/KRB_ERROR exchanges to complete authentication;
626 for example, in order to allow the server to resynchronize with the
627 drifting clock on a time-based token card. In these cases the KDC
628 may respond with another KRB_ERROR message containing a different
629 sam-type value, along with appropriate prompts and/or challenges.
630 This sequence of exchanges will continue until authentication
631 either succeeds or fails.
635 Single-use authentication mechanisms requiring the use of the
636 send-encrypted-sad option are discouraged as their use on the net-
637 work is less secure than the case where a combination of the users
638 password and SAD is used as the encryption key. In particular,
639 when the send-encrypted-sad option is used, an attacker who
640 observes the response and is in possession of the users' secret key
641 (which doesn't change from login to login) can use the key to
642 decrypt the response and obtain the single-use authentication data.
644 If the KDC sets the must-pk-encrypt-sad flag of the sam-flags field
645 but the client software being used does not support public-key
646 cryptography, it is possible that legitimate users may be denied
649 An attacker in possession of the users encryption key (again, which
650 doesn't change from login to login) might be able to
651 generate/modify a SAM challenge and attach the appropriate check-
652 sum. This affects the security of both the send-encrypted-sad
653 option and the must-pk-encrypt-sad option.
657 Neuman, Zorn, Hornstein [Page 10]
663 INTERNET-DRAFT August 6, 1998
667 This Internet-Draft expires on Feburary 11, 1999.
673 The Kerberos Network Authentication System; Kohl and Neuman;
677 The S/Key One-Time Password System; Haller; February 1995
680 Report of IAB Workshop on Security in the Internet Architec-
681 ture; Braden, Clark, Crocker and Huitema; June 1994
684 9. Authors' Addresses
686 USC/Information Sciences Institute
687 4676 Admiralty Way #1001
688 Marina del Rey, CA 90292-6695
695 Microsoft Corporation
700 EMail: glennz@microsoft.com
704 ITT/US Naval Research Lab
709 EMail: kenh@cmf.nrl.navy.mil
723 Neuman, Zorn, Hornstein [Page 11]