1
2
3Kerberos Working Group                                            L. Zhu
4Internet-Draft                                     Microsoft Corporation
5Updates: 4120 (if approved)                                   S. Hartman
6Intended status: Standards Track                       Painless Security
7Expires: January 15, 2009                                  July 14, 2008
8
9
10        A Generalized Framework for Kerberos Pre-Authentication
11                 draft-ietf-krb-wg-preauth-framework-08
12
13Status of this Memo
14
15   By submitting this Internet-Draft, each author represents that any
16   applicable patent or other IPR claims of which he or she is aware
17   have been or will be disclosed, and any of which he or she becomes
18   aware will be disclosed, in accordance with Section 6 of BCP 79.
19
20   Internet-Drafts are working documents of the Internet Engineering
21   Task Force (IETF), its areas, and its working groups.  Note that
22   other groups may also distribute working documents as Internet-
23   Drafts.
24
25   Internet-Drafts are draft documents valid for a maximum of six months
26   and may be updated, replaced, or obsoleted by other documents at any
27   time.  It is inappropriate to use Internet-Drafts as reference
28   material or to cite them other than as "work in progress."
29
30   The list of current Internet-Drafts can be accessed at
31   http://www.ietf.org/ietf/1id-abstracts.txt.
32
33   The list of Internet-Draft Shadow Directories can be accessed at
34   http://www.ietf.org/shadow.html.
35
36   This Internet-Draft will expire on January 15, 2009.
37
38Abstract
39
40   Kerberos is a protocol for verifying the identity of principals
41   (e.g., a workstation user or a network server) on an open network.
42   The Kerberos protocol provides a mechanism called pre-authentication
43   for proving the identity of a principal and for better protecting the
44   long-term secret of the principal.
45
46   This document describes a model for Kerberos pre-authentication
47   mechanisms.  The model describes what state in the Kerberos request a
48   pre-authentication mechanism is likely to change.  It also describes
49   how multiple pre-authentication mechanisms used in the same request
50   will interact.
51
52
53
54Zhu & Hartman           Expires January 15, 2009                [Page 1]
55
56Internet-Draft         Kerberos Preauth Framework              July 2008
57
58
59   This document also provides common tools needed by multiple pre-
60   authentication mechanisms.  One of these tools is a secure channel
61   between the client and the KDC with a reply key delivery mechanism;
62   this secure channel can be used to protect the authentication
63   exchange thus eliminate offline dictionary attacks.  With these
64   tools, it is relatively straightforward to chain multiple
65   authentication mechanisms, utilize a different key management system,
66   or support a new key agreement algorithm.
67
68
69Table of Contents
70
71   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
72   2.  Conventions and Terminology Used in This Document  . . . . . .  5
73   3.  Model for Pre-Authentication . . . . . . . . . . . . . . . . .  5
74     3.1.  Information Managed by the Pre-authentication Model  . . .  6
75     3.2.  Initial Pre-authentication Required Error  . . . . . . . .  8
76     3.3.  Client to KDC  . . . . . . . . . . . . . . . . . . . . . .  9
77     3.4.  KDC to Client  . . . . . . . . . . . . . . . . . . . . . . 10
78   4.  Pre-Authentication Facilities  . . . . . . . . . . . . . . . . 10
79     4.1.  Client-authentication Facility . . . . . . . . . . . . . . 12
80     4.2.  Strengthening-reply-key Facility . . . . . . . . . . . . . 12
81     4.3.  Replacing-reply-key Facility . . . . . . . . . . . . . . . 13
82     4.4.  KDC-authentication Facility  . . . . . . . . . . . . . . . 14
83   5.  Requirements for Pre-Authentication Mechanisms . . . . . . . . 14
84   6.  Tools for Use in Pre-Authentication Mechanisms . . . . . . . . 15
85     6.1.  Combining Keys . . . . . . . . . . . . . . . . . . . . . . 15
86     6.2.  Protecting Requests/Responses  . . . . . . . . . . . . . . 16
87     6.3.  Managing States for the KDC  . . . . . . . . . . . . . . . 17
88     6.4.  Pre-authentication Set . . . . . . . . . . . . . . . . . . 19
89     6.5.  Definition of Kerberos FAST Padata . . . . . . . . . . . . 22
90       6.5.1.  FAST Armors  . . . . . . . . . . . . . . . . . . . . . 23
91       6.5.2.  FAST Request . . . . . . . . . . . . . . . . . . . . . 24
92       6.5.3.  FAST Response  . . . . . . . . . . . . . . . . . . . . 28
93       6.5.4.  Authenticated Kerberos Error Messages using
94               Kerberos FAST  . . . . . . . . . . . . . . . . . . . . 30
95       6.5.5.  The Encrypted Challenge FAST Factor  . . . . . . . . . 31
96     6.6.  Authentication Strength Indication . . . . . . . . . . . . 32
97   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 33
98   8.  Security Considerations  . . . . . . . . . . . . . . . . . . . 33
99   9.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 34
100   10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 34
101     10.1. Normative References . . . . . . . . . . . . . . . . . . . 34
102     10.2. Informative References . . . . . . . . . . . . . . . . . . 34
103   Appendix A.  Change History  . . . . . . . . . . . . . . . . . . . 35
104     A.1.  Changes since 07 . . . . . . . . . . . . . . . . . . . . . 35
105     A.2.  Changes since 06 . . . . . . . . . . . . . . . . . . . . . 35
106   Appendix B.  ASN.1 module  . . . . . . . . . . . . . . . . . . . . 35
107
108
109
110Zhu & Hartman           Expires January 15, 2009                [Page 2]
111
112Internet-Draft         Kerberos Preauth Framework              July 2008
113
114
115   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 39
116   Intellectual Property and Copyright Statements . . . . . . . . . . 40
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166Zhu & Hartman           Expires January 15, 2009                [Page 3]
167
168Internet-Draft         Kerberos Preauth Framework              July 2008
169
170
1711.  Introduction
172
173   The core Kerberos specification [RFC4120] treats pre-authentication
174   data as an opaque typed hole in the messages to the KDC that may
175   influence the reply key used to encrypt the KDC reply.  This
176   generality has been useful: pre-authentication data is used for a
177   variety of extensions to the protocol, many outside the expectations
178   of the initial designers.  However, this generality makes designing
179   more common types of pre-authentication mechanisms difficult.  Each
180   mechanism needs to specify how it interacts with other mechanisms.
181   Also, problems like combining a key with the long-term secret or
182   proving the identity of the user are common to multiple mechanisms.
183   Where there are generally well-accepted solutions to these problems,
184   it is desirable to standardize one of these solutions so mechanisms
185   can avoid duplication of work.  In other cases, a modular approach to
186   these problems is appropriate.  The modular approach will allow new
187   and better solutions to common pre-authentication problems to be used
188   by existing mechanisms as they are developed.
189
190   This document specifies a framework for Kerberos pre-authentication
191   mechanisms.  It defines the common set of functions that pre-
192   authentication mechanisms perform as well as how these functions
193   affect the state of the request and reply.  In addition several
194   common tools needed by pre-authentication mechanisms are provided.
195   Unlike [RFC3961], this framework is not complete--it does not
196   describe all the inputs and outputs for the pre-authentication
197   mechanisms.  Pre-Authentication mechanism designers should try to be
198   consistent with this framework because doing so will make their
199   mechanisms easier to implement.  Kerberos implementations are likely
200   to have plugin architectures for pre-authentication; such
201   architectures are likely to support mechanisms that follow this
202   framework plus commonly used extensions.
203
204   One of these common tools is the flexible authentication secure
205   tunneling (FAST) padata type.  FAST provides a protected channel
206   between the client and the KDC, and it can optionally deliver a reply
207   key within the protected channel.  Based on FAST, pre-authentication
208   mechanisms can extend Kerberos with ease, to support, for example,
209   password authenticated key exchange (PAKE) protocols with zero
210   knowledge password proof (ZKPP) [EKE] [IEEE1363.2].  Any pre-
211   authentication mechanism can be encapsulated in the FAST messages as
212   defined in Section 6.5.  A pre-authentication type carried within
213   FAST is called a FAST factor.  Creating a FAST factor is the easiest
214   path to create a new pre-authentication mechanism.  FAST factors are
215   significantly easier to analyze from a security standpoint than other
216   pre-authentication mechanisms.
217
218   Mechanism designers should design FAST factors, instead of new pre-
219
220
221
222Zhu & Hartman           Expires January 15, 2009                [Page 4]
223
224Internet-Draft         Kerberos Preauth Framework              July 2008
225
226
227   authentication mechanisms outside of FAST.
228
229
2302.  Conventions and Terminology Used in This Document
231
232   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
233   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
234   document are to be interpreted as described in [RFC2119].
235
236   The word padata is used as a shorthand for pre-authentication data.
237
238   A conversation is the set of all authentication messages exchanged
239   between the client and the KDCs in order to authenticate the client
240   principal.  A conversation as defined here consists of all messages
241   that are necessary to complete the authentication between the client
242   and the KDC.
243
244   Lastly, this document should be read only after reading the documents
245   describing the Kerberos cryptography framework [RFC3961] and the core
246   Kerberos protocol [RFC4120].  This document may freely use
247   terminology and notation from these documents without reference or
248   further explanation.
249
250
2513.  Model for Pre-Authentication
252
253   When a Kerberos client wishes to obtain a ticket using the
254   authentication server, it sends an initial Authentication Service
255   (AS) request.  If pre-authentication is required but not being used,
256   then the KDC will respond with a KDC_ERR_PREAUTH_REQUIRED error.
257   Alternatively, if the client knows what pre-authentication to use, it
258   MAY optimize away a round-trip and send an initial request with
259   padata included in the initial request.  If the client includes the
260   padata computed using the wrong pre-authentication mechanism or
261   incorrect keys, the KDC MAY return KDC_ERR_PREAUTH_FAILED with no
262   indication of what padata should have been included.  In that case,
263   the client MUST retry with no padata and examine the error data of
264   the KDC_ERR_PREAUTH_REQUIRED error.  If the KDC includes pre-
265   authentication information in the accompanying error data of
266   KDC_ERR_PREAUTH_FAILED, the client SHOULD process the error data, and
267   then retry.
268
269   The conventional KDC maintains no state between two requests;
270   subsequent requests may even be processed by a different KDC.  On the
271   other hand, the client treats a series of exchanges with KDCs as a
272   single conversation.  Each exchange accumulates state and hopefully
273   brings the client closer to a successful authentication.
274
275
276
277
278Zhu & Hartman           Expires January 15, 2009                [Page 5]
279
280Internet-Draft         Kerberos Preauth Framework              July 2008
281
282
283   These models for state management are in apparent conflict.  For many
284   of the simpler pre-authentication scenarios, the client uses one
285   round trip to find out what mechanisms the KDC supports.  Then the
286   next request contains sufficient pre-authentication for the KDC to be
287   able to return a successful reply.  For these simple scenarios, the
288   client only sends one request with pre-authentication data and so the
289   conversation is trivial.  For more complex conversations, the KDC
290   needs to provide the client with a cookie to include in future
291   requests to capture the current state of the authentication session.
292   Handling of multiple round-trip mechanisms is discussed in
293   Section 6.3.
294
295   This framework specifies the behavior of Kerberos pre-authentication
296   mechanisms used to identify users or to modify the reply key used to
297   encrypt the KDC reply.  The PA-DATA typed hole may be used to carry
298   extensions to Kerberos that have nothing to do with proving the
299   identity of the user or establishing a reply key.  Such extensions
300   are outside the scope of this framework.  However mechanisms that do
301   accomplish these goals should follow this framework.
302
303   This framework specifies the minimum state that a Kerberos
304   implementation needs to maintain while handling a request in order to
305   process pre-authentication.  It also specifies how Kerberos
306   implementations process the padata at each step of the AS request
307   process.
308
3093.1.  Information Managed by the Pre-authentication Model
310
311   The following information is maintained by the client and KDC as each
312   request is being processed:
313
314   o  The reply key used to encrypt the KDC reply
315
316   o  How strongly the identity of the client has been authenticated
317
318   o  Whether the reply key has been used in this conversation
319
320   o  Whether the reply key has been replaced in this conversation
321
322   o  Whether the contents of the KDC reply can be verified by the
323      client principal
324
325
326   Conceptually, the reply key is initially the long-term key of the
327   principal.  However, principals can have multiple long-term keys
328   because of support for multiple encryption types, salts and
329   string2key parameters.  As described in Section 5.2.7.5 of the
330   Kerberos protocol [RFC4120], the KDC sends PA-ETYPE-INFO2 to notify
331
332
333
334Zhu & Hartman           Expires January 15, 2009                [Page 6]
335
336Internet-Draft         Kerberos Preauth Framework              July 2008
337
338
339   the client what types of keys are available.  Thus in full
340   generality, the reply key in the pre-authentication model is actually
341   a set of keys.  At the beginning of a request, it is initialized to
342   the set of long-term keys advertised in the PA-ETYPE-INFO2 element on
343   the KDC.  If multiple reply keys are available, the client chooses
344   which one to use.  Thus the client does not need to treat the reply
345   key as a set.  At the beginning of a request, the client picks a
346   reply key to use.
347
348   KDC implementations MAY choose to offer only one key in the PA-ETYPE-
349   INFO2 element.  Since the KDC already knows the client's list of
350   supported enctypes from the request, no interoperability problems are
351   created by choosing a single possible reply key.  This way, the KDC
352   implementation avoids the complexity of treating the reply key as a
353   set.
354
355   When the padata in the request is verified by the KDC, then the
356   client is known to have that key, therefore the KDC SHOULD pick the
357   same key as the reply key.
358
359   At the beginning of handling a message on both the client and the
360   KDC, the client's identity is not authenticated.  A mechanism may
361   indicate that it has successfully authenticated the client's
362   identity.  This information is useful to keep track of on the client
363   in order to know what pre-authentication mechanisms should be used.
364   The KDC needs to keep track of whether the client is authenticated
365   because the primary purpose of pre-authentication is to authenticate
366   the client identity before issuing a ticket.  The handling of
367   authentication strength using various authentication mechanisms is
368   discussed in Section 6.6.
369
370   Initially the reply key has not been used.  A pre-authentication
371   mechanism that uses the reply key to encrypt or checksum some data in
372   the generation of new keys MUST indicate that the reply key is used.
373   This state is maintained by the client and the KDC to enforce the
374   security requirement stated in Section 4.3 that the reply key cannot
375   be replaced after it is used.
376
377   Initially the reply key has not been replaced.  If a mechanism
378   implements the Replace Reply Key facility discussed in Section 4.3,
379   then the state MUST be updated to indicate that the reply key has
380   been replaced.  Once the reply key has been replaced, knowledge of
381   the reply key is insufficient to authenticate the client.  The reply
382   key is marked replaced in exactly the same situations as the KDC
383   reply is marked as not being verified to the client principal.
384   However, while mechanisms can verify the KDC reply to the client,
385   once the reply key is replaced, then the reply key remains replaced
386   for the remainder of the conversation.
387
388
389
390Zhu & Hartman           Expires January 15, 2009                [Page 7]
391
392Internet-Draft         Kerberos Preauth Framework              July 2008
393
394
395   Without pre-authentication, the client knows that the KDC reply is
396   authentic and has not been modified because it is encrypted in a
397   long-term key of the client.  Only the KDC and the client know that
398   key.  So at the start of a conversation, the KDC reply is presumed to
399   be verified using the client principal's long-term key.  Any pre-
400   authentication mechanism that sets a new reply key not based on the
401   principal's long-term secret MUST either verify the KDC reply some
402   other way or indicate that the reply is not verified.  If a mechanism
403   indicates that the reply is not verified then the client
404   implementation MUST return an error unless a subsequent mechanism
405   verifies the reply.  The KDC needs to track this state so it can
406   avoid generating a reply that is not verified.
407
408   The typical Kerberos request does not provide a way for the client
409   machine to know that it is talking to the correct KDC.  Someone who
410   can inject packets into the network between the client machine and
411   the KDC and who knows the password that the user will give to the
412   client machine can generate a KDC reply that will decrypt properly.
413   So, if the client machine needs to authenticate that the user is in
414   fact the named principal, then the client machine needs to do a TGS
415   request for itself as a service.  Some pre-authentication mechanisms
416   may provide a way for the client to authenticate the KDC.  Examples
417   of this include signing the reply that can be verified using a well-
418   known public key or providing a ticket for the client machine as a
419   service.
420
4213.2.  Initial Pre-authentication Required Error
422
423   Typically a client starts a conversation by sending an initial
424   request with no pre-authentication.  If the KDC requires pre-
425   authentication, then it returns a KDC_ERR_PREAUTH_REQUIRED message.
426   After the first reply with the KDC_ERR_PREAUTH_REQUIRED error code,
427   the KDC returns the error code KDC_ERR_MORE_PREAUTH_DATA_NEEDED
428   (defined in Section 6.3) for pre-authentication configurations that
429   use multi-round-trip mechanisms; see Section 3.4 for details of that
430   case.
431
432   The KDC needs to choose which mechanisms to offer the client.  The
433   client needs to be able to choose what mechanisms to use from the
434   first message.  For example consider the KDC that will accept
435   mechanism A followed by mechanism B or alternatively the single
436   mechanism C. A client that supports A and C needs to know that it
437   should not bother trying A.
438
439   Mechanisms can either be sufficient on their own or can be part of an
440   authentication set--a group of mechanisms that all need to
441   successfully complete in order to authenticate a client.  Some
442   mechanisms may only be useful in authentication sets; others may be
443
444
445
446Zhu & Hartman           Expires January 15, 2009                [Page 8]
447
448Internet-Draft         Kerberos Preauth Framework              July 2008
449
450
451   useful alone or in authentication sets.  For the second group of
452   mechanisms, KDC policy dictates whether the mechanism will be part of
453   an authentication set or offered alone.  For each mechanism that is
454   offered alone, the KDC includes the pre-authentication type ID of the
455   mechanism in the padata sequence returned in the
456   KDC_ERR_PREAUTH_REQUIRED error.
457
458   The KDC SHOULD NOT send data that is encrypted in the long-term
459   password-based key of the principal.  Doing so has the same security
460   exposures as the Kerberos protocol without pre-authentication.  There
461   are few situations where pre-authentication is desirable and where
462   the KDC needs to expose cipher text encrypted in a weak key before
463   the client has proven knowledge of that key.
464
4653.3.  Client to KDC
466
467   This description assumes that a client has already received a
468   KDC_ERR_PREAUTH_REQUIRED from the KDC.  If the client performs
469   optimistic pre-authentication then the client needs to optimistically
470   guess values for the information it would normally receive from that
471   error response.
472
473   The client starts by initializing the pre-authentication state as
474   specified.  It then processes the padata in the
475   KDC_ERR_PREAUTH_REQUIRED.
476
477   When processing the response to the KDC_ERR_PREAUTH_REQUIRED, the
478   client MAY ignore any padata it chooses unless doing so violates a
479   specification to which the client conforms.  Clients conforming to
480   this specification MUST NOT ignore the padata defined in Section 6.3.
481   Clients SHOULD process padata unrelated to this framework or other
482   means of authenticating the user.  Clients SHOULD choose one
483   authentication set or mechanism that could lead to authenticating the
484   user and ignore the rest.  Since the list of mechanisms offered by
485   the KDC is in the decreasing preference order, clients typically
486   choose the first mechanism or authentication set that the client can
487   usefully perform.  If a client chooses to ignore a padata it MUST NOT
488   process the padata, allow the padata to affect the pre-authentication
489   state, nor respond to the padata.
490
491   For each padata the client chooses to process, the client processes
492   the padata and modifies the pre-authentication state as required by
493   that mechanism.  Padata are processed in the order received from the
494   KDC.
495
496   After processing the padata in the KDC error, the client generates a
497   new request.  It processes the pre-authentication mechanisms in the
498   order in which they will appear in the next request, updating the
499
500
501
502Zhu & Hartman           Expires January 15, 2009                [Page 9]
503
504Internet-Draft         Kerberos Preauth Framework              July 2008
505
506
507   state as appropriate.  The request is sent when it is complete.
508
5093.4.  KDC to Client
510
511   When a KDC receives an AS request from a client, it needs to
512   determine whether it will respond with an error or an AS reply.
513   There are many causes for an error to be generated that have nothing
514   to do with pre-authentication; they are discussed in the core
515   Kerberos specification.
516
517   From the standpoint of evaluating the pre-authentication, the KDC
518   first starts by initializing the pre-authentication state.  It then
519   processes the padata in the request.  As mentioned in Section 3.3,
520   the KDC MAY ignore padata that is inappropriate for the configuration
521   and MUST ignore padata of an unknown type.  The KDC MUST NOT ignore
522   padata of types used in previous messages.  For example, if a KDC
523   issues a KDC_ERR_PREAUTH_REQUIRED error including padata of type x,
524   then the KDC cannot ignore padata of type x received in an AS-REQ
525   message from the client.
526
527   At this point the KDC decides whether it will issue an error or a
528   reply.  Typically a KDC will issue a reply if the client's identity
529   has been authenticated to a sufficient degree.
530
531   In the case of a KDC_ERR_MORE_PREAUTH_DATA_NEEDED error, the KDC
532   first starts by initializing the pre-authentication state.  Then it
533   processes any padata in the client's request in the order provided by
534   the client.  Mechanisms that are not understood by the KDC are
535   ignored.  Next, it generates padata for the error response, modifying
536   the pre-authentication state appropriately as each mechanism is
537   processed.  The KDC chooses the order in which it will generate
538   padata (and thus the order of padata in the response), but it needs
539   to modify the pre-authentication state consistently with the choice
540   of order.  For example, if some mechanism establishes an
541   authenticated client identity, then the subsequent mechanisms in the
542   generated response receive this state as input.  After the padata is
543   generated, the error response is sent.  Typically the errors with the
544   code KDC_ERR_MORE_PREAUTH_DATA_NEEDED in a converstation will include
545   KDC state as discussed in Section 6.3.
546
547   To generate a final reply, the KDC generates the padata modifying the
548   pre-authentication state as necessary.  Then it generates the final
549   response, encrypting it in the current pre-authentication reply key.
550
551
5524.  Pre-Authentication Facilities
553
554   Pre-Authentication mechanisms can be thought of as providing various
555
556
557
558Zhu & Hartman           Expires January 15, 2009               [Page 10]
559
560Internet-Draft         Kerberos Preauth Framework              July 2008
561
562
563   conceptual facilities.  This serves two useful purposes.  First,
564   mechanism authors can choose only to solve one specific small
565   problem.  It is often useful for a mechanism designed to offer key
566   management not to directly provide client authentication but instead
567   to allow one or more other mechanisms to handle this need.  Secondly,
568   thinking about the abstract services that a mechanism provides yields
569   a minimum set of security requirements that all mechanisms providing
570   that facility must meet.  These security requirements are not
571   complete; mechanisms will have additional security requirements based
572   on the specific protocol they employ.
573
574   A mechanism is not constrained to only offering one of these
575   facilities.  While such mechanisms can be designed and are sometimes
576   useful, many pre-authentication mechanisms implement several
577   facilities.  By combining multiple facilities in a single mechanism,
578   it is often easier to construct a secure, simple solution than by
579   solving the problem in full generality.  Even when mechanisms provide
580   multiple facilities, they need to meet the security requirements for
581   all the facilities they provide.  If the FAST factor approach is
582   used, it is likely that one or a small number of facilities can be
583   provided by a single mechanism without complicating the security
584   analysis.
585
586   According to Kerberos extensibility rules (Section 1.5 of the
587   Kerberos specification [RFC4120]), an extension MUST NOT change the
588   semantics of a message unless a recipient is known to understand that
589   extension.  Because a client does not know that the KDC supports a
590   particular pre-authentication mechanism when it sends an initial
591   request, a pre-authentication mechanism MUST NOT change the semantics
592   of the request in a way that will break a KDC that does not
593   understand that mechanism.  Similarly, KDCs MUST NOT send messages to
594   clients that affect the core semantics unless the client has
595   indicated support for the message.
596
597   The only state in this model that would break the interpretation of a
598   message is changing the expected reply key.  If one mechanism changed
599   the reply key and a later mechanism used that reply key, then a KDC
600   that interpreted the second mechanism but not the first would fail to
601   interpret the request correctly.  In order to avoid this problem,
602   extensions that change core semantics are typically divided into two
603   parts.  The first part proposes a change to the core semantic--for
604   example proposes a new reply key.  The second part acknowledges that
605   the extension is understood and that the change takes effect.
606   Section 4.2 discusses how to design mechanisms that modify the reply
607   key to be split into a proposal and acceptance without requiring
608   additional round trips to use the new reply key in subsequent pre-
609   authentication.  Other changes in the state described in Section 3.1
610   can safely be ignored by a KDC that does not understand a mechanism.
611
612
613
614Zhu & Hartman           Expires January 15, 2009               [Page 11]
615
616Internet-Draft         Kerberos Preauth Framework              July 2008
617
618
619   Mechanisms that modify the behavior of the request outside the scope
620   of this framework need to carefully consider the Kerberos
621   extensibility rules to avoid similar problems.
622
6234.1.  Client-authentication Facility
624
625   The client authentication facility proves the identity of a user to
626   the KDC before a ticket is issued.  Examples of mechanisms
627   implementing this facility include the encrypted timestamp facility
628   defined in Section 5.2.7.2 of the Kerberos specification [RFC4120].
629   Mechanisms that provide this facility are expected to mark the client
630   as authenticated.
631
632   Mechanisms implementing this facility SHOULD require the client to
633   prove knowledge of the reply key before transmitting a successful KDC
634   reply.  Otherwise, an attacker can intercept the pre-authentication
635   exchange and get a reply to attack.  One way of proving the client
636   knows the reply key is to implement the Replace Reply Key facility
637   along with this facility.  The PKINIT mechanism [RFC4556] implements
638   Client Authentication alongside Replace Reply Key.
639
640   If the reply key has been replaced, then mechanisms such as
641   encrypted-timestamp that rely on knowledge of the reply key to
642   authenticate the client MUST NOT be used.
643
6444.2.  Strengthening-reply-key Facility
645
646   Particularly, when dealing with keys based on passwords, it is
647   desirable to increase the strength of the key by adding additional
648   secrets to it.  Examples of sources of additional secrets include the
649   results of a Diffie-Hellman key exchange or key bits from the output
650   of a smart card [KRB-WG.SAM].  Typically these additional secrets can
651   be first combined with the existing reply key and then converted to a
652   protocol key using tools defined in Section 6.1.
653
654   Typically a mechanism implementing this facility will know that the
655   other side of the exchange supports the facility before the reply key
656   is changed.  For example, a mechanism might need to learn the
657   certificate for a KDC before encrypting a new key in the public key
658   belonging to that certificate.  However, if a mechanism implementing
659   this facility wishes to modify the reply key before knowing that the
660   other party in the exchange supports the mechanism, it proposes
661   modifying the reply key.  The other party then includes a message
662   indicating that the proposal is accepted if it is understood and
663   meets policy.  In many cases it is desirable to use the new reply key
664   for client authentication and for other facilities.  Waiting for the
665   other party to accept the proposal and actually modify the reply key
666   state would add an additional round trip to the exchange.  Instead,
667
668
669
670Zhu & Hartman           Expires January 15, 2009               [Page 12]
671
672Internet-Draft         Kerberos Preauth Framework              July 2008
673
674
675   mechanism designers are encouraged to include a typed hole for
676   additional padata in the message that proposes the reply key change.
677   The padata included in the typed hole are generated assuming the new
678   reply key.  If the other party accepts the proposal, then these
679   padata are considered as an inner level.  As with the outer level,
680   one authentication set or mechanism is typically chosen for client
681   authentication, along with auxiliary mechanisms such as KDC cookies,
682   and other mechanisms are ignored.  When mechanisms include such a
683   container, the hint provided for use in authentication sets MUST
684   contain a sequence of inner mechanisms along with hints for those
685   mechanisms.  The party generating the proposal can determine whether
686   the padata were processed based on whether the proposal for the reply
687   key is accepted.
688
689   The specific formats of the proposal message, including where padata
690   are included is a matter for the mechanism specification.  Similarly,
691   the format of the message accepting the proposal is mechanism-
692   specific.
693
694   Mechanisms implementing this facility and including a typed hole for
695   additional padata MUST checksum that padata using a keyed checksum or
696   encrypt the padata.  This requirement protects against modification
697   of the contents of the typed hole.  By modifying these contents an
698   attacker might be able to choose which mechanism is used to
699   authenticate the client, or to convince a party to provide text
700   encrypted in a key that the attacker had manipulated.  It is
701   important that mechanisms strengthen the reply key enough that using
702   it to checksum padata is appropriate.
703
7044.3.  Replacing-reply-key Facility
705
706   The Replace Reply Key facility replaces the key in which a successful
707   AS reply will be encrypted.  This facility can only be used in cases
708   where knowledge of the reply key is not used to authenticate the
709   client.  The new reply key MUST be communicated to the client and the
710   KDC in a secure manner.  Mechanisms implementing this facility MUST
711   mark the reply key as replaced in the pre-authentication state.
712   Mechanisms implementing this facility MUST either provide a mechanism
713   to verify the KDC reply to the client or mark the reply as unverified
714   in the pre-authentication state.  Mechanisms implementing this
715   facility SHOULD NOT be used if a previous mechanism has used the
716   reply key.
717
718   As with the strengthening-reply-key facility, Kerberos extensibility
719   rules require that the reply key not be changed unless both sides of
720   the exchange understand the extension.  In the case of this facility
721   it will likely be the case for both sides to know that the facility
722   is available by the time that the new key is available to be used.
723
724
725
726Zhu & Hartman           Expires January 15, 2009               [Page 13]
727
728Internet-Draft         Kerberos Preauth Framework              July 2008
729
730
731   However, mechanism designers can use a container for padata in a
732   proposal message as discussed in Section 4.2 if appropriate.
733
7344.4.  KDC-authentication Facility
735
736   This facility verifies that the reply comes from the expected KDC.
737   In traditional Kerberos, the KDC and the client share a key, so if
738   the KDC reply can be decrypted then the client knows that a trusted
739   KDC responded.  Note that the client machine cannot trust the client
740   unless the machine is presented with a service ticket for it
741   (typically the machine can retrieve this ticket by itself).  However,
742   if the reply key is replaced, some mechanism is required to verify
743   the KDC.  Pre-authentication mechanisms providing this facility allow
744   a client to determine that the expected KDC has responded even after
745   the reply key is replaced.  They mark the pre-authentication state as
746   having been verified.
747
748
7495.  Requirements for Pre-Authentication Mechanisms
750
751   This section lists requirements for specifications of pre-
752   authentication mechanisms.
753
754   For each message in the pre-authentication mechanism, the
755   specification describes the pa-type value to be used and the contents
756   of the message.  The processing of the message by the sender and
757   recipient is also specified.  This specification needs to include all
758   modifications to the pre-authentication state.
759
760   Generally mechanisms have a message that can be sent in the error
761   data of the KDC_ERR_PREAUTH_REQUIRED error message or in an
762   authentication set.  If the client needs information such as trusted
763   certificate authorities in order to determine if it can use the
764   mechanism, then this information should be in that message.  In
765   addition, such mechanisms should also define a pa-hint to be included
766   in authentication sets.  Often, the same information included in the
767   padata-value is appropriate to include in the pa-hint (as defined in
768   Section 6.4).
769
770   In order to ease security analysis the mechanism specification should
771   describe what facilities from this document are offered by the
772   mechanism.  For each facility, the security consideration section of
773   the mechanism specification should show that the security
774   requirements of that facility are met.  This requirement is
775   applicable to any FAST factor that provides authentication
776   information.
777
778   Significant problems have resulted in the specification of Kerberos
779
780
781
782Zhu & Hartman           Expires January 15, 2009               [Page 14]
783
784Internet-Draft         Kerberos Preauth Framework              July 2008
785
786
787   protocols because much of the KDC exchange is not protected against
788   authentication.  The security considerations section should discuss
789   unauthenticated plaintext attacks.  It should either show that
790   plaintext is protected or discuss what harm an attacker could do by
791   modifying the plaintext.  It is generally acceptable for an attacker
792   to be able to cause the protocol negotiation to fail by modifying
793   plaintext.  More significant attacks should be evaluated carefully.
794
795   As discussed in Section 6.3, there is no guarantee that a client will
796   use the same KDCs for all messages in a conversation.  The mechanism
797   specification needs to show why the mechanism is secure in this
798   situation.  The hardest problem to deal with, especially for
799   challenge/response mechanisms is to make sure that the same response
800   cannot be replayed against two KDCs while allowing the client to talk
801   to any KDC.
802
803
8046.  Tools for Use in Pre-Authentication Mechanisms
805
806   This section describes common tools needed by multiple pre-
807   authentication mechanisms.  By using these tools mechanism designers
808   can use a modular approach to specify mechanism details and ease
809   security analysis.
810
8116.1.  Combining Keys
812
813   Frequently a weak key needs to be combined with a stronger key before
814   use.  For example, passwords are typically limited in size and
815   insufficiently random, therefore it is desirable to increase the
816   strength of the keys based on passwords by adding additional secrets.
817   Additional source of secrecy may come from hardware tokens.
818
819   This section provides standard ways to combine two keys into one.
820
821   KRB-FX-CF1() is defined to combine two pass-phrases.
822
823       KRB-FX-CF1(UTF-8 string, UTF-8 string) -> (UTF-8 string)
824       KRB-FX-CF1(x, y) -> x || y
825
826   Where || denotes concatenation.  The strength of the final key is
827   roughly the total strength of the individual keys being combined
828   assuming that the string_to_key() function [RFC3961] uses all its
829   input evenly.
830
831   An example usage of KRB-FX-CF1() is when a device provides random but
832   short passwords, the password is often combined with a personal
833   identification number (PIN).  The password and the PIN can be
834   combined using KRB-FX-CF1().
835
836
837
838Zhu & Hartman           Expires January 15, 2009               [Page 15]
839
840Internet-Draft         Kerberos Preauth Framework              July 2008
841
842
843   KRB-FX-CF2() combines two protocol keys based on the pseudo-random()
844   function defined in [RFC3961].
845
846   Given two input keys, K1 and K2, where K1 and K2 can be of two
847   different enctypes, the output key of KRB-FX-CF2(), K3, is derived as
848   follows:
849
850       KRB-FX-CF2(protocol key, protocol key, octet string,
851                 octet string)  ->  (protocol key)
852
853       PRF+(K1, pepper1) -> octet-string-1
854       PRF+(K2, pepper2) -> octet-string-2
855       KRB-FX-CF2(K1, K2, pepper1, pepper2) ->
856              random-to-key(octet-string-1 ^ octet-string-2)
857
858   Where ^ denotes the exclusive-OR operation.  PRF+() is defined as
859   follows:
860
861    PRF+(protocol key, octet string) -> (octet string)
862
863    PRF+(key, shared-info) -> pseudo-random( key,  1 || shared-info ) ||
864                  pseudo-random( key, 2 || shared-info ) ||
865                  pseudo-random( key, 3 || shared-info ) || ...
866
867   Here the counter value 1, 2, 3 and so on are encoded as a one-octet
868   integer.  The pseudo-random() operation is specified by the enctype
869   of the protocol key.  PRF+() uses the counter to generate enough bits
870   as needed by the random-to-key() [RFC3961] function for the
871   encryption type specified for the resulting key; unneeded bits are
872   removed from the tail.
873
874   Mechanism designers MUST specify the values for the input parameter
875   pepper1 and pepper2 when combining two keys using KRB-FX-CF2().  The
876   pepper1 and pepper2 MUST be distinct so that if the two keys being
877   combined are the same, the resulting key is not a trivial key.
878
8796.2.  Protecting Requests/Responses
880
881   Mechanism designers SHOULD protect clear text portions of pre-
882   authentication data.  Various denial of service attacks and downgrade
883   attacks against Kerberos are possible unless plaintexts are somehow
884   protected against modification.  An early design goal of Kerberos
885   Version 5 [RFC4120] was to avoid encrypting more of the
886   authentication exchange that was required.  (Version 4 doubly-
887   encrypted the encrypted part of a ticket in a KDC reply, for
888   example.)  This minimization of encryption reduces the load on the
889   KDC and busy servers.  Also, during the initial design of Version 5,
890   the existence of legal restrictions on the export of cryptography
891
892
893
894Zhu & Hartman           Expires January 15, 2009               [Page 16]
895
896Internet-Draft         Kerberos Preauth Framework              July 2008
897
898
899   made it desirable to minimize of the number of uses of encryption in
900   the protocol.  Unfortunately, performing this minimization created
901   numerous instances of unauthenticated security-relevant plaintext
902   fields.
903
904   If there is more than one roundtrip for an authentication exchange,
905   mechanism designers need to allow either the client or the KDC to
906   provide a checksum of all the messages exchanged on the wire in the
907   conversation, and the checksum is then verified by the receiver.
908
909   New mechanisms MUST NOT be hard-wired to use a specific algorithm.
910
911   Primitives defined in [RFC3961] are RECOMMENDED for integrity
912   protection and confidentiality.  Mechanisms based on these primitives
913   are crypto-agile as the result of using [RFC3961] along with
914   [RFC4120].  The advantage afforded by crypto-agility is the ability
915   to avoid a multi-year standardization and deployment cycle to fix a
916   problem that is specific to a particular algorithm, when real attacks
917   do arise against that algorithm.
918
919   Note that data used by FAST factors (defined in Section 6.5) is
920   encrypted in a protected channel, thus they do not share the un-
921   authenticated-text issues with mechanisms designed as full-blown pre-
922   authentication mechanisms.
923
9246.3.  Managing States for the KDC
925
926   Kerberos KDCs are stateless.  There is no requirement that clients
927   will choose the same KDC for the second request in a conversation.
928   Proxies or other intermediate nodes may also influence KDC selection.
929   So, each request from a client to a KDC must include sufficient
930   information that the KDC can regenerate any needed state.  This is
931   accomplished by giving the client a potentially long opaque cookie in
932   responses to include in future requests in the same conversation.
933   The KDC MAY respond that a conversation is too old and needs to
934   restart by responding with a KDC_ERR_PREAUTH_EXPIRED error.
935
936       KDC_ERR_PREAUTH_EXPIRED            TBA
937
938   When a client receives this error, the client SHOULD abort the
939   existing conversation, and restart a new one.
940
941   An example, where more than one message from the client is needed, is
942   when the client is authenticated based on a challenge-response
943   scheme.  In that case, the KDC needs to keep track of the challenge
944   issued for a client authentication request.
945
946   The PA-FX-COOKIE pdata type is defined in this section to facilitate
947
948
949
950Zhu & Hartman           Expires January 15, 2009               [Page 17]
951
952Internet-Draft         Kerberos Preauth Framework              July 2008
953
954
955   state management.  This padata is sent by the KDC when the KDC
956   requires state for a future transaction.  The client includes this
957   opaque token in the next message in the conversation.  The token may
958   be relatively large; clients MUST be prepared for tokens somewhat
959   larger than the size of all messages in a conversation.
960
961       PA_FX_COOKIE                       TBA
962           -- Stateless cookie that is not tied to a specific KDC.
963
964   The corresponding padata-value field [RFC4120] contains the
965   Distinguished Encoding Rules (DER) [X60] [X690] encoding of the
966   following Abstract Syntax Notation One (ASN.1) type PA-FX-COOKIE:
967
968      PA-FX-COOKIE ::= SEQUENCE {
969          conversationId  [0] OCTET STRING,
970             -- Contains the identifier of this conversation. This field
971             -- must contain the same value for all the messages
972             -- within the same conversation.
973          enc-binding-key [1] EncryptedData OPTIONAL,
974                          -- EncryptionKey --
975             -- This field is present when and only when a FAST
976             -- padata as defined in Section 6.5 is included.
977             -- The encrypted data, when decrypted, contains an
978             -- EncryptionKey structure.
979             -- This encryption key is encrypted using the armor key
980             -- (defined in Section 6.5.1), and the key usage for the
981             -- encryption is KEY_USAGE_FAST_BINDING_KEY.
982             -- Present only once in a converstation.
983          cookie          [2] OCTET STRING OPTIONAL,
984             -- Opaque data, for use to associate all the messages in
985             -- a single conversation between the client and the KDC.
986             -- This is generated by the KDC and the client MUST copy
987             -- the exact cookie encapsulated in a PA_FX_COOKIE data
988             -- element into the next message of the same conversation.
989          ...
990      }
991      KEY_USAGE_FAST_BINDING_KEY         TBA
992
993   The conversationId field contains a sufficiently-long rand number
994   that uniquely identifies the conversation.  If a PA_FX_COOKIE padata
995   is present in one message, a PA_FX_COOKIE structure MUST be present
996   in all subsequent messages of the same converstation between the
997   client and the KDC, with the same conversationId value.
998
999   The enc-binding-key field is present when and only when a FAST padata
1000   (defined in Section 6.5) is included.  The enc-binding-key field is
1001   present only once in a conversation.  It MUST be ignored if it is
1002   present in a subsequent message of the same conversation.  The
1003
1004
1005
1006Zhu & Hartman           Expires January 15, 2009               [Page 18]
1007
1008Internet-Draft         Kerberos Preauth Framework              July 2008
1009
1010
1011   encrypted data, when decrypted, contains an EncryptionKey structure
1012   that is called the binding key.  The binding key is encrypted using
1013   the armor key (defined in Section 6.5.1), and the key usage for the
1014   encryption is KEY_USAGE_FAST_BINDING_KEY.
1015
1016   If a Kerberos FAST padata as defined in Section 6.5 is included in
1017   one message, it MUST be included in all subsequent messages of the
1018   same conversation.
1019
1020   When FAST padata as defined Section 6.5 is included, the PA-FX-COOKIE
1021   padata MUST be included.
1022
1023   The cookie token is generated by the KDC and the client MUST copy the
1024   exact cookie encapsulated in a PA_FX_COOKIE data element into the
1025   next message of the same conversation.  The content of the cookie
1026   field is a local matter of the KDC.  However the KDC MUST construct
1027   the cookie token in such a manner that a malicious client cannot
1028   subvert the authentication process by manipulating the token.  The
1029   KDC implementation needs to consider expiration of tokens, key
1030   rollover and other security issues in token design.  The content of
1031   the cookie field is likely specific to the pre-authentication
1032   mechanisms used to authenticate the client.  If a client
1033   authentication response can be replayed to multiple KDCs via the
1034   PA_FX_COOKIE mechanism, an expiration in the cookie is RECOMMENDED to
1035   prevent the response being presented indefinitely.
1036
1037   If at least one more message for a mechanism or a mechanism set is
1038   expected by the KDC, the KDC returns a
1039   KDC_ERR_MORE_PREAUTH_DATA_NEEDED error with a PA_FX_COOKIE to
1040   identify the conversation with the client according to Section 6.5.4.
1041
1042        KDC_ERR_MORE_PREAUTH_DATA_NEEDED   TBA
1043
10446.4.  Pre-authentication Set
1045
1046   If all mechanisms in a group need to successfully complete in order
1047   to authenticate a client, the client and the KDC SHOULD use the
1048   PA_AUTHENTICATION_SET padata element.
1049
1050   A PA_AUTHENTICATION_SET padata element contains the ASN.1 DER
1051   encoding of the PA-AUTHENTICATION-SET structure:
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062Zhu & Hartman           Expires January 15, 2009               [Page 19]
1063
1064Internet-Draft         Kerberos Preauth Framework              July 2008
1065
1066
1067        PA-AUTHENTICATION-SET ::= SEQUENCE OF PA-AUTHENTICATION-SET-ELEM
1068
1069        PA-AUTHENTICATION-SET-ELEM ::= SEQUENCE {
1070            pa-type      [0] Int32,
1071                -- same as padata-type.
1072            pa-hint      [1] OCTET STRING OPTIONAL,
1073            pa-value  [2] OCTET STRING OPTIONAL,
1074            ...
1075        }
1076
1077   The pa-type field of the PA-AUTHENTICATION-SET-ELEM structure
1078   contains the corresponding value of padata-type in PA-DATA [RFC4120].
1079   Associated with the pa-type is a pa-hint, which is an octet-string
1080   specified by the pre-authentication mechanism.  This hint may provide
1081   information for the client which helps it determine whether the
1082   mechanism can be used.  For example a public-key mechanism might
1083   include the certificate authorities it trusts in the hint info.  Most
1084   mechanisms today do not specify hint info; if a mechanism does not
1085   specify hint info the KDC MUST NOT send a hint for that mechanism.
1086   To allow future revisions of mechanism specifications to add hint
1087   info, clients MUST ignore hint info received for mechanisms that the
1088   client believes do not support hint info.  The pa-value element of
1089   the PA-AUTHENTICATION-SET-ELEM sequence is included to carry the
1090   first padata-value from the KDC to the client.  If the client chooses
1091   this authentication set then the client MUST process this pa-value.
1092   The pa-value element MUST be absent for all but the first entry in
1093   the authentication set.  Clients MUST ignore pa-value for the second
1094   and following entries in the authentication set.
1095
1096   If the client chooses an authentication set, then its AS-REQ message
1097   MUST contain a PA_AUTHENTICATION_SET_SELECTED padata element.  This
1098   element contains the encoding of the PA-AUTHENTICATION-SET sequence
1099   received from the KDC corresponding to the authentication set that is
1100   chosen.  The client MUST use the same octet values received from the
1101   KDC; it cannot re-encode the sequence.  This allows KDCs to use bit-
1102   wise comparison to identify the selected authentication set.  The
1103   PA_AUTHENTICATION_SET_SELECTED padata element MUST come before any
1104   padata elements from the authentication set in the padata sequence in
1105   the AS-REQ message.  The client MAY cache authentication sets from
1106   prior messages and use them to construct an optimistic initial AS-
1107   REQ.  If the KDC receives a PA_AUTHENTICATION_SET_SELECTED padata
1108   element that does not correspond to an authentication set that it
1109   would offer, then the KDC returns the
1110   KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET error.  The edata in this
1111   error contains a sequence of padata just as for the
1112   KDC_ERR_PREAUTH_REQUIRED error.
1113
1114
1115
1116
1117
1118Zhu & Hartman           Expires January 15, 2009               [Page 20]
1119
1120Internet-Draft         Kerberos Preauth Framework              July 2008
1121
1122
1123      PA_AUTHENTICATION_SET_SELECTED         TBA
1124      KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET TBA
1125
1126   The PA-AUTHENTICATION-SET appears only in the first message from the
1127   KDC to the client.  In particular, the client MAY fail if the
1128   authentication mechanism sets change as the conversation progresses.
1129   Clients MAY assume that the hints provided in the authentication set
1130   contain enough information that the client knows what user interface
1131   elements need to be displayed during the entire authentication
1132   conversation.  Exceptional circumstances such as expired passwords or
1133   expired accounts may require that additional user interface be
1134   displayed.  Mechanism designers need to carefully consider the design
1135   of their hints so that the client has this information.  This way,
1136   clients can construct necessary dialogue boxes or wizards based on
1137   the authentication set and can present a coherent user interface.
1138   Current standards for user interface do not provide an acceptable
1139   experience when the client has to ask additional questions later in
1140   the conversation.
1141
1142   When indicating which sets of pre-authentication mechanisms are
1143   supported, the KDC includes a PA-AUTHENTICATION-SET padata element
1144   for each pre-authentication mechanism set.
1145
1146   The client sends the padata-value for the first mechanism it picks in
1147   the pre-authentication set, when the first mechanism completes, the
1148   client and the KDC will proceed with the second mechanism, and so on
1149   until all mechanisms complete successfully.  The PA_FX_COOKIE as
1150   defined in Section 6.3 MUST be sent by the KDC along with the first
1151   message that contains a PA-AUTHENTICATION-SET, in order to keep track
1152   of KDC states.
1153
1154   Before the authentication succeeds and a ticket is returned, the
1155   message that the client sends is an AS_REQ and the message that the
1156   KDC sends is a KRB-ERROR message.  The error code in the KRB-ERROR
1157   message from the KDC is KDC_ERR_MORE_PREAUTH_DATA_NEEDED as defined
1158   in Section 6.3 and the accompanying e-data contains the DER encoding
1159   of ASN.1 type METHOD-DATA.  The KDC includes the padata elements in
1160   the METHOD-DATA.  If there is no padata, the e-data field is absent
1161   in the KRB-ERROR message.
1162
1163   If the client sends the last message for a given mechanism, then the
1164   KDC sends the first message for the next mechanism.  If the next
1165   mechanism does not start with a KDC-side challenge, then the KDC
1166   includes a padata item with the appropriate pa-type and an empty pa-
1167   data.
1168
1169   If the KDC sends the last message for a particular mechanism, the KDC
1170   also includes the first padata for the next mechanism.
1171
1172
1173
1174Zhu & Hartman           Expires January 15, 2009               [Page 21]
1175
1176Internet-Draft         Kerberos Preauth Framework              July 2008
1177
1178
11796.5.  Definition of Kerberos FAST Padata
1180
1181   As described in [RFC4120], Kerberos is vulnerable to offline
1182   dictionary attacks.  An attacker can request an AS-REP and try
1183   various passwords to see if they can decrypt the resulting ticket.
1184   RFC 4120 provides the entrypted timestap pre-authentication method
1185   that ameliorates the situation somewhat by requiring that an attacker
1186   observe a successful authentication.  However stronger security is
1187   desired in many environments.  The Kerberos FAST pre-authentication
1188   padata defined in this section provides a tool to significantly
1189   reduce vulnerability to offline dictionary attack.  When combined
1190   with encrypted timestamp, FAST requires an attacker to mount a
1191   successful man-in-the-middle attack to observe ciphertext.  When
1192   combined with host keys, FAST can even protect against active
1193   attacks.  FAST also provides solutions to common problems for pre-
1194   authentication mechanisms such as binding of the request and the
1195   reply, freshness guarantee of the authentication.  FAST itself,
1196   however, does not authenticate the client or the KDC, instead, it
1197   provides a typed hole to allow pre-authentication data be tunneled.
1198   A pre-authentication data element used within FAST is called a FAST
1199   factor.  A FAST factor captures the minimal work required for
1200   extending Kerberos to support a new pre-authentication scheme.
1201
1202   A FAST factor MUST NOT be used outside of FAST unless its
1203   specification explicitly allows so.  The typed holes in FAST messages
1204   can also be used as generic holes for other padata that are not
1205   intended to prove the client's identity, or establish the reply key.
1206
1207   New pre-authentication mechanisms SHOULD be designed as FAST factors,
1208   instead of full-blown pre-authentication mechanisms.
1209
1210   FAST factors that are pre-authentication mechanisms MUST meet the
1211   requirements in Section 5.
1212
1213   FAST employs an armoring scheme.  The armor can be a Ticket Granting
1214   Ticket (TGT) obtained by the client's machine using the host keys to
1215   pre-authenticate with the KDC, or an anonymous TGT obtained based on
1216   anonymous PKINIT [KRB-ANON] [RFC4556].
1217
1218   The rest of this section describes the types of armors and the syntax
1219   of the messages used by FAST.  Conforming implementations MUST
1220   support Kerberos FAST padata.
1221
1222   Any FAST armor scheme MUST provide a fresh armor key for each
1223   conversation.  Clients and KDCs can assume that if a message is
1224   encrypted and integrity protected with a given armor key then it is
1225   part of the conversation using that armor key.
1226
1227
1228
1229
1230Zhu & Hartman           Expires January 15, 2009               [Page 22]
1231
1232Internet-Draft         Kerberos Preauth Framework              July 2008
1233
1234
12356.5.1.  FAST Armors
1236
1237   An armor key is used to encrypt pre-authentication data in the FAST
1238   request and the response.  The KrbFastArmor structure is defined to
1239   identify the armor key.  This structure contains the following two
1240   fields: the armor-type identifies the type of armors, and the armor-
1241   value as an OCTET STRING contains the description of the armor scheme
1242   and the armor key.
1243
1244        KrbFastArmor ::= SEQUENCE {
1245            armor-type   [0] Int32,
1246                -- Type of the armor.
1247            armor-value  [1] OCTET STRING,
1248                -- Value of the armor.
1249            ...
1250        }
1251
1252   The value of the armor key is a matter of the armor type
1253   specification.  Only one armor type is defined in this document.
1254
1255        FX_FAST_ARMOR_AP_REQUEST           TBA
1256
1257   The FX_FAST_ARMOR_AP_REQUEST armor is based on Kerberos tickets.
1258
1259   Conforming implementations MUST implement the
1260   FX_FAST_ARMOR_AP_REQUEST armor type.
1261
12626.5.1.1.  Ticket-based Armors
1263
1264   This is a ticket-based armoring scheme.  The armor-type is
1265   FX_FAST_ARMOR_AP_REQUEST, the armor-value contains an ASN.1 DER
1266   encoded AP-REQ.  The ticket in the AP-REQ is called an armor ticket
1267   or an armor TGT.  The subkey field in the AP-REQ MUST be present.
1268   The armor key is the subkey in the AP-REQ authenticator.
1269
1270   The server name field of the armor ticket MUST identify the TGS of
1271   the target realm.  Here are three ways in the decreasing preference
1272   order how an armor TGT SHOULD be obtained:
1273
1274   1.  If the client is authenticating from a host machine whose
1275       Kerberos realm has a trust path to the client's realm, the host
1276       machine obtains a TGT by pre-authenticating intitialy the realm
1277       of the host machine using the host keys.  If the client's realm
1278       is different than the realm of the local host, the machine then
1279       obtains a cross-realm TGT to the client's realm as the armor
1280       ticket.  Otherwise, the host's primary TGT is the armor ticket.
1281
1282
1283
1284
1285
1286Zhu & Hartman           Expires January 15, 2009               [Page 23]
1287
1288Internet-Draft         Kerberos Preauth Framework              July 2008
1289
1290
1291   2.  If the client's host machine cannot obtain a host ticket strictly
1292       based on RFC4120, but the KDC has an asymmetric signing key that
1293       the client can verify the binding between the public key of the
1294       signing key and the expected KDC, the client can use anonymous
1295       PKINIT [KRB-ANON] [RFC4556] to authenticate the KDC and obtain an
1296       anonymous TGT as the armor ticket.  The armor key can be a cross-
1297       team TGT obtained based on the initial primary TGT obtained using
1298       anonymous PKINIT with KDC authentication.
1299
1300   3.  Otherwise, the client uses anonymous PKINIT to get an anonymous
1301       TGT without KDC authentication and that TGT is the armor ticket.
1302       Note that this mode of operation is vulnerable to man-in-the-
1303       middle attacks at the time of obtaining the initial anonymous
1304       armor TGT.  The armor key can be a cross-team TGT obtained based
1305       on the initial primary TGT obtained using anonymous PKINIT
1306       without KDC authentication.
1307
1308   Because the KDC does not know if the client is able to trust the
1309   ticket it has, the KDC MUST initialize the pre-authentication state
1310   to an unverified KDC.
1311
13126.5.2.  FAST Request
1313
1314   A padata type PA_FX_FAST is defined for the Kerberos FAST pre-
1315   authentication padata.  The corresponding padata-value field
1316   [RFC4120] contains the DER encoding of the ASN.1 type PA-FX-FAST-
1317   REQUEST.
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342Zhu & Hartman           Expires January 15, 2009               [Page 24]
1343
1344Internet-Draft         Kerberos Preauth Framework              July 2008
1345
1346
1347       PA_FX_FAST                         TBA
1348           -- Padata type for Kerberos FAST
1349
1350       PA-FX-FAST-REQUEST ::= CHOICE {
1351           armored-data [0] KrbFastArmoredReq,
1352           ...
1353       }
1354
1355       KrbFastArmoredReq ::= SEQUENCE {
1356           armor        [0] KrbFastArmor OPTIONAL,
1357               -- Contains the armor that identifies the armor key.
1358               -- MUST be present in AS-REQ.
1359               -- MUST be absent in TGS-REQ.
1360           req-checksum [1] Checksum,
1361               -- Checksum performed over the type KDC-REQ-BODY for
1362               -- the req-body field of the KDC-REQ structure defined in
1363               -- [RFC4120]
1364               -- The checksum key is the armor key, the checksum
1365               -- type is the required checksum type for the enctype of
1366               -- the armor key, and the key usage number is
1367               -- KEY_USAGE_FAST_REA_CHKSUM.
1368           enc-fast-req [2] EncryptedData, -- KrbFastReq --
1369               -- The encryption key is the armor key, and the key usage
1370               -- number is KEY_USAGE_FAST_ENC.
1371           ...
1372       }
1373
1374       KEY_USAGE_FAST_REA_CHKSUM          TBA
1375       KEY_USAGE_FAST_ENC                 TBA
1376
1377   The PA-FX-FAST-REQUEST structure contains a KrbFastArmoredReq type.
1378   The KrbFastArmoredReq encapsulates the encrypted padata.
1379
1380   The enc-fast-req field contains an encrypted KrbFastReq structure.
1381   The armor key is used to encrypt the KrbFastReq structure, and the
1382   key usage number for that encryption is KEY_USAGE_FAST_ARMOR.
1383
1384        KEY_USAGE_FAST_ARMOR               TBA
1385
1386   The armor key is selected as follows:
1387
1388   o  In an AS request, the armor field in the KrbFastArmoredReq
1389      structure MUST be present and the armor key is identified
1390      according to the specification of the armor type.
1391
1392   o  In a TGS request, the armor field in the KrbFastArmoredReq
1393      structure MUST NOT be present and the subkey in the AP-REQ
1394      authenticator in the PA-TGS-REQ PA-DATA MUST be present.  In this
1395
1396
1397
1398Zhu & Hartman           Expires January 15, 2009               [Page 25]
1399
1400Internet-Draft         Kerberos Preauth Framework              July 2008
1401
1402
1403      case, the armor key is that subkey in the AP-REQ authenticator.
1404
1405   The req-checksum field contains a checksum that is performed over the
1406   type KDC-REQ-BODY for the req-body field of the KDC-REQ [RFC4120]
1407   structure of the containing message.  The checksum key is the armor
1408   key, and the checksum type is the required checksum type for the
1409   enctype of the armor key per [RFC3961].  This checksum is included in
1410   order to bind the FAST data to the outer request.  A KDC that
1411   implements FAST will ignore the outer request, but including a
1412   checksum is relatively cheap and may prevent confusing behavior.
1413
1414   The KrbFastReq structure contains the following information:
1415
1416        KrbFastReq ::= SEQUENCE {
1417            fast-options [0] FastOptions,
1418                -- Additional options.
1419            padata       [1] SEQUENCE OF PA-DATA,
1420                -- padata typed holes.
1421            req-body     [2] KDC-REQ-BODY,
1422                -- Contains the KDC request body as defined in Section
1423                -- 5.4.1 of [RFC4120].
1424                -- This req-body field is preferred over the outer field
1425                -- in the KDC request.
1426             ...
1427        }
1428
1429   The fast-options field indicates various options that are to modify
1430   the behavior of the KDC.  The following options are defined:
1431
1432        FastOptions ::= KerberosFlags
1433            -- reserved(0),
1434            -- anonymous(1),
1435            -- kdc-referrals(16)
1436
1437
1438      Bits    Name          Description
1439     -----------------------------------------------------------------
1440      0     RESERVED        Reserved for future expansion of this field.
1441      1     anonymous       Requesting the KDC to hide client names in
1442                            the KDC response, as described next in this
1443                            section.
1444      16    kdc-referrals   Requesting the KDC to follow referrals, as
1445                            described next in this section.
1446
1447   Bits 1 through 15 (with bit 2 and bit 15 included) are critical
1448   options.  If the KDC does not support a critical option, it MUST fail
1449   the request with KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS (there is no
1450   accompanying e-data defined in this document for this error code).
1451
1452
1453
1454Zhu & Hartman           Expires January 15, 2009               [Page 26]
1455
1456Internet-Draft         Kerberos Preauth Framework              July 2008
1457
1458
1459   Bit 16 and onward (with bit 16 included) are non-critical options.
1460   KDCs conforming to this specification ignores unknown non-critical
1461   options.
1462
1463        KDC_ERR_UNKNOWN_FAST_OPTIONS       TBA
1464
1465   The anonymous Option
1466
1467      The Kerberos response defined in [RFC4120] contains the client
1468      identity in clear text, This makes traffic analysis
1469      straightforward.  The anonymous option is designed to complicate
1470      traffic analysis.  If the anonymous option is set, the KDC
1471      implementing PA_FX_FAST MUST identify the client as the anonymous
1472      principal [KRB-ANON] in the KDC reply and the error response.
1473      Hence this option is set by the client if it wishes to conceal the
1474      client identity in the KDC response.  A conforming KD ignores the
1475      client principal name in the outer KDC-REQ-BODY field, and
1476      identifies the client using the cname and crealm fields in the
1477      req-body field of the KrbFastReq structure.
1478
1479   The kdc-referrals Option
1480
1481      The Kerberos client described in [RFC4120] has to request referral
1482      TGTs along the authentication path in order to get a service
1483      ticket for the target service.  The Kerberos client described in
1484      the [REFERRALS] need to contact the AS specified in the error
1485      response in order to complete client referrals.  The kdc-referrals
1486      option is designed to minimize the number of messages that need to
1487      be processed by the client.  This option is useful when, for
1488      example, the client may contact the KDC via a satellite link that
1489      has high network latency, or the client has limited computational
1490      capabilities.  If the kdc-referrals option is set, the KDC that
1491      honors this option acts as the client to follow AS referrals and
1492      TGS referrals [REFERRALS], and return the service ticket to the
1493      named server principal in the client request using the reply key
1494      expected by the client.  The kdc-referrals option can be
1495      implemented when the KDC knows the reply key.  The KDC can ignore
1496      kdc-referrals option when it does not understand it or it does not
1497      allow this option based on local policy.  The client SHOULD be
1498      able to process the KDC responses when this option is not honored
1499      by the KDC.
1500
1501   The padata field contains a list of PA-DATA structures as described
1502   in Section 5.2.7 of [RFC4120].  These PA-DATA structures can contain
1503   FAST factors.  They can also be used as generic typed-holes to
1504   contain data not intended for proving the client's identity or
1505   establishing a reply key, but for protocol extensibility.
1506
1507
1508
1509
1510Zhu & Hartman           Expires January 15, 2009               [Page 27]
1511
1512Internet-Draft         Kerberos Preauth Framework              July 2008
1513
1514
1515   The KDC-REQ-BODY in the FAST structure is used in preference to the
1516   KDC-REQ-BODY outside of the FAST pre-authentication.  The outer KDC-
1517   REQ-BODY structure SHOULD be filled in for backwards compatibility
1518   with KDCs that do not support FAST.  A conforming KDC ignores the
1519   outer KDC-REQ-BODY field in the KDC request.
1520
15216.5.3.  FAST Response
1522
1523   The KDC that supports the PA_FX_FAST padata MUST include a PA_FX_FAST
1524   padata element in the KDC reply.  In the case of an error, the
1525   PA_FX_FAST padata is included in the KDC responses according to
1526   Section 6.5.4.
1527
1528   The corresponding padata-value field [RFC4120] for the PA_FX_FAST in
1529   the KDC response contains the DER encoding of the ASN.1 type PA-FX-
1530   FAST-REPLY.
1531
1532      PA-FX-FAST-REPLY ::= CHOICE {
1533          armored-data [0] KrbFastArmoredRep,
1534          ...
1535      }
1536
1537      KrbFastArmoredRep ::= SEQUENCE {
1538          enc-fast-rep      [0] EncryptedData, -- KrbFastResponse --
1539              -- The encryption key is the armor key in the request, and
1540              -- the key usage number is KEY_USAGE_FAST_REP.
1541          ...
1542      }
1543      KEY_USAGE_FAST_REP                 TBA
1544
1545   The PA-FX-FAST-REPLY structure contains a KrbFastArmoredRep
1546   structure.  The KrbFastArmoredRep structure encapsulates the padata
1547   in the KDC reply in the encrypted form.  The KrbFastResponse is
1548   encrypted with the armor key used in the corresponding request, and
1549   the key usage number is KEY_USAGE_FAST_REP.
1550
1551   The Kerberos client who does not receive a PA-FX-FAST-REPLY in the
1552   KDC response MUST support a local policy that rejects the response.
1553   Clients MAY also support policies that fall back to other mechanisms
1554   or that do not use pre-authentication when FAST is unavailable.  It
1555   is important to consider the potential downgrade attacks when
1556   deploying such a policy.
1557
1558   The KrbFastResponse structure contains the following information:
1559
1560
1561
1562
1563
1564
1565
1566Zhu & Hartman           Expires January 15, 2009               [Page 28]
1567
1568Internet-Draft         Kerberos Preauth Framework              July 2008
1569
1570
1571     KrbFastResponse ::= SEQUENCE {
1572         padata      [0] SEQUENCE OF PA-DATA,
1573             -- padata typed holes.
1574         rep-key     [1] EncryptionKey OPTIONAL,
1575             -- This, if present, replaces the reply key for AS and TGS.
1576             -- MUST be absent in KRB-ERROR.
1577         finished    [2] KrbFastFinished OPTIONAL,
1578             -- MUST be present if the client is authenticated,
1579             -- absent otherwise.
1580             -- Typically this is present if and only if the containing
1581             -- message is the last one in a conversation.
1582         ...
1583     }
1584
1585   The padata field in the KrbFastResponse structure contains a list of
1586   PA-DATA structures as described in Section 5.2.7 of [RFC4120].  These
1587   PA-DATA structures are used to carry data advancing the exchange
1588   specific for the FAST factors.  They can also be used as generic
1589   typed-holes for protocol extensibility.
1590
1591   The rep-key field, if present, contains the reply key that is used to
1592   encrypted the KDC reply.  The rep-key field MUST be absent in the
1593   case where an error occurs.  The enctype of the rep-key is the
1594   strongest mutually supported by the KDC and the client.
1595
1596   The finished field contains a KrbFastFinished structure.  It is
1597   filled by the KDC in the final message in the conversation; it MUST
1598   be absent otherwise.  In other words, this field can only be present
1599   in an AS-REP or a TGS-REP when a ticket is returned.
1600
1601   The KrbFastFinished structure contains the following information:
1602
1603        KrbFastFinished ::= SEQUENCE {
1604            timestamp   [0] KerberosTime,
1605            usec        [1] Microseconds,
1606                -- timestamp and usec represent the time on the KDC when
1607                -- the reply was generated.
1608            crealm      [2] Realm,
1609            cname       [3] PrincipalName,
1610                -- Contains the client realm and the client name.
1611            checksum    [4] Checksum,
1612                -- Checksum performed over all the messages in the
1613                -- conversation, except the containing message.
1614                -- The checksum key is the binding key as defined in
1615                -- Section 6.3, and the checksum type is the required
1616                -- checksum type of the binding key.
1617            ...
1618        }
1619
1620
1621
1622Zhu & Hartman           Expires January 15, 2009               [Page 29]
1623
1624Internet-Draft         Kerberos Preauth Framework              July 2008
1625
1626
1627        KEY_USAGE_FAST_FINISHED            TBA
1628
1629   The timestamp and usec fields represent the time on the KDC when the
1630   reply ticket was generated, these fields have the same semantics as
1631   the corresponding-identically-named fields in Section 5.6.1 of
1632   [RFC4120].  The client MUST use the KDC's time in these fields
1633   thereafter when using the returned ticket.  Note that the KDC's time
1634   in AS-REP may not match the authtime in the reply ticket if the kdc-
1635   referrals option is requested and honored by the KDC.
1636
1637   The cname and crealm fields identify the authenticated client.
1638
1639   The checksum field contains a checksum of all the messages in the
1640   conversation prior to the containing message (the containing message
1641   is excluded).  The checksum key is the binding key as defined in
1642   Section 6.3, and the checksum type is the required checksum type of
1643   the enctype of that key, and the key usage number is
1644   KEY_USAGE_FAST_FINISHED. [[anchor9: Examples would be good here; what
1645   all goes into the checksum?]]
1646
1647   When FAST padata is included, the PA-FX-COOKIE padata as defined in
1648   Section 6.3 MUST also be included if the KDC expects at least one
1649   more message from the client in order to complete the authentication.
1650
16516.5.4.  Authenticated Kerberos Error Messages using Kerberos FAST
1652
1653   If the Kerberos FAST padata was included in the request, unless
1654   otherwise specified, the e-data field of the KRB-ERROR message
1655   [RFC4120] contains the ASN.1 DER encoding of the type METHOD-DATA
1656   [RFC4120] and a PA_FX_FAST is included in the METHOD-DATA.  The KDC
1657   MUST include all the padata elements such as PA-ETYPE-INFO2 and
1658   padata elments that indicate acceptable pre-authentication mechanisms
1659   [RFC4120] and in the KrbFastResponse structure.
1660
1661   If the Kerberos FAST padata is included in the request but not
1662   included in the error reply, it is a matter of the local policy on
1663   the client to accept the information in the error message without
1664   integrity protection.  The Kerberos client MAY process an error
1665   message without a PA-FX-FAST-REPLY, if that is only intended to
1666   return better error information to the application, typically for
1667   trouble-shooting purposes.
1668
1669   In the cases where the e-data field of the KRB-ERROR message is
1670   expected to carry a TYPED-DATA [RFC4120] element, the
1671   PA_FX_TYPED_DATA padata is included in the KrbFastResponse structure
1672   to encapsulate the TYPED-DATA [RFC4120] elements.  For example, the
1673   TD_TRUSTED_CERTIFIERS structure is expected to be in the KRB-ERROR
1674   message when the error code is KDC_ERR_CANT_VERIFY_CERTIFICATE
1675
1676
1677
1678Zhu & Hartman           Expires January 15, 2009               [Page 30]
1679
1680Internet-Draft         Kerberos Preauth Framework              July 2008
1681
1682
1683   [RFC4556].
1684
1685        PA_FX_TYPED_DATA                   TBA
1686            -- This is the padata element that encapsulates a TYPED-DATA
1687            -- structure.
1688
1689   The corresponding padata-value for the PA_FX_TYPED_DATA padata type
1690   contains the DER encoding of the ASN.1 type TYPED-DATA [RFC4120].
1691
16926.5.5.  The Encrypted Challenge FAST Factor
1693
1694   The encrypted challenge FAST factor authenticates a client using the
1695   client's long-term key.  This factor works similarly to the encrypted
1696   time stamp pre-authentication option described in [RFC4120].  The
1697   client encrypts a structure containing a timestamp in the challenge
1698   key.  The challenge key is KRB-FX-CF2(long_term_key, armor_key,
1699   "challengelongterm", "challengearmor").  Because the armor key is
1700   fresh and random, the challenge key is fresh and random.  The only
1701   purpose of the timestamp is to limit the validity of the
1702   authentication so that a request cannot be replayed.  A client MAY
1703   base the timestamp based on the KDC time in a KDC error and need not
1704   maintain accurate time synchronization itself.  If a client bases its
1705   time on an untrusted source, an attacker may trick the client into
1706   producing an authentication request that is valid at some future
1707   time.  The attacker may be able to use this authentication request to
1708   make it appear that a client has authenticated at that future time.
1709   If ticket-based armor is used, then the lifetime of the ticket will
1710   limit the window in which an attacker can make the client appear to
1711   have authenticated.  For many situations, the ability of an attacker
1712   to cause a client to appear to have authenticated is not a
1713   significant concern; the ability to avoid requiring time
1714   synchronization on clients is more valuable.
1715
1716   The client sends a padata of type PA_ENCRYPTED_CHALLENGE the
1717   corresponding padata-value contains the DER encoding of ASN.1 type
1718   EncryptedChallenge.
1719
1720      EncryptedChallenge ::= EncryptedData
1721              -- Encrypted PA-ENC-TS-ENC, encrypted in the challenge key
1722              -- using key usage KEY_USAGE_ENC_CHALLENGE_CLIENT for the
1723              --  client and KEY_USAGE_ENC_CHALLENGE_KDC for the KDC.
1724
1725      PA_ENCRYPTED_CHALLENGE          TBA
1726      KEY_USAGE_ENC_CHALLENGE_CLIENT  TBA
1727      KEY_USAGE_ENC_CHALLENGE_KDC     TBA
1728
1729   The client includes some time stamp reasonably close to the KDC's
1730   current time and encrypts it in the challenge key.  Clients MAY use
1731
1732
1733
1734Zhu & Hartman           Expires January 15, 2009               [Page 31]
1735
1736Internet-Draft         Kerberos Preauth Framework              July 2008
1737
1738
1739   the current time; doing so prevents the exposure where an attacker
1740   can cause a client to appear to authenticate in the future.  The
1741   client sends the request including this factor.
1742
1743   On receiving an AS-REQ containing the PA_ENCRYPTED_CHALLENGE fast
1744   factor, the KDC decrypts the timestamp.  If the decryption fails the
1745   KDC SHOULD return KDC_ERR_PREAUTH_FAILED, including etype-info2 in
1746   the error [[anchor11: Or should this be KRB_APP_ERR_MODIFIED?]].  The
1747   KDC confirms that the timestamp falls within its current clock skew
1748   returning KRB_APP_ERR_SKEW if not.  The KDC then SHOULD check to see
1749   if the encrypted challenge is a replay.  The KDC MUST NOT consider
1750   two encrypted challenges replays simply because the time stamps are
1751   the same; to be a replay, the ciphertext MUST be identical.  It is
1752   not clear that RFC 3961 prevents encryption systems for which an
1753   attacker can transform one ciphertext into a different ciphertext
1754   yielding an identical plaintext.  So, it may not be safe to base
1755   replay detection on the ciphertext in the general case.  However the
1756   FAST tunnel provides integrity protection so requiring ciphertext be
1757   identical is secure in this instance.  Allowing clients to re-use
1758   time stamps avoids requiring that clients maintain state about which
1759   time stamps have been used.
1760
1761   If the KDC accepts the encrypted challenge, it MUST include a padata
1762   element of type PA_ENCRYPTED_CHALLENGE.  The KDC encrypts its current
1763   time in the challenge key.  The KDC MUST replace the reply key before
1764   issuing a ticket. [[anchor12: I'd like to say that the KDC replaces
1765   its reply key by this point.  However we need to decide at what
1766   points the FAST mechanism for replacing the reply key can be used and
1767   how that interacts with this.]]The client MUST check that the
1768   timestamp decrypts properly.  The client MAY check that the timestamp
1769   is in some reasonable skew of the current time.  The client MUST NOT
1770   require that the timestamp be identical to the timestamp in the
1771   issued credentials or the returned message.
1772
1773   The encrypted challenge FAST factor provides the following
1774   facilities: client-authentication, KDC authentication.  It does not
1775   provide the strengthening-reply-key facility.  The security
1776   considerations section of this document provides an explanation why
1777   the security requirements are met.
1778
1779   Conforming implementations MUST support the encrypted challenge FAST
1780   factor.
1781
17826.6.  Authentication Strength Indication
1783
1784   Implementations that have pre-authentication mechanisms offering
1785   significantly different strengths of client authentication MAY choose
1786   to keep track of the strength of the authentication used as an input
1787
1788
1789
1790Zhu & Hartman           Expires January 15, 2009               [Page 32]
1791
1792Internet-Draft         Kerberos Preauth Framework              July 2008
1793
1794
1795   into policy decisions.  For example, some principals might require
1796   strong pre-authentication, while less sensitive principals can use
1797   relatively weak forms of pre-authentication like encrypted timestamp.
1798
1799   An AuthorizationData data type AD-Authentication-Strength is defined
1800   for this purpose.
1801
1802        AD-authentication-strength         TBA
1803
1804   The corresponding ad-data field contains the DER encoding of the pre-
1805   authentication data set as defined in Section 6.4.  This set contains
1806   all the pre-authentication mechanisms that were used to authenticate
1807   the client.  If only one pre-authentication mechanism was used to
1808   authenticate the client, the pre-authentication set contains one
1809   element.
1810
1811   The AD-authentication-strength element MUST be included in the AD-IF-
1812   RELEVANT, thus it can be ignored if it is unknown to the receiver.
1813
1814
18157.  IANA Considerations
1816
1817   This document defines several new pa-data types, key usages and error
1818   codes.  In addition it would be good to track which pa-data items are
1819   only to be used as FAST factors.
1820
1821
18228.  Security Considerations
1823
1824   The kdc-referrals option in the Kerberos FAST padata requests the KDC
1825   to act as the client to follow referrals.  This can overload the KDC.
1826   To limit the damages of denied of service using this option, KDCs MAY
1827   restrict the number of simultaneous active requests with this option
1828   for any given client principal.
1829
1830   Because the client secrets are known only to the client and the KDC,
1831   the verification of the authenticated timestamp proves the client's
1832   identity, the verification of the authenticated timestamp in the KDC
1833   reply proves that the expected KDC responded.  The encrypted reply
1834   key is contained in the rep-key in the PA-FX-FAST-REPLY.  Therefore,
1835   the authenticated timestamp FAST factor as a pre-authentication
1836   mechanism offers the following facilities: client-authentication,
1837   replacing-reply-key, KDC-authentication.  There is no un-
1838   authenticated clear text introduced by the authenticated timestamp
1839   FAST factor.
1840
1841
1842
1843
1844
1845
1846Zhu & Hartman           Expires January 15, 2009               [Page 33]
1847
1848Internet-Draft         Kerberos Preauth Framework              July 2008
1849
1850
18519.  Acknowledgements
1852
1853   Sam Hartman would like to thank the MIT Kerberos Consortium for its
1854   funding of his time on this project prior to April 2008.
1855
1856   Several suggestions from Jeffery Hutzman based on early revisions of
1857   this documents led to significant improvements of this document.
1858
1859   The proposal to ask one KDC to chase down the referrals and return
1860   the final ticket is based on requirements in [ID.CROSS].
1861
1862   Joel Webber had a proposal for a mechanism similar to FAST that
1863   created a protected tunnel for Kerberos pre-authentication.
1864
1865
186610.  References
1867
186810.1.  Normative References
1869
1870   [KRB-ANON]
1871              Zhu, L. and P. Leach, "Kerberos Anonymity Support",
1872              draft-ietf-krb-wg-anon-04.txt (work in progress), 2007.
1873
1874   [REFERRALS]
1875              Raeburn, K. and L. Zhu, "Generating KDC Referrals to
1876              Locate Kerberos Realms",
1877              draft-ietf-krb-wg-kerberos-referrals-10.txt (work in
1878              progress), 2007.
1879
1880   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
1881              Requirement Levels", BCP 14, RFC 2119, March 1997.
1882
1883   [RFC3961]  Raeburn, K., "Encryption and Checksum Specifications for
1884              Kerberos 5", RFC 3961, February 2005.
1885
1886   [RFC4120]  Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The
1887              Kerberos Network Authentication Service (V5)", RFC 4120,
1888              July 2005.
1889
1890   [RFC4556]  Zhu, L. and B. Tung, "Public Key Cryptography for Initial
1891              Authentication in Kerberos (PKINIT)", RFC 4556, June 2006.
1892
1893
1894Zhu & Hartman           Expires January 15, 2009               [Page 34]
1895
1896Internet-Draft         Kerberos Preauth Framework              July 2008
1897
1898
1899   [SHA2]     National Institute of Standards and Technology, "Secure 
1900              Hash Standard (SHS)", Federal Information Processing 
1901              Standards Publication 180-2, August 2002.  
1902
1903   [X680]     ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002,
1904              Information technology - Abstract Syntax Notation One
1905              (ASN.1): Specification of basic notation.
1906   
1907   [X690]     ITU-T Recommendation X.690 (2002) | ISO/IEC 8825-1:2002,
1908              Information technology - ASN.1 encoding Rules:
1909              Specification of Basic Encoding Rules (BER), Canonical
1910              Encoding Rules (CER) and Distinguished Encoding Rules
1911              (DER).              
1912
191310.2.  Informative References
1914
1915   [EKE]      Bellovin, S. M. and M. Merritt. "Augmented 
1916              Encrypted Key Exchange: A Password-Based Protocol Secure 
1917              Against Dictionary Attacks and Password File Compromise". 
1918              Proceedings of the 1st ACM Conference on Computer and 
1919              Communications Security, ACM Press, November 1993.
1920   
1921   [HKDF]     Dang, Q. and P. Polk, draft-dang-nistkdf, work in 
1922              progress.
1923
1924   [IEEE1363.2] 
1925              IEEE P1363.2: Password-Based Public-Key Cryptography, 
1926              2004.
1927
1928   [ID.CROSS]
1929              Sakane, S., Zrelli, S., and M. Ishiyama , "Problem
1930              Statement on the Operation of Kerberos in a Specific
1931              System", draft-sakane-krb-cross-problem-statement-02.txt
1932              (work in progress), April 2007.
1933
1934   [KRB-WG.SAM]
1935
1936              Hornstein, K., Renard, K., Neuman, C., and G. Zorn,
1937              "Integrating Single-use Authentication Mechanisms with
1938              Kerberos", draft-ietf-krb-wg-kerberos-sam-02.txt (work in
1939              progress), October 2003.
1940
1941
1942Appendix A.  Change History
1943
1944   RFC editor, please remove this section before publication.
1945
1946A.1.  Changes since 07
1947
1948      Propose replacement of authenticated timestamp with encrypted
1949      challenge.  The desire to avoid clients needing time
1950      synchronization and to simply the factor.
1951      Add a requirement that any FAST armor scheme must provide a fresh
1952      key for each conversation.  This allows us to assume that anything
1953      encrypted/integrity protected in the right key is fresh and not
1954      subject to cross-conversation cut&paste.
1955      Removed heartbeat padata.  The KDC will double up messages if it
1956      needs to; the client simply sends its message and waits for the
1957      next response.
1958      Define PA_AUTHENTICATION_SET_SELECTED
1959      Clarify a KDC cannot ignore padata is has clamed to support
1960
1961A.2.  Changes since 06
1962
1963      Note that even for replace reply key it is likely that the side
1964      using the mechanism will know that the other side supports it.
1965      Since it is reasonablly unlikely we'll need a container mechanism
1966      other than FAST itself, we don't need to optimize for that case.
1967      So, we want to optimize for implementation simplicity.  Thus if
1968      you do have such a container mechanism interacting with
1969      authentication sets we'll assume that the hint need to describe
1970      hints for all contained mechanisms.  This closes out a long-
1971      standing issue.
1972      Write up what Sam believes is the consensus on UI and prompts in
1973      the authentication set: clients MAY assume that they have all the
1974      UI information they need.
1975
1976
1977Appendix B.  ASN.1 module
1978
1979     KerberosPreauthFramework {
1980           iso(1) identified-organization(3) dod(6) internet(1)
1981
1982
1983
1984Zhu & Hartman           Expires January 15, 2009               [Page 35]
1985
1986Internet-Draft         Kerberos Preauth Framework              July 2008
1987
1988
1989           security(5) kerberosV5(2) modules(4) preauth-framework(3)
1990     } DEFINITIONS EXPLICIT TAGS ::= BEGIN
1991
1992     IMPORTS
1993          KerberosTime, PrincipalName, Realm, EncryptionKey, Checksum,
1994          Int32, EncryptedData, PA-ENC-TS-ENC, PA-DATA, KDC-REQ-BODY,
1995          Microseconds, KerberosFlags
1996               FROM KerberosV5Spec2 { iso(1) identified-organization(3)
1997                 dod(6) internet(1) security(5) kerberosV5(2)
1998                 modules(4) krb5spec2(2) };
1999                 -- as defined in RFC 4120.
2000
2001     PA-FX-COOKIE ::= SEQUENCE {
2002         conversationId  [0] OCTET STRING,
2003            -- Contains the identifier of this conversation. This field
2004            -- must contain the same value for all the messages
2005            -- within the same conversation.
2006         enc-binding-key [1] EncryptedData OPTIONAL,
2007                         -- EncryptionKey --
2008            -- This field is present when and only when a FAST
2009            -- padata as defined in Section 6.5 is included.
2010            -- The encrypted data, when decrypted, contains an
2011            -- EncryptionKey structure.
2012            -- This encryption key is encrypted using the armor key
2013            -- (defined in Section 6.5.1), and the key usage for the
2014            -- encryption is KEY_USAGE_FAST_BINDING_KEY.
2015            -- Present only once in a converstation.
2016         cookie          [2] OCTET STRING OPTIONAL,
2017            -- Opaque data, for use to associate all the messages in
2018            -- a single conversation between the client and the KDC.
2019            -- This is generated by the KDC and the client MUST copy
2020            -- the exact cookie encapsulated in a PA_FX_COOKIE data
2021            -- element into the next message of the same conversation.
2022         ...
2023     }
2024
2025     PA-AUTHENTICATION-SET ::= SEQUENCE OF PA-AUTHENTICATION-SET-ELEM
2026
2027     PA-AUTHENTICATION-SET-ELEM ::= SEQUENCE {
2028         pa-type      [0] Int32,
2029             -- same as padata-type.
2030         pa-hint      [1] OCTET STRING OPTIONAL,
2031         pa-value  [2] OCTET STRING OPTIONAL,
2032         ...
2033     }
2034
2035     KrbFastArmor ::= SEQUENCE {
2036         armor-type   [0] Int32,
2037
2038
2039
2040Zhu & Hartman           Expires January 15, 2009               [Page 36]
2041
2042Internet-Draft         Kerberos Preauth Framework              July 2008
2043
2044
2045             -- Type of the armor.
2046         armor-value  [1] OCTET STRING,
2047             -- Value of the armor.
2048         ...
2049     }
2050
2051     PA-FX-FAST-REQUEST ::= CHOICE {
2052         armored-data [0] KrbFastArmoredReq,
2053         ...
2054     }
2055
2056     KrbFastArmoredReq ::= SEQUENCE {
2057         armor        [0] KrbFastArmor OPTIONAL,
2058             -- Contains the armor that identifies the armor key.
2059             -- MUST be present in AS-REQ.
2060             -- MUST be absent in TGS-REQ.
2061         req-checksum [1] Checksum,
2062             -- Checksum performed over the type KDC-REQ-BODY for
2063             -- the req-body field of the KDC-REQ structure defined in
2064             -- [RFC4120]
2065             -- The checksum key is the armor key, the checksum
2066             -- type is the required checksum type for the enctype of
2067             -- the armor key, and the key usage number is
2068             -- KEY_USAGE_FAST_REA_CHKSUM.
2069         enc-fast-req [2] EncryptedData, -- KrbFastReq --
2070             -- The encryption key is the armor key, and the key usage
2071             -- number is KEY_USAGE_FAST_ENC.
2072         ...
2073     }
2074
2075     KrbFastReq ::= SEQUENCE {
2076         fast-options [0] FastOptions,
2077             -- Additional options.
2078         padata       [1] SEQUENCE OF PA-DATA,
2079             -- padata typed holes.
2080         req-body     [2] KDC-REQ-BODY,
2081             -- Contains the KDC request body as defined in Section
2082             -- 5.4.1 of [RFC4120].
2083             -- This req-body field is preferred over the outer field
2084             -- in the KDC request.
2085          ...
2086     }
2087
2088     FastOptions ::= KerberosFlags
2089         -- reserved(0),
2090         -- anonymous(1),
2091         -- kdc-referrals(16)
2092
2093
2094
2095
2096Zhu & Hartman           Expires January 15, 2009               [Page 37]
2097
2098Internet-Draft         Kerberos Preauth Framework              July 2008
2099
2100
2101     PA-FX-FAST-REPLY ::= CHOICE {
2102         armored-data [0] KrbFastArmoredRep,
2103         ...
2104     }
2105
2106     KrbFastArmoredRep ::= SEQUENCE {
2107         enc-fast-rep      [0] EncryptedData, -- KrbFastResponse --
2108             -- The encryption key is the armor key in the request, and
2109             -- the key usage number is KEY_USAGE_FAST_REP.
2110         ...
2111     }
2112
2113     KrbFastResponse ::= SEQUENCE {
2114         padata      [0] SEQUENCE OF PA-DATA,
2115             -- padata typed holes.
2116         rep-key     [1] EncryptionKey OPTIONAL,
2117             -- This, if present, replaces the reply key for AS and TGS.
2118             -- MUST be absent in KRB-ERROR.
2119         finished    [2] KrbFastFinished OPTIONAL,
2120             -- MUST be present if the client is authenticated,
2121             -- absent otherwise.
2122             -- Typically this is present if and only if the containing
2123             -- message is the last one in a conversation.
2124         ...
2125     }
2126
2127     KrbFastFinished ::= SEQUENCE {
2128         timestamp   [0] KerberosTime,
2129         usec        [1] Microseconds,
2130             -- timestamp and usec represent the time on the KDC when
2131             -- the reply was generated.
2132         crealm      [2] Realm,
2133         cname       [3] PrincipalName,
2134             -- Contains the client realm and the client name.
2135         checksum    [4] Checksum,
2136             -- Checksum performed over all the messages in the
2137             -- conversation, except the containing message.
2138             -- The checksum key is the binding key as defined in
2139             -- Section 6.3, and the checksum type is the required
2140             -- checksum type of the binding key.
2141         ...
2142     }
2143
2144     EncryptedChallenge ::= EncryptedData
2145             -- Encrypted PA-ENC-TS-ENC, encrypted in the challenge key
2146             -- using key usage KEY_USAGE_ENC_CHALLENGE_CLIENT for the
2147             --  client and KEY_USAGE_ENC_CHALLENGE_KDC for the KDC.
2148     END
2149
2150
2151
2152Zhu & Hartman           Expires January 15, 2009               [Page 38]
2153
2154Internet-Draft         Kerberos Preauth Framework              July 2008
2155
2156
2157Authors' Addresses
2158
2159   Larry Zhu
2160   Microsoft Corporation
2161   One Microsoft Way
2162   Redmond, WA  98052
2163   US
2164
2165   Email: lzhu@microsoft.com
2166
2167
2168   Sam hartman
2169   Painless Security
2170
2171   Email: hartmans-ietf@mit.edu
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208Zhu & Hartman           Expires January 15, 2009               [Page 39]
2209
2210Internet-Draft         Kerberos Preauth Framework              July 2008
2211
2212
2213Full Copyright Statement
2214
2215   Copyright (C) The IETF Trust (2008).
2216
2217   This document is subject to the rights, licenses and restrictions
2218   contained in BCP 78, and except as set forth therein, the authors
2219   retain all their rights.
2220
2221   This document and the information contained herein are provided on an
2222   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
2223   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
2224   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
2225   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
2226   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
2227   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
2228
2229
2230Intellectual Property
2231
2232   The IETF takes no position regarding the validity or scope of any
2233   Intellectual Property Rights or other rights that might be claimed to
2234   pertain to the implementation or use of the technology described in
2235   this document or the extent to which any license under such rights
2236   might or might not be available; nor does it represent that it has
2237   made any independent effort to identify any such rights.  Information
2238   on the procedures with respect to rights in RFC documents can be
2239   found in BCP 78 and BCP 79.
2240
2241   Copies of IPR disclosures made to the IETF Secretariat and any
2242   assurances of licenses to be made available, or the result of an
2243   attempt made to obtain a general license or permission for the use of
2244   such proprietary rights by implementers or users of this
2245   specification can be obtained from the IETF on-line IPR repository at
2246   http://www.ietf.org/ipr.
2247
2248   The IETF invites any interested party to bring to its attention any
2249   copyrights, patents or patent applications, or other proprietary
2250   rights that may cover technology that may be required to implement
2251   this standard.  Please address the information to the IETF at
2252   ietf-ipr@ietf.org.
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264Zhu & Hartman           Expires January 15, 2009               [Page 40]
2265
2266
2267