4 INTERNET-DRAFT Clifford Neuman
9 The Kerberos Network Authentication Service (V5)
13 This document is an Internet-Draft. Internet-Drafts are working documents
14 of the Internet Engineering Task Force (IETF), its areas, and its working
15 groups. Note that other groups may also distribute working documents as
18 Internet-Drafts are draft documents valid for a maximum of six months and
19 may be updated, replaced, or obsoleted by other documents at any time. It
20 is inappropriate to use Internet-Drafts as reference material or to cite
21 them other than as 'work in progress.'
23 To learn the current status of any Internet-Draft, please check the
24 '1id-abstracts.txt' listing contained in the Internet-Drafts Shadow
25 Directories on ftp.ietf.org (US East Coast), nic.nordu.net (Europe),
26 ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
28 The distribution of this memo is unlimited. It is filed as
29 draft-ietf-cat-kerberos-revisions-03.txt, and expires May 18th, 1999.
30 Please send comments to: krb-protocol@MIT.EDU
34 This document provides an overview and specification of Version 5 of the
35 Kerberos protocol, and updates RFC1510 to clarify aspects of the protocol
36 and its intended use that require more detailed or clearer explanation than
37 was provided in RFC1510. This document is intended to provide a detailed
38 description of the protocol, suitable for implementation, together with
39 descriptions of the appropriate use of protocol messages and fields within
42 This document is not intended to describe Kerberos to the end user, system
43 administrator, or application developer. Higher level papers describing
44 Version 5 of the Kerberos system [NT94] and documenting version 4 [SNS88],
45 are available elsewhere.
49 This INTERNET-DRAFT describes the concepts and model upon which the
50 Kerberos network authentication system is based. It also specifies Version
51 5 of the Kerberos protocol.
53 The motivations, goals, assumptions, and rationale behind most design
54 decisions are treated cursorily; they are more fully described in a paper
55 available in IEEE communications [NT94] and earlier in the Kerberos portion
56 of the Athena Technical Plan [MNSS87]. The protocols have been a proposed
57 standard and are being considered for advancement for draft standard
58 through the IETF standard process. Comments are encouraged on the
59 presentation, but only minor refinements to the protocol as implemented or
60 extensions that fit within current protocol framework will be considered at
62 Neuman, Ts'o, Kohl Expires: 18 May 1999
65 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
70 Requests for addition to an electronic mailing list for discussion of
71 Kerberos, kerberos@MIT.EDU, may be addressed to kerberos-request@MIT.EDU.
72 This mailing list is gatewayed onto the Usenet as the group
73 comp.protocols.kerberos. Requests for further information, including
74 documents and code availability, may be sent to info-kerberos@MIT.EDU.
78 The Kerberos model is based in part on Needham and Schroeder's trusted
79 third-party authentication protocol [NS78] and on modifications suggested
80 by Denning and Sacco [DS81]. The original design and implementation of
81 Kerberos Versions 1 through 4 was the work of two former Project Athena
82 staff members, Steve Miller of Digital Equipment Corporation and Clifford
83 Neuman (now at the Information Sciences Institute of the University of
84 Southern California), along with Jerome Saltzer, Technical Director of
85 Project Athena, and Jeffrey Schiller, MIT Campus Network Manager. Many
86 other members of Project Athena have also contributed to the work on
89 Version 5 of the Kerberos protocol (described in this document) has evolved
90 from Version 4 based on new requirements and desires for features not
91 available in Version 4. The design of Version 5 of the Kerberos protocol
92 was led by Clifford Neuman and John Kohl with much input from the
93 community. The development of the MIT reference implementation was led at
94 MIT by John Kohl and Theodore T'so, with help and contributed code from
95 many others. Since RFC1510 was issued, extensions and revisions to the
96 protocol have been proposed by many individuals. Some of these proposals
97 are reflected in this document. Where such changes involved significant
98 effort, the document cites the contribution of the proposer.
100 Reference implementations of both version 4 and version 5 of Kerberos are
101 publicly available and commercial implementations have been developed and
102 are widely used. Details on the differences between Kerberos Versions 4 and
103 5 can be found in [KNT92].
107 Kerberos provides a means of verifying the identities of principals, (e.g.
108 a workstation user or a network server) on an open (unprotected) network.
109 This is accomplished without relying on assertions by the host operating
110 system, without basing trust on host addresses, without requiring physical
111 security of all the hosts on the network, and under the assumption that
112 packets traveling along the network can be read, modified, and inserted at
113 will[1]. Kerberos performs authentication under these conditions as a
114 trusted third-party authentication service by using conventional (shared
115 secret key [2] cryptography. Kerberos extensions have been proposed and
116 implemented that provide for the use of public key cryptography during
117 certain phases of the authentication protocol. These extensions provide for
118 authentication of users registered with public key certification
119 authorities, and allow the system to provide certain benefits of public key
120 cryptography in situations where they are needed.
122 The basic Kerberos authentication process proceeds as follows: A client
123 sends a request to the authentication server (AS) requesting 'credentials'
124 for a given server. The AS responds with these credentials, encrypted in
125 the client's key. The credentials consist of 1) a 'ticket' for the server
126 and 2) a temporary encryption key (often called a "session key"). The
128 Neuman, Ts'o, Kohl Expires: 18 May 1999
131 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
134 client transmits the ticket (which contains the client's identity and a
135 copy of the session key, all encrypted in the server's key) to the server.
136 The session key (now shared by the client and server) is used to
137 authenticate the client, and may optionally be used to authenticate the
138 server. It may also be used to encrypt further communication between the
139 two parties or to exchange a separate sub-session key to be used to encrypt
140 further communication.
142 Implementation of the basic protocol consists of one or more authentication
143 servers running on physically secure hosts. The authentication servers
144 maintain a database of principals (i.e., users and servers) and their
145 secret keys. Code libraries provide encryption and implement the Kerberos
146 protocol. In order to add authentication to its transactions, a typical
147 network application adds one or two calls to the Kerberos library directly
148 or through the Generic Security Services Application Programming Interface,
149 GSSAPI, described in separate document. These calls result in the
150 transmission of the necessary messages to achieve authentication.
152 The Kerberos protocol consists of several sub-protocols (or exchanges).
153 There are two basic methods by which a client can ask a Kerberos server for
154 credentials. In the first approach, the client sends a cleartext request
155 for a ticket for the desired server to the AS. The reply is sent encrypted
156 in the client's secret key. Usually this request is for a ticket-granting
157 ticket (TGT) which can later be used with the ticket-granting server (TGS).
158 In the second method, the client sends a request to the TGS. The client
159 uses the TGT to authenticate itself to the TGS in the same manner as if it
160 were contacting any other application server that requires Kerberos
161 authentication. The reply is encrypted in the session key from the TGT.
162 Though the protocol specification describes the AS and the TGS as separate
163 servers, they are implemented in practice as different protocol entry
164 points within a single Kerberos server.
166 Once obtained, credentials may be used to verify the identity of the
167 principals in a transaction, to ensure the integrity of messages exchanged
168 between them, or to preserve privacy of the messages. The application is
169 free to choose whatever protection may be necessary.
171 To verify the identities of the principals in a transaction, the client
172 transmits the ticket to the application server. Since the ticket is sent
173 "in the clear" (parts of it are encrypted, but this encryption doesn't
174 thwart replay) and might be intercepted and reused by an attacker,
175 additional information is sent to prove that the message originated with
176 the principal to whom the ticket was issued. This information (called the
177 authenticator) is encrypted in the session key, and includes a timestamp.
178 The timestamp proves that the message was recently generated and is not a
179 replay. Encrypting the authenticator in the session key proves that it was
180 generated by a party possessing the session key. Since no one except the
181 requesting principal and the server know the session key (it is never sent
182 over the network in the clear) this guarantees the identity of the client.
184 The integrity of the messages exchanged between principals can also be
185 guaranteed using the session key (passed in the ticket and contained in the
186 credentials). This approach provides detection of both replay attacks and
187 message stream modification attacks. It is accomplished by generating and
188 transmitting a collision-proof checksum (elsewhere called a hash or digest
189 function) of the client's message, keyed with the session key. Privacy and
190 integrity of the messages exchanged between principals can be secured by
191 encrypting the data to be passed using the session key contained in the
192 ticket or the subsession key found in the authenticator.
194 Neuman, Ts'o, Kohl Expires: 18 May 1999
197 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
201 The authentication exchanges mentioned above require read-only access to
202 the Kerberos database. Sometimes, however, the entries in the database must
203 be modified, such as when adding new principals or changing a principal's
204 key. This is done using a protocol between a client and a third Kerberos
205 server, the Kerberos Administration Server (KADM). There is also a protocol
206 for maintaining multiple copies of the Kerberos database. Neither of these
207 protocols are described in this document.
209 1.1. Cross-Realm Operation
211 The Kerberos protocol is designed to operate across organizational
212 boundaries. A client in one organization can be authenticated to a server
213 in another. Each organization wishing to run a Kerberos server establishes
214 its own 'realm'. The name of the realm in which a client is registered is
215 part of the client's name, and can be used by the end-service to decide
216 whether to honor a request.
218 By establishing 'inter-realm' keys, the administrators of two realms can
219 allow a client authenticated in the local realm to prove its identity to
220 servers in other realms[3]. The exchange of inter-realm keys (a separate
221 key may be used for each direction) registers the ticket-granting service
222 of each realm as a principal in the other realm. A client is then able to
223 obtain a ticket-granting ticket for the remote realm's ticket-granting
224 service from its local realm. When that ticket-granting ticket is used, the
225 remote ticket-granting service uses the inter-realm key (which usually
226 differs from its own normal TGS key) to decrypt the ticket-granting ticket,
227 and is thus certain that it was issued by the client's own TGS. Tickets
228 issued by the remote ticket-granting service will indicate to the
229 end-service that the client was authenticated from another realm.
231 A realm is said to communicate with another realm if the two realms share
232 an inter-realm key, or if the local realm shares an inter-realm key with an
233 intermediate realm that communicates with the remote realm. An
234 authentication path is the sequence of intermediate realms that are
235 transited in communicating from one realm to another.
237 Realms are typically organized hierarchically. Each realm shares a key with
238 its parent and a different key with each child. If an inter-realm key is
239 not directly shared by two realms, the hierarchical organization allows an
240 authentication path to be easily constructed. If a hierarchical
241 organization is not used, it may be necessary to consult a database in
242 order to construct an authentication path between realms.
244 Although realms are typically hierarchical, intermediate realms may be
245 bypassed to achieve cross-realm authentication through alternate
246 authentication paths (these might be established to make communication
247 between two realms more efficient). It is important for the end-service to
248 know which realms were transited when deciding how much faith to place in
249 the authentication process. To facilitate this decision, a field in each
250 ticket contains the names of the realms that were involved in
251 authenticating the client.
253 The application server is ultimately responsible for accepting or rejecting
254 authentication and should check the transited field. The application server
255 may choose to rely on the KDC for the application server's realm to check
256 the transited field. The application server's KDC will set the
257 TRANSITED-POLICY-CHECKED flag in this case. The KDC's for intermediate
258 realms may also check the transited field as they issue
260 Neuman, Ts'o, Kohl Expires: 18 May 1999
263 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
266 ticket-granting-tickets for other realms, but they are encouraged not to do
267 so. A client may request that the KDC's not check the transited field by
268 setting the DISABLE-TRANSITED-CHECK flag. KDC's are encouraged but not
269 required to honor this flag.
273 As an authentication service, Kerberos provides a means of verifying the
274 identity of principals on a network. Authentication is usually useful
275 primarily as a first step in the process of authorization, determining
276 whether a client may use a service, which objects the client is allowed to
277 access, and the type of access allowed for each. Kerberos does not, by
278 itself, provide authorization. Possession of a client ticket for a service
279 provides only for authentication of the client to that service, and in the
280 absence of a separate authorization procedure, it should not be considered
281 by an application as authorizing the use of that service.
283 Such separate authorization methods may be implemented as application
284 specific access control functions and may be based on files such as the
285 application server, or on separately issued authorization credentials such
286 as those based on proxies [Neu93] , or on other authorization services.
288 Applications should not be modified to accept the issuance of a service
289 ticket by the Kerberos server (even by an modified Kerberos server) as
290 granting authority to use the service, since such applications may become
291 vulnerable to the bypass of this authorization check in an environment if
292 they interoperate with other KDCs or where other options for application
293 authentication (e.g. the PKTAPP proposal) are provided.
295 1.3. Environmental assumptions
297 Kerberos imposes a few assumptions on the environment in which it can
300 * 'Denial of service' attacks are not solved with Kerberos. There are
301 places in these protocols where an intruder can prevent an application
302 from participating in the proper authentication steps. Detection and
303 solution of such attacks (some of which can appear to be nnot-uncommon
304 'normal' failure modes for the system) is usually best left to the
305 human administrators and users.
306 * Principals must keep their secret keys secret. If an intruder somehow
307 steals a principal's key, it will be able to masquerade as that
308 principal or impersonate any server to the legitimate principal.
309 * 'Password guessing' attacks are not solved by Kerberos. If a user
310 chooses a poor password, it is possible for an attacker to
311 successfully mount an offline dictionary attack by repeatedly
312 attempting to decrypt, with successive entries from a dictionary,
313 messages obtained which are encrypted under a key derived from the
315 * Each host on the network must have a clock which is 'loosely
316 synchronized' to the time of the other hosts; this synchronization is
317 used to reduce the bookkeeping needs of application servers when they
318 do replay detection. The degree of "looseness" can be configured on a
319 per-server basis, but is typically on the order of 5 minutes. If the
320 clocks are synchronized over the network, the clock synchronization
321 protocol must itself be secured from network attackers.
322 * Principal identifiers are not recycled on a short-term basis. A
323 typical mode of access control will use access control lists (ACLs) to
324 grant permissions to particular principals. If a stale ACL entry
326 Neuman, Ts'o, Kohl Expires: 18 May 1999
329 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
332 remains for a deleted principal and the principal identifier is
333 reused, the new principal will inherit rights specified in the stale
334 ACL entry. By not re-using principal identifiers, the danger of
335 inadvertent access is removed.
337 1.4. Glossary of terms
339 Below is a list of terms used throughout this document.
342 Verifying the claimed identity of a principal.
343 Authentication header
344 A record containing a Ticket and an Authenticator to be presented to a
345 server as part of the authentication process.
347 A sequence of intermediate realms transited in the authentication
348 process when communicating from one realm to another.
350 A record containing information that can be shown to have been
351 recently generated using the session key known only by the client and
354 The process of determining whether a client may use a service, which
355 objects the client is allowed to access, and the type of access
358 A token that grants the bearer permission to access an object or
359 service. In Kerberos, this might be a ticket whose use is restricted
360 by the contents of the authorization data field, but which lists no
361 network addresses, together with the session key necessary to use the
364 The output of an encryption function. Encryption transforms plaintext
367 A process that makes use of a network service on behalf of a user.
368 Note that in some cases a Server may itself be a client of some other
369 server (e.g. a print server may be a client of a file server).
371 A ticket plus the secret session key necessary to successfully use
372 that ticket in an authentication exchange.
374 Key Distribution Center, a network service that supplies tickets and
375 temporary session keys; or an instance of that service or the host on
376 which it runs. The KDC services both initial ticket and
377 ticket-granting ticket requests. The initial ticket portion is
378 sometimes referred to as the Authentication Server (or service). The
379 ticket-granting ticket portion is sometimes referred to as the
380 ticket-granting server (or service).
382 Aside from the 3-headed dog guarding Hades, the name given to Project
383 Athena's authentication service, the protocol used by that service, or
384 the code used to implement the authentication service.
386 The input to an encryption function or the output of a decryption
387 function. Decryption transforms ciphertext into plaintext.
389 A uniquely named client or server instance that participates in a
390 network communication.
392 Neuman, Ts'o, Kohl Expires: 18 May 1999
395 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
399 The name used to uniquely identify each different principal.
401 To encipher a record containing several fields in such a way that the
402 fields cannot be individually replaced without either knowledge of the
403 encryption key or leaving evidence of tampering.
405 An encryption key shared by a principal and the KDC, distributed
406 outside the bounds of the system, with a long lifetime. In the case of
407 a human user's principal, the secret key is derived from a password.
409 A particular Principal which provides a resource to network clients.
410 The server is sometimes refered to as the Application Server.
412 A resource provided to network clients; often provided by more than
413 one server (for example, remote file service).
415 A temporary encryption key used between two principals, with a
416 lifetime limited to the duration of a single login "session".
418 A temporary encryption key used between two principals, selected and
419 exchanged by the principals using the session key, and with a lifetime
420 limited to the duration of a single association.
422 A record that helps a client authenticate itself to a server; it
423 contains the client's identity, a session key, a timestamp, and other
424 information, all sealed using the server's secret key. It only serves
425 to authenticate a client when presented along with a fresh
428 2. Ticket flag uses and requests
430 Each Kerberos ticket contains a set of flags which are used to indicate
431 various attributes of that ticket. Most flags may be requested by a client
432 when the ticket is obtained; some are automatically turned on and off by a
433 Kerberos server as required. The following sections explain what the
434 various flags mean, and gives examples of reasons to use such a flag.
436 2.1. Initial and pre-authenticated tickets
438 The INITIAL flag indicates that a ticket was issued using the AS protocol
439 and not issued based on a ticket-granting ticket. Application servers that
440 want to require the demonstrated knowledge of a client's secret key (e.g. a
441 password-changing program) can insist that this flag be set in any tickets
442 they accept, and thus be assured that the client's key was recently
443 presented to the application client.
445 The PRE-AUTHENT and HW-AUTHENT flags provide addition information about the
446 initial authentication, regardless of whether the current ticket was issued
447 directly (in which case INITIAL will also be set) or issued on the basis of
448 a ticket-granting ticket (in which case the INITIAL flag is clear, but the
449 PRE-AUTHENT and HW-AUTHENT flags are carried forward from the
450 ticket-granting ticket).
454 The INVALID flag indicates that a ticket is invalid. Application servers
455 must reject tickets which have this flag set. A postdated ticket will
456 usually be issued in this form. Invalid tickets must be validated by the
458 Neuman, Ts'o, Kohl Expires: 18 May 1999
461 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
464 KDC before use, by presenting them to the KDC in a TGS request with the
465 VALIDATE option specified. The KDC will only validate tickets after their
466 starttime has passed. The validation is required so that postdated tickets
467 which have been stolen before their starttime can be rendered permanently
468 invalid (through a hot-list mechanism) (see section 3.3.3.1).
470 2.3. Renewable tickets
472 Applications may desire to hold tickets which can be valid for long periods
473 of time. However, this can expose their credentials to potential theft for
474 equally long periods, and those stolen credentials would be valid until the
475 expiration time of the ticket(s). Simply using short-lived tickets and
476 obtaining new ones periodically would require the client to have long-term
477 access to its secret key, an even greater risk. Renewable tickets can be
478 used to mitigate the consequences of theft. Renewable tickets have two
479 "expiration times": the first is when the current instance of the ticket
480 expires, and the second is the latest permissible value for an individual
481 expiration time. An application client must periodically (i.e. before it
482 expires) present a renewable ticket to the KDC, with the RENEW option set
483 in the KDC request. The KDC will issue a new ticket with a new session key
484 and a later expiration time. All other fields of the ticket are left
485 unmodified by the renewal process. When the latest permissible expiration
486 time arrives, the ticket expires permanently. At each renewal, the KDC may
487 consult a hot-list to determine if the ticket had been reported stolen
488 since its last renewal; it will refuse to renew such stolen tickets, and
489 thus the usable lifetime of stolen tickets is reduced.
491 The RENEWABLE flag in a ticket is normally only interpreted by the
492 ticket-granting service (discussed below in section 3.3). It can usually be
493 ignored by application servers. However, some particularly careful
494 application servers may wish to disallow renewable tickets.
496 If a renewable ticket is not renewed by its expiration time, the KDC will
497 not renew the ticket. The RENEWABLE flag is reset by default, but a client
498 may request it be set by setting the RENEWABLE option in the KRB_AS_REQ
499 message. If it is set, then the renew-till field in the ticket contains the
500 time after which the ticket may not be renewed.
502 2.4. Postdated tickets
504 Applications may occasionally need to obtain tickets for use much later,
505 e.g. a batch submission system would need tickets to be valid at the time
506 the batch job is serviced. However, it is dangerous to hold valid tickets
507 in a batch queue, since they will be on-line longer and more prone to
508 theft. Postdated tickets provide a way to obtain these tickets from the KDC
509 at job submission time, but to leave them "dormant" until they are
510 activated and validated by a further request of the KDC. If a ticket theft
511 were reported in the interim, the KDC would refuse to validate the ticket,
512 and the thief would be foiled.
514 The MAY-POSTDATE flag in a ticket is normally only interpreted by the
515 ticket-granting service. It can be ignored by application servers. This
516 flag must be set in a ticket-granting ticket in order to issue a postdated
517 ticket based on the presented ticket. It is reset by default; it may be
518 requested by a client by setting the ALLOW-POSTDATE option in the
519 KRB_AS_REQ message. This flag does not allow a client to obtain a postdated
520 ticket-granting ticket; postdated ticket-granting tickets can only by
521 obtained by requesting the postdating in the KRB_AS_REQ message. The life
522 (endtime-starttime) of a postdated ticket will be the remaining life of the
524 Neuman, Ts'o, Kohl Expires: 18 May 1999
527 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
530 ticket-granting ticket at the time of the request, unless the RENEWABLE
531 option is also set, in which case it can be the full life
532 (endtime-starttime) of the ticket-granting ticket. The KDC may limit how
533 far in the future a ticket may be postdated.
535 The POSTDATED flag indicates that a ticket has been postdated. The
536 application server can check the authtime field in the ticket to see when
537 the original authentication occurred. Some services may choose to reject
538 postdated tickets, or they may only accept them within a certain period
539 after the original authentication. When the KDC issues a POSTDATED ticket,
540 it will also be marked as INVALID, so that the application client must
541 present the ticket to the KDC to be validated before use.
543 2.5. Proxiable and proxy tickets
545 At times it may be necessary for a principal to allow a service to perform
546 an operation on its behalf. The service must be able to take on the
547 identity of the client, but only for a particular purpose. A principal can
548 allow a service to take on the principal's identity for a particular
549 purpose by granting it a proxy.
551 The process of granting a proxy using the proxy and proxiable flags is used
552 to provide credentials for use with specific services. Though conceptually
553 also a proxy, user's wishing to delegate their identity for ANY purpose
554 must use the ticket forwarding mechanism described in the next section to
555 forward a ticket granting ticket.
557 The PROXIABLE flag in a ticket is normally only interpreted by the
558 ticket-granting service. It can be ignored by application servers. When
559 set, this flag tells the ticket-granting server that it is OK to issue a
560 new ticket (but not a ticket-granting ticket) with a different network
561 address based on this ticket. This flag is set if requested by the client
562 on initial authentication. By default, the client will request that it be
563 set when requesting a ticket granting ticket, and reset when requesting any
566 This flag allows a client to pass a proxy to a server to perform a remote
567 request on its behalf, e.g. a print service client can give the print
568 server a proxy to access the client's files on a particular file server in
569 order to satisfy a print request.
571 In order to complicate the use of stolen credentials, Kerberos tickets are
572 usually valid from only those network addresses specifically included in
573 the ticket[4]. When granting a proxy, the client must specify the new
574 network address from which the proxy is to be used, or indicate that the
575 proxy is to be issued for use from any address.
577 The PROXY flag is set in a ticket by the TGS when it issues a proxy ticket.
578 Application servers may check this flag and at their option they may
579 require additional authentication from the agent presenting the proxy in
580 order to provide an audit trail.
582 2.6. Forwardable tickets
584 Authentication forwarding is an instance of a proxy where the service is
585 granted complete use of the client's identity. An example where it might be
586 used is when a user logs in to a remote system and wants authentication to
587 work from that system as if the login were local.
590 Neuman, Ts'o, Kohl Expires: 18 May 1999
593 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
596 The FORWARDABLE flag in a ticket is normally only interpreted by the
597 ticket-granting service. It can be ignored by application servers. The
598 FORWARDABLE flag has an interpretation similar to that of the PROXIABLE
599 flag, except ticket-granting tickets may also be issued with different
600 network addresses. This flag is reset by default, but users may request
601 that it be set by setting the FORWARDABLE option in the AS request when
602 they request their initial ticket- granting ticket.
604 This flag allows for authentication forwarding without requiring the user
605 to enter a password again. If the flag is not set, then authentication
606 forwarding is not permitted, but the same result can still be achieved if
607 the user engages in the AS exchange specifying the requested network
608 addresses and supplies a password.
610 The FORWARDED flag is set by the TGS when a client presents a ticket with
611 the FORWARDABLE flag set and requests a forwarded ticket by specifying the
612 FORWARDED KDC option and supplying a set of addresses for the new ticket.
613 It is also set in all tickets issued based on tickets with the FORWARDED
614 flag set. Application servers may choose to process FORWARDED tickets
615 differently than non-FORWARDED tickets.
617 2.7. Other KDC options
619 There are two additional options which may be set in a client's request of
620 the KDC. The RENEWABLE-OK option indicates that the client will accept a
621 renewable ticket if a ticket with the requested life cannot otherwise be
622 provided. If a ticket with the requested life cannot be provided, then the
623 KDC may issue a renewable ticket with a renew-till equal to the the
624 requested endtime. The value of the renew-till field may still be adjusted
625 by site-determined limits or limits imposed by the individual principal or
628 The ENC-TKT-IN-SKEY option is honored only by the ticket-granting service.
629 It indicates that the ticket to be issued for the end server is to be
630 encrypted in the session key from the a additional second ticket-granting
631 ticket provided with the request. See section 3.3.3 for specific details.
635 The following sections describe the interactions between network clients
636 and servers and the messages involved in those exchanges.
638 3.1. The Authentication Service Exchange
641 Message direction Message type Section
642 1. Client to Kerberos KRB_AS_REQ 5.4.1
643 2. Kerberos to client KRB_AS_REP or 5.4.2
646 The Authentication Service (AS) Exchange between the client and the
647 Kerberos Authentication Server is initiated by a client when it wishes to
648 obtain authentication credentials for a given server but currently holds no
649 credentials. In its basic form, the client's secret key is used for
650 encryption and decryption. This exchange is typically used at the
651 initiation of a login session to obtain credentials for a Ticket-Granting
652 Server which will subsequently be used to obtain credentials for other
653 servers (see section 3.3) without requiring further use of the client's
654 secret key. This exchange is also used to request credentials for services
656 Neuman, Ts'o, Kohl Expires: 18 May 1999
659 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
662 which must not be mediated through the Ticket-Granting Service, but rather
663 require a principal's secret key, such as the password-changing service[5].
664 This exchange does not by itself provide any assurance of the the identity
667 The exchange consists of two messages: KRB_AS_REQ from the client to
668 Kerberos, and KRB_AS_REP or KRB_ERROR in reply. The formats for these
669 messages are described in sections 5.4.1, 5.4.2, and 5.9.1.
671 In the request, the client sends (in cleartext) its own identity and the
672 identity of the server for which it is requesting credentials. The
673 response, KRB_AS_REP, contains a ticket for the client to present to the
674 server, and a session key that will be shared by the client and the server.
675 The session key and additional information are encrypted in the client's
676 secret key. The KRB_AS_REP message contains information which can be used
677 to detect replays, and to associate it with the message to which it
678 replies. Various errors can occur; these are indicated by an error response
679 (KRB_ERROR) instead of the KRB_AS_REP response. The error message is not
680 encrypted. The KRB_ERROR message contains information which can be used to
681 associate it with the message to which it replies. The lack of encryption
682 in the KRB_ERROR message precludes the ability to detect replays,
683 fabrications, or modifications of such messages.
685 Without preautentication, the authentication server does not know whether
686 the client is actually the principal named in the request. It simply sends
687 a reply without knowing or caring whether they are the same. This is
688 acceptable because nobody but the principal whose identity was given in the
689 request will be able to use the reply. Its critical information is
690 encrypted in that principal's key. The initial request supports an optional
691 field that can be used to pass additional information that might be needed
692 for the initial exchange. This field may be used for preauthentication as
693 described in section [hl<>].
695 3.1.1. Generation of KRB_AS_REQ message
697 The client may specify a number of options in the initial request. Among
698 these options are whether pre-authentication is to be performed; whether
699 the requested ticket is to be renewable, proxiable, or forwardable; whether
700 it should be postdated or allow postdating of derivative tickets; and
701 whether a renewable ticket will be accepted in lieu of a non-renewable
702 ticket if the requested ticket expiration date cannot be satisfied by a
703 non-renewable ticket (due to configuration constraints; see section 4). See
704 section A.1 for pseudocode.
706 The client prepares the KRB_AS_REQ message and sends it to the KDC.
708 3.1.2. Receipt of KRB_AS_REQ message
710 If all goes well, processing the KRB_AS_REQ message will result in the
711 creation of a ticket for the client to present to the server. The format
712 for the ticket is described in section 5.3.1. The contents of the ticket
713 are determined as follows.
715 3.1.3. Generation of KRB_AS_REP message
717 The authentication server looks up the client and server principals named
718 in the KRB_AS_REQ in its database, extracting their respective keys. If
719 required, the server pre-authenticates the request, and if the
720 pre-authentication check fails, an error message with the code
722 Neuman, Ts'o, Kohl Expires: 18 May 1999
725 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
728 KDC_ERR_PREAUTH_FAILED is returned. If the server cannot accommodate the
729 requested encryption type, an error message with code KDC_ERR_ETYPE_NOSUPP
730 is returned. Otherwise it generates a 'random' session key[7].
732 If there are multiple encryption keys registered for a client in the
733 Kerberos database (or if the key registered supports multiple encryption
734 types; e.g. DES-CBC-CRC and DES-CBC-MD5), then the etype field from the AS
735 request is used by the KDC to select the encryption method to be used for
736 encrypting the response to the client. If there is more than one supported,
737 strong encryption type in the etype list, the first valid etype for which
738 an encryption key is available is used. The encryption method used to
739 respond to a TGS request is taken from the keytype of the session key found
740 in the ticket granting ticket.
742 When the etype field is present in a KDC request, whether an AS or TGS
743 request, the KDC will attempt to assign the type of the random session key
744 from the list of methods in the etype field. The KDC will select the
745 appropriate type using the list of methods provided together with
746 information from the Kerberos database indicating acceptable encryption
747 methods for the application server. The KDC will not issue tickets with a
748 weak session key encryption type.
750 If the requested start time is absent, indicates a time in the past, or is
751 within the window of acceptable clock skew for the KDC and the POSTDATE
752 option has not been specified, then the start time of the ticket is set to
753 the authentication server's current time. If it indicates a time in the
754 future beyond the acceptable clock skew, but the POSTDATED option has not
755 been specified then the error KDC_ERR_CANNOT_POSTDATE is returned.
756 Otherwise the requested start time is checked against the policy of the
757 local realm (the administrator might decide to prohibit certain types or
758 ranges of postdated tickets), and if acceptable, the ticket's start time is
759 set as requested and the INVALID flag is set in the new ticket. The
760 postdated ticket must be validated before use by presenting it to the KDC
761 after the start time has been reached.
763 The expiration time of the ticket will be set to the minimum of the
766 * The expiration time (endtime) requested in the KRB_AS_REQ message.
767 * The ticket's start time plus the maximum allowable lifetime associated
768 with the client principal (the authentication server's database
769 includes a maximum ticket lifetime field in each principal's record;
771 * The ticket's start time plus the maximum allowable lifetime associated
772 with the server principal.
773 * The ticket's start time plus the maximum lifetime set by the policy of
776 If the requested expiration time minus the start time (as determined above)
777 is less than a site-determined minimum lifetime, an error message with code
778 KDC_ERR_NEVER_VALID is returned. If the requested expiration time for the
779 ticket exceeds what was determined as above, and if the 'RENEWABLE-OK'
780 option was requested, then the 'RENEWABLE' flag is set in the new ticket,
781 and the renew-till value is set as if the 'RENEWABLE' option were requested
782 (the field and option names are described fully in section 5.4.1).
784 If the RENEWABLE option has been requested or if the RENEWABLE-OK option
785 has been set and a renewable ticket is to be issued, then the renew-till
786 field is set to the minimum of:
788 Neuman, Ts'o, Kohl Expires: 18 May 1999
791 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
795 * Its requested value.
796 * The start time of the ticket plus the minimum of the two maximum
797 renewable lifetimes associated with the principals' database entries.
798 * The start time of the ticket plus the maximum renewable lifetime set
799 by the policy of the local realm.
801 The flags field of the new ticket will have the following options set if
802 they have been requested and if the policy of the local realm allows:
803 FORWARDABLE, MAY-POSTDATE, POSTDATED, PROXIABLE, RENEWABLE. If the new
804 ticket is post-dated (the start time is in the future), its INVALID flag
807 If all of the above succeed, the server formats a KRB_AS_REP message (see
808 section 5.4.2), copying the addresses in the request into the caddr of the
809 response, placing any required pre-authentication data into the padata of
810 the response, and encrypts the ciphertext part in the client's key using
811 the requested encryption method, and sends it to the client. See section
814 3.1.4. Generation of KRB_ERROR message
816 Several errors can occur, and the Authentication Server responds by
817 returning an error message, KRB_ERROR, to the client, with the error-code
818 and e-text fields set to appropriate values. The error message contents and
819 details are described in Section 5.9.1.
821 3.1.5. Receipt of KRB_AS_REP message
823 If the reply message type is KRB_AS_REP, then the client verifies that the
824 cname and crealm fields in the cleartext portion of the reply match what it
825 requested. If any padata fields are present, they may be used to derive the
826 proper secret key to decrypt the message. The client decrypts the encrypted
827 part of the response using its secret key, verifies that the nonce in the
828 encrypted part matches the nonce it supplied in its request (to detect
829 replays). It also verifies that the sname and srealm in the response match
830 those in the request (or are otherwise expected values), and that the host
831 address field is also correct. It then stores the ticket, session key,
832 start and expiration times, and other information for later use. The
833 key-expiration field from the encrypted part of the response may be checked
834 to notify the user of impending key expiration (the client program could
835 then suggest remedial action, such as a password change). See section A.3
838 Proper decryption of the KRB_AS_REP message is not sufficient to verify the
839 identity of the user; the user and an attacker could cooperate to generate
840 a KRB_AS_REP format message which decrypts properly but is not from the
841 proper KDC. If the host wishes to verify the identity of the user, it must
842 require the user to present application credentials which can be verified
843 using a securely-stored secret key for the host. If those credentials can
844 be verified, then the identity of the user can be assured.
846 3.1.6. Receipt of KRB_ERROR message
848 If the reply message type is KRB_ERROR, then the client interprets it as an
849 error and performs whatever application-specific tasks are necessary to
852 3.2. The Client/Server Authentication Exchange
854 Neuman, Ts'o, Kohl Expires: 18 May 1999
857 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
862 Message direction Message type Section
863 Client to Application server KRB_AP_REQ 5.5.1
864 [optional] Application server to client KRB_AP_REP or 5.5.2
867 The client/server authentication (CS) exchange is used by network
868 applications to authenticate the client to the server and vice versa. The
869 client must have already acquired credentials for the server using the AS
872 3.2.1. The KRB_AP_REQ message
874 The KRB_AP_REQ contains authentication information which should be part of
875 the first message in an authenticated transaction. It contains a ticket, an
876 authenticator, and some additional bookkeeping information (see section
877 5.5.1 for the exact format). The ticket by itself is insufficient to
878 authenticate a client, since tickets are passed across the network in
879 cleartext[DS90], so the authenticator is used to prevent invalid replay of
880 tickets by proving to the server that the client knows the session key of
881 the ticket and thus is entitled to use the ticket. The KRB_AP_REQ message
882 is referred to elsewhere as the 'authentication header.'
884 3.2.2. Generation of a KRB_AP_REQ message
886 When a client wishes to initiate authentication to a server, it obtains
887 (either through a credentials cache, the AS exchange, or the TGS exchange)
888 a ticket and session key for the desired service. The client may re-use any
889 tickets it holds until they expire. To use a ticket the client constructs a
890 new Authenticator from the the system time, its name, and optionally an
891 application specific checksum, an initial sequence number to be used in
892 KRB_SAFE or KRB_PRIV messages, and/or a session subkey to be used in
893 negotiations for a session key unique to this particular session.
894 Authenticators may not be re-used and will be rejected if replayed to a
895 server[LGDSR87]. If a sequence number is to be included, it should be
896 randomly chosen so that even after many messages have been exchanged it is
897 not likely to collide with other sequence numbers in use.
899 The client may indicate a requirement of mutual authentication or the use
900 of a session-key based ticket by setting the appropriate flag(s) in the
901 ap-options field of the message.
903 The Authenticator is encrypted in the session key and combined with the
904 ticket to form the KRB_AP_REQ message which is then sent to the end server
905 along with any additional application-specific information. See section A.9
908 3.2.3. Receipt of KRB_AP_REQ message
910 Authentication is based on the server's current time of day (clocks must be
911 loosely synchronized), the authenticator, and the ticket. Several errors
912 are possible. If an error occurs, the server is expected to reply to the
913 client with a KRB_ERROR message. This message may be encapsulated in the
914 application protocol if its 'raw' form is not acceptable to the protocol.
915 The format of error messages is described in section 5.9.1.
917 The algorithm for verifying authentication information is as follows. If
918 the message type is not KRB_AP_REQ, the server returns the
920 Neuman, Ts'o, Kohl Expires: 18 May 1999
923 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
926 KRB_AP_ERR_MSG_TYPE error. If the key version indicated by the Ticket in
927 the KRB_AP_REQ is not one the server can use (e.g., it indicates an old
928 key, and the server no longer possesses a copy of the old key), the
929 KRB_AP_ERR_BADKEYVER error is returned. If the USE-SESSION-KEY flag is set
930 in the ap-options field, it indicates to the server that the ticket is
931 encrypted in the session key from the server's ticket-granting ticket
932 rather than its secret key[10]. Since it is possible for the server to be
933 registered in multiple realms, with different keys in each, the srealm
934 field in the unencrypted portion of the ticket in the KRB_AP_REQ is used to
935 specify which secret key the server should use to decrypt that ticket. The
936 KRB_AP_ERR_NOKEY error code is returned if the server doesn't have the
937 proper key to decipher the ticket.
939 The ticket is decrypted using the version of the server's key specified by
940 the ticket. If the decryption routines detect a modification of the ticket
941 (each encryption system must provide safeguards to detect modified
942 ciphertext; see section 6), the KRB_AP_ERR_BAD_INTEGRITY error is returned
943 (chances are good that different keys were used to encrypt and decrypt).
945 The authenticator is decrypted using the session key extracted from the
946 decrypted ticket. If decryption shows it to have been modified, the
947 KRB_AP_ERR_BAD_INTEGRITY error is returned. The name and realm of the
948 client from the ticket are compared against the same fields in the
949 authenticator. If they don't match, the KRB_AP_ERR_BADMATCH error is
950 returned (they might not match, for example, if the wrong session key was
951 used to encrypt the authenticator). The addresses in the ticket (if any)
952 are then searched for an address matching the operating-system reported
953 address of the client. If no match is found or the server insists on ticket
954 addresses but none are present in the ticket, the KRB_AP_ERR_BADADDR error
957 If the local (server) time and the client time in the authenticator differ
958 by more than the allowable clock skew (e.g., 5 minutes), the
959 KRB_AP_ERR_SKEW error is returned. If the server name, along with the
960 client name, time and microsecond fields from the Authenticator match any
961 recently-seen such tuples, the KRB_AP_ERR_REPEAT error is returned[11]. The
962 server must remember any authenticator presented within the allowable clock
963 skew, so that a replay attempt is guaranteed to fail. If a server loses
964 track of any authenticator presented within the allowable clock skew, it
965 must reject all requests until the clock skew interval has passed. This
966 assures that any lost or re-played authenticators will fall outside the
967 allowable clock skew and can no longer be successfully replayed (If this is
968 not done, an attacker could conceivably record the ticket and authenticator
969 sent over the network to a server, then disable the client's host, pose as
970 the disabled host, and replay the ticket and authenticator to subvert the
971 authentication.). If a sequence number is provided in the authenticator,
972 the server saves it for later use in processing KRB_SAFE and/or KRB_PRIV
973 messages. If a subkey is present, the server either saves it for later use
974 or uses it to help generate its own choice for a subkey to be returned in a
977 The server computes the age of the ticket: local (server) time minus the
978 start time inside the Ticket. If the start time is later than the current
979 time by more than the allowable clock skew or if the INVALID flag is set in
980 the ticket, the KRB_AP_ERR_TKT_NYV error is returned. Otherwise, if the
981 current time is later than end time by more than the allowable clock skew,
982 the KRB_AP_ERR_TKT_EXPIRED error is returned.
984 If all these checks succeed without an error, the server is assured that
986 Neuman, Ts'o, Kohl Expires: 18 May 1999
989 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
992 the client possesses the credentials of the principal named in the ticket
993 and thus, the client has been authenticated to the server. See section A.10
996 Passing these checks provides only authentication of the named principal;
997 it does not imply authorization to use the named service. Applications must
998 make a separate authorization decisions based upon the authenticated name
999 of the user, the requested operation, local acces control information such
1000 as that contained in a .k5login or .k5users file, and possibly a separate
1001 distributed authorization service.
1003 3.2.4. Generation of a KRB_AP_REP message
1005 Typically, a client's request will include both the authentication
1006 information and its initial request in the same message, and the server
1007 need not explicitly reply to the KRB_AP_REQ. However, if mutual
1008 authentication (not only authenticating the client to the server, but also
1009 the server to the client) is being performed, the KRB_AP_REQ message will
1010 have MUTUAL-REQUIRED set in its ap-options field, and a KRB_AP_REP message
1011 is required in response. As with the error message, this message may be
1012 encapsulated in the application protocol if its "raw" form is not
1013 acceptable to the application's protocol. The timestamp and microsecond
1014 field used in the reply must be the client's timestamp and microsecond
1015 field (as provided in the authenticator)[12]. If a sequence number is to be
1016 included, it should be randomly chosen as described above for the
1017 authenticator. A subkey may be included if the server desires to negotiate
1018 a different subkey. The KRB_AP_REP message is encrypted in the session key
1019 extracted from the ticket. See section A.11 for pseudocode.
1021 3.2.5. Receipt of KRB_AP_REP message
1023 If a KRB_AP_REP message is returned, the client uses the session key from
1024 the credentials obtained for the server[13] to decrypt the message, and
1025 verifies that the timestamp and microsecond fields match those in the
1026 Authenticator it sent to the server. If they match, then the client is
1027 assured that the server is genuine. The sequence number and subkey (if
1028 present) are retained for later use. See section A.12 for pseudocode.
1030 3.2.6. Using the encryption key
1032 After the KRB_AP_REQ/KRB_AP_REP exchange has occurred, the client and
1033 server share an encryption key which can be used by the application. The
1034 'true session key' to be used for KRB_PRIV, KRB_SAFE, or other
1035 application-specific uses may be chosen by the application based on the
1036 subkeys in the KRB_AP_REP message and the authenticator[14]. In some cases,
1037 the use of this session key will be implicit in the protocol; in others the
1038 method of use must be chosen from several alternatives. We leave the
1039 protocol negotiations of how to use the key (e.g. selecting an encryption
1040 or checksum type) to the application programmer; the Kerberos protocol does
1041 not constrain the implementation options, but an example of how this might
1044 One way that an application may choose to negotiate a key to be used for
1045 subequent integrity and privacy protection is for the client to propose a
1046 key in the subkey field of the authenticator. The server can then choose a
1047 key using the proposed key from the client as input, returning the new
1048 subkey in the subkey field of the application reply. This key could then be
1049 used for subsequent communication. To make this example more concrete, if
1050 the encryption method in use required a 56 bit key, and for whatever
1052 Neuman, Ts'o, Kohl Expires: 18 May 1999
1055 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1058 reason, one of the parties was prevented from using a key with more than 40
1059 unknown bits, this method would allow the the party which is prevented from
1060 using more than 40 bits to either propose (if the client) an initial key
1061 with a known quantity for 16 of those bits, or to mask 16 of the bits (if
1062 the server) with the known quantity. The application implementor is warned,
1063 however, that this is only an example, and that an analysis of the
1064 particular crytosystem to be used, and the reasons for limiting the key
1065 length, must be made before deciding whether it is acceptable to mask bits
1068 With both the one-way and mutual authentication exchanges, the peers should
1069 take care not to send sensitive information to each other without proper
1070 assurances. In particular, applications that require privacy or integrity
1071 should use the KRB_AP_REP response from the server to client to assure both
1072 client and server of their peer's identity. If an application protocol
1073 requires privacy of its messages, it can use the KRB_PRIV message (section
1074 3.5). The KRB_SAFE message (section 3.4) can be used to assure integrity.
1076 3.3. The Ticket-Granting Service (TGS) Exchange
1079 Message direction Message type Section
1080 1. Client to Kerberos KRB_TGS_REQ 5.4.1
1081 2. Kerberos to client KRB_TGS_REP or 5.4.2
1084 The TGS exchange between a client and the Kerberos Ticket-Granting Server
1085 is initiated by a client when it wishes to obtain authentication
1086 credentials for a given server (which might be registered in a remote
1087 realm), when it wishes to renew or validate an existing ticket, or when it
1088 wishes to obtain a proxy ticket. In the first case, the client must already
1089 have acquired a ticket for the Ticket-Granting Service using the AS
1090 exchange (the ticket-granting ticket is usually obtained when a client
1091 initially authenticates to the system, such as when a user logs in). The
1092 message format for the TGS exchange is almost identical to that for the AS
1093 exchange. The primary difference is that encryption and decryption in the
1094 TGS exchange does not take place under the client's key. Instead, the
1095 session key from the ticket-granting ticket or renewable ticket, or
1096 sub-session key from an Authenticator is used. As is the case for all
1097 application servers, expired tickets are not accepted by the TGS, so once a
1098 renewable or ticket-granting ticket expires, the client must use a separate
1099 exchange to obtain valid tickets.
1101 The TGS exchange consists of two messages: A request (KRB_TGS_REQ) from the
1102 client to the Kerberos Ticket-Granting Server, and a reply (KRB_TGS_REP or
1103 KRB_ERROR). The KRB_TGS_REQ message includes information authenticating the
1104 client plus a request for credentials. The authentication information
1105 consists of the authentication header (KRB_AP_REQ) which includes the
1106 client's previously obtained ticket-granting, renewable, or invalid ticket.
1107 In the ticket-granting ticket and proxy cases, the request may include one
1108 or more of: a list of network addresses, a collection of typed
1109 authorization data to be sealed in the ticket for authorization use by the
1110 application server, or additional tickets (the use of which are described
1111 later). The TGS reply (KRB_TGS_REP) contains the requested credentials,
1112 encrypted in the session key from the ticket-granting ticket or renewable
1113 ticket, or if present, in the sub-session key from the Authenticator (part
1114 of the authentication header). The KRB_ERROR message contains an error code
1115 and text explaining what went wrong. The KRB_ERROR message is not
1116 encrypted. The KRB_TGS_REP message contains information which can be used
1118 Neuman, Ts'o, Kohl Expires: 18 May 1999
1121 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1124 to detect replays, and to associate it with the message to which it
1125 replies. The KRB_ERROR message also contains information which can be used
1126 to associate it with the message to which it replies, but the lack of
1127 encryption in the KRB_ERROR message precludes the ability to detect replays
1128 or fabrications of such messages.
1130 3.3.1. Generation of KRB_TGS_REQ message
1132 Before sending a request to the ticket-granting service, the client must
1133 determine in which realm the application server is registered[15]. If the
1134 client does not already possess a ticket-granting ticket for the
1135 appropriate realm, then one must be obtained. This is first attempted by
1136 requesting a ticket-granting ticket for the destination realm from a
1137 Kerberos server for which the client does posess a ticket-granting ticket
1138 (using the KRB_TGS_REQ message recursively). The Kerberos server may return
1139 a TGT for the desired realm in which case one can proceed. Alternatively,
1140 the Kerberos server may return a TGT for a realm which is 'closer' to the
1141 desired realm (further along the standard hierarchical path), in which case
1142 this step must be repeated with a Kerberos server in the realm specified in
1143 the returned TGT. If neither are returned, then the request must be retried
1144 with a Kerberos server for a realm higher in the hierarchy. This request
1145 will itself require a ticket-granting ticket for the higher realm which
1146 must be obtained by recursively applying these directions.
1148 Once the client obtains a ticket-granting ticket for the appropriate realm,
1149 it determines which Kerberos servers serve that realm, and contacts one.
1150 The list might be obtained through a configuration file or network service
1151 or it may be generated from the name of the realm; as long as the secret
1152 keys exchanged by realms are kept secret, only denial of service results
1153 from using a false Kerberos server.
1155 As in the AS exchange, the client may specify a number of options in the
1156 KRB_TGS_REQ message. The client prepares the KRB_TGS_REQ message, providing
1157 an authentication header as an element of the padata field, and including
1158 the same fields as used in the KRB_AS_REQ message along with several
1159 optional fields: the enc-authorization-data field for application server
1160 use and additional tickets required by some options.
1162 In preparing the authentication header, the client can select a sub-session
1163 key under which the response from the Kerberos server will be
1164 encrypted[16]. If the sub-session key is not specified, the session key
1165 from the ticket-granting ticket will be used. If the enc-authorization-data
1166 is present, it must be encrypted in the sub-session key, if present, from
1167 the authenticator portion of the authentication header, or if not present,
1168 using the session key from the ticket-granting ticket.
1170 Once prepared, the message is sent to a Kerberos server for the destination
1171 realm. See section A.5 for pseudocode.
1173 3.3.2. Receipt of KRB_TGS_REQ message
1175 The KRB_TGS_REQ message is processed in a manner similar to the KRB_AS_REQ
1176 message, but there are many additional checks to be performed. First, the
1177 Kerberos server must determine which server the accompanying ticket is for
1178 and it must select the appropriate key to decrypt it. For a normal
1179 KRB_TGS_REQ message, it will be for the ticket granting service, and the
1180 TGS's key will be used. If the TGT was issued by another realm, then the
1181 appropriate inter-realm key must be used. If the accompanying ticket is not
1182 a ticket granting ticket for the current realm, but is for an application
1184 Neuman, Ts'o, Kohl Expires: 18 May 1999
1187 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1190 server in the current realm, the RENEW, VALIDATE, or PROXY options are
1191 specified in the request, and the server for which a ticket is requested is
1192 the server named in the accompanying ticket, then the KDC will decrypt the
1193 ticket in the authentication header using the key of the server for which
1194 it was issued. If no ticket can be found in the padata field, the
1195 KDC_ERR_PADATA_TYPE_NOSUPP error is returned.
1197 Once the accompanying ticket has been decrypted, the user-supplied checksum
1198 in the Authenticator must be verified against the contents of the request,
1199 and the message rejected if the checksums do not match (with an error code
1200 of KRB_AP_ERR_MODIFIED) or if the checksum is not keyed or not
1201 collision-proof (with an error code of KRB_AP_ERR_INAPP_CKSUM). If the
1202 checksum type is not supported, the KDC_ERR_SUMTYPE_NOSUPP error is
1203 returned. If the authorization-data are present, they are decrypted using
1204 the sub-session key from the Authenticator.
1206 If any of the decryptions indicate failed integrity checks, the
1207 KRB_AP_ERR_BAD_INTEGRITY error is returned.
1209 3.3.3. Generation of KRB_TGS_REP message
1211 The KRB_TGS_REP message shares its format with the KRB_AS_REP
1212 (KRB_KDC_REP), but with its type field set to KRB_TGS_REP. The detailed
1213 specification is in section 5.4.2.
1215 The response will include a ticket for the requested server. The Kerberos
1216 database is queried to retrieve the record for the requested server
1217 (including the key with which the ticket will be encrypted). If the request
1218 is for a ticket granting ticket for a remote realm, and if no key is shared
1219 with the requested realm, then the Kerberos server will select the realm
1220 "closest" to the requested realm with which it does share a key, and use
1221 that realm instead. This is the only case where the response from the KDC
1222 will be for a different server than that requested by the client.
1224 By default, the address field, the client's name and realm, the list of
1225 transited realms, the time of initial authentication, the expiration time,
1226 and the authorization data of the newly-issued ticket will be copied from
1227 the ticket-granting ticket (TGT) or renewable ticket. If the transited
1228 field needs to be updated, but the transited type is not supported, the
1229 KDC_ERR_TRTYPE_NOSUPP error is returned.
1231 If the request specifies an endtime, then the endtime of the new ticket is
1232 set to the minimum of (a) that request, (b) the endtime from the TGT, and
1233 (c) the starttime of the TGT plus the minimum of the maximum life for the
1234 application server and the maximum life for the local realm (the maximum
1235 life for the requesting principal was already applied when the TGT was
1236 issued). If the new ticket is to be a renewal, then the endtime above is
1237 replaced by the minimum of (a) the value of the renew_till field of the
1238 ticket and (b) the starttime for the new ticket plus the life
1239 (endtime-starttime) of the old ticket.
1241 If the FORWARDED option has been requested, then the resulting ticket will
1242 contain the addresses specified by the client. This option will only be
1243 honored if the FORWARDABLE flag is set in the TGT. The PROXY option is
1244 similar; the resulting ticket will contain the addresses specified by the
1245 client. It will be honored only if the PROXIABLE flag in the TGT is set.
1246 The PROXY option will not be honored on requests for additional
1247 ticket-granting tickets.
1250 Neuman, Ts'o, Kohl Expires: 18 May 1999
1253 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1256 If the requested start time is absent, indicates a time in the past, or is
1257 within the window of acceptable clock skew for the KDC and the POSTDATE
1258 option has not been specified, then the start time of the ticket is set to
1259 the authentication server's current time. If it indicates a time in the
1260 future beyond the acceptable clock skew, but the POSTDATED option has not
1261 been specified or the MAY-POSTDATE flag is not set in the TGT, then the
1262 error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise, if the
1263 ticket-granting ticket has the MAY-POSTDATE flag set, then the resulting
1264 ticket will be postdated and the requested starttime is checked against the
1265 policy of the local realm. If acceptable, the ticket's start time is set as
1266 requested, and the INVALID flag is set. The postdated ticket must be
1267 validated before use by presenting it to the KDC after the starttime has
1268 been reached. However, in no case may the starttime, endtime, or renew-till
1269 time of a newly-issued postdated ticket extend beyond the renew-till time
1270 of the ticket-granting ticket.
1272 If the ENC-TKT-IN-SKEY option has been specified and an additional ticket
1273 has been included in the request, the KDC will decrypt the additional
1274 ticket using the key for the server to which the additional ticket was
1275 issued and verify that it is a ticket-granting ticket. If the name of the
1276 requested server is missing from the request, the name of the client in the
1277 additional ticket will be used. Otherwise the name of the requested server
1278 will be compared to the name of the client in the additional ticket and if
1279 different, the request will be rejected. If the request succeeds, the
1280 session key from the additional ticket will be used to encrypt the new
1281 ticket that is issued instead of using the key of the server for which the
1282 new ticket will be used[17].
1284 If the name of the server in the ticket that is presented to the KDC as
1285 part of the authentication header is not that of the ticket-granting server
1286 itself, the server is registered in the realm of the KDC, and the RENEW
1287 option is requested, then the KDC will verify that the RENEWABLE flag is
1288 set in the ticket, that the INVALID flag is not set in the ticket, and that
1289 the renew_till time is still in the future. If the VALIDATE option is
1290 rqeuested, the KDC will check that the starttime has passed and the INVALID
1291 flag is set. If the PROXY option is requested, then the KDC will check that
1292 the PROXIABLE flag is set in the ticket. If the tests succeed, and the
1293 ticket passes the hotlist check described in the next paragraph, the KDC
1294 will issue the appropriate new ticket.
1296 3.3.3.1. Checking for revoked tickets
1298 Whenever a request is made to the ticket-granting server, the presented
1299 ticket(s) is(are) checked against a hot-list of tickets which have been
1300 canceled. This hot-list might be implemented by storing a range of issue
1301 timestamps for 'suspect tickets'; if a presented ticket had an authtime in
1302 that range, it would be rejected. In this way, a stolen ticket-granting
1303 ticket or renewable ticket cannot be used to gain additional tickets
1304 (renewals or otherwise) once the theft has been reported. Any normal ticket
1305 obtained before it was reported stolen will still be valid (because they
1306 require no interaction with the KDC), but only until their normal
1309 The ciphertext part of the response in the KRB_TGS_REP message is encrypted
1310 in the sub-session key from the Authenticator, if present, or the session
1311 key key from the ticket-granting ticket. It is not encrypted using the
1312 client's secret key. Furthermore, the client's key's expiration date and
1313 the key version number fields are left out since these values are stored
1314 along with the client's database record, and that record is not needed to
1316 Neuman, Ts'o, Kohl Expires: 18 May 1999
1319 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1322 satisfy a request based on a ticket-granting ticket. See section A.6 for
1325 3.3.3.2. Encoding the transited field
1327 If the identity of the server in the TGT that is presented to the KDC as
1328 part of the authentication header is that of the ticket-granting service,
1329 but the TGT was issued from another realm, the KDC will look up the
1330 inter-realm key shared with that realm and use that key to decrypt the
1331 ticket. If the ticket is valid, then the KDC will honor the request,
1332 subject to the constraints outlined above in the section describing the AS
1333 exchange. The realm part of the client's identity will be taken from the
1334 ticket-granting ticket. The name of the realm that issued the
1335 ticket-granting ticket will be added to the transited field of the ticket
1336 to be issued. This is accomplished by reading the transited field from the
1337 ticket-granting ticket (which is treated as an unordered set of realm
1338 names), adding the new realm to the set, then constructing and writing out
1339 its encoded (shorthand) form (this may involve a rearrangement of the
1342 Note that the ticket-granting service does not add the name of its own
1343 realm. Instead, its responsibility is to add the name of the previous
1344 realm. This prevents a malicious Kerberos server from intentionally leaving
1345 out its own name (it could, however, omit other realms' names).
1347 The names of neither the local realm nor the principal's realm are to be
1348 included in the transited field. They appear elsewhere in the ticket and
1349 both are known to have taken part in authenticating the principal. Since
1350 the endpoints are not included, both local and single-hop inter-realm
1351 authentication result in a transited field that is empty.
1353 Because the name of each realm transited is added to this field, it might
1354 potentially be very long. To decrease the length of this field, its
1355 contents are encoded. The initially supported encoding is optimized for the
1356 normal case of inter-realm communication: a hierarchical arrangement of
1357 realms using either domain or X.500 style realm names. This encoding
1358 (called DOMAIN-X500-COMPRESS) is now described.
1360 Realm names in the transited field are separated by a ",". The ",", "\",
1361 trailing "."s, and leading spaces (" ") are special characters, and if they
1362 are part of a realm name, they must be quoted in the transited field by
1363 preced- ing them with a "\".
1365 A realm name ending with a "." is interpreted as being prepended to the
1366 previous realm. For example, we can encode traversal of EDU, MIT.EDU,
1367 ATHENA.MIT.EDU, WASHINGTON.EDU, and CS.WASHINGTON.EDU as:
1369 "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.".
1371 Note that if ATHENA.MIT.EDU, or CS.WASHINGTON.EDU were end-points, that
1372 they would not be included in this field, and we would have:
1374 "EDU,MIT.,WASHINGTON.EDU"
1376 A realm name beginning with a "/" is interpreted as being appended to the
1377 previous realm[18]. If it is to stand by itself, then it should be preceded
1378 by a space (" "). For example, we can encode traversal of /COM/HP/APOLLO,
1379 /COM/HP, /COM, and /COM/DEC as:
1382 Neuman, Ts'o, Kohl Expires: 18 May 1999
1385 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1388 "/COM,/HP,/APOLLO, /COM/DEC".
1390 Like the example above, if /COM/HP/APOLLO and /COM/DEC are endpoints, they
1391 they would not be included in this field, and we would have:
1395 A null subfield preceding or following a "," indicates that all realms
1396 between the previous realm and the next realm have been traversed[19].
1397 Thus, "," means that all realms along the path between the client and the
1398 server have been traversed. ",EDU, /COM," means that that all realms from
1399 the client's realm up to EDU (in a domain style hierarchy) have been
1400 traversed, and that everything from /COM down to the server's realm in an
1401 X.500 style has also been traversed. This could occur if the EDU realm in
1402 one hierarchy shares an inter-realm key directly with the /COM realm in
1405 3.3.4. Receipt of KRB_TGS_REP message
1407 When the KRB_TGS_REP is received by the client, it is processed in the same
1408 manner as the KRB_AS_REP processing described above. The primary difference
1409 is that the ciphertext part of the response must be decrypted using the
1410 session key from the ticket-granting ticket rather than the client's secret
1411 key. See section A.7 for pseudocode.
1413 3.4. The KRB_SAFE Exchange
1415 The KRB_SAFE message may be used by clients requiring the ability to detect
1416 modifications of messages they exchange. It achieves this by including a
1417 keyed collision-proof checksum of the user data and some control
1418 information. The checksum is keyed with an encryption key (usually the last
1419 key negotiated via subkeys, or the session key if no negotiation has
1422 3.4.1. Generation of a KRB_SAFE message
1424 When an application wishes to send a KRB_SAFE message, it collects its data
1425 and the appropriate control information and computes a checksum over them.
1426 The checksum algorithm should be a keyed one-way hash function (such as the
1427 RSA- MD5-DES checksum algorithm specified in section 6.4.5, or the DES
1428 MAC), generated using the sub-session key if present, or the session key.
1429 Different algorithms may be selected by changing the checksum type in the
1430 message. Unkeyed or non-collision-proof checksums are not suitable for this
1433 The control information for the KRB_SAFE message includes both a timestamp
1434 and a sequence number. The designer of an application using the KRB_SAFE
1435 message must choose at least one of the two mechanisms. This choice should
1436 be based on the needs of the application protocol.
1438 Sequence numbers are useful when all messages sent will be received by
1439 one's peer. Connection state is presently required to maintain the session
1440 key, so maintaining the next sequence number should not present an
1443 If the application protocol is expected to tolerate lost messages without
1444 them being resent, the use of the timestamp is the appropriate replay
1445 detection mechanism. Using timestamps is also the appropriate mechanism for
1446 multi-cast protocols where all of one's peers share a common sub-session
1448 Neuman, Ts'o, Kohl Expires: 18 May 1999
1451 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1454 key, but some messages will be sent to a subset of one's peers.
1456 After computing the checksum, the client then transmits the information and
1457 checksum to the recipient in the message format specified in section 5.6.1.
1459 3.4.2. Receipt of KRB_SAFE message
1461 When an application receives a KRB_SAFE message, it verifies it as follows.
1462 If any error occurs, an error code is reported for use by the application.
1464 The message is first checked by verifying that the protocol version and
1465 type fields match the current version and KRB_SAFE, respectively. A
1466 mismatch generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error.
1467 The application verifies that the checksum used is a collision-proof keyed
1468 checksum, and if it is not, a KRB_AP_ERR_INAPP_CKSUM error is generated.
1469 The recipient verifies that the operating system's report of the sender's
1470 address matches the sender's address in the message, and (if a recipient
1471 address is specified or the recipient requires an address) that one of the
1472 recipient's addresses appears as the recipient's address in the message. A
1473 failed match for either case generates a KRB_AP_ERR_BADADDR error. Then the
1474 timestamp and usec and/or the sequence number fields are checked. If
1475 timestamp and usec are expected and not present, or they are present but
1476 not current, the KRB_AP_ERR_SKEW error is generated. If the server name,
1477 along with the client name, time and microsecond fields from the
1478 Authenticator match any recently-seen (sent or received[20] ) such tuples,
1479 the KRB_AP_ERR_REPEAT error is generated. If an incorrect sequence number
1480 is included, or a sequence number is expected but not present, the
1481 KRB_AP_ERR_BADORDER error is generated. If neither a time-stamp and usec or
1482 a sequence number is present, a KRB_AP_ERR_MODIFIED error is generated.
1483 Finally, the checksum is computed over the data and control information,
1484 and if it doesn't match the received checksum, a KRB_AP_ERR_MODIFIED error
1487 If all the checks succeed, the application is assured that the message was
1488 generated by its peer and was not modi- fied in transit.
1490 3.5. The KRB_PRIV Exchange
1492 The KRB_PRIV message may be used by clients requiring confidentiality and
1493 the ability to detect modifications of exchanged messages. It achieves this
1494 by encrypting the messages and adding control information.
1496 3.5.1. Generation of a KRB_PRIV message
1498 When an application wishes to send a KRB_PRIV message, it collects its data
1499 and the appropriate control information (specified in section 5.7.1) and
1500 encrypts them under an encryption key (usually the last key negotiated via
1501 subkeys, or the session key if no negotiation has occured). As part of the
1502 control information, the client must choose to use either a timestamp or a
1503 sequence number (or both); see the discussion in section 3.4.1 for
1504 guidelines on which to use. After the user data and control information are
1505 encrypted, the client transmits the ciphertext and some 'envelope'
1506 information to the recipient.
1508 3.5.2. Receipt of KRB_PRIV message
1510 When an application receives a KRB_PRIV message, it verifies it as follows.
1511 If any error occurs, an error code is reported for use by the application.
1514 Neuman, Ts'o, Kohl Expires: 18 May 1999
1517 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1520 The message is first checked by verifying that the protocol version and
1521 type fields match the current version and KRB_PRIV, respectively. A
1522 mismatch generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error.
1523 The application then decrypts the ciphertext and processes the resultant
1524 plaintext. If decryption shows the data to have been modified, a
1525 KRB_AP_ERR_BAD_INTEGRITY error is generated. The recipient verifies that
1526 the operating system's report of the sender's address matches the sender's
1527 address in the message, and (if a recipient address is specified or the
1528 recipient requires an address) that one of the recipient's addresses
1529 appears as the recipient's address in the message. A failed match for
1530 either case generates a KRB_AP_ERR_BADADDR error. Then the timestamp and
1531 usec and/or the sequence number fields are checked. If timestamp and usec
1532 are expected and not present, or they are present but not current, the
1533 KRB_AP_ERR_SKEW error is generated. If the server name, along with the
1534 client name, time and microsecond fields from the Authenticator match any
1535 recently-seen such tuples, the KRB_AP_ERR_REPEAT error is generated. If an
1536 incorrect sequence number is included, or a sequence number is expected but
1537 not present, the KRB_AP_ERR_BADORDER error is generated. If neither a
1538 time-stamp and usec or a sequence number is present, a KRB_AP_ERR_MODIFIED
1541 If all the checks succeed, the application can assume the message was
1542 generated by its peer, and was securely transmitted (without intruders able
1543 to see the unencrypted contents).
1545 3.6. The KRB_CRED Exchange
1547 The KRB_CRED message may be used by clients requiring the ability to send
1548 Kerberos credentials from one host to another. It achieves this by sending
1549 the tickets together with encrypted data containing the session keys and
1550 other information associated with the tickets.
1552 3.6.1. Generation of a KRB_CRED message
1554 When an application wishes to send a KRB_CRED message it first (using the
1555 KRB_TGS exchange) obtains credentials to be sent to the remote host. It
1556 then constructs a KRB_CRED message using the ticket or tickets so obtained,
1557 placing the session key needed to use each ticket in the key field of the
1558 corresponding KrbCredInfo sequence of the encrypted part of the the
1561 Other information associated with each ticket and obtained during the
1562 KRB_TGS exchange is also placed in the corresponding KrbCredInfo sequence
1563 in the encrypted part of the KRB_CRED message. The current time and, if
1564 specifically required by the application the nonce, s-address, and
1565 r-address fields, are placed in the encrypted part of the KRB_CRED message
1566 which is then encrypted under an encryption key previosuly exchanged in the
1567 KRB_AP exchange (usually the last key negotiated via subkeys, or the
1568 session key if no negotiation has occured).
1570 3.6.2. Receipt of KRB_CRED message
1572 When an application receives a KRB_CRED message, it verifies it. If any
1573 error occurs, an error code is reported for use by the application. The
1574 message is verified by checking that the protocol version and type fields
1575 match the current version and KRB_CRED, respectively. A mismatch generates
1576 a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The application then
1577 decrypts the ciphertext and processes the resultant plaintext. If
1578 decryption shows the data to have been modified, a KRB_AP_ERR_BAD_INTEGRITY
1580 Neuman, Ts'o, Kohl Expires: 18 May 1999
1583 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1588 If present or required, the recipient verifies that the operating system's
1589 report of the sender's address matches the sender's address in the message,
1590 and that one of the recipient's addresses appears as the recipient's
1591 address in the message. A failed match for either case generates a
1592 KRB_AP_ERR_BADADDR error. The timestamp and usec fields (and the nonce
1593 field if required) are checked next. If the timestamp and usec are not
1594 present, or they are present but not current, the KRB_AP_ERR_SKEW error is
1597 If all the checks succeed, the application stores each of the new tickets
1598 in its ticket cache together with the session key and other information in
1599 the corresponding KrbCredInfo sequence from the encrypted part of the
1602 4. The Kerberos Database
1604 The Kerberos server must have access to a database contain- ing the
1605 principal identifiers and secret keys of principals to be
1608 4.1. Database contents
1610 A database entry should contain at least the following fields:
1614 name Principal's identifier
1615 key Principal's secret key
1616 p_kvno Principal's key version
1617 max_life Maximum lifetime for Tickets
1618 max_renewable_life Maximum total lifetime for renewable Tickets
1620 The name field is an encoding of the principal's identifier. The key field
1621 contains an encryption key. This key is the principal's secret key. (The
1622 key can be encrypted before storage under a Kerberos "master key" to
1623 protect it in case the database is compromised but the master key is not.
1624 In that case, an extra field must be added to indicate the master key
1625 version used, see below.) The p_kvno field is the key version number of the
1626 principal's secret key. The max_life field contains the maximum allowable
1627 lifetime (endtime - starttime) for any Ticket issued for this principal.
1628 The max_renewable_life field contains the maximum allowable total lifetime
1629 for any renewable Ticket issued for this principal. (See section 3.1 for a
1630 description of how these lifetimes are used in determining the lifetime of
1633 A server may provide KDC service to several realms, as long as the database
1634 representation provides a mechanism to distinguish between principal
1635 records with identifiers which differ only in the realm name.
1637 When an application server's key changes, if the change is routine (i.e.
1638 not the result of disclosure of the old key), the old key should be
1639 retained by the server until all tickets that had been issued using that
1640 key have expired. Because of this, it is possible for several keys to be
1641 active for a single principal. Ciphertext encrypted in a principal's key is
1642 always tagged with the version of the key that was used for encryption, to
1643 help the recipient find the proper key for decryption.
1646 Neuman, Ts'o, Kohl Expires: 18 May 1999
1649 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1652 When more than one key is active for a particular principal, the principal
1653 will have more than one record in the Kerberos database. The keys and key
1654 version numbers will differ between the records (the rest of the fields may
1655 or may not be the same). Whenever Kerberos issues a ticket, or responds to
1656 a request for initial authentication, the most recent key (known by the
1657 Kerberos server) will be used for encryption. This is the key with the
1658 highest key version number.
1660 4.2. Additional fields
1662 Project Athena's KDC implementation uses additional fields in its database:
1666 K_kvno Kerberos' key version
1667 expiration Expiration date for entry
1668 attributes Bit field of attributes
1669 mod_date Timestamp of last modification
1670 mod_name Modifying principal's identifier
1672 The K_kvno field indicates the key version of the Kerberos master key under
1673 which the principal's secret key is encrypted.
1675 After an entry's expiration date has passed, the KDC will return an error
1676 to any client attempting to gain tickets as or for the principal. (A
1677 database may want to maintain two expiration dates: one for the principal,
1678 and one for the principal's current key. This allows password aging to work
1679 independently of the principal's expiration date. However, due to the
1680 limited space in the responses, the KDC must combine the key expiration and
1681 principal expiration date into a single value called 'key_exp', which is
1682 used as a hint to the user to take administrative action.)
1684 The attributes field is a bitfield used to govern the operations involving
1685 the principal. This field might be useful in conjunction with user
1686 registration procedures, for site-specific policy implementations (Project
1687 Athena currently uses it for their user registration process controlled by
1688 the system-wide database service, Moira [LGDSR87]), to identify whether a
1689 principal can play the role of a client or server or both, to note whether
1690 a server is appropriate trusted to recieve credentials delegated by a
1691 client, or to identify the 'string to key' conversion algorithm used for a
1692 principal's key[22]. Other bits are used to indicate that certain ticket
1693 options should not be allowed in tickets encrypted under a principal's key
1694 (one bit each): Disallow issuing postdated tickets, disallow issuing
1695 forwardable tickets, disallow issuing tickets based on TGT authentication,
1696 disallow issuing renewable tickets, disallow issuing proxiable tickets, and
1697 disallow issuing tickets for which the principal is the server.
1699 The mod_date field contains the time of last modification of the entry, and
1700 the mod_name field contains the name of the principal which last modified
1703 4.3. Frequently Changing Fields
1705 Some KDC implementations may wish to maintain the last time that a request
1706 was made by a particular principal. Information that might be maintained
1707 includes the time of the last request, the time of the last request for a
1708 ticket-granting ticket, the time of the last use of a ticket-granting
1709 ticket, or other times. This information can then be returned to the user
1710 in the last-req field (see section 5.2).
1712 Neuman, Ts'o, Kohl Expires: 18 May 1999
1715 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1719 Other frequently changing information that can be maintained is the latest
1720 expiration time for any tickets that have been issued using each key. This
1721 field would be used to indicate how long old keys must remain valid to
1722 allow the continued use of outstanding tickets.
1726 The KDC implementation should have the following configurable constants or
1727 options, to allow an administrator to make and enforce policy decisions:
1729 * The minimum supported lifetime (used to determine whether the
1730 KDC_ERR_NEVER_VALID error should be returned). This constant should
1731 reflect reasonable expectations of round-trip time to the KDC,
1732 encryption/decryption time, and processing time by the client and
1733 target server, and it should allow for a minimum 'useful' lifetime.
1734 * The maximum allowable total (renewable) lifetime of a ticket
1735 (renew_till - starttime).
1736 * The maximum allowable lifetime of a ticket (endtime - starttime).
1737 * Whether to allow the issue of tickets with empty address fields
1738 (including the ability to specify that such tickets may only be issued
1739 if the request specifies some authorization_data).
1740 * Whether proxiable, forwardable, renewable or post-datable tickets are
1743 5. Message Specifications
1745 The following sections describe the exact contents and encoding of protocol
1746 messages and objects. The ASN.1 base definitions are presented in the first
1747 subsection. The remaining subsections specify the protocol objects (tickets
1748 and authenticators) and messages. Specification of encryption and checksum
1749 techniques, and the fields related to them, appear in section 6.
1751 Optional field in ASN.1 sequences
1753 For optional integer value and date fields in ASN.1 sequences where a
1754 default value has been specified, certain default values will not be
1755 allowed in the encoding because these values will always be represented
1756 through defaulting by the absence of the optional field. For example, one
1757 will not send a microsecond zero value because one must make sure that
1758 there is only one way to encode this value.
1760 Additional fields in ASN.1 sequences
1762 Implementations receiving Kerberos messages with additional fields present
1763 in ASN.1 sequences should carry the those fields through unmodified when
1764 the message is forwarded. Implementation should drop such fields if the
1765 sequence is reencoded.
1767 5.1. ASN.1 Distinguished Encoding Representation
1769 All uses of ASN.1 in Kerberos shall use the Distinguished Encoding
1770 Representation of the data elements as described in the X.509
1771 specification, section 8.7 [X509-88].
1773 5.3. ASN.1 Base Definitions
1775 The following ASN.1 base definitions are used in the rest of this section.
1776 Note that since the underscore character (_) is not permitted in ASN.1
1778 Neuman, Ts'o, Kohl Expires: 18 May 1999
1781 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1784 names, the hyphen (-) is used in its place for the purposes of ASN.1 names.
1786 Realm ::= GeneralString
1787 PrincipalName ::= SEQUENCE {
1788 name-type[0] INTEGER,
1789 name-string[1] SEQUENCE OF GeneralString
1792 Kerberos realms are encoded as GeneralStrings. Realms shall not contain a
1793 character with the code 0 (the ASCII NUL). Most realms will usually consist
1794 of several components separated by periods (.), in the style of Internet
1795 Domain Names, or separated by slashes (/) in the style of X.500 names.
1796 Acceptable forms for realm names are specified in section 7. A
1797 PrincipalName is a typed sequence of components consisting of the following
1801 This field specifies the type of name that follows. Pre-defined values
1802 for this field are specified in section 7.2. The name-type should be
1803 treated as a hint. Ignoring the name type, no two names can be the
1804 same (i.e. at least one of the components, or the realm, must be
1805 different). This constraint may be eliminated in the future.
1807 This field encodes a sequence of components that form a name, each
1808 component encoded as a GeneralString. Taken together, a PrincipalName
1809 and a Realm form a principal identifier. Most PrincipalNames will have
1810 only a few components (typically one or two).
1812 KerberosTime ::= GeneralizedTime
1813 -- Specifying UTC time zone (Z)
1815 The timestamps used in Kerberos are encoded as GeneralizedTimes. An
1816 encoding shall specify the UTC time zone (Z) and shall not include any
1817 fractional portions of the seconds. It further shall not include any
1818 separators. Example: The only valid format for UTC time 6 minutes, 27
1819 seconds after 9 pm on 6 November 1985 is 19851106210627Z.
1821 HostAddress ::= SEQUENCE {
1822 addr-type[0] INTEGER,
1823 address[1] OCTET STRING
1826 HostAddresses ::= SEQUENCE OF HostAddress
1828 The host adddress encodings consists of two fields:
1831 This field specifies the type of address that follows. Pre-defined
1832 values for this field are specified in section 8.1.
1834 This field encodes a single address of type addr-type.
1836 The two forms differ slightly. HostAddress contains exactly one address;
1837 HostAddresses contains a sequence of possibly many addresses.
1839 AuthorizationData ::= SEQUENCE OF SEQUENCE {
1841 ad-data[1] OCTET STRING
1844 Neuman, Ts'o, Kohl Expires: 18 May 1999
1847 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1852 This field contains authorization data to be interpreted according to
1853 the value of the corresponding ad-type field.
1855 This field specifies the format for the ad-data subfield. All negative
1856 values are reserved for local use. Non-negative values are reserved
1859 Each sequence of type and data is refered to as an authorization element.
1860 Elements may be application specific, however, there is a common set of
1861 recursive elements that should be understood by all implementations. These
1862 elements contain other elements embedded within them, and the
1863 interpretation of the encapsulating element determines which of the
1864 embedded elements must be interpreted, and which may be ignored.
1865 Definitions for these common elements may be found in Appendix B.
1867 TicketExtensions ::= SEQUENCE OF SEQUENCE {
1869 te-data[1] OCTET STRING
1875 This field contains opaque data that must be caried with the ticket to
1876 support extensions to the Kerberos protocol including but not limited
1877 to some forms of inter-realm key exchange and plaintext authorization
1878 data. See appendix C for some common uses of this field.
1880 This field specifies the format for the te-data subfield. All negative
1881 values are reserved for local use. Non-negative values are reserved
1884 APOptions ::= BIT STRING
1886 -- use-session-key(1),
1887 -- mutual-required(2)
1889 TicketFlags ::= BIT STRING
1902 -- transited-policy-checked(12),
1903 -- ok-as-delegate(13)
1905 KDCOptions ::= BIT STRING
1910 Neuman, Ts'o, Kohl Expires: 18 May 1999
1913 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1918 -- allow-postdate(5),
1927 -- disable-transited-check(26),
1928 -- renewable-ok(27),
1929 -- enc-tkt-in-skey(28),
1933 ASN.1 Bit strings have a length and a value. When used in Kerberos for the
1934 APOptions, TicketFlags, and KDCOptions, the length of the bit string on
1935 generated values should be the smallest number of bits needed to include
1936 the highest order bit that is set (1), but in no case less than 32 bits.
1937 The ASN.1 representation of the bit strings uses unnamed bits, with the
1938 meaning of the individual bits defined by the comments in the specification
1939 above. Implementations should accept values of bit strings of any length
1940 and treat the value of flags corresponding to bits beyond the end of the
1941 bit string as if the bit were reset (0). Comparison of bit strings of
1942 different length should treat the smaller string as if it were padded with
1943 zeros beyond the high order bits to the length of the longer string[23].
1945 LastReq ::= SEQUENCE OF SEQUENCE {
1947 lr-value[1] KerberosTime
1951 This field indicates how the following lr-value field is to be
1952 interpreted. Negative values indicate that the information pertains
1953 only to the responding server. Non-negative values pertain to all
1954 servers for the realm. If the lr-type field is zero (0), then no
1955 information is conveyed by the lr-value subfield. If the absolute
1956 value of the lr-type field is one (1), then the lr-value subfield is
1957 the time of last initial request for a TGT. If it is two (2), then the
1958 lr-value subfield is the time of last initial request. If it is three
1959 (3), then the lr-value subfield is the time of issue for the newest
1960 ticket-granting ticket used. If it is four (4), then the lr-value
1961 subfield is the time of the last renewal. If it is five (5), then the
1962 lr-value subfield is the time of last request (of any type). If it is
1963 (6), then the lr-value subfield is the time when the password will
1966 This field contains the time of the last request. the time must be
1967 interpreted according to the contents of the accompanying lr-type
1970 See section 6 for the definitions of Checksum, ChecksumType, EncryptedData,
1971 EncryptionKey, EncryptionType, and KeyType.
1973 5.3. Tickets and Authenticators
1976 Neuman, Ts'o, Kohl Expires: 18 May 1999
1979 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
1982 This section describes the format and encryption parameters for tickets and
1983 authenticators. When a ticket or authenticator is included in a protocol
1984 message it is treated as an opaque object.
1988 A ticket is a record that helps a client authenticate to a service. A
1989 Ticket contains the following information:
1991 Ticket ::= [APPLICATION 1] SEQUENCE {
1994 sname[2] PrincipalName,
1995 enc-part[3] EncryptedData,
1996 extensions[4] TicketExtensions OPTIONAL
1999 -- Encrypted part of ticket
2000 EncTicketPart ::= [APPLICATION 3] SEQUENCE {
2001 flags[0] TicketFlags,
2002 key[1] EncryptionKey,
2004 cname[3] PrincipalName,
2005 transited[4] TransitedEncoding,
2006 authtime[5] KerberosTime,
2007 starttime[6] KerberosTime OPTIONAL,
2008 endtime[7] KerberosTime,
2009 renew-till[8] KerberosTime OPTIONAL,
2010 caddr[9] HostAddresses OPTIONAL,
2011 authorization-data[10] AuthorizationData OPTIONAL
2013 -- encoded Transited field
2014 TransitedEncoding ::= SEQUENCE {
2015 tr-type[0] INTEGER, -- must be
2017 contents[1] OCTET STRING
2020 The encoding of EncTicketPart is encrypted in the key shared by Kerberos
2021 and the end server (the server's secret key). See section 6 for the format
2025 This field specifies the version number for the ticket format. This
2026 document describes version number 5.
2028 This field specifies the realm that issued a ticket. It also serves to
2029 identify the realm part of the server's principal identifier. Since a
2030 Kerberos server can only issue tickets for servers within its realm,
2031 the two will always be identical.
2033 This field specifies the name part of the server's identity.
2035 This field holds the encrypted encoding of the EncTicketPart sequence.
2037 This optional field contains a sequence of extentions that may be used
2038 to carry information that must be carried with the ticket to support
2039 several extensions, including but not limited to plaintext
2040 authorization data, tokens for exchanging inter-realm keys, and other
2041 information that must be associated with a ticket for use by the
2043 Neuman, Ts'o, Kohl Expires: 18 May 1999
2046 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2049 application server. See Appendix C for definitions of some common
2052 Note that some older versions of Kerberos did not support this field.
2053 Because this is an optional field it will not break older clients, but
2054 older clients might strip this field from the ticket before sending it
2055 to the application server. This limits the usefulness of this ticket
2056 field to environments where the ticket will not be parsed and
2057 reconstructed by these older Kerberos clients.
2059 If it is known that the client will strip this field from the ticket,
2060 as an interim measure the KDC may append this field to the end of the
2061 enc-part of the ticket and append a traler indicating the lenght of
2062 the appended extensions field. (this paragraph is open for discussion,
2063 including the form of the traler).
2065 This field indicates which of various options were used or requested
2066 when the ticket was issued. It is a bit-field, where the selected
2067 options are indicated by the bit being set (1), and the unselected
2068 options and reserved fields being reset (0). Bit 0 is the most
2069 significant bit. The encoding of the bits is specified in section 5.2.
2070 The flags are described in more detail above in section 2. The
2071 meanings of the flags are:
2073 Bit(s) Name Description
2076 Reserved for future expansion of this
2080 The FORWARDABLE flag is normally only
2081 interpreted by the TGS, and can be
2082 ignored by end servers. When set, this
2083 flag tells the ticket-granting server
2084 that it is OK to issue a new ticket-
2085 granting ticket with a different network
2086 address based on the presented ticket.
2089 When set, this flag indicates that the
2090 ticket has either been forwarded or was
2091 issued based on authentication involving
2092 a forwarded ticket-granting ticket.
2095 The PROXIABLE flag is normally only
2096 interpreted by the TGS, and can be
2097 ignored by end servers. The PROXIABLE
2098 flag has an interpretation identical to
2099 that of the FORWARDABLE flag, except
2100 that the PROXIABLE flag tells the
2101 ticket-granting server that only non-
2102 ticket-granting tickets may be issued
2103 with different network addresses.
2106 When set, this flag indicates that a
2109 Neuman, Ts'o, Kohl Expires: 18 May 1999
2112 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2117 The MAY-POSTDATE flag is normally only
2118 interpreted by the TGS, and can be
2119 ignored by end servers. This flag tells
2120 the ticket-granting server that a post-
2121 dated ticket may be issued based on this
2122 ticket-granting ticket.
2125 This flag indicates that this ticket has
2126 been postdated. The end-service can
2127 check the authtime field to see when the
2128 original authentication occurred.
2131 This flag indicates that a ticket is
2132 invalid, and it must be validated by the
2133 KDC before use. Application servers
2134 must reject tickets which have this flag
2138 The RENEWABLE flag is normally only
2139 interpreted by the TGS, and can usually
2140 be ignored by end servers (some particu-
2141 larly careful servers may wish to disal-
2142 low renewable tickets). A renewable
2143 ticket can be used to obtain a replace-
2144 ment ticket that expires at a later
2148 This flag indicates that this ticket was
2149 issued using the AS protocol, and not
2150 issued based on a ticket-granting
2154 This flag indicates that during initial
2155 authentication, the client was authenti-
2156 cated by the KDC before a ticket was
2157 issued. The strength of the pre-
2158 authentication method is not indicated,
2159 but is acceptable to the KDC.
2162 This flag indicates that the protocol
2163 employed for initial authentication
2164 required the use of hardware expected to
2165 be possessed solely by the named client.
2166 The hardware authentication method is
2167 selected by the KDC and the strength of
2168 the method is not indicated.
2170 12 TRANSITED This flag indicates that the KDC for the
2171 POLICY-CHECKED realm has checked the transited field
2172 against a realm defined policy for
2173 trusted certifiers. If this flag is
2175 Neuman, Ts'o, Kohl Expires: 18 May 1999
2178 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2181 reset (0), then the application server
2182 must check the transited field itself,
2183 and if unable to do so it must reject
2184 the authentication. If the flag is set
2185 (1) then the application server may skip
2186 its own validation of the transited
2187 field, relying on the validation
2188 performed by the KDC. At its option the
2189 application server may still apply its
2190 own validation based on a separate
2191 policy for acceptance.
2193 13 OK-AS-DELEGATE This flag indicates that the server (not
2194 the client) specified in the ticket has
2195 been determined by policy of the realm
2196 to be a suitable recipient of
2197 delegation. A client can use the
2198 presence of this flag to help it make a
2199 decision whether to delegate credentials
2200 (either grant a proxy or a forwarded
2201 ticket granting ticket) to this server.
2202 The client is free to ignore the value
2203 of this flag. When setting this flag,
2204 an administrator should consider the
2205 Security and placement of the server on
2206 which the service will run, as well as
2207 whether the service requires the use of
2208 delegated credentials.
2211 This flag indicates that the principal
2212 named in the ticket is a generic princi-
2213 pal for the realm and does not identify
2214 the individual using the ticket. The
2215 purpose of the ticket is only to
2216 securely distribute a session key, and
2217 not to identify the user. Subsequent
2218 requests using the same ticket and ses-
2219 sion may be considered as originating
2220 from the same user, but requests with
2221 the same username but a different ticket
2222 are likely to originate from different
2226 Reserved for future use.
2229 This field exists in the ticket and the KDC response and is used to
2230 pass the session key from Kerberos to the application server and the
2231 client. The field's encoding is described in section 6.2.
2233 This field contains the name of the realm in which the client is
2234 registered and in which initial authentication took place.
2236 This field contains the name part of the client's principal
2239 This field lists the names of the Kerberos realms that took part in
2241 Neuman, Ts'o, Kohl Expires: 18 May 1999
2244 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2247 authenticating the user to whom this ticket was issued. It does not
2248 specify the order in which the realms were transited. See section
2249 3.3.3.2 for details on how this field encodes the traversed realms.
2250 When the names of CA's are to be embedded inthe transited field (as
2251 specified for some extentions to the protocol), the X.500 names of the
2252 CA's should be mapped into items in the transited field using the
2253 mapping defined by RFC2253.
2255 This field indicates the time of initial authentication for the named
2256 principal. It is the time of issue for the original ticket on which
2257 this ticket is based. It is included in the ticket to provide
2258 additional information to the end service, and to provide the
2259 necessary information for implementation of a `hot list' service at
2260 the KDC. An end service that is particularly paranoid could refuse to
2261 accept tickets for which the initial authentication occurred "too far"
2262 in the past. This field is also returned as part of the response from
2263 the KDC. When returned as part of the response to initial
2264 authentication (KRB_AS_REP), this is the current time on the Ker-
2267 This field in the ticket specifies the time after which the ticket is
2268 valid. Together with endtime, this field specifies the life of the
2269 ticket. If it is absent from the ticket, its value should be treated
2270 as that of the authtime field.
2272 This field contains the time after which the ticket will not be
2273 honored (its expiration time). Note that individual services may place
2274 their own limits on the life of a ticket and may reject tickets which
2275 have not yet expired. As such, this is really an upper bound on the
2276 expiration time for the ticket.
2278 This field is only present in tickets that have the RENEWABLE flag set
2279 in the flags field. It indicates the maximum endtime that may be
2280 included in a renewal. It can be thought of as the absolute expiration
2281 time for the ticket, including all renewals.
2283 This field in a ticket contains zero (if omitted) or more (if present)
2284 host addresses. These are the addresses from which the ticket can be
2285 used. If there are no addresses, the ticket can be used from any
2286 location. The decision by the KDC to issue or by the end server to
2287 accept zero-address tickets is a policy decision and is left to the
2288 Kerberos and end-service administrators; they may refuse to issue or
2289 accept such tickets. The suggested and default policy, however, is
2290 that such tickets will only be issued or accepted when additional
2291 information that can be used to restrict the use of the ticket is
2292 included in the authorization_data field. Such a ticket is a
2295 Network addresses are included in the ticket to make it harder for an
2296 attacker to use stolen credentials. Because the session key is not
2297 sent over the network in cleartext, credentials can't be stolen simply
2298 by listening to the network; an attacker has to gain access to the
2299 session key (perhaps through operating system security breaches or a
2300 careless user's unattended session) to make use of stolen tickets.
2302 It is important to note that the network address from which a
2303 connection is received cannot be reliably determined. Even if it could
2304 be, an attacker who has compromised the client's worksta- tion could
2305 use the credentials from there. Including the network addresses only
2307 Neuman, Ts'o, Kohl Expires: 18 May 1999
2310 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2313 makes it more difficult, not impossible, for an attacker to walk off
2314 with stolen credentials and then use them from a "safe" location.
2316 The authorization-data field is used to pass authorization data from
2317 the principal on whose behalf a ticket was issued to the application
2318 service. If no authorization data is included, this field will be left
2319 out. Experience has shown that the name of this field is confusing,
2320 and that a better name for this field would be restrictions.
2321 Unfortunately, it is not possible to change the name of this field at
2324 This field contains restrictions on any authority obtained on the
2325 basis of authentication using the ticket. It is possible for any
2326 principal in posession of credentials to add entries to the
2327 authorization data field since these entries further restrict what can
2328 be done with the ticket. Such additions can be made by specifying the
2329 additional entries when a new ticket is obtained during the TGS
2330 exchange, or they may be added during chained delegation using the
2331 authorization data field of the authenticator.
2333 Because entries may be added to this field by the holder of
2334 credentials, it is not allowable for the presence of an entry in the
2335 authorization data field of a ticket to amplify the priveleges one
2336 would obtain from using a ticket.
2338 The data in this field may be specific to the end service; the field
2339 will contain the names of service specific objects, and the rights to
2340 those objects. The format for this field is described in section 5.2.
2341 Although Kerberos is not concerned with the format of the contents of
2342 the sub-fields, it does carry type information (ad-type).
2344 By using the authorization_data field, a principal is able to issue a
2345 proxy that is valid for a specific purpose. For example, a client
2346 wishing to print a file can obtain a file server proxy to be passed to
2347 the print server. By specifying the name of the file in the
2348 authorization_data field, the file server knows that the print server
2349 can only use the client's rights when accessing the particular file to
2352 A separate service providing authorization or certifying group
2353 membership may be built using the authorization-data field. In this
2354 case, the entity granting authorization (not the authorized entity),
2355 obtains a ticket in its own name (e.g. the ticket is issued in the
2356 name of a privelege server), and this entity adds restrictions on its
2357 own authority and delegates the restricted authority through a proxy
2358 to the client. The client would then present this authorization
2359 credential to the application server separately from the
2360 authentication exchange.
2362 Similarly, if one specifies the authorization-data field of a proxy
2363 and leaves the host addresses blank, the resulting ticket and session
2364 key can be treated as a capability. See [Neu93] for some suggested
2367 The authorization-data field is optional and does not have to be
2368 included in a ticket.
2370 5.3.2. Authenticators
2373 Neuman, Ts'o, Kohl Expires: 18 May 1999
2376 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2379 An authenticator is a record sent with a ticket to a server to certify the
2380 client's knowledge of the encryption key in the ticket, to help the server
2381 detect replays, and to help choose a "true session key" to use with the
2382 particular session. The encoding is encrypted in the ticket's session key
2383 shared by the client and the server:
2385 -- Unencrypted authenticator
2386 Authenticator ::= [APPLICATION 2] SEQUENCE {
2387 authenticator-vno[0] INTEGER,
2389 cname[2] PrincipalName,
2390 cksum[3] Checksum OPTIONAL,
2392 ctime[5] KerberosTime,
2393 subkey[6] EncryptionKey OPTIONAL,
2394 seq-number[7] INTEGER OPTIONAL,
2395 authorization-data[8] AuthorizationData OPTIONAL
2400 This field specifies the version number for the format of the
2401 authenticator. This document specifies version 5.
2403 These fields are the same as those described for the ticket in section
2406 This field contains a checksum of the the applica- tion data that
2407 accompanies the KRB_AP_REQ.
2409 This field contains the microsecond part of the client's timestamp.
2410 Its value (before encryption) ranges from 0 to 999999. It often
2411 appears along with ctime. The two fields are used together to specify
2412 a reasonably accurate timestamp.
2414 This field contains the current time on the client's host.
2416 This field contains the client's choice for an encryption key which is
2417 to be used to protect this specific application session. Unless an
2418 application specifies otherwise, if this field is left out the session
2419 key from the ticket will be used.
2421 This optional field includes the initial sequence number to be used by
2422 the KRB_PRIV or KRB_SAFE messages when sequence numbers are used to
2423 detect replays (It may also be used by application specific messages).
2424 When included in the authenticator this field specifies the initial
2425 sequence number for messages from the client to the server. When
2426 included in the AP-REP message, the initial sequence number is that
2427 for messages from the server to the client. When used in KRB_PRIV or
2428 KRB_SAFE messages, it is incremented by one after each message is
2429 sent. Sequence numbers fall in the range of 0 through 2^32 - 1 and
2430 wrap to zero following the value 2^32 - 1.
2432 For sequence numbers to adequately support the detection of replays
2433 they should be non-repeating, even across connection boundaries. The
2434 initial sequence number should be random and uniformly distributed
2435 across the full space of possible sequence numbers, so that it cannot
2436 be guessed by an attacker and so that it and the successive sequence
2437 numbers do not repeat other sequences.
2439 Neuman, Ts'o, Kohl Expires: 18 May 1999
2442 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2446 This field is the same as described for the ticket in section 5.3.1.
2447 It is optional and will only appear when additional restrictions are
2448 to be placed on the use of a ticket, beyond those carried in the
2451 5.4. Specifications for the AS and TGS exchanges
2453 This section specifies the format of the messages used in the exchange
2454 between the client and the Kerberos server. The format of possible error
2455 messages appears in section 5.9.1.
2457 5.4.1. KRB_KDC_REQ definition
2459 The KRB_KDC_REQ message has no type of its own. Instead, its type is one of
2460 KRB_AS_REQ or KRB_TGS_REQ depending on whether the request is for an
2461 initial ticket or an additional ticket. In either case, the message is sent
2462 from the client to the Authentication Server to request credentials for a
2465 The message fields are:
2467 AS-REQ ::= [APPLICATION 10] KDC-REQ
2468 TGS-REQ ::= [APPLICATION 12] KDC-REQ
2470 KDC-REQ ::= SEQUENCE {
2472 msg-type[2] INTEGER,
2473 padata[3] SEQUENCE OF PA-DATA OPTIONAL,
2474 req-body[4] KDC-REQ-BODY
2477 PA-DATA ::= SEQUENCE {
2478 padata-type[1] INTEGER,
2479 padata-value[2] OCTET STRING,
2480 -- might be encoded AP-REQ
2483 KDC-REQ-BODY ::= SEQUENCE {
2484 kdc-options[0] KDCOptions,
2485 cname[1] PrincipalName OPTIONAL,
2486 -- Used only in AS-REQ
2487 realm[2] Realm, -- Server's realm
2488 -- Also client's in AS-REQ
2489 sname[3] PrincipalName OPTIONAL,
2490 from[4] KerberosTime OPTIONAL,
2491 till[5] KerberosTime OPTIONAL,
2492 rtime[6] KerberosTime OPTIONAL,
2494 etype[8] SEQUENCE OF INTEGER,
2496 -- in preference order
2497 addresses[9] HostAddresses OPTIONAL,
2498 enc-authorization-data[10] EncryptedData OPTIONAL,
2499 -- Encrypted AuthorizationData
2501 additional-tickets[11] SEQUENCE OF Ticket OPTIONAL
2505 Neuman, Ts'o, Kohl Expires: 18 May 1999
2508 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2511 The fields in this message are:
2514 This field is included in each message, and specifies the protocol
2515 version number. This document specifies protocol version 5.
2517 This field indicates the type of a protocol message. It will almost
2518 always be the same as the application identifier associated with a
2519 message. It is included to make the identifier more readily accessible
2520 to the application. For the KDC-REQ message, this type will be
2521 KRB_AS_REQ or KRB_TGS_REQ.
2523 The padata (pre-authentication data) field contains a sequence of
2524 authentication information which may be needed before credentials can
2525 be issued or decrypted. In the case of requests for additional tickets
2526 (KRB_TGS_REQ), this field will include an element with padata-type of
2527 PA-TGS-REQ and data of an authentication header (ticket-granting
2528 ticket and authenticator). The checksum in the authenticator (which
2529 must be collision-proof) is to be computed over the KDC-REQ-BODY
2530 encoding. In most requests for initial authentication (KRB_AS_REQ) and
2531 most replies (KDC-REP), the padata field will be left out.
2533 This field may also contain information needed by certain extensions
2534 to the Kerberos protocol. For example, it might be used to initially
2535 verify the identity of a client before any response is returned. This
2536 is accomplished with a padata field with padata-type equal to
2537 PA-ENC-TIMESTAMP and padata-value defined as follows:
2539 padata-type ::= PA-ENC-TIMESTAMP
2540 padata-value ::= EncryptedData -- PA-ENC-TS-ENC
2542 PA-ENC-TS-ENC ::= SEQUENCE {
2543 patimestamp[0] KerberosTime, -- client's time
2544 pausec[1] INTEGER OPTIONAL
2547 with patimestamp containing the client's time and pausec containing
2548 the microseconds which may be omitted if a client will not generate
2549 more than one request per second. The ciphertext (padata-value)
2550 consists of the PA-ENC-TS-ENC sequence, encrypted using the client's
2553 [use-specified-kvno item is here for discussion and may be removed] It
2554 may also be used by the client to specify the version of a key that is
2555 being used for accompanying preauthentication, and/or which should be
2556 used to encrypt the reply from the KDC.
2558 PA-USE-SPECIFIED-KVNO ::= Integer
2560 The KDC should only accept and abide by the value of the
2561 use-specified-kvno preauthentication data field when the specified key
2562 is still valid and until use of a new key is confirmed. This situation
2563 is likely to occur primarily during the period during which an updated
2564 key is propagating to other KDC's in a realm.
2566 The padata field can also contain information needed to help the KDC
2567 or the client select the key needed for generating or decrypting the
2568 response. This form of the padata is useful for supporting the use of
2569 certain token cards with Kerberos. The details of such extensions are
2571 Neuman, Ts'o, Kohl Expires: 18 May 1999
2574 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2577 specified in separate documents. See [Pat92] for additional uses of
2580 The padata-type element of the padata field indicates the way that the
2581 padata-value element is to be interpreted. Negative values of
2582 padata-type are reserved for unregistered use; non-negative values are
2583 used for a registered interpretation of the element type.
2585 This field is a placeholder delimiting the extent of the remaining
2586 fields. If a checksum is to be calculated over the request, it is
2587 calculated over an encoding of the KDC-REQ-BODY sequence which is
2588 enclosed within the req-body field.
2590 This field appears in the KRB_AS_REQ and KRB_TGS_REQ requests to the
2591 KDC and indicates the flags that the client wants set on the tickets
2592 as well as other information that is to modify the behavior of the
2593 KDC. Where appropriate, the name of an option may be the same as the
2594 flag that is set by that option. Although in most case, the bit in the
2595 options field will be the same as that in the flags field, this is not
2596 guaranteed, so it is not acceptable to simply copy the options field
2597 to the flags field. There are various checks that must be made before
2598 honoring an option anyway.
2600 The kdc_options field is a bit-field, where the selected options are
2601 indicated by the bit being set (1), and the unselected options and
2602 reserved fields being reset (0). The encoding of the bits is specified
2603 in section 5.2. The options are described in more detail above in
2604 section 2. The meanings of the options are:
2606 Bit(s) Name Description
2608 Reserved for future expansion of
2613 The FORWARDABLE option indicates
2615 the ticket to be issued is to have
2617 forwardable flag set. It may only
2619 set on the initial request, or in a
2621 sequent request if the
2623 ticket on which it is based is also
2628 The FORWARDED option is only
2632 server and will only be honored if
2634 ticket-granting ticket in the
2636 has its FORWARDABLE bit set.
2638 option indicates that this is a
2640 for forwarding. The address(es) of
2642 host from which the resulting ticket
2644 to be valid are included in
2646 addresses field of the request.
2649 The PROXIABLE option indicates that
2651 ticket to be issued is to have its
2653 iable flag set. It may only be set
2656 Neuman, Ts'o, Kohl Expires: 18 May 1999
2659 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2662 the initial request, or in a
2664 request if the ticket-granting ticket
2666 which it is based is also proxiable.
2669 The PROXY option indicates that this
2671 a request for a proxy. This option
2673 only be honored if the
2675 ticket in the request has its
2677 bit set. The address(es) of the
2679 from which the resulting ticket is to
2681 valid are included in the
2683 field of the request.
2686 The ALLOW-POSTDATE option indicates
2688 the ticket to be issued is to have
2690 MAY-POSTDATE flag set. It may only
2692 set on the initial request, or in a
2694 sequent request if the
2696 ticket on which it is based also has
2698 MAY-POSTDATE flag set.
2701 The POSTDATED option indicates that
2703 is a request for a postdated
2705 This option will only be honored if
2707 ticket-granting ticket on which
2708 it is based has its MAY-POSTDATE
2710 The resulting ticket will also have
2712 INVALID flag set, and that flag may
2714 reset by a subsequent request to the
2716 after the starttime in the ticket
2721 This option is presently unused.
2724 The RENEWABLE option indicates that
2726 ticket to be issued is to have
2728 RENEWABLE flag set. It may only be
2730 on the initial request, or when
2732 ticket-granting ticket on which
2734 request is based is also renewable.
2736 this option is requested, then the
2738 field in the request contains
2740 desired absolute expiration time for
2745 These options are presently unused.
2747 14 REQUEST-ANONYMOUS
2748 The REQUEST-ANONYMOUS option
2750 that the ticket to be issued is not
2752 identify the user to which it
2754 issued. Instead, the principal
2757 Neuman, Ts'o, Kohl Expires: 18 May 1999
2760 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2763 ier is to be generic, as specified
2765 the policy of the realm (e.g.
2767 anonymous@realm). The purpose of
2769 ticket is only to securely distribute
2771 session key, and not to identify
2773 user. The ANONYMOUS flag on the
2775 to be returned should be set. If
2777 local realms policy does not
2779 anonymous credentials, the request is
2784 Reserved for future use.
2786 26 DISABLE-TRANSITED-CHECK
2787 By default the KDC will check the
2788 transited field of a ticket-granting-
2789 ticket against the policy of the local
2790 realm before it will issue derivative
2791 tickets based on the ticket granting
2792 ticket. If this flag is set in the
2793 request, checking of the transited
2795 is disabled. Tickets issued without
2797 performance of this check will be
2799 by the reset (0) value of the
2800 TRANSITED-POLICY-CHECKED flag,
2801 indicating to the application server
2802 that the tranisted field must be
2804 locally. KDC's are encouraged but not
2805 required to honor the
2806 DISABLE-TRANSITED-CHECK option.
2809 The RENEWABLE-OK option indicates that
2811 renewable ticket will be acceptable if
2813 ticket with the requested life
2815 otherwise be provided. If a ticket
2817 the requested life cannot be
2819 then a renewable ticket may be
2821 with a renew-till equal to the
2823 requested endtime. The value of
2825 renew-till field may still be limited
2827 local limits, or limits selected by
2829 individual principal or server.
2832 This option is used only by the
2834 granting service. The
2836 option indicates that the ticket for
2838 end server is to be encrypted in
2840 session key from the additional
2842 granting ticket provided.
2845 Reserved for future use.
2848 This option is used only by the
2850 granting service. The RENEW
2853 Neuman, Ts'o, Kohl Expires: 18 May 1999
2856 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2859 indicates that the present request
2861 for a renewal. The ticket provided
2863 encrypted in the secret key for
2865 server on which it is valid.
2867 option will only be honored if
2869 ticket to be renewed has its
2871 flag set and if the time in its
2873 till field has not passed. The
2875 to be renewed is passed in the
2877 field as part of the
2882 This option is used only by the
2884 granting service. The VALIDATE
2886 indicates that the request is to
2888 date a postdated ticket. It will
2890 be honored if the ticket presented
2892 postdated, presently has its
2894 flag set, and would be otherwise
2896 at this time. A ticket cannot be
2898 dated before its starttime. The
2900 presented for validation is encrypted
2902 the key of the server for which it
2904 valid and is passed in the padata
2906 as part of the authentication header.
2909 These fields are the same as those described for the ticket in section
2910 5.3.1. sname may only be absent when the ENC-TKT-IN-SKEY option is
2911 specified. If absent, the name of the server is taken from the name of
2912 the client in the ticket passed as additional-tickets.
2913 enc-authorization-data
2914 The enc-authorization-data, if present (and it can only be present in
2915 the TGS_REQ form), is an encoding of the desired authorization-data
2916 encrypted under the sub-session key if present in the Authenticator,
2917 or alternatively from the session key in the ticket-granting ticket,
2918 both from the padata field in the KRB_AP_REQ.
2920 This field specifies the realm part of the server's principal
2921 identifier. In the AS exchange, this is also the realm part of the
2922 client's principal identifier.
2924 This field is included in the KRB_AS_REQ and KRB_TGS_REQ ticket
2925 requests when the requested ticket is to be postdated. It specifies
2926 the desired start time for the requested ticket. If this field is
2927 omitted then the KDC should use the current time instead.
2929 This field contains the expiration date requested by the client in a
2930 ticket request. It is optional and if omitted the requested ticket is
2931 to have the maximum endtime permitted according to KDC policy for the
2932 parties to the authentication exchange as limited by expiration date
2933 of the ticket granting ticket or other preauthentication credentials.
2935 This field is the requested renew-till time sent from a client to the
2936 KDC in a ticket request. It is optional.
2938 This field is part of the KDC request and response. It it intended to
2939 hold a random number generated by the client. If the same number is
2941 Neuman, Ts'o, Kohl Expires: 18 May 1999
2944 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
2947 included in the encrypted response from the KDC, it provides evidence
2948 that the response is fresh and has not been replayed by an attacker.
2949 Nonces must never be re-used. Ideally, it should be generated
2950 randomly, but if the correct time is known, it may suffice[25].
2952 This field specifies the desired encryption algorithm to be used in
2955 This field is included in the initial request for tickets, and
2956 optionally included in requests for additional tickets from the
2957 ticket-granting server. It specifies the addresses from which the
2958 requested ticket is to be valid. Normally it includes the addresses
2959 for the client's host. If a proxy is requested, this field will
2960 contain other addresses. The contents of this field are usually copied
2961 by the KDC into the caddr field of the resulting ticket.
2963 Additional tickets may be optionally included in a request to the
2964 ticket-granting server. If the ENC-TKT-IN-SKEY option has been
2965 specified, then the session key from the additional ticket will be
2966 used in place of the server's key to encrypt the new ticket. If more
2967 than one option which requires additional tickets has been specified,
2968 then the additional tickets are used in the order specified by the
2969 ordering of the options bits (see kdc-options, above).
2971 The application code will be either ten (10) or twelve (12) depending on
2972 whether the request is for an initial ticket (AS-REQ) or for an additional
2975 The optional fields (addresses, authorization-data and additional-tickets)
2976 are only included if necessary to perform the operation specified in the
2979 It should be noted that in KRB_TGS_REQ, the protocol version number appears
2980 twice and two different message types appear: the KRB_TGS_REQ message
2981 contains these fields as does the authentication header (KRB_AP_REQ) that
2982 is passed in the padata field.
2984 5.4.2. KRB_KDC_REP definition
2986 The KRB_KDC_REP message format is used for the reply from the KDC for
2987 either an initial (AS) request or a subsequent (TGS) request. There is no
2988 message type for KRB_KDC_REP. Instead, the type will be either KRB_AS_REP
2989 or KRB_TGS_REP. The key used to encrypt the ciphertext part of the reply
2990 depends on the message type. For KRB_AS_REP, the ciphertext is encrypted in
2991 the client's secret key, and the client's key version number is included in
2992 the key version number for the encrypted data. For KRB_TGS_REP, the
2993 ciphertext is encrypted in the sub-session key from the Authenticator, or
2994 if absent, the session key from the ticket-granting ticket used in the
2995 request. In that case, no version number will be present in the
2996 EncryptedData sequence.
2998 The KRB_KDC_REP message contains the following fields:
3000 AS-REP ::= [APPLICATION 11] KDC-REP
3001 TGS-REP ::= [APPLICATION 13] KDC-REP
3003 KDC-REP ::= SEQUENCE {
3005 msg-type[1] INTEGER,
3007 Neuman, Ts'o, Kohl Expires: 18 May 1999
3010 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3013 padata[2] SEQUENCE OF PA-DATA OPTIONAL,
3015 cname[4] PrincipalName,
3017 enc-part[6] EncryptedData
3020 EncASRepPart ::= [APPLICATION 25[27]] EncKDCRepPart
3021 EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart
3023 EncKDCRepPart ::= SEQUENCE {
3024 key[0] EncryptionKey,
3025 last-req[1] LastReq,
3027 key-expiration[3] KerberosTime OPTIONAL,
3028 flags[4] TicketFlags,
3029 authtime[5] KerberosTime,
3030 starttime[6] KerberosTime OPTIONAL,
3031 endtime[7] KerberosTime,
3032 renew-till[8] KerberosTime OPTIONAL,
3034 sname[10] PrincipalName,
3035 caddr[11] HostAddresses OPTIONAL
3039 These fields are described above in section 5.4.1. msg-type is either
3040 KRB_AS_REP or KRB_TGS_REP.
3042 This field is described in detail in section 5.4.1. One possible use
3043 for this field is to encode an alternate "mix-in" string to be used
3044 with a string-to-key algorithm (such as is described in section
3045 6.3.2). This ability is useful to ease transitions if a realm name
3046 needs to change (e.g. when a company is acquired); in such a case all
3047 existing password-derived entries in the KDC database would be flagged
3048 as needing a special mix-in string until the next password change.
3049 crealm, cname, srealm and sname
3050 These fields are the same as those described for the ticket in section
3053 The newly-issued ticket, from section 5.3.1.
3055 This field is a place holder for the ciphertext and related
3056 information that forms the encrypted part of a message. The
3057 description of the encrypted part of the message follows each
3058 appearance of this field. The encrypted part is encoded as described
3061 This field is the same as described for the ticket in section 5.3.1.
3063 This field is returned by the KDC and specifies the time(s) of the
3064 last request by a principal. Depending on what information is
3065 available, this might be the last time that a request for a
3066 ticket-granting ticket was made, or the last time that a request based
3067 on a ticket-granting ticket was successful. It also might cover all
3068 servers for a realm, or just the particular server. Some
3069 implementations may display this information to the user to aid in
3070 discovering unauthorized use of one's identity. It is similar in
3071 spirit to the last login time displayed when logging into timesharing
3073 Neuman, Ts'o, Kohl Expires: 18 May 1999
3076 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3081 This field is described above in section 5.4.1.
3083 The key-expiration field is part of the response from the KDC and
3084 specifies the time that the client's secret key is due to expire. The
3085 expiration might be the result of password aging or an account
3086 expiration. This field will usually be left out of the TGS reply since
3087 the response to the TGS request is encrypted in a session key and no
3088 client information need be retrieved from the KDC database. It is up
3089 to the application client (usually the login program) to take
3090 appropriate action (such as notifying the user) if the expiration time
3092 flags, authtime, starttime, endtime, renew-till and caddr
3093 These fields are duplicates of those found in the encrypted portion of
3094 the attached ticket (see section 5.3.1), provided so the client may
3095 verify they match the intended request and to assist in proper ticket
3096 caching. If the message is of type KRB_TGS_REP, the caddr field will
3097 only be filled in if the request was for a proxy or forwarded ticket,
3098 or if the user is substituting a subset of the addresses from the
3099 ticket granting ticket. If the client-requested addresses are not
3100 present or not used, then the addresses contained in the ticket will
3101 be the same as those included in the ticket-granting ticket.
3103 5.5. Client/Server (CS) message specifications
3105 This section specifies the format of the messages used for the
3106 authentication of the client to the application server.
3108 5.5.1. KRB_AP_REQ definition
3110 The KRB_AP_REQ message contains the Kerberos protocol version number, the
3111 message type KRB_AP_REQ, an options field to indicate any options in use,
3112 and the ticket and authenticator themselves. The KRB_AP_REQ message is
3113 often referred to as the 'authentication header'.
3115 AP-REQ ::= [APPLICATION 14] SEQUENCE {
3117 msg-type[1] INTEGER,
3118 ap-options[2] APOptions,
3120 authenticator[4] EncryptedData
3123 APOptions ::= BIT STRING {
3132 These fields are described above in section 5.4.1. msg-type is
3135 This field appears in the application request (KRB_AP_REQ) and affects
3136 the way the request is processed. It is a bit-field, where the
3137 selected options are indicated by the bit being set (1), and the
3139 Neuman, Ts'o, Kohl Expires: 18 May 1999
3142 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3145 unselected options and reserved fields being reset (0). The encoding
3146 of the bits is specified in section 5.2. The meanings of the options
3149 Bit(s) Name Description
3152 Reserved for future expansion of
3157 The USE-SESSION-KEY option
3159 that the ticket the client is
3161 to a server is encrypted in the
3163 key from the server's
3165 ticket. When this option is not
3167 fied, the ticket is encrypted in
3169 server's secret key.
3172 The MUTUAL-REQUIRED option tells
3174 server that the client requires
3176 authentication, and that it must
3178 with a KRB_AP_REP message.
3181 Reserved for future use.
3184 This field is a ticket authenticating the client to the server.
3186 This contains the authenticator, which includes the client's choice of
3187 a subkey. Its encoding is described in section 5.3.2.
3189 5.5.2. KRB_AP_REP definition
3191 The KRB_AP_REP message contains the Kerberos protocol version number, the
3192 message type, and an encrypted time- stamp. The message is sent in in
3193 response to an application request (KRB_AP_REQ) where the mutual
3194 authentication option has been selected in the ap-options field.
3196 AP-REP ::= [APPLICATION 15] SEQUENCE {
3198 msg-type[1] INTEGER,
3199 enc-part[2] EncryptedData
3202 EncAPRepPart ::= [APPLICATION 27[29]] SEQUENCE {
3203 ctime[0] KerberosTime,
3205 subkey[2] EncryptionKey OPTIONAL,
3206 seq-number[3] INTEGER OPTIONAL
3209 The encoded EncAPRepPart is encrypted in the shared session key of the
3210 ticket. The optional subkey field can be used in an application-arranged
3211 negotiation to choose a per association session key.
3215 Neuman, Ts'o, Kohl Expires: 18 May 1999
3218 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3221 These fields are described above in section 5.4.1. msg-type is
3224 This field is described above in section 5.4.2.
3226 This field contains the current time on the client's host.
3228 This field contains the microsecond part of the client's timestamp.
3230 This field contains an encryption key which is to be used to protect
3231 this specific application session. See section 3.2.6 for specifics on
3232 how this field is used to negotiate a key. Unless an application
3233 specifies otherwise, if this field is left out, the sub-session key
3234 from the authenticator, or if also left out, the session key from the
3235 ticket will be used.
3237 5.5.3. Error message reply
3239 If an error occurs while processing the application request, the KRB_ERROR
3240 message will be sent in response. See section 5.9.1 for the format of the
3241 error message. The cname and crealm fields may be left out if the server
3242 cannot determine their appropriate values from the corresponding KRB_AP_REQ
3243 message. If the authenticator was decipherable, the ctime and cusec fields
3244 will contain the values from it.
3246 5.6. KRB_SAFE message specification
3248 This section specifies the format of a message that can be used by either
3249 side (client or server) of an application to send a tamper-proof message to
3250 its peer. It presumes that a session key has previously been exchanged (for
3251 example, by using the KRB_AP_REQ/KRB_AP_REP messages).
3253 5.6.1. KRB_SAFE definition
3255 The KRB_SAFE message contains user data along with a collision-proof
3256 checksum keyed with the last encryption key negotiated via subkeys, or the
3257 session key if no negotiation has occured. The message fields are:
3259 KRB-SAFE ::= [APPLICATION 20] SEQUENCE {
3261 msg-type[1] INTEGER,
3262 safe-body[2] KRB-SAFE-BODY,
3266 KRB-SAFE-BODY ::= SEQUENCE {
3267 user-data[0] OCTET STRING,
3268 timestamp[1] KerberosTime OPTIONAL,
3269 usec[2] INTEGER OPTIONAL,
3270 seq-number[3] INTEGER OPTIONAL,
3271 s-address[4] HostAddress OPTIONAL,
3272 r-address[5] HostAddress OPTIONAL
3276 These fields are described above in section 5.4.1. msg-type is
3279 This field is a placeholder for the body of the KRB-SAFE message.
3281 Neuman, Ts'o, Kohl Expires: 18 May 1999
3284 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3288 This field contains the checksum of the application data. Checksum
3289 details are described in section 6.4. The checksum is computed over
3290 the encoding of the KRB-SAFE sequence. First, the cksum is zeroed and
3291 the checksum is computed over the encoding of the KRB-SAFE sequence,
3292 then the checksum is set to the result of that computation, and
3293 finally the KRB-SAFE sequence is encoded again.
3295 This field is part of the KRB_SAFE and KRB_PRIV messages and contain
3296 the application specific data that is being passed from the sender to
3299 This field is part of the KRB_SAFE and KRB_PRIV messages. Its contents
3300 are the current time as known by the sender of the message. By
3301 checking the timestamp, the recipient of the message is able to make
3302 sure that it was recently generated, and is not a replay.
3304 This field is part of the KRB_SAFE and KRB_PRIV headers. It contains
3305 the microsecond part of the timestamp.
3307 This field is described above in section 5.3.2.
3309 This field specifies the address in use by the sender of the message.
3311 This field specifies the address in use by the recipient of the
3312 message. It may be omitted for some uses (such as broadcast
3313 protocols), but the recipient may arbitrarily reject such messages.
3314 This field along with s-address can be used to help detect messages
3315 which have been incorrectly or maliciously delivered to the wrong
3318 5.7. KRB_PRIV message specification
3320 This section specifies the format of a message that can be used by either
3321 side (client or server) of an application to securely and privately send a
3322 message to its peer. It presumes that a session key has previously been
3323 exchanged (for example, by using the KRB_AP_REQ/KRB_AP_REP messages).
3325 5.7.1. KRB_PRIV definition
3327 The KRB_PRIV message contains user data encrypted in the Session Key. The
3330 KRB-PRIV ::= [APPLICATION 21] SEQUENCE {
3332 msg-type[1] INTEGER,
3333 enc-part[3] EncryptedData
3336 EncKrbPrivPart ::= [APPLICATION 28[31]] SEQUENCE {
3337 user-data[0] OCTET STRING,
3338 timestamp[1] KerberosTime OPTIONAL,
3339 usec[2] INTEGER OPTIONAL,
3340 seq-number[3] INTEGER OPTIONAL,
3341 s-address[4] HostAddress OPTIONAL, -- sender's
3343 r-address[5] HostAddress OPTIONAL -- recip's
3349 Neuman, Ts'o, Kohl Expires: 18 May 1999
3352 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3355 These fields are described above in section 5.4.1. msg-type is
3358 This field holds an encoding of the EncKrbPrivPart sequence encrypted
3359 under the session key[32]. This encrypted encoding is used for the
3360 enc-part field of the KRB-PRIV message. See section 6 for the format
3362 user-data, timestamp, usec, s-address and r-address
3363 These fields are described above in section 5.6.1.
3365 This field is described above in section 5.3.2.
3367 5.8. KRB_CRED message specification
3369 This section specifies the format of a message that can be used to send
3370 Kerberos credentials from one principal to another. It is presented here to
3371 encourage a common mechanism to be used by applications when forwarding
3372 tickets or providing proxies to subordinate servers. It presumes that a
3373 session key has already been exchanged perhaps by using the
3374 KRB_AP_REQ/KRB_AP_REP messages.
3376 5.8.1. KRB_CRED definition
3378 The KRB_CRED message contains a sequence of tickets to be sent and
3379 information needed to use the tickets, including the session key from each.
3380 The information needed to use the tickets is encrypted under an encryption
3381 key previously exchanged or transferred alongside the KRB_CRED message. The
3384 KRB-CRED ::= [APPLICATION 22] SEQUENCE {
3386 msg-type[1] INTEGER, -- KRB_CRED
3387 tickets[2] SEQUENCE OF Ticket,
3388 enc-part[3] EncryptedData
3391 EncKrbCredPart ::= [APPLICATION 29] SEQUENCE {
3392 ticket-info[0] SEQUENCE OF KrbCredInfo,
3393 nonce[1] INTEGER OPTIONAL,
3394 timestamp[2] KerberosTime OPTIONAL,
3395 usec[3] INTEGER OPTIONAL,
3396 s-address[4] HostAddress OPTIONAL,
3397 r-address[5] HostAddress OPTIONAL
3400 KrbCredInfo ::= SEQUENCE {
3401 key[0] EncryptionKey,
3402 prealm[1] Realm OPTIONAL,
3403 pname[2] PrincipalName OPTIONAL,
3404 flags[3] TicketFlags OPTIONAL,
3405 authtime[4] KerberosTime OPTIONAL,
3406 starttime[5] KerberosTime OPTIONAL,
3407 endtime[6] KerberosTime OPTIONAL
3408 renew-till[7] KerberosTime OPTIONAL,
3409 srealm[8] Realm OPTIONAL,
3410 sname[9] PrincipalName OPTIONAL,
3411 caddr[10] HostAddresses OPTIONAL
3415 Neuman, Ts'o, Kohl Expires: 18 May 1999
3418 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3422 These fields are described above in section 5.4.1. msg-type is
3425 These are the tickets obtained from the KDC specifically for use by
3426 the intended recipient. Successive tickets are paired with the
3427 corresponding KrbCredInfo sequence from the enc-part of the KRB-CRED
3430 This field holds an encoding of the EncKrbCredPart sequence encrypted
3431 under the session key shared between the sender and the intended
3432 recipient. This encrypted encoding is used for the enc-part field of
3433 the KRB-CRED message. See section 6 for the format of the ciphertext.
3435 If practical, an application may require the inclusion of a nonce
3436 generated by the recipient of the message. If the same value is
3437 included as the nonce in the message, it provides evidence that the
3438 message is fresh and has not been replayed by an attacker. A nonce
3439 must never be re-used; it should be generated randomly by the
3440 recipient of the message and provided to the sender of the message in
3441 an application specific manner.
3443 These fields specify the time that the KRB-CRED message was generated.
3444 The time is used to provide assurance that the message is fresh.
3445 s-address and r-address
3446 These fields are described above in section 5.6.1. They are used
3447 optionally to provide additional assurance of the integrity of the
3450 This field exists in the corresponding ticket passed by the KRB-CRED
3451 message and is used to pass the session key from the sender to the
3452 intended recipient. The field's encoding is described in section 6.2.
3454 The following fields are optional. If present, they can be associated with
3455 the credentials in the remote ticket file. If left out, then it is assumed
3456 that the recipient of the credentials already knows their value.
3459 The name and realm of the delegated principal identity.
3460 flags, authtime, starttime, endtime, renew-till, srealm, sname, and caddr
3461 These fields contain the values of the correspond- ing fields from the
3462 ticket found in the ticket field. Descriptions of the fields are
3463 identical to the descriptions in the KDC-REP message.
3465 5.9. Error message specification
3467 This section specifies the format for the KRB_ERROR message. The fields
3468 included in the message are intended to return as much information as
3469 possible about an error. It is not expected that all the information
3470 required by the fields will be available for all types of errors. If the
3471 appropriate information is not available when the message is composed, the
3472 corresponding field will be left out of the message.
3474 Note that since the KRB_ERROR message is not protected by any encryption,
3475 it is quite possible for an intruder to synthesize or modify such a
3476 message. In particular, this means that the client should not use any
3477 fields in this message for security-critical purposes, such as setting a
3478 system clock or generating a fresh authenticator. The message can be
3479 useful, however, for advising a user on the reason for some failure.
3481 Neuman, Ts'o, Kohl Expires: 18 May 1999
3484 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3488 5.9.1. KRB_ERROR definition
3490 The KRB_ERROR message consists of the following fields:
3492 KRB-ERROR ::= [APPLICATION 30] SEQUENCE {
3494 msg-type[1] INTEGER,
3495 ctime[2] KerberosTime OPTIONAL,
3496 cusec[3] INTEGER OPTIONAL,
3497 stime[4] KerberosTime,
3499 error-code[6] INTEGER,
3500 crealm[7] Realm OPTIONAL,
3501 cname[8] PrincipalName OPTIONAL,
3502 realm[9] Realm, -- Correct realm
3503 sname[10] PrincipalName, -- Correct name
3504 e-text[11] GeneralString OPTIONAL,
3505 e-data[12] OCTET STRING OPTIONAL,
3506 e-cksum[13] Checksum OPTIONAL,
3507 e-typed-data[14] SEQUENCE of ETypedData
3511 ETypedData ::= SEQUENCE {
3512 e-data-type [1] INTEGER,
3513 e-data-value [2] OCTET STRING,
3519 These fields are described above in section 5.4.1. msg-type is
3522 This field is described above in section 5.4.1.
3524 This field is described above in section 5.5.2.
3526 This field contains the current time on the server. It is of type
3529 This field contains the microsecond part of the server's timestamp.
3530 Its value ranges from 0 to 999999. It appears along with stime. The
3531 two fields are used in conjunction to specify a reasonably accurate
3534 This field contains the error code returned by Kerberos or the server
3535 when a request fails. To interpret the value of this field see the
3536 list of error codes in section 8. Implementations are encouraged to
3537 provide for national language support in the display of error
3539 crealm, cname, srealm and sname
3540 These fields are described above in section 5.3.1.
3542 This field contains additional text to help explain the error code
3543 associated with the failed request (for example, it might include a
3544 principal name which was unknown).
3546 This field contains additional data about the error for use by the
3548 Neuman, Ts'o, Kohl Expires: 18 May 1999
3551 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3554 application to help it recover from or handle the error. If the
3555 errorcode is KDC_ERR_PREAUTH_REQUIRED, then the e-data field will
3556 contain an encoding of a sequence of padata fields, each corresponding
3557 to an acceptable pre-authentication method and optionally containing
3558 data for the method:
3560 METHOD-DATA ::= SEQUENCE of PA-DATA
3562 If the error-code is KRB_AP_ERR_METHOD, then the e-data field will
3563 contain an encoding of the following sequence:
3565 METHOD-DATA ::= SEQUENCE {
3566 method-type[0] INTEGER,
3567 method-data[1] OCTET STRING OPTIONAL
3570 method-type will indicate the required alternate method; method-data
3571 will contain any required additional information.
3573 This field contains an optional checksum for the KRB-ERROR message.
3574 The checksum is calculated over the Kerberos ASN.1 encoding of the
3575 KRB-ERROR message with the checksum absent. The checksum is then added
3576 to the KRB-ERROR structure and the message is re-encoded. The Checksum
3577 should be calculated using the session key from the ticket granting
3578 ticket or service ticket, where available. If the error is in response
3579 to a TGS or AP request, the checksum should be calculated uing the the
3580 session key from the client's ticket. If the error is in response to
3581 an AS request, then the checksum should be calulated using the
3582 client's secret key ONLY if there has been suitable preauthentication
3583 to prove knowledge of the secret key by the client[33]. If a checksum
3584 can not be computed because the key to be used is not available, no
3585 checksum will be included.
3587 [This field for discussion, may be deleted from final spec] This field
3588 contains optional data that may be used to help the client recover
3589 from the indicated error. [This could contain the METHOD-DATA
3590 specified since I don't think anyone actually uses it yet. It could
3591 also contain the PA-DATA sequence for the preauth required error if we
3592 had a clear way to transition to the use of this field from the use of
3593 the untype e-data field.] For example, this field may specify the key
3594 version of the key used to verify preauthentication:
3596 e-data-type := 20 -- Key version number
3597 e-data-value := Integer -- Key version number used to verify
3600 6. Encryption and Checksum Specifications
3602 The Kerberos protocols described in this document are designed to use
3603 stream encryption ciphers, which can be simulated using commonly available
3604 block encryption ciphers, such as the Data Encryption Standard, [DES77] in
3605 conjunction with block chaining and checksum methods [DESM80]. Encryption
3606 is used to prove the identities of the network entities participating in
3607 message exchanges. The Key Distribution Center for each realm is trusted by
3608 all principals registered in that realm to store a secret key in
3609 confidence. Proof of knowledge of this secret key is used to verify the
3610 authenticity of a principal.
3612 The KDC uses the principal's secret key (in the AS exchange) or a shared
3613 session key (in the TGS exchange) to encrypt responses to ticket requests;
3615 Neuman, Ts'o, Kohl Expires: 18 May 1999
3618 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3621 the ability to obtain the secret key or session key implies the knowledge
3622 of the appropriate keys and the identity of the KDC. The ability of a
3623 principal to decrypt the KDC response and present a Ticket and a properly
3624 formed Authenticator (generated with the session key from the KDC response)
3625 to a service verifies the identity of the principal; likewise the ability
3626 of the service to extract the session key from the Ticket and prove its
3627 knowledge thereof in a response verifies the identity of the service.
3629 The Kerberos protocols generally assume that the encryption used is secure
3630 from cryptanalysis; however, in some cases, the order of fields in the
3631 encrypted portions of messages are arranged to minimize the effects of
3632 poorly chosen keys. It is still important to choose good keys. If keys are
3633 derived from user-typed passwords, those passwords need to be well chosen
3634 to make brute force attacks more difficult. Poorly chosen keys still make
3635 easy targets for intruders.
3637 The following sections specify the encryption and checksum mechanisms
3638 currently defined for Kerberos. The encodings, chaining, and padding
3639 requirements for each are described. For encryption methods, it is often
3640 desirable to place random information (often referred to as a confounder)
3641 at the start of the message. The requirements for a confounder are
3642 specified with each encryption mechanism.
3644 Some encryption systems use a block-chaining method to improve the the
3645 security characteristics of the ciphertext. However, these chaining methods
3646 often don't provide an integrity check upon decryption. Such systems (such
3647 as DES in CBC mode) must be augmented with a checksum of the plain-text
3648 which can be verified at decryption and used to detect any tampering or
3649 damage. Such checksums should be good at detecting burst errors in the
3650 input. If any damage is detected, the decryption routine is expected to
3651 return an error indicating the failure of an integrity check. Each
3652 encryption type is expected to provide and verify an appropriate checksum.
3653 The specification of each encryption method sets out its checksum
3656 Finally, where a key is to be derived from a user's password, an algorithm
3657 for converting the password to a key of the appropriate type is included.
3658 It is desirable for the string to key function to be one-way, and for the
3659 mapping to be different in different realms. This is important because
3660 users who are registered in more than one realm will often use the same
3661 password in each, and it is desirable that an attacker compromising the
3662 Kerberos server in one realm not obtain or derive the user's key in
3665 For an discussion of the integrity characteristics of the candidate
3666 encryption and checksum methods considered for Kerberos, the the reader is
3669 6.1. Encryption Specifications
3671 The following ASN.1 definition describes all encrypted messages. The
3672 enc-part field which appears in the unencrypted part of messages in section
3673 5 is a sequence consisting of an encryption type, an optional key version
3674 number, and the ciphertext.
3676 EncryptedData ::= SEQUENCE {
3677 etype[0] INTEGER, -- EncryptionType
3678 kvno[1] INTEGER OPTIONAL,
3679 cipher[2] OCTET STRING -- ciphertext
3681 Neuman, Ts'o, Kohl Expires: 18 May 1999
3684 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3692 This field identifies which encryption algorithm was used to encipher
3693 the cipher. Detailed specifications for selected encryption types
3694 appear later in this section.
3696 This field contains the version number of the key under which data is
3697 encrypted. It is only present in messages encrypted under long lasting
3698 keys, such as principals' secret keys.
3700 This field contains the enciphered text, encoded as an OCTET STRING.
3702 The cipher field is generated by applying the specified encryption
3703 algorithm to data composed of the message and algorithm-specific inputs.
3704 Encryption mechanisms defined for use with Kerberos must take sufficient
3705 measures to guarantee the integrity of the plaintext, and we recommend they
3706 also take measures to protect against precomputed dictionary attacks. If
3707 the encryption algorithm is not itself capable of doing so, the protections
3708 can often be enhanced by adding a checksum and a confounder.
3710 The suggested format for the data to be encrypted includes a confounder, a
3711 checksum, the encoded plaintext, and any necessary padding. The msg-seq
3712 field contains the part of the protocol message described in section 5
3713 which is to be encrypted. The confounder, checksum, and padding are all
3714 untagged and untyped, and their length is exactly sufficient to hold the
3715 appropriate item. The type and length is implicit and specified by the
3716 particular encryption type being used (etype). The format for the data to
3717 be encrypted is described in the following diagram:
3719 +-----------+----------+-------------+-----+
3720 |confounder | check | msg-seq | pad |
3721 +-----------+----------+-------------+-----+
3723 The format cannot be described in ASN.1, but for those who prefer an
3724 ASN.1-like notation:
3726 CipherText ::= ENCRYPTED SEQUENCE {
3727 confounder[0] UNTAGGED[35] OCTET STRING(conf_length) OPTIONAL,
3728 check[1] UNTAGGED OCTET STRING(checksum_length) OPTIONAL,
3729 msg-seq[2] MsgSequence,
3730 pad UNTAGGED OCTET STRING(pad_length) OPTIONAL
3733 One generates a random confounder of the appropriate length, placing it in
3734 confounder; zeroes out check; calculates the appropriate checksum over
3735 confounder, check, and msg-seq, placing the result in check; adds the
3736 necessary padding; then encrypts using the specified encryption type and
3737 the appropriate key.
3739 Unless otherwise specified, a definition of an encryption algorithm that
3740 specifies a checksum, a length for the confounder field, or an octet
3741 boundary for padding uses this ciphertext format[36]. Those fields which
3742 are not specified will be omitted.
3744 In the interest of allowing all implementations using a particular
3745 encryption type to communicate with all others using that type, the
3747 Neuman, Ts'o, Kohl Expires: 18 May 1999
3750 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3753 specification of an encryption type defines any checksum that is needed as
3754 part of the encryption process. If an alternative checksum is to be used, a
3755 new encryption type must be defined.
3757 Some cryptosystems require additional information beyond the key and the
3758 data to be encrypted. For example, DES, when used in cipher-block-chaining
3759 mode, requires an initialization vector. If required, the description for
3760 each encryption type must specify the source of such additional
3761 information. 6.2. Encryption Keys
3763 The sequence below shows the encoding of an encryption key:
3765 EncryptionKey ::= SEQUENCE {
3767 keyvalue[1] OCTET STRING
3771 This field specifies the type of encryption key that follows in the
3772 keyvalue field. It will almost always correspond to the encryption
3773 algorithm used to generate the EncryptedData, though more than one
3774 algorithm may use the same type of key (the mapping is many to one).
3775 This might happen, for example, if the encryption algorithm uses an
3776 alternate checksum algorithm for an integrity check, or a different
3779 This field contains the key itself, encoded as an octet string.
3781 All negative values for the encryption key type are reserved for local use.
3782 All non-negative values are reserved for officially assigned type fields
3783 and interpreta- tions.
3785 6.3. Encryption Systems
3787 6.3.1. The NULL Encryption System (null)
3789 If no encryption is in use, the encryption system is said to be the NULL
3790 encryption system. In the NULL encryption system there is no checksum,
3791 confounder or padding. The ciphertext is simply the plaintext. The NULL Key
3792 is used by the null encryption system and is zero octets in length, with
3795 6.3.2. DES in CBC mode with a CRC-32 checksum (des-cbc-crc)
3797 The des-cbc-crc encryption mode encrypts information under the Data
3798 Encryption Standard [DES77] using the cipher block chaining mode [DESM80].
3799 A CRC-32 checksum (described in ISO 3309 [ISO3309]) is applied to the
3800 confounder and message sequence (msg-seq) and placed in the cksum field.
3801 DES blocks are 8 bytes. As a result, the data to be encrypted (the
3802 concatenation of confounder, checksum, and message) must be padded to an 8
3803 byte boundary before encryption. The details of the encryption of this data
3804 are identical to those for the des-cbc-md5 encryption mode.
3806 Note that, since the CRC-32 checksum is not collision-proof, an attacker
3807 could use a probabilistic chosen-plaintext attack to generate a valid
3808 message even if a confounder is used [SG92]. The use of collision-proof
3809 checksums is recommended for environments where such attacks represent a
3810 significant threat. The use of the CRC-32 as the checksum for ticket or
3811 authenticator is no longer mandated as an interoperability requirement for
3813 Neuman, Ts'o, Kohl Expires: 18 May 1999
3816 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3819 Kerberos Version 5 Specification 1 (See section 9.1 for specific details).
3821 6.3.3. DES in CBC mode with an MD4 checksum (des-cbc-md4)
3823 The des-cbc-md4 encryption mode encrypts information under the Data
3824 Encryption Standard [DES77] using the cipher block chaining mode [DESM80].
3825 An MD4 checksum (described in [MD492]) is applied to the confounder and
3826 message sequence (msg-seq) and placed in the cksum field. DES blocks are 8
3827 bytes. As a result, the data to be encrypted (the concatenation of
3828 confounder, checksum, and message) must be padded to an 8 byte boundary
3829 before encryption. The details of the encryption of this data are identical
3830 to those for the des-cbc-md5 encryption mode.
3832 6.3.4. DES in CBC mode with an MD5 checksum (des-cbc-md5)
3834 The des-cbc-md5 encryption mode encrypts information under the Data
3835 Encryption Standard [DES77] using the cipher block chaining mode [DESM80].
3836 An MD5 checksum (described in [MD5-92].) is applied to the confounder and
3837 message sequence (msg-seq) and placed in the cksum field. DES blocks are 8
3838 bytes. As a result, the data to be encrypted (the concatenation of
3839 confounder, checksum, and message) must be padded to an 8 byte boundary
3842 Plaintext and DES ciphtertext are encoded as blocks of 8 octets which are
3843 concatenated to make the 64-bit inputs for the DES algorithms. The first
3844 octet supplies the 8 most significant bits (with the octet's MSbit used as
3845 the DES input block's MSbit, etc.), the second octet the next 8 bits, ...,
3846 and the eighth octet supplies the 8 least significant bits.
3848 Encryption under DES using cipher block chaining requires an additional
3849 input in the form of an initialization vector. Unless otherwise specified,
3850 zero should be used as the initialization vector. Kerberos' use of DES
3851 requires an 8 octet confounder.
3853 The DES specifications identify some 'weak' and 'semi-weak' keys; those
3854 keys shall not be used for encrypting messages for use in Kerberos.
3855 Additionally, because of the way that keys are derived for the encryption
3856 of checksums, keys shall not be used that yield 'weak' or 'semi-weak' keys
3857 when eXclusive-ORed with the hexadecimal constant F0F0F0F0F0F0F0F0.
3859 A DES key is 8 octets of data, with keytype one (1). This consists of 56
3860 bits of key, and 8 parity bits (one per octet). The key is encoded as a
3861 series of 8 octets written in MSB-first order. The bits within the key are
3862 also encoded in MSB order. For example, if the encryption key is
3863 (B1,B2,...,B7,P1,B8,...,B14,P2,B15,...,B49,P7,B50,...,B56,P8) where
3864 B1,B2,...,B56 are the key bits in MSB order, and P1,P2,...,P8 are the
3865 parity bits, the first octet of the key would be B1,B2,...,B7,P1 (with B1
3866 as the MSbit). [See the FIPS 81 introduction for reference.]
3868 String to key transformation
3870 To generate a DES key from a text string (password), a "salt" is
3871 concatenated to the text string, and then padded with ASCII nulls to an 8
3872 byte boundary. This "salt" is normally the realm and each component of the
3873 principal's name appended. However, sometimes different salts are used ---
3874 for example, when a realm is renamed, or if a user changes her username, or
3875 for compatibility with Kerberos V4 (whose string-to-key algorithm uses a
3876 null string for the salt). This string is then fan-folded and
3877 eXclusive-ORed with itself to form an 8 byte DES key. Before
3879 Neuman, Ts'o, Kohl Expires: 18 May 1999
3882 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3885 eXclusive-ORing a block, every byte is shifted one bit to the left to leave
3886 the lowest bit zero. The key is the "corrected" by correcting the parity on
3887 the key, and if the key matches a 'weak' or 'semi-weak' key as described in
3888 the DES specification, it is eXclusive-ORed with the constant
3889 00000000000000F0. This key is then used to generate a DES CBC checksum on
3890 the initial string (with the salt appended). The result of the CBC checksum
3891 is the "corrected" as described above to form the result which is return as
3892 the key. Pseudocode follows:
3894 name_to_default_salt(realm, name) {
3896 for(each component in name) {
3902 key_correction(key) {
3904 if (is_weak_key_key(key))
3909 string_to_key(string,salt) {
3914 pad(s); /* with nulls to 8 byte boundary */
3915 for(8byteblock in s) {
3921 left shift every byte in 8byteblock one bit;
3922 tempkey = tempkey XOR 8byteblock;
3924 tempkey = key_correction(tempkey);
3925 key = key_correction(DES-CBC-check(s,tempkey));
3929 6.3.5. Triple DES with HMAC-SHA1 Kerberos Encryption Type with Key
3930 Derivation [Horowitz]
3932 NOTE: This description currently refers to documents, the contents of which
3933 might be bettered included by value in this spec. The description below was
3934 provided by Marc Horowitz, and the form in which it will finally appear is
3935 yet to be determined. This description is included in this version of the
3936 draft because it does describe the implemenation ready for use with the MIT
3937 implementation. Note also that the encryption identifier has been left
3938 unspecified here because the value from Marc Horowitz's spec conflicted
3939 with some other impmenentations implemented based on perevious versions of
3942 This encryption type is based on the Triple DES cryptosystem, the HMAC-SHA1
3943 [Krawczyk96] message authentication algorithm, and key derivation for
3945 Neuman, Ts'o, Kohl Expires: 18 May 1999
3948 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
3951 Kerberos V5 [HorowitzB96].
3953 The des3-cbc-hmac-sha1 encryption type has been assigned the value ??. The
3954 hmac-sha1-des3 checksum type has been assigned the value 12.
3956 Encryption Type des3-cbc-hmac-sha1
3958 EncryptedData using this type must be generated as described in
3959 [Horowitz96]. The encryption algorithm is Triple DES in Outer-CBC mode. The
3960 keyed hash algorithm is HMAC-SHA1. Unless otherwise specified, a zero IV
3961 must be used. If the length of the input data is not a multiple of the
3962 block size, zero octets must be used to pad the plaintext to the next
3963 eight-octet boundary. The counfounder must be eight random octets (one
3966 Checksum Type hmac-sha1-des3
3968 Checksums using this type must be generated as described in [Horowitz96].
3969 The keyed hash algorithm is HMAC-SHA1.
3973 The EncryptionKey value is 24 octets long. The 7 most significant bits of
3974 each octet contain key bits, and the least significant bit is the inverse
3975 of the xor of the key bits.
3977 For the purposes of key derivation, the block size is 64 bits, and the key
3978 size is 168 bits. The 168 bits output by key derivation are converted to an
3979 EncryptionKey value as follows. First, the 168 bits are divided into three
3980 groups of 56 bits, which are expanded individually into 64 bits as follows:
3983 9 10 11 12 13 14 15 p
3984 17 18 19 20 21 22 23 p
3985 25 26 27 28 29 30 31 p
3986 33 34 35 36 37 38 39 p
3987 41 42 43 44 45 46 47 p
3988 49 50 51 52 53 54 55 p
3989 56 48 40 32 24 16 8 p
3991 The "p" bits are parity bits computed over the data bits. The output of the
3992 three expansions are concatenated to form the EncryptionKey value.
3994 When the HMAC-SHA1 of a string is computed, the key is used in the
3999 In the Kerberos protocol, cryptographic keys are used in a number of
4000 places. In order to minimize the effect of compromising a key, it is
4001 desirable to use a different key for each of these places. Key derivation
4002 [Horowitz96] can be used to construct different keys for each operation
4003 from the keys transported on the network. For this to be possible, a small
4004 change to the specification is necessary.
4006 This section specifies a profile for the use of key derivation [Horowitz96]
4007 with Kerberos. For each place where a key is used, a ``key usage'' must is
4008 specified for that purpose. The key, key usage, and encryption/checksum
4009 type together describe the transformation from plaintext to ciphertext, or
4011 Neuman, Ts'o, Kohl Expires: 18 May 1999
4014 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4017 plaintext to checksum.
4021 This is a complete list of places keys are used in the kerberos protocol,
4022 with key usage values and RFC 1510 section numbers:
4024 1. AS-REQ PA-ENC-TIMESTAMP padata timestamp, encrypted with the
4025 client key (section 5.4.1)
4026 2. AS-REP Ticket and TGS-REP Ticket (includes tgs session key or
4027 application session key), encrypted with the service key
4029 3. AS-REP encrypted part (includes tgs session key or application
4030 session key), encrypted with the client key (section 5.4.2)
4031 4. TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the tgs
4032 session key (section 5.4.1)
4033 5. TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the tgs
4034 authenticator subkey (section 5.4.1)
4035 6. TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator cksum, keyed
4036 with the tgs session key (sections 5.3.2, 5.4.1)
4037 7. TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator (includes tgs
4038 authenticator subkey), encrypted with the tgs session key
4040 8. TGS-REP encrypted part (includes application session key),
4041 encrypted with the tgs session key (section 5.4.2)
4042 9. TGS-REP encrypted part (includes application session key),
4043 encrypted with the tgs authenticator subkey (section 5.4.2)
4044 10. AP-REQ Authenticator cksum, keyed with the application session
4046 11. AP-REQ Authenticator (includes application authenticator
4047 subkey), encrypted with the application session key (section
4049 12. AP-REP encrypted part (includes application session subkey),
4050 encrypted with the application session key (section 5.5.2)
4051 13. KRB-PRIV encrypted part, encrypted with a key chosen by the
4052 application (section 5.7.1)
4053 14. KRB-CRED encrypted part, encrypted with a key chosen by the
4054 application (section 5.6.1)
4055 15. KRB-SAVE cksum, keyed with a key chosen by the application
4057 18. KRB-ERROR checksum (e-cksum in section 5.9.1)
4058 19. AD-KDCIssued checksum (ad-checksum in appendix B.1)
4059 20. Checksum for Mandatory Ticket Extensions (appendix B.6)
4060 21. Checksum in Authorization Data in Ticket Extensions (appendix B.7)
4062 Key usage values between 1024 and 2047 (inclusive) are reserved for
4063 application use. Applications should use even values for encryption and odd
4064 values for checksums within this range.
4066 A few of these key usages need a little clarification. A service which
4067 receives an AP-REQ has no way to know if the enclosed Ticket was part of an
4068 AS-REP or TGS-REP. Therefore, key usage 2 must always be used for
4069 generating a Ticket, whether it is in response to an AS- REQ or TGS-REQ.
4071 There might exist other documents which define protocols in terms of the
4072 RFC1510 encryption types or checksum types. Such documents would not know
4073 about key usages. In order that these documents continue to be meaningful
4074 until they are updated, key usages 1024 and 1025 must be used to derive
4075 keys for encryption and checksums, respectively. New protocols defined in
4077 Neuman, Ts'o, Kohl Expires: 18 May 1999
4080 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4083 terms of the Kerberos encryption and checksum types should use their own
4084 key usages. Key usages may be registered with IANA to avoid conflicts. Key
4085 usages must be unsigned 32 bit integers. Zero is not permitted.
4087 Defining Cryptosystems Using Key Derivation
4089 Kerberos requires that the ciphertext component of EncryptedData be
4090 tamper-resistant as well as confidential. This implies encryption and
4091 integrity functions, which must each use their own separate keys. So, for
4092 each key usage, two keys must be generated, one for encryption (Ke), and
4093 one for integrity (Ki):
4095 Ke = DK(protocol key, key usage | 0xAA)
4096 Ki = DK(protocol key, key usage | 0x55)
4098 where the protocol key is from the EncryptionKey from the wire protocol,
4099 and the key usage is represented as a 32 bit integer in network byte order.
4100 The ciphertest must be generated from the plaintext as follows:
4102 ciphertext = E(Ke, confounder | plaintext | padding) |
4103 H(Ki, confounder | plaintext | padding)
4105 The confounder and padding are specific to the encryption algorithm E.
4107 When generating a checksum only, there is no need for a confounder or
4108 padding. Again, a new key (Kc) must be used. Checksums must be generated
4109 from the plaintext as follows:
4111 Kc = DK(protocol key, key usage | 0x99)
4113 MAC = H(Kc, plaintext)
4115 Note that each enctype is described by an encryption algorithm E and a
4116 keyed hash algorithm H, and each checksum type is described by a keyed hash
4117 algorithm H. HMAC, with an appropriate hash, is recommended for use as H.
4119 Key Derivation from Passwords
4121 The well-known constant for password key derivation must be the byte string
4122 {0x6b 0x65 0x72 0x62 0x65 0x72 0x6f 0x73}. These values correspond to the
4123 ASCII encoding for the string "kerberos".
4127 The following is the ASN.1 definition used for a checksum:
4129 Checksum ::= SEQUENCE {
4130 cksumtype[0] INTEGER,
4131 checksum[1] OCTET STRING
4135 This field indicates the algorithm used to generate the accompanying
4138 This field contains the checksum itself, encoded as an octet string.
4140 Detailed specification of selected checksum types appear later in this
4141 section. Negative values for the checksum type are reserved for local use.
4143 Neuman, Ts'o, Kohl Expires: 18 May 1999
4146 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4149 All non-negative values are reserved for officially assigned type fields
4150 and interpretations.
4152 Checksums used by Kerberos can be classified by two properties: whether
4153 they are collision-proof, and whether they are keyed. It is infeasible to
4154 find two plaintexts which generate the same checksum value for a
4155 collision-proof checksum. A key is required to perturb or initialize the
4156 algorithm in a keyed checksum. To prevent message-stream modification by an
4157 active attacker, unkeyed checksums should only be used when the checksum
4158 and message will be subsequently encrypted (e.g. the checksums defined as
4159 part of the encryption algorithms covered earlier in this section).
4161 Collision-proof checksums can be made tamper-proof if the checksum value is
4162 encrypted before inclusion in a message. In such cases, the composition of
4163 the checksum and the encryption algorithm must be considered a separate
4164 checksum algorithm (e.g. RSA-MD5 encrypted using DES is a new checksum
4165 algorithm of type RSA-MD5-DES). For most keyed checksums, as well as for
4166 the encrypted forms of unkeyed collision-proof checksums, Kerberos prepends
4167 a confounder before the checksum is calculated.
4169 6.4.1. The CRC-32 Checksum (crc32)
4171 The CRC-32 checksum calculates a checksum based on a cyclic redundancy
4172 check as described in ISO 3309 [ISO3309]. The resulting checksum is four
4173 (4) octets in length. The CRC-32 is neither keyed nor collision-proof. The
4174 use of this checksum is not recommended. An attacker using a probabilistic
4175 chosen-plaintext attack as described in [SG92] might be able to generate an
4176 alternative message that satisfies the checksum. The use of collision-proof
4177 checksums is recommended for environments where such attacks represent a
4180 6.4.2. The RSA MD4 Checksum (rsa-md4)
4182 The RSA-MD4 checksum calculates a checksum using the RSA MD4 algorithm
4183 [MD4-92]. The algorithm takes as input an input message of arbitrary length
4184 and produces as output a 128-bit (16 octet) checksum. RSA-MD4 is believed
4185 to be collision-proof.
4187 6.4.3. RSA MD4 Cryptographic Checksum Using DES (rsa-md4-des)
4189 The RSA-MD4-DES checksum calculates a keyed collision-proof checksum by
4190 prepending an 8 octet confounder before the text, applying the RSA MD4
4191 checksum algorithm, and encrypting the confounder and the checksum using
4192 DES in cipher-block-chaining (CBC) mode using a variant of the key, where
4193 the variant is computed by eXclusive-ORing the key with the constant
4194 F0F0F0F0F0F0F0F0[39]. The initialization vector should be zero. The
4195 resulting checksum is 24 octets long (8 octets of which are redundant).
4196 This checksum is tamper-proof and believed to be collision-proof.
4198 The DES specifications identify some weak keys' and 'semi-weak keys'; those
4199 keys shall not be used for generating RSA-MD4 checksums for use in
4202 The format for the checksum is described in the follow- ing diagram:
4204 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4205 | des-cbc(confounder + rsa-md4(confounder+msg),key=var(key),iv=0) |
4206 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4209 Neuman, Ts'o, Kohl Expires: 18 May 1999
4212 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4215 The format cannot be described in ASN.1, but for those who prefer an
4216 ASN.1-like notation:
4218 rsa-md4-des-checksum ::= ENCRYPTED UNTAGGED SEQUENCE {
4219 confounder[0] UNTAGGED OCTET STRING(8),
4220 check[1] UNTAGGED OCTET STRING(16)
4223 6.4.4. The RSA MD5 Checksum (rsa-md5)
4225 The RSA-MD5 checksum calculates a checksum using the RSA MD5 algorithm.
4226 [MD5-92]. The algorithm takes as input an input message of arbitrary length
4227 and produces as output a 128-bit (16 octet) checksum. RSA-MD5 is believed
4228 to be collision-proof.
4230 6.4.5. RSA MD5 Cryptographic Checksum Using DES (rsa-md5-des)
4232 The RSA-MD5-DES checksum calculates a keyed collision-proof checksum by
4233 prepending an 8 octet confounder before the text, applying the RSA MD5
4234 checksum algorithm, and encrypting the confounder and the checksum using
4235 DES in cipher-block-chaining (CBC) mode using a variant of the key, where
4236 the variant is computed by eXclusive-ORing the key with the hexadecimal
4237 constant F0F0F0F0F0F0F0F0. The initialization vector should be zero. The
4238 resulting checksum is 24 octets long (8 octets of which are redundant).
4239 This checksum is tamper-proof and believed to be collision-proof.
4241 The DES specifications identify some 'weak keys' and 'semi-weak keys';
4242 those keys shall not be used for encrypting RSA-MD5 checksums for use in
4245 The format for the checksum is described in the following diagram:
4247 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4248 | des-cbc(confounder + rsa-md5(confounder+msg),key=var(key),iv=0) |
4249 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4251 The format cannot be described in ASN.1, but for those who prefer an
4252 ASN.1-like notation:
4254 rsa-md5-des-checksum ::= ENCRYPTED UNTAGGED SEQUENCE {
4255 confounder[0] UNTAGGED OCTET STRING(8),
4256 check[1] UNTAGGED OCTET STRING(16)
4259 6.4.6. DES cipher-block chained checksum (des-mac)
4261 The DES-MAC checksum is computed by prepending an 8 octet confounder to the
4262 plaintext, performing a DES CBC-mode encryption on the result using the key
4263 and an initialization vector of zero, taking the last block of the
4264 ciphertext, prepending the same confounder and encrypting the pair using
4265 DES in cipher-block-chaining (CBC) mode using a a variant of the key, where
4266 the variant is computed by eXclusive-ORing the key with the hexadecimal
4267 constant F0F0F0F0F0F0F0F0. The initialization vector should be zero. The
4268 resulting checksum is 128 bits (16 octets) long, 64 bits of which are
4269 redundant. This checksum is tamper-proof and collision-proof.
4271 The format for the checksum is described in the following diagram:
4273 +--+--+--+--+--+--+--+--+-----+-----+-----+-----+-----+-----+-----+-----+
4275 Neuman, Ts'o, Kohl Expires: 18 May 1999
4278 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4281 | des-cbc(confounder + des-mac(conf+msg,iv=0,key),key=var(key),iv=0) |
4282 +--+--+--+--+--+--+--+--+-----+-----+-----+-----+-----+-----+-----+-----+
4284 The format cannot be described in ASN.1, but for those who prefer an
4285 ASN.1-like notation:
4287 des-mac-checksum ::= ENCRYPTED UNTAGGED SEQUENCE {
4288 confounder[0] UNTAGGED OCTET STRING(8),
4289 check[1] UNTAGGED OCTET STRING(8)
4292 The DES specifications identify some 'weak' and 'semi-weak' keys; those
4293 keys shall not be used for generating DES-MAC checksums for use in
4294 Kerberos, nor shall a key be used whose variant is 'weak' or 'semi-weak'.
4296 6.4.7. RSA MD4 Cryptographic Checksum Using DES alternative (rsa-md4-des-k)
4298 The RSA-MD4-DES-K checksum calculates a keyed collision-proof checksum by
4299 applying the RSA MD4 checksum algorithm and encrypting the results using
4300 DES in cipher-block-chaining (CBC) mode using a DES key as both key and
4301 initialization vector. The resulting checksum is 16 octets long. This
4302 checksum is tamper-proof and believed to be collision-proof. Note that this
4303 checksum type is the old method for encoding the RSA-MD4-DES checksum and
4304 it is no longer recommended.
4306 6.4.8. DES cipher-block chained checksum alternative (des-mac-k)
4308 The DES-MAC-K checksum is computed by performing a DES CBC-mode encryption
4309 of the plaintext, and using the last block of the ciphertext as the
4310 checksum value. It is keyed with an encryption key and an initialization
4311 vector; any uses which do not specify an additional initialization vector
4312 will use the key as both key and initialization vector. The resulting
4313 checksum is 64 bits (8 octets) long. This checksum is tamper-proof and
4314 collision-proof. Note that this checksum type is the old method for
4315 encoding the DES-MAC checksum and it is no longer recommended. The DES
4316 specifications identify some 'weak keys' and 'semi-weak keys'; those keys
4317 shall not be used for generating DES-MAC checksums for use in Kerberos.
4319 7. Naming Constraints
4323 Although realm names are encoded as GeneralStrings and although a realm can
4324 technically select any name it chooses, interoperability across realm
4325 boundaries requires agreement on how realm names are to be assigned, and
4326 what information they imply.
4328 To enforce these conventions, each realm must conform to the conventions
4329 itself, and it must require that any realms with which inter-realm keys are
4330 shared also conform to the conventions and require the same from its
4333 Kerberos realm names are case sensitive. Realm names that differ only in
4334 the case of the characters are not equivalent. There are presently four
4335 styles of realm names: domain, X500, other, and reserved. Examples of each
4338 domain: ATHENA.MIT.EDU (example)
4339 X500: C=US/O=OSF (example)
4341 Neuman, Ts'o, Kohl Expires: 18 May 1999
4344 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4347 other: NAMETYPE:rest/of.name=without-restrictions (example)
4348 reserved: reserved, but will not conflict with above
4350 Domain names must look like domain names: they consist of components
4351 separated by periods (.) and they contain neither colons (:) nor slashes
4352 (/). Domain names must be converted to upper case when used as realm names.
4354 X.500 names contain an equal (=) and cannot contain a colon (:) before the
4355 equal. The realm names for X.500 names will be string representations of
4356 the names with components separated by slashes. Leading and trailing
4357 slashes will not be included.
4359 Names that fall into the other category must begin with a prefix that
4360 contains no equal (=) or period (.) and the prefix must be followed by a
4361 colon (:) and the rest of the name. All prefixes must be assigned before
4362 they may be used. Presently none are assigned.
4364 The reserved category includes strings which do not fall into the first
4365 three categories. All names in this category are reserved. It is unlikely
4366 that names will be assigned to this category unless there is a very strong
4367 argument for not using the 'other' category.
4369 These rules guarantee that there will be no conflicts between the various
4370 name styles. The following additional constraints apply to the assignment
4371 of realm names in the domain and X.500 categories: the name of a realm for
4372 the domain or X.500 formats must either be used by the organization owning
4373 (to whom it was assigned) an Internet domain name or X.500 name, or in the
4374 case that no such names are registered, authority to use a realm name may
4375 be derived from the authority of the parent realm. For example, if there is
4376 no domain name for E40.MIT.EDU, then the administrator of the MIT.EDU realm
4377 can authorize the creation of a realm with that name.
4379 This is acceptable because the organization to which the parent is assigned
4380 is presumably the organization authorized to assign names to its children
4381 in the X.500 and domain name systems as well. If the parent assigns a realm
4382 name without also registering it in the domain name or X.500 hierarchy, it
4383 is the parent's responsibility to make sure that there will not in the
4384 future exists a name identical to the realm name of the child unless it is
4385 assigned to the same entity as the realm name.
4387 7.2. Principal Names
4389 As was the case for realm names, conventions are needed to ensure that all
4390 agree on what information is implied by a principal name. The name-type
4391 field that is part of the principal name indicates the kind of information
4392 implied by the name. The name-type should be treated as a hint. Ignoring
4393 the name type, no two names can be the same (i.e. at least one of the
4394 components, or the realm, must be different). The following name types are
4397 name-type value meaning
4399 NT-UNKNOWN 0 Name type not known
4400 NT-PRINCIPAL 1 General principal name (e.g. username, or DCE
4402 NT-SRV-INST 2 Service and other unique instance (krbtgt)
4403 NT-SRV-HST 3 Service with host name as instance (telnet,
4405 NT-SRV-XHST 4 Service with slash-separated host name components
4407 NT-X500-PRINCIPAL 6 Encoded X.509 Distingished name [RFC 1779]
4409 Neuman, Ts'o, Kohl Expires: 18 May 1999
4412 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4416 When a name implies no information other than its uniqueness at a
4417 particular time the name type PRINCIPAL should be used. The principal name
4418 type should be used for users, and it might also be used for a unique
4419 server. If the name is a unique machine generated ID that is guaranteed
4420 never to be reassigned then the name type of UID should be used (note that
4421 it is generally a bad idea to reassign names of any type since stale
4422 entries might remain in access control lists).
4424 If the first component of a name identifies a service and the remaining
4425 components identify an instance of the service in a server specified
4426 manner, then the name type of SRV-INST should be used. An example of this
4427 name type is the Kerberos ticket-granting service whose name has a first
4428 component of krbtgt and a second component identifying the realm for which
4429 the ticket is valid.
4431 If instance is a single component following the service name and the
4432 instance identifies the host on which the server is running, then the name
4433 type SRV-HST should be used. This type is typically used for Internet
4434 services such as telnet and the Berkeley R commands. If the separate
4435 components of the host name appear as successive components following the
4436 name of the service, then the name type SRV-XHST should be used. This type
4437 might be used to identify servers on hosts with X.500 names where the slash
4438 (/) might otherwise be ambiguous.
4440 A name type of NT-X500-PRINCIPAL should be used when a name from an X.509
4441 certificiate is translated into a Kerberos name. The encoding of the X.509
4442 name as a Kerberos principal shall conform to the encoding rules specified
4445 A name type of UNKNOWN should be used when the form of the name is not
4446 known. When comparing names, a name of type UNKNOWN will match principals
4447 authenticated with names of any type. A principal authenticated with a name
4448 of type UNKNOWN, however, will only match other names of type UNKNOWN.
4450 Names of any type with an initial component of 'krbtgt' are reserved for
4451 the Kerberos ticket granting service. See section 8.2.3 for the form of
4454 7.2.1. Name of server principals
4456 The principal identifier for a server on a host will generally be composed
4457 of two parts: (1) the realm of the KDC with which the server is registered,
4458 and (2) a two-component name of type NT-SRV-HST if the host name is an
4459 Internet domain name or a multi-component name of type NT-SRV-XHST if the
4460 name of the host is of a form such as X.500 that allows slash (/)
4461 separators. The first component of the two- or multi-component name will
4462 identify the service and the latter components will identify the host.
4463 Where the name of the host is not case sensitive (for example, with
4464 Internet domain names) the name of the host must be lower case. If
4465 specified by the application protocol for services such as telnet and the
4466 Berkeley R commands which run with system privileges, the first component
4467 may be the string 'host' instead of a service specific identifier. When a
4468 host has an official name and one or more aliases, the official name of the
4469 host must be used when constructing the name of the server principal.
4471 8. Constants and other defined values
4473 8.1. Host address types
4475 Neuman, Ts'o, Kohl Expires: 18 May 1999
4478 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4482 All negative values for the host address type are reserved for local use.
4483 All non-negative values are reserved for officially assigned type fields
4484 and interpretations.
4486 The values of the types for the following addresses are chosen to match the
4487 defined address family constants in the Berkeley Standard Distributions of
4488 Unix. They can be found in with symbolic names AF_xxx (where xxx is an
4489 abbreviation of the address family name).
4491 Internet (IPv4) Addresses
4493 Internet (IPv4) addresses are 32-bit (4-octet) quantities, encoded in MSB
4494 order. The type of IPv4 addresses is two (2).
4496 Internet (IPv6) Addresses [Westerlund]
4498 IPv6 addresses are 128-bit (16-octet) quantities, encoded in MSB order. The
4499 type of IPv6 addresses is twenty-four (24). [RFC1883] [RFC1884]. The
4500 following addresses (see [RFC1884]) MUST not appear in any Kerberos packet:
4502 * the Unspecified Address
4503 * the Loopback Address
4504 * Link-Local addresses
4506 IPv4-mapped IPv6 addresses MUST be represented as addresses of type 2.
4510 CHAOSnet addresses are 16-bit (2-octet) quantities, encoded in MSB order.
4511 The type of CHAOSnet addresses is five (5).
4515 ISO addresses are variable-length. The type of ISO addresses is seven (7).
4517 Xerox Network Services (XNS) addresses
4519 XNS addresses are 48-bit (6-octet) quantities, encoded in MSB order. The
4520 type of XNS addresses is six (6).
4522 AppleTalk Datagram Delivery Protocol (DDP) addresses
4524 AppleTalk DDP addresses consist of an 8-bit node number and a 16-bit
4525 network number. The first octet of the address is the node number; the
4526 remaining two octets encode the network number in MSB order. The type of
4527 AppleTalk DDP addresses is sixteen (16).
4529 DECnet Phase IV addresses
4531 DECnet Phase IV addresses are 16-bit addresses, encoded in LSB order. The
4532 type of DECnet Phase IV addresses is twelve (12).
4536 Netbios addresses are 16-octet addresses typically composed of 1 to 15
4537 characters, trailing blank (ascii char 20) filled, with a 16th octet of
4538 0x0. The type of Netbios addresses is 20 (0x14).
4541 Neuman, Ts'o, Kohl Expires: 18 May 1999
4544 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4549 8.2.1. UDP/IP transport
4551 When contacting a Kerberos server (KDC) for a KRB_KDC_REQ request using UDP
4552 IP transport, the client shall send a UDP datagram containing only an
4553 encoding of the request to port 88 (decimal) at the KDC's IP address; the
4554 KDC will respond with a reply datagram containing only an encoding of the
4555 reply message (either a KRB_ERROR or a KRB_KDC_REP) to the sending port at
4556 the sender's IP address. Kerberos servers supporting IP transport must
4557 accept UDP requests on port 88 (decimal). The response to a request made
4558 through UDP/IP transport must also use UDP/IP transport.
4560 8.2.2. TCP/IP transport [Westerlund,Danielsson]
4562 Kerberos servers (KDC's) should accept TCP requests on port 88 (decimal)
4563 and clients should support the sending of TCP requests on port 88
4564 (decimal). When the KRB_KDC_REQ message is sent to the KDC over a TCP
4565 stream, a new connection will be established for each authentication
4566 exchange (request and response). The KRB_KDC_REP or KRB_ERROR message will
4567 be returned to the client on the same TCP stream that was established for
4568 the request. The response to a request made through TCP/IP transport must
4569 also use TCP/IP transport. Implementors should note that some extentions to
4570 the Kerberos protocol will not work if any implementation not supporting
4571 the TCP transport is involved (client or KDC). Implementors are strongly
4572 urged to support the TCP transport on both the client and server and are
4573 advised that the current notation of "should" support will likely change in
4574 the future to must support. The KDC may close the TCP stream after sending
4575 a response, but may leave the stream open if it expects a followup - in
4576 which case it may close the stream at any time if resource constratints or
4577 other factors make it desirable to do so. Care must be taken in managing
4578 TCP/IP connections with the KDC to prevent denial of service attacks based
4579 on the number of TCP/IP connections with the KDC that remain open. If
4580 multiple exchanges with the KDC are needed for certain forms of
4581 preauthentication, multiple TCP connections may be required. A client may
4582 close the stream after receiving response, and should close the stream if
4583 it does not expect to send followup messages. The client must be prepared
4584 to have the stream closed by the KDC at anytime, in which case it must
4585 simply connect again when it is ready to send subsequent messages.
4587 The first four octets of the TCP stream used to transmit the request
4588 request will encode in network byte order the length of the request
4589 (KRB_KDC_REQ), and the length will be followed by the request itself. The
4590 response will similarly be preceeded by a 4 octet encoding in network byte
4591 order of the length of the KRB_KDC_REP or the KRB_ERROR message and will be
4592 followed by the KRB_KDC_REP or the KRB_ERROR response. If the sign bit is
4593 set on integer represented by the first 4 octets, then the next 4 octets
4594 will be read, extending the length of the field by another 4 octets (less 1
4597 8.2.3. OSI transport
4599 During authentication of an OSI client to an OSI server, the mutual
4600 authentication of an OSI server to an OSI client, the transfer of
4601 credentials from an OSI client to an OSI server, or during exchange of
4602 private or integrity checked messages, Kerberos protocol messages may be
4603 treated as opaque objects and the type of the authentication mechanism will
4607 Neuman, Ts'o, Kohl Expires: 18 May 1999
4610 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4613 OBJECT IDENTIFIER ::= {iso (1), org(3), dod(6),internet(1),
4614 security(5),kerberosv5(2)}
4616 Depending on the situation, the opaque object will be an authentication
4617 header (KRB_AP_REQ), an authentication reply (KRB_AP_REP), a safe message
4618 (KRB_SAFE), a private message (KRB_PRIV), or a credentials message
4619 (KRB_CRED). The opaque data contains an application code as specified in
4620 the ASN.1 description for each message. The application code may be used by
4621 Kerberos to determine the message type.
4623 8.2.3. Name of the TGS
4625 The principal identifier of the ticket-granting service shall be composed
4626 of three parts: (1) the realm of the KDC issuing the TGS ticket (2) a
4627 two-part name of type NT-SRV-INST, with the first part "krbtgt" and the
4628 second part the name of the realm which will accept the ticket-granting
4629 ticket. For example, a ticket-granting ticket issued by the ATHENA.MIT.EDU
4630 realm to be used to get tickets from the ATHENA.MIT.EDU KDC has a principal
4631 identifier of "ATHENA.MIT.EDU" (realm), ("krbtgt", "ATHENA.MIT.EDU")
4632 (name). A ticket-granting ticket issued by the ATHENA.MIT.EDU realm to be
4633 used to get tickets from the MIT.EDU realm has a principal identifier of
4634 "ATHENA.MIT.EDU" (realm), ("krbtgt", "MIT.EDU") (name).
4636 8.3. Protocol constants and associated values
4638 The following tables list constants used in the protocol and defines their
4639 meanings. Ranges are specified in the "specification" section that limit
4640 the values of constants for which values are defined here. This allows
4641 implementations to make assumptions about the maximum values that will be
4642 received for these constants. Implementation receiving values outside the
4643 range specified in the "specification" section may reject the request, but
4644 they must recover cleanly.
4646 Encryption type etype value block size minimum pad size confounder
4653 des3-cbc-md5 5 8 0 8
4655 des3-cbc-sha1 7 8 0 8
4656 sign-dsa-generate 8 (pkinit)
4657 encrypt-rsa-priv 9 (pkinit)
4658 encrypt-rsa-pub 10 (pkinit)
4659 rsa-pub-md5 11 (pkinit)
4660 rsa-pub-sha1 12 (pkinit)
4661 des3kd-cbc-sha1 ?? 8 0 8
4662 ENCTYPE_PK_CROSS 48 (reserved for pkcross)
4665 Checksum type sumtype value checksum size
4675 Neuman, Ts'o, Kohl Expires: 18 May 1999
4678 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4682 hmac-sha1-des3 12 20 (I had this as 10, is it
4685 padata type padata-type value
4692 PA-SANDIA-SECUREID 6
4695 PA-CYBERSAFE-SECUREID 9
4698 SAM-CHALLENGE 12 (sam/otp)
4699 SAM-RESPONSE 13 (sam/otp)
4700 PA-PK-AS-REQ 14 (pkinit)
4701 PA-PK-AS-REP 15 (pkinit)
4702 PA-PK-AS-SIGN 16 (pkinit)
4703 PA-PK-KEY-REQ 17 (pkinit)
4704 PA-PK-KEY-REP 18 (pkinit)
4705 PA-USE-SPECIFIED-KVNO 20
4707 authorization data type ad-type value
4709 AD-INTENDED-FOR-SERVER 2
4710 AD-INTENDED-FOR-APPLICATION-CLASS 3
4713 AD-MANDATORY-TICKET-EXTENSIONS 6
4714 AD-IN-TICKET-EXTENSIONS 7
4715 reserved values 8-63
4719 Ticket Extension Types
4721 TE-TYPE-NULL 0 Null ticket extension
4722 TE-TYPE-EXTERNAL-ADATA 1 Integrity protected authorization data
4723 2 TE-TYPE-PKCROSS-KDC (I have reservations)
4724 TE-TYPE-PKCROSS-CLIENT 3 PKCROSS cross realm key ticket
4725 TE-TYPE-CYBERSAFE-EXT 4 Assigned to CyberSafe Corp
4726 5 TE-TYPE-DEST-HOST (I have reservations)
4728 alternate authentication type method-type value
4729 reserved values 0-63
4730 ATT-CHALLENGE-RESPONSE 64
4732 transited encoding type tr-type value
4733 DOMAIN-X500-COMPRESS 1
4734 reserved values all others
4736 Label Value Meaning or MIT code
4738 pvno 5 current Kerberos protocol version number
4742 Neuman, Ts'o, Kohl Expires: 18 May 1999
4745 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4749 KRB_AS_REQ 10 Request for initial authentication
4750 KRB_AS_REP 11 Response to KRB_AS_REQ request
4751 KRB_TGS_REQ 12 Request for authentication based on TGT
4752 KRB_TGS_REP 13 Response to KRB_TGS_REQ request
4753 KRB_AP_REQ 14 application request to server
4754 KRB_AP_REP 15 Response to KRB_AP_REQ_MUTUAL
4755 KRB_SAFE 20 Safe (checksummed) application message
4756 KRB_PRIV 21 Private (encrypted) application message
4757 KRB_CRED 22 Private (encrypted) message to forward
4759 KRB_ERROR 30 Error response
4763 KRB_NT_UNKNOWN 0 Name type not known
4764 KRB_NT_PRINCIPAL 1 Just the name of the principal as in DCE, or for
4766 KRB_NT_SRV_INST 2 Service and other unique instance (krbtgt)
4767 KRB_NT_SRV_HST 3 Service with host name as instance (telnet,
4769 KRB_NT_SRV_XHST 4 Service with host as remaining components
4770 KRB_NT_UID 5 Unique ID
4771 KRB_NT_X500_PRINCIPAL 6 Encoded X.509 Distingished name [RFC 2253]
4775 KDC_ERR_NONE 0 No error
4776 KDC_ERR_NAME_EXP 1 Client's entry in database has expired
4777 KDC_ERR_SERVICE_EXP 2 Server's entry in database has expired
4778 KDC_ERR_BAD_PVNO 3 Requested protocol version number not
4780 KDC_ERR_C_OLD_MAST_KVNO 4 Client's key encrypted in old master key
4781 KDC_ERR_S_OLD_MAST_KVNO 5 Server's key encrypted in old master key
4782 KDC_ERR_C_PRINCIPAL_UNKNOWN 6 Client not found in Kerberos database
4783 KDC_ERR_S_PRINCIPAL_UNKNOWN 7 Server not found in Kerberos database
4784 KDC_ERR_PRINCIPAL_NOT_UNIQUE 8 Multiple principal entries in database
4785 KDC_ERR_NULL_KEY 9 The client or server has a null key
4786 KDC_ERR_CANNOT_POSTDATE 10 Ticket not eligible for postdating
4787 KDC_ERR_NEVER_VALID 11 Requested start time is later than end
4789 KDC_ERR_POLICY 12 KDC policy rejects request
4790 KDC_ERR_BADOPTION 13 KDC cannot accommodate requested option
4791 KDC_ERR_ETYPE_NOSUPP 14 KDC has no support for encryption type
4792 KDC_ERR_SUMTYPE_NOSUPP 15 KDC has no support for checksum type
4793 KDC_ERR_PADATA_TYPE_NOSUPP 16 KDC has no support for padata type
4794 KDC_ERR_TRTYPE_NOSUPP 17 KDC has no support for transited type
4795 KDC_ERR_CLIENT_REVOKED 18 Clients credentials have been revoked
4796 KDC_ERR_SERVICE_REVOKED 19 Credentials for server have been revoked
4797 KDC_ERR_TGT_REVOKED 20 TGT has been revoked
4798 KDC_ERR_CLIENT_NOTYET 21 Client not yet valid - try again later
4799 KDC_ERR_SERVICE_NOTYET 22 Server not yet valid - try again later
4800 KDC_ERR_KEY_EXPIRED 23 Password has expired - change password
4802 KDC_ERR_PREAUTH_FAILED 24 Pre-authentication information was
4804 KDC_ERR_PREAUTH_REQUIRED 25 Additional pre-authenticationrequired
4806 KDC_ERR_SERVER_NOMATCH 26 Requested server and ticket don't match
4807 KDC_ERR_MUST_USE_USER2USER 27 Server principal valid for user2user
4809 KDC_ERR_PATH_NOT_ACCPETED 28 KDC Policy rejects transited path
4810 KRB_AP_ERR_BAD_INTEGRITY 31 Integrity check on decrypted field
4812 KRB_AP_ERR_TKT_EXPIRED 32 Ticket expired
4813 KRB_AP_ERR_TKT_NYV 33 Ticket not yet valid
4814 KRB_AP_ERR_REPEAT 34 Request is a replay
4815 KRB_AP_ERR_NOT_US 35 The ticket isn't for us
4816 KRB_AP_ERR_BADMATCH 36 Ticket and authenticator don't match
4818 Neuman, Ts'o, Kohl Expires: 18 May 1999
4821 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4824 KRB_AP_ERR_SKEW 37 Clock skew too great
4825 KRB_AP_ERR_BADADDR 38 Incorrect net address
4826 KRB_AP_ERR_BADVERSION 39 Protocol version mismatch
4827 KRB_AP_ERR_MSG_TYPE 40 Invalid msg type
4828 KRB_AP_ERR_MODIFIED 41 Message stream modified
4829 KRB_AP_ERR_BADORDER 42 Message out of order
4830 KRB_AP_ERR_BADKEYVER 44 Specified version of key is not
4832 KRB_AP_ERR_NOKEY 45 Service key not available
4833 KRB_AP_ERR_MUT_FAIL 46 Mutual authentication failed
4834 KRB_AP_ERR_BADDIRECTION 47 Incorrect message direction
4835 KRB_AP_ERR_METHOD 48 Alternative authentication method
4837 KRB_AP_ERR_BADSEQ 49 Incorrect sequence number in message
4838 KRB_AP_ERR_INAPP_CKSUM 50 Inappropriate type of checksum in
4840 KRB_AP_PATH_NOT_ACCEPTED 51 Policy rejects transited path
4841 KRB_ERR_RESPONSE_TOO_BIG 52 Response too big for UDP, retry with TCP
4842 KRB_ERR_GENERIC 60 Generic error (description in e-text)
4843 KRB_ERR_FIELD_TOOLONG 61 Field is too long for this
4845 KDC_ERROR_CLIENT_NOT_TRUSTED 62 (pkinit)
4846 KDC_ERROR_KDC_NOT_TRUSTED 63 (pkinit)
4847 KDC_ERROR_INVALID_SIG 64 (pkinit)
4848 KDC_ERR_KEY_TOO_WEAK 65 (pkinit)
4849 KDC_ERR_CERTIFICATE_MISMATCH 66 (pkinit)
4851 9. Interoperability requirements
4853 Version 5 of the Kerberos protocol supports a myriad of options. Among
4854 these are multiple encryption and checksum types, alternative encoding
4855 schemes for the transited field, optional mechanisms for
4856 pre-authentication, the handling of tickets with no addresses, options for
4857 mutual authentication, user to user authentication, support for proxies,
4858 forwarding, postdating, and renewing tickets, the format of realm names,
4859 and the handling of authorization data.
4861 In order to ensure the interoperability of realms, it is necessary to
4862 define a minimal configuration which must be supported by all
4863 implementations. This minimal configuration is subject to change as
4864 technology does. For example, if at some later date it is discovered that
4865 one of the required encryption or checksum algorithms is not secure, it
4868 9.1. Specification 2
4870 This section defines the second specification of these options.
4871 Implementations which are configured in this way can be said to support
4872 Kerberos Version 5 Specification 2 (5.1). Specification 1 (depricated) may
4873 be found in RFC1510.
4877 TCP/IP and UDP/IP transport must be supported by KDCs claiming conformance
4878 to specification 2. Kerberos clients claiming conformance to specification
4879 2 must support UDP/IP transport for messages with the KDC and should
4880 support TCP/IP transport.
4882 Encryption and checksum methods
4884 The following encryption and checksum mechanisms must be supported.
4885 Implementations may support other mechanisms as well, but the additional
4886 mechanisms may only be used when communicating with principals known to
4888 Neuman, Ts'o, Kohl Expires: 18 May 1999
4891 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4894 also support them: This list is to be determined.
4896 Encryption: DES-CBC-MD5
4897 Checksums: CRC-32, DES-MAC, DES-MAC-K, and DES-MD5
4901 All implementations must understand hierarchical realms in both the
4902 Internet Domain and the X.500 style. When a ticket granting ticket for an
4903 unknown realm is requested, the KDC must be able to determine the names of
4904 the intermediate realms between the KDCs realm and the requested realm.
4906 Transited field encoding
4908 DOMAIN-X500-COMPRESS (described in section 3.3.3.2) must be supported.
4909 Alternative encodings may be supported, but they may be used only when that
4910 encoding is supported by ALL intermediate realms.
4912 Pre-authentication methods
4914 The TGS-REQ method must be supported. The TGS-REQ method is not used on the
4915 initial request. The PA-ENC-TIMESTAMP method must be supported by clients
4916 but whether it is enabled by default may be determined on a realm by realm
4917 basis. If not used in the initial request and the error
4918 KDC_ERR_PREAUTH_REQUIRED is returned specifying PA-ENC-TIMESTAMP as an
4919 acceptable method, the client should retry the initial request using the
4920 PA-ENC-TIMESTAMP preauthentication method. Servers need not support the
4921 PA-ENC-TIMESTAMP method, but if not supported the server should ignore the
4922 presence of PA-ENC-TIMESTAMP pre-authentication in a request.
4924 Mutual authentication
4926 Mutual authentication (via the KRB_AP_REP message) must be supported.
4928 Ticket addresses and flags
4930 All KDC's must pass on tickets that carry no addresses (i.e. if a TGT
4931 contains no addresses, the KDC will return derivative tickets), but each
4932 realm may set its own policy for issuing such tickets, and each application
4933 server will set its own policy with respect to accepting them.
4935 Proxies and forwarded tickets must be supported. Individual realms and
4936 application servers can set their own policy on when such tickets will be
4939 All implementations must recognize renewable and postdated tickets, but
4940 need not actually implement them. If these options are not supported, the
4941 starttime and endtime in the ticket shall specify a ticket's entire useful
4942 life. When a postdated ticket is decoded by a server, all implementations
4943 shall make the presence of the postdated flag visible to the calling
4946 User-to-user authentication
4948 Support for user to user authentication (via the ENC-TKT-IN-SKEY KDC
4949 option) must be provided by implementations, but individual realms may
4950 decide as a matter of policy to reject such requests on a per-principal or
4954 Neuman, Ts'o, Kohl Expires: 18 May 1999
4957 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
4962 Implementations must pass all authorization data subfields from
4963 ticket-granting tickets to any derivative tickets unless directed to
4964 suppress a subfield as part of the definition of that registered subfield
4965 type (it is never incorrect to pass on a subfield, and no registered
4966 subfield types presently specify suppression at the KDC).
4968 Implementations must make the contents of any authorization data subfields
4969 available to the server when a ticket is used. Implementations are not
4970 required to allow clients to specify the contents of the authorization data
4975 All protocol constants are constrained to 32 bit (signed) values unless
4976 further constrained by the protocol definition. This limit is provided to
4977 allow implementations to make assumptions about the maximum values that
4978 will be received for these constants. Implementation receiving values
4979 outside this range may reject the request, but they must recover cleanly.
4981 9.2. Recommended KDC values
4983 Following is a list of recommended values for a KDC implementation, based
4984 on the list of suggested configuration constants (see section 4.4).
4986 minimum lifetime 5 minutes
4987 maximum renewable lifetime 1 week
4988 maximum ticket lifetime 1 day
4989 empty addresses only when suitable restrictions appear
4990 in authorization data
4991 proxiable, etc. Allowed.
4995 [NT94] B. Clifford Neuman and Theodore Y. Ts'o, "An Authenti-
4996 cation Service for Computer Networks," IEEE Communica-
4997 tions Magazine, Vol. 32(9), pp. 33-38 (September 1994).
4999 [MNSS87] S. P. Miller, B. C. Neuman, J. I. Schiller, and J. H.
5000 Saltzer, Section E.2.1: Kerberos Authentication and
5001 Authorization System, M.I.T. Project Athena, Cambridge,
5002 Massachusetts (December 21, 1987).
5004 [SNS88] J. G. Steiner, B. C. Neuman, and J. I. Schiller, "Ker-
5005 beros: An Authentication Service for Open Network Sys-
5006 tems," pp. 191-202 in Usenix Conference Proceedings,
5007 Dallas, Texas (February, 1988).
5009 [NS78] Roger M. Needham and Michael D. Schroeder, "Using
5010 Encryption for Authentication in Large Networks of Com-
5011 puters," Communications of the ACM, Vol. 21(12),
5012 pp. 993-999 (December, 1978).
5014 [DS81] Dorothy E. Denning and Giovanni Maria Sacco, "Time-
5015 stamps in Key Distribution Protocols," Communications
5016 of the ACM, Vol. 24(8), pp. 533-536 (August 1981).
5018 [KNT92] John T. Kohl, B. Clifford Neuman, and Theodore Y. Ts'o,
5020 Neuman, Ts'o, Kohl Expires: 18 May 1999
5023 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5026 "The Evolution of the Kerberos Authentication Service,"
5027 in an IEEE Computer Society Text soon to be published
5030 [Neu93] B. Clifford Neuman, "Proxy-Based Authorization and
5031 Accounting for Distributed Systems," in Proceedings of
5032 the 13th International Conference on Distributed Com-
5033 puting Systems, Pittsburgh, PA (May, 1993).
5035 [DS90] Don Davis and Ralph Swick, "Workstation Services and
5036 Kerberos Authentication at Project Athena," Technical
5037 Memorandum TM-424, MIT Laboratory for Computer Science
5040 [LGDSR87] P. J. Levine, M. R. Gretzinger, J. M. Diaz, W. E. Som-
5041 merfeld, and K. Raeburn, Section E.1: Service Manage-
5042 ment System, M.I.T. Project Athena, Cambridge, Mas-
5045 [X509-88] CCITT, Recommendation X.509: The Directory Authentica-
5046 tion Framework, December 1988.
5048 [Pat92]. J. Pato, Using Pre-Authentication to Avoid Password
5049 Guessing Attacks, Open Software Foundation DCE Request
5050 for Comments 26 (December 1992).
5052 [DES77] National Bureau of Standards, U.S. Department of Com-
5053 merce, "Data Encryption Standard," Federal Information
5054 Processing Standards Publication 46, Washington, DC
5057 [DESM80] National Bureau of Standards, U.S. Department of Com-
5058 merce, "DES Modes of Operation," Federal Information
5059 Processing Standards Publication 81, Springfield, VA
5062 [SG92] Stuart G. Stubblebine and Virgil D. Gligor, "On Message
5063 Integrity in Cryptographic Protocols," in Proceedings
5064 of the IEEE Symposium on Research in Security and
5065 Privacy, Oakland, California (May 1992).
5067 [IS3309] International Organization for Standardization, "ISO
5068 Information Processing Systems - Data Communication -
5069 High-Level Data Link Control Procedure - Frame Struc-
5070 ture," IS 3309 (October 1984). 3rd Edition.
5072 [MD4-92] R. Rivest, "The MD4 Message Digest Algorithm," RFC
5073 1320, MIT Laboratory for Computer Science (April
5076 [MD5-92] R. Rivest, "The MD5 Message Digest Algorithm," RFC
5077 1321, MIT Laboratory for Computer Science (April
5080 [KBC96] H. Krawczyk, M. Bellare, and R. Canetti, "HMAC: Keyed-
5081 Hashing for Message Authentication," Working Draft
5082 draft-ietf-ipsec-hmac-md5-01.txt, (August 1996).
5084 [Horowitz96] Horowitz, M., "Key Derivation for Authentication,
5086 Neuman, Ts'o, Kohl Expires: 18 May 1999
5089 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5092 Integrity, and Privacy", draft-horowitz-key-derivation-02.txt,
5095 [HorowitzB96] Horowitz, M., "Key Derivation for Kerberos V5", draft-
5096 horowitz-kerb-key-derivation-01.txt, September 1998.
5098 [Krawczyk96] Krawczyk, H., Bellare, and M., Canetti, R., "HMAC:
5099 Keyed-Hashing for Message Authentication", draft-ietf-ipsec-hmac-
5100 md5-01.txt, August, 1996.
5102 A. Pseudo-code for protocol processing
5104 This appendix provides pseudo-code describing how the messages are to be
5105 constructed and interpreted by clients and servers.
5107 A.1. KRB_AS_REQ generation
5109 request.pvno := protocol version; /* pvno = 5 */
5110 request.msg-type := message type; /* type = KRB_AS_REQ */
5112 if(pa_enc_timestamp_required) then
5113 request.padata.padata-type = PA-ENC-TIMESTAMP;
5115 padata-body.patimestamp,pausec = system_time;
5116 encrypt padata-body into request.padata.padata-value
5117 using client.key; /* derived from password */
5120 body.kdc-options := users's preferences;
5121 body.cname := user's name;
5122 body.realm := user's realm;
5123 body.sname := service's name; /* usually "krbtgt", "localrealm" */
5124 if (body.kdc-options.POSTDATED is set) then
5125 body.from := requested starting time;
5129 body.till := requested end time;
5130 if (body.kdc-options.RENEWABLE is set) then
5131 body.rtime := requested final renewal time;
5133 body.nonce := random_nonce();
5134 body.etype := requested etypes;
5135 if (user supplied addresses) then
5136 body.addresses := user's addresses;
5138 omit body.addresses;
5140 omit body.enc-authorization-data;
5141 request.req-body := body;
5143 kerberos := lookup(name of local kerberos server (or servers));
5144 send(packet,kerberos);
5148 retry or use alternate server;
5152 Neuman, Ts'o, Kohl Expires: 18 May 1999
5155 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5158 A.2. KRB_AS_REQ verification and KRB_AS_REP generation
5160 decode message into req;
5162 client := lookup(req.cname,req.realm);
5163 server := lookup(req.sname,req.realm);
5166 kdc_time := system_time.seconds;
5169 /* no client in Database */
5170 error_out(KDC_ERR_C_PRINCIPAL_UNKNOWN);
5173 /* no server in Database */
5174 error_out(KDC_ERR_S_PRINCIPAL_UNKNOWN);
5177 if(client.pa_enc_timestamp_required and
5178 pa_enc_timestamp not present) then
5179 error_out(KDC_ERR_PREAUTH_REQUIRED(PA_ENC_TIMESTAMP));
5182 if(pa_enc_timestamp present) then
5183 decrypt req.padata-value into decrypted_enc_timestamp
5185 using auth_hdr.authenticator.subkey;
5186 if (decrypt_error()) then
5187 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5188 if(decrypted_enc_timestamp is not within allowable skew)
5190 error_out(KDC_ERR_PREAUTH_FAILED);
5192 if(decrypted_enc_timestamp and usec is replay)
5193 error_out(KDC_ERR_PREAUTH_FAILED);
5195 add decrypted_enc_timestamp and usec to replay cache;
5198 use_etype := first supported etype in req.etypes;
5200 if (no support for req.etypes) then
5201 error_out(KDC_ERR_ETYPE_NOSUPP);
5204 new_tkt.vno := ticket version; /* = 5 */
5205 new_tkt.sname := req.sname;
5206 new_tkt.srealm := req.srealm;
5207 reset all flags in new_tkt.flags;
5209 /* It should be noted that local policy may affect the */
5210 /* processing of any of these flags. For example, some */
5211 /* realms may refuse to issue renewable tickets */
5213 if (req.kdc-options.FORWARDABLE is set) then
5214 set new_tkt.flags.FORWARDABLE;
5216 if (req.kdc-options.PROXIABLE is set) then
5217 set new_tkt.flags.PROXIABLE;
5219 Neuman, Ts'o, Kohl Expires: 18 May 1999
5222 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5227 if (req.kdc-options.ALLOW-POSTDATE is set) then
5228 set new_tkt.flags.MAY-POSTDATE;
5230 if ((req.kdc-options.RENEW is set) or
5231 (req.kdc-options.VALIDATE is set) or
5232 (req.kdc-options.PROXY is set) or
5233 (req.kdc-options.FORWARDED is set) or
5234 (req.kdc-options.ENC-TKT-IN-SKEY is set)) then
5235 error_out(KDC_ERR_BADOPTION);
5238 new_tkt.session := random_session_key();
5239 new_tkt.cname := req.cname;
5240 new_tkt.crealm := req.crealm;
5241 new_tkt.transited := empty_transited_field();
5243 new_tkt.authtime := kdc_time;
5245 if (req.kdc-options.POSTDATED is set) then
5246 if (against_postdate_policy(req.from)) then
5247 error_out(KDC_ERR_POLICY);
5249 set new_tkt.flags.POSTDATED;
5250 set new_tkt.flags.INVALID;
5251 new_tkt.starttime := req.from;
5253 omit new_tkt.starttime; /* treated as authtime when omitted */
5255 if (req.till = 0) then
5261 new_tkt.endtime := min(till,
5262 new_tkt.starttime+client.max_life,
5263 new_tkt.starttime+server.max_life,
5264 new_tkt.starttime+max_life_for_realm);
5266 if ((req.kdc-options.RENEWABLE-OK is set) and
5267 (new_tkt.endtime < req.till)) then
5268 /* we set the RENEWABLE option for later processing */
5269 set req.kdc-options.RENEWABLE;
5270 req.rtime := req.till;
5273 if (req.rtime = 0) then
5279 if (req.kdc-options.RENEWABLE is set) then
5280 set new_tkt.flags.RENEWABLE;
5281 new_tkt.renew-till := min(rtime,
5283 new_tkt.starttime+client.max_rlife,
5285 new_tkt.starttime+server.max_rlife,
5287 Neuman, Ts'o, Kohl Expires: 18 May 1999
5290 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5294 new_tkt.starttime+max_rlife_for_realm);
5296 omit new_tkt.renew-till; /* only present if RENEWABLE */
5299 if (req.addresses) then
5300 new_tkt.caddr := req.addresses;
5305 new_tkt.authorization_data := empty_authorization_data();
5307 encode to-be-encrypted part of ticket into OCTET STRING;
5308 new_tkt.enc-part := encrypt OCTET STRING
5309 using etype_for_key(server.key), server.key, server.p_kvno;
5311 /* Start processing the response */
5314 resp.msg-type := KRB_AS_REP;
5315 resp.cname := req.cname;
5316 resp.crealm := req.realm;
5317 resp.ticket := new_tkt;
5319 resp.key := new_tkt.session;
5320 resp.last-req := fetch_last_request_info(client);
5321 resp.nonce := req.nonce;
5322 resp.key-expiration := client.expiration;
5323 resp.flags := new_tkt.flags;
5325 resp.authtime := new_tkt.authtime;
5326 resp.starttime := new_tkt.starttime;
5327 resp.endtime := new_tkt.endtime;
5329 if (new_tkt.flags.RENEWABLE) then
5330 resp.renew-till := new_tkt.renew-till;
5333 resp.realm := new_tkt.realm;
5334 resp.sname := new_tkt.sname;
5336 resp.caddr := new_tkt.caddr;
5338 encode body of reply into OCTET STRING;
5340 resp.enc-part := encrypt OCTET STRING
5341 using use_etype, client.key, client.p_kvno;
5344 A.3. KRB_AS_REP verification
5346 decode response into resp;
5348 if (resp.msg-type = KRB_ERROR) then
5349 if(error = KDC_ERR_PREAUTH_REQUIRED(PA_ENC_TIMESTAMP)) then
5350 set pa_enc_timestamp_required;
5354 Neuman, Ts'o, Kohl Expires: 18 May 1999
5357 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5360 process_error(resp);
5364 /* On error, discard the response, and zero the session key */
5365 /* from the response immediately */
5367 key = get_decryption_key(resp.enc-part.kvno, resp.enc-part.etype,
5369 unencrypted part of resp := decode of decrypt of resp.enc-part
5370 using resp.enc-part.etype and key;
5373 if (common_as_rep_tgs_rep_checks fail) then
5378 if near(resp.princ_exp) then
5379 print(warning message);
5381 save_for_later(ticket,session,client,server,times,flags);
5383 A.4. KRB_AS_REP and KRB_TGS_REP common checks
5385 if (decryption_error() or
5386 (req.cname != resp.cname) or
5387 (req.realm != resp.crealm) or
5388 (req.sname != resp.sname) or
5389 (req.realm != resp.realm) or
5390 (req.nonce != resp.nonce) or
5391 (req.addresses != resp.caddr)) then
5393 return KRB_AP_ERR_MODIFIED;
5396 /* make sure no flags are set that shouldn't be, and that all that
5398 /* should be are set
5400 if (!check_flags_for_compatability(req.kdc-options,resp.flags)) then
5402 return KRB_AP_ERR_MODIFIED;
5405 if ((req.from = 0) and
5406 (resp.starttime is not within allowable skew)) then
5408 return KRB_AP_ERR_SKEW;
5410 if ((req.from != 0) and (req.from != resp.starttime)) then
5412 return KRB_AP_ERR_MODIFIED;
5414 if ((req.till != 0) and (resp.endtime > req.till)) then
5416 return KRB_AP_ERR_MODIFIED;
5419 if ((req.kdc-options.RENEWABLE is set) and
5420 (req.rtime != 0) and (resp.renew-till > req.rtime)) then
5422 Neuman, Ts'o, Kohl Expires: 18 May 1999
5425 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5429 return KRB_AP_ERR_MODIFIED;
5431 if ((req.kdc-options.RENEWABLE-OK is set) and
5432 (resp.flags.RENEWABLE) and
5434 (resp.renew-till > req.till)) then
5436 return KRB_AP_ERR_MODIFIED;
5439 A.5. KRB_TGS_REQ generation
5441 /* Note that make_application_request might have to recursivly
5443 /* call this routine to get the appropriate ticket-granting ticket
5446 request.pvno := protocol version; /* pvno = 5 */
5447 request.msg-type := message type; /* type = KRB_TGS_REQ */
5449 body.kdc-options := users's preferences;
5450 /* If the TGT is not for the realm of the end-server */
5451 /* then the sname will be for a TGT for the end-realm */
5452 /* and the realm of the requested ticket (body.realm) */
5453 /* will be that of the TGS to which the TGT we are */
5454 /* sending applies */
5455 body.sname := service's name;
5456 body.realm := service's realm;
5458 if (body.kdc-options.POSTDATED is set) then
5459 body.from := requested starting time;
5463 body.till := requested end time;
5464 if (body.kdc-options.RENEWABLE is set) then
5465 body.rtime := requested final renewal time;
5467 body.nonce := random_nonce();
5468 body.etype := requested etypes;
5469 if (user supplied addresses) then
5470 body.addresses := user's addresses;
5472 omit body.addresses;
5475 body.enc-authorization-data := user-supplied data;
5476 if (body.kdc-options.ENC-TKT-IN-SKEY) then
5477 body.additional-tickets_ticket := second TGT;
5480 request.req-body := body;
5481 check := generate_checksum (req.body,checksumtype);
5483 request.padata[0].padata-type := PA-TGS-REQ;
5484 request.padata[0].padata-value := create a KRB_AP_REQ using
5485 the TGT and checksum
5487 /* add in any other padata as required/supplied */
5488 kerberos := lookup(name of local kerberose server (or servers));
5490 Neuman, Ts'o, Kohl Expires: 18 May 1999
5493 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5496 send(packet,kerberos);
5500 retry or use alternate server;
5503 A.6. KRB_TGS_REQ verification and KRB_TGS_REP generation
5505 /* note that reading the application request requires first
5506 determining the server for which a ticket was issued, and choosing
5508 correct key for decryption. The name of the server appears in the
5509 plaintext part of the ticket. */
5511 if (no KRB_AP_REQ in req.padata) then
5512 error_out(KDC_ERR_PADATA_TYPE_NOSUPP);
5514 verify KRB_AP_REQ in req.padata;
5516 /* Note that the realm in which the Kerberos server is operating is
5517 determined by the instance from the ticket-granting ticket. The
5519 in the ticket-granting ticket is the realm under which the ticket
5520 granting ticket was issued. It is possible for a single Kerberos
5521 server to support more than one realm. */
5523 auth_hdr := KRB_AP_REQ;
5524 tgt := auth_hdr.ticket;
5526 if (tgt.sname is not a TGT for local realm and is not req.sname)
5528 error_out(KRB_AP_ERR_NOT_US);
5530 realm := realm_tgt_is_for(tgt);
5532 decode remainder of request;
5534 if (auth_hdr.authenticator.cksum is missing) then
5535 error_out(KRB_AP_ERR_INAPP_CKSUM);
5538 if (auth_hdr.authenticator.cksum type is not supported) then
5539 error_out(KDC_ERR_SUMTYPE_NOSUPP);
5541 if (auth_hdr.authenticator.cksum is not both collision-proof and
5543 error_out(KRB_AP_ERR_INAPP_CKSUM);
5546 set computed_checksum := checksum(req);
5547 if (computed_checksum != auth_hdr.authenticatory.cksum) then
5548 error_out(KRB_AP_ERR_MODIFIED);
5551 server := lookup(req.sname,realm);
5554 if (is_foreign_tgt_name(req.sname)) then
5555 server := best_intermediate_tgs(req.sname);
5557 /* no server in Database */
5558 error_out(KDC_ERR_S_PRINCIPAL_UNKNOWN);
5560 Neuman, Ts'o, Kohl Expires: 18 May 1999
5563 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5569 session := generate_random_session_key();
5571 use_etype := first supported etype in req.etypes;
5573 if (no support for req.etypes) then
5574 error_out(KDC_ERR_ETYPE_NOSUPP);
5577 new_tkt.vno := ticket version; /* = 5 */
5578 new_tkt.sname := req.sname;
5579 new_tkt.srealm := realm;
5580 reset all flags in new_tkt.flags;
5582 /* It should be noted that local policy may affect the */
5583 /* processing of any of these flags. For example, some */
5584 /* realms may refuse to issue renewable tickets */
5586 new_tkt.caddr := tgt.caddr;
5587 resp.caddr := NULL; /* We only include this if they change */
5588 if (req.kdc-options.FORWARDABLE is set) then
5589 if (tgt.flags.FORWARDABLE is reset) then
5590 error_out(KDC_ERR_BADOPTION);
5592 set new_tkt.flags.FORWARDABLE;
5594 if (req.kdc-options.FORWARDED is set) then
5595 if (tgt.flags.FORWARDABLE is reset) then
5596 error_out(KDC_ERR_BADOPTION);
5598 set new_tkt.flags.FORWARDED;
5599 new_tkt.caddr := req.addresses;
5600 resp.caddr := req.addresses;
5602 if (tgt.flags.FORWARDED is set) then
5603 set new_tkt.flags.FORWARDED;
5606 if (req.kdc-options.PROXIABLE is set) then
5607 if (tgt.flags.PROXIABLE is reset)
5608 error_out(KDC_ERR_BADOPTION);
5610 set new_tkt.flags.PROXIABLE;
5612 if (req.kdc-options.PROXY is set) then
5613 if (tgt.flags.PROXIABLE is reset) then
5614 error_out(KDC_ERR_BADOPTION);
5616 set new_tkt.flags.PROXY;
5617 new_tkt.caddr := req.addresses;
5618 resp.caddr := req.addresses;
5621 if (req.kdc-options.ALLOW-POSTDATE is set) then
5622 if (tgt.flags.MAY-POSTDATE is reset)
5623 error_out(KDC_ERR_BADOPTION);
5626 Neuman, Ts'o, Kohl Expires: 18 May 1999
5629 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5632 set new_tkt.flags.MAY-POSTDATE;
5634 if (req.kdc-options.POSTDATED is set) then
5635 if (tgt.flags.MAY-POSTDATE is reset) then
5636 error_out(KDC_ERR_BADOPTION);
5638 set new_tkt.flags.POSTDATED;
5639 set new_tkt.flags.INVALID;
5640 if (against_postdate_policy(req.from)) then
5641 error_out(KDC_ERR_POLICY);
5643 new_tkt.starttime := req.from;
5646 if (req.kdc-options.VALIDATE is set) then
5647 if (tgt.flags.INVALID is reset) then
5648 error_out(KDC_ERR_POLICY);
5650 if (tgt.starttime > kdc_time) then
5651 error_out(KRB_AP_ERR_NYV);
5653 if (check_hot_list(tgt)) then
5654 error_out(KRB_AP_ERR_REPEAT);
5657 reset new_tkt.flags.INVALID;
5660 if (req.kdc-options.(any flag except ENC-TKT-IN-SKEY, RENEW,
5661 and those already processed) is set) then
5662 error_out(KDC_ERR_BADOPTION);
5665 new_tkt.authtime := tgt.authtime;
5667 if (req.kdc-options.RENEW is set) then
5668 /* Note that if the endtime has already passed, the ticket would
5670 /* have been rejected in the initial authentication stage, so
5672 /* there is no need to check again here
5674 if (tgt.flags.RENEWABLE is reset) then
5675 error_out(KDC_ERR_BADOPTION);
5677 if (tgt.renew-till < kdc_time) then
5678 error_out(KRB_AP_ERR_TKT_EXPIRED);
5681 new_tkt.starttime := kdc_time;
5682 old_life := tgt.endttime - tgt.starttime;
5683 new_tkt.endtime := min(tgt.renew-till,
5684 new_tkt.starttime + old_life);
5686 new_tkt.starttime := kdc_time;
5687 if (req.till = 0) then
5693 new_tkt.endtime := min(till,
5695 Neuman, Ts'o, Kohl Expires: 18 May 1999
5698 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5701 new_tkt.starttime+client.max_life,
5702 new_tkt.starttime+server.max_life,
5703 new_tkt.starttime+max_life_for_realm,
5706 if ((req.kdc-options.RENEWABLE-OK is set) and
5707 (new_tkt.endtime < req.till) and
5708 (tgt.flags.RENEWABLE is set) then
5709 /* we set the RENEWABLE option for later processing
5711 set req.kdc-options.RENEWABLE;
5712 req.rtime := min(req.till, tgt.renew-till);
5716 if (req.rtime = 0) then
5722 if ((req.kdc-options.RENEWABLE is set) and
5723 (tgt.flags.RENEWABLE is set)) then
5724 set new_tkt.flags.RENEWABLE;
5725 new_tkt.renew-till := min(rtime,
5727 new_tkt.starttime+client.max_rlife,
5729 new_tkt.starttime+server.max_rlife,
5731 new_tkt.starttime+max_rlife_for_realm,
5734 new_tkt.renew-till := OMIT; /* leave the renew-till field
5737 if (req.enc-authorization-data is present) then
5738 decrypt req.enc-authorization-data into
5739 decrypted_authorization_data
5740 using auth_hdr.authenticator.subkey;
5741 if (decrypt_error()) then
5742 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5745 new_tkt.authorization_data := req.auth_hdr.ticket.authorization_data
5747 decrypted_authorization_data;
5749 new_tkt.key := session;
5750 new_tkt.crealm := tgt.crealm;
5751 new_tkt.cname := req.auth_hdr.ticket.cname;
5753 if (realm_tgt_is_for(tgt) := tgt.realm) then
5754 /* tgt issued by local realm */
5755 new_tkt.transited := tgt.transited;
5757 /* was issued for this realm by some other realm */
5758 if (tgt.transited.tr-type not supported) then
5759 error_out(KDC_ERR_TRTYPE_NOSUPP);
5761 new_tkt.transited := compress_transited(tgt.transited +
5763 /* Don't check tranited field if TGT for foreign realm,
5764 * or requested not to check */
5765 if (is_not_foreign_tgt_name(new_tkt.server)
5766 && req.kdc-options.DISABLE-TRANSITED-CHECK not set) then
5769 Neuman, Ts'o, Kohl Expires: 18 May 1999
5772 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5775 /* Check it, so end-server does not have to
5776 * but don't fail, end-server may still accept it */
5777 if (check_transited_field(new_tkt.transited) == OK)
5778 set new_tkt.flags.TRANSITED-POLICY-CHECKED;
5783 encode encrypted part of new_tkt into OCTET STRING;
5784 if (req.kdc-options.ENC-TKT-IN-SKEY is set) then
5785 if (server not specified) then
5786 server = req.second_ticket.client;
5788 if ((req.second_ticket is not a TGT) or
5789 (req.second_ticket.client != server)) then
5790 error_out(KDC_ERR_POLICY);
5793 new_tkt.enc-part := encrypt OCTET STRING using
5794 using etype_for_key(second-ticket.key),
5797 new_tkt.enc-part := encrypt OCTET STRING
5798 using etype_for_key(server.key), server.key,
5803 resp.msg-type := KRB_TGS_REP;
5804 resp.crealm := tgt.crealm;
5805 resp.cname := tgt.cname;
5806 resp.ticket := new_tkt;
5808 resp.key := session;
5809 resp.nonce := req.nonce;
5810 resp.last-req := fetch_last_request_info(client);
5811 resp.flags := new_tkt.flags;
5813 resp.authtime := new_tkt.authtime;
5814 resp.starttime := new_tkt.starttime;
5815 resp.endtime := new_tkt.endtime;
5817 omit resp.key-expiration;
5819 resp.sname := new_tkt.sname;
5820 resp.realm := new_tkt.realm;
5822 if (new_tkt.flags.RENEWABLE) then
5823 resp.renew-till := new_tkt.renew-till;
5826 encode body of reply into OCTET STRING;
5828 if (req.padata.authenticator.subkey)
5829 resp.enc-part := encrypt OCTET STRING using use_etype,
5830 req.padata.authenticator.subkey;
5831 else resp.enc-part := encrypt OCTET STRING using use_etype, tgt.key;
5835 A.7. KRB_TGS_REP verification
5837 Neuman, Ts'o, Kohl Expires: 18 May 1999
5840 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5844 decode response into resp;
5846 if (resp.msg-type = KRB_ERROR) then
5847 process_error(resp);
5851 /* On error, discard the response, and zero the session key from
5852 the response immediately */
5854 if (req.padata.authenticator.subkey)
5855 unencrypted part of resp := decode of decrypt of
5857 using resp.enc-part.etype and subkey;
5858 else unencrypted part of resp := decode of decrypt of resp.enc-part
5859 using resp.enc-part.etype and tgt's session
5861 if (common_as_rep_tgs_rep_checks fail) then
5866 check authorization_data as necessary;
5867 save_for_later(ticket,session,client,server,times,flags);
5869 A.8. Authenticator generation
5871 body.authenticator-vno := authenticator vno; /* = 5 */
5872 body.cname, body.crealm := client name;
5873 if (supplying checksum) then
5874 body.cksum := checksum;
5877 body.ctime, body.cusec := system_time;
5878 if (selecting sub-session key) then
5879 select sub-session key;
5880 body.subkey := sub-session key;
5882 if (using sequence numbers) then
5883 select initial sequence number;
5884 body.seq-number := initial sequence;
5887 A.9. KRB_AP_REQ generation
5889 obtain ticket and session_key from cache;
5891 packet.pvno := protocol version; /* 5 */
5892 packet.msg-type := message type; /* KRB_AP_REQ */
5894 if (desired(MUTUAL_AUTHENTICATION)) then
5895 set packet.ap-options.MUTUAL-REQUIRED;
5897 reset packet.ap-options.MUTUAL-REQUIRED;
5899 if (using session key for ticket) then
5900 set packet.ap-options.USE-SESSION-KEY;
5902 reset packet.ap-options.USE-SESSION-KEY;
5905 Neuman, Ts'o, Kohl Expires: 18 May 1999
5908 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5912 packet.ticket := ticket; /* ticket */
5913 generate authenticator;
5914 encode authenticator into OCTET STRING;
5915 encrypt OCTET STRING into packet.authenticator using session_key;
5917 A.10. KRB_AP_REQ verification
5920 if (packet.pvno != 5) then
5921 either process using other protocol spec
5922 or error_out(KRB_AP_ERR_BADVERSION);
5924 if (packet.msg-type != KRB_AP_REQ) then
5925 error_out(KRB_AP_ERR_MSG_TYPE);
5927 if (packet.ticket.tkt_vno != 5) then
5928 either process using other protocol spec
5929 or error_out(KRB_AP_ERR_BADVERSION);
5931 if (packet.ap_options.USE-SESSION-KEY is set) then
5932 retrieve session key from ticket-granting ticket for
5933 packet.ticket.{sname,srealm,enc-part.etype};
5935 retrieve service key for
5936 packet.ticket.{sname,srealm,enc-part.etype,enc-part.skvno};
5938 if (no_key_available) then
5939 if (cannot_find_specified_skvno) then
5940 error_out(KRB_AP_ERR_BADKEYVER);
5942 error_out(KRB_AP_ERR_NOKEY);
5945 decrypt packet.ticket.enc-part into decr_ticket using retrieved key;
5946 if (decryption_error()) then
5947 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5949 decrypt packet.authenticator into decr_authenticator
5950 using decr_ticket.key;
5951 if (decryption_error()) then
5952 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5954 if (decr_authenticator.{cname,crealm} !=
5955 decr_ticket.{cname,crealm}) then
5956 error_out(KRB_AP_ERR_BADMATCH);
5958 if (decr_ticket.caddr is present) then
5959 if (sender_address(packet) is not in decr_ticket.caddr) then
5960 error_out(KRB_AP_ERR_BADADDR);
5962 elseif (application requires addresses) then
5963 error_out(KRB_AP_ERR_BADADDR);
5965 if (not in_clock_skew(decr_authenticator.ctime,
5966 decr_authenticator.cusec)) then
5967 error_out(KRB_AP_ERR_SKEW);
5969 if (repeated(decr_authenticator.{ctime,cusec,cname,crealm})) then
5971 Neuman, Ts'o, Kohl Expires: 18 May 1999
5974 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
5977 error_out(KRB_AP_ERR_REPEAT);
5979 save_identifier(decr_authenticator.{ctime,cusec,cname,crealm});
5981 if ((decr_ticket.starttime-system_time > CLOCK_SKEW) or
5982 (decr_ticket.flags.INVALID is set)) then
5983 /* it hasn't yet become valid */
5984 error_out(KRB_AP_ERR_TKT_NYV);
5986 if (system_time-decr_ticket.endtime > CLOCK_SKEW) then
5987 error_out(KRB_AP_ERR_TKT_EXPIRED);
5989 if (decr_ticket.transited) then
5990 /* caller may ignore the TRANSITED-POLICY-CHECKED and do
5992 if (decr_ticket.flags.TRANSITED-POLICY-CHECKED not set) then
5993 if (check_transited_field(decr_ticket.transited) then
5994 error_out(KDC_AP_PATH_NOT_ACCPETED);
5998 /* caller must check decr_ticket.flags for any pertinent details */
5999 return(OK, decr_ticket, packet.ap_options.MUTUAL-REQUIRED);
6001 A.11. KRB_AP_REP generation
6003 packet.pvno := protocol version; /* 5 */
6004 packet.msg-type := message type; /* KRB_AP_REP */
6006 body.ctime := packet.ctime;
6007 body.cusec := packet.cusec;
6008 if (selecting sub-session key) then
6009 select sub-session key;
6010 body.subkey := sub-session key;
6012 if (using sequence numbers) then
6013 select initial sequence number;
6014 body.seq-number := initial sequence;
6017 encode body into OCTET STRING;
6019 select encryption type;
6020 encrypt OCTET STRING into packet.enc-part;
6022 A.12. KRB_AP_REP verification
6025 if (packet.pvno != 5) then
6026 either process using other protocol spec
6027 or error_out(KRB_AP_ERR_BADVERSION);
6029 if (packet.msg-type != KRB_AP_REP) then
6030 error_out(KRB_AP_ERR_MSG_TYPE);
6032 cleartext := decrypt(packet.enc-part) using ticket's session key;
6033 if (decryption_error()) then
6034 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6037 Neuman, Ts'o, Kohl Expires: 18 May 1999
6040 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6043 if (cleartext.ctime != authenticator.ctime) then
6044 error_out(KRB_AP_ERR_MUT_FAIL);
6046 if (cleartext.cusec != authenticator.cusec) then
6047 error_out(KRB_AP_ERR_MUT_FAIL);
6049 if (cleartext.subkey is present) then
6050 save cleartext.subkey for future use;
6052 if (cleartext.seq-number is present) then
6053 save cleartext.seq-number for future verifications;
6055 return(AUTHENTICATION_SUCCEEDED);
6057 A.13. KRB_SAFE generation
6059 collect user data in buffer;
6061 /* assemble packet: */
6062 packet.pvno := protocol version; /* 5 */
6063 packet.msg-type := message type; /* KRB_SAFE */
6065 body.user-data := buffer; /* DATA */
6066 if (using timestamp) then
6068 body.timestamp, body.usec := system_time;
6070 if (using sequence numbers) then
6071 body.seq-number := sequence number;
6073 body.s-address := sender host addresses;
6074 if (only one recipient) then
6075 body.r-address := recipient host address;
6077 checksum.cksumtype := checksum type;
6078 compute checksum over body;
6079 checksum.checksum := checksum value; /* checksum.checksum */
6080 packet.cksum := checksum;
6081 packet.safe-body := body;
6083 A.14. KRB_SAFE verification
6086 if (packet.pvno != 5) then
6087 either process using other protocol spec
6088 or error_out(KRB_AP_ERR_BADVERSION);
6090 if (packet.msg-type != KRB_SAFE) then
6091 error_out(KRB_AP_ERR_MSG_TYPE);
6093 if (packet.checksum.cksumtype is not both collision-proof and keyed)
6095 error_out(KRB_AP_ERR_INAPP_CKSUM);
6097 if (safe_priv_common_checks_ok(packet)) then
6098 set computed_checksum := checksum(packet.body);
6099 if (computed_checksum != packet.checksum) then
6100 error_out(KRB_AP_ERR_MODIFIED);
6102 return (packet, PACKET_IS_GENUINE);
6104 Neuman, Ts'o, Kohl Expires: 18 May 1999
6107 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6111 return common_checks_error;
6114 A.15. KRB_SAFE and KRB_PRIV common checks
6116 if (packet.s-address != O/S_sender(packet)) then
6117 /* O/S report of sender not who claims to have sent it */
6118 error_out(KRB_AP_ERR_BADADDR);
6120 if ((packet.r-address is present) and
6121 (packet.r-address != local_host_address)) then
6122 /* was not sent to proper place */
6123 error_out(KRB_AP_ERR_BADADDR);
6125 if (((packet.timestamp is present) and
6126 (not in_clock_skew(packet.timestamp,packet.usec))) or
6127 (packet.timestamp is not present and timestamp expected)) then
6128 error_out(KRB_AP_ERR_SKEW);
6130 if (repeated(packet.timestamp,packet.usec,packet.s-address)) then
6131 error_out(KRB_AP_ERR_REPEAT);
6134 if (((packet.seq-number is present) and
6135 ((not in_sequence(packet.seq-number)))) or
6136 (packet.seq-number is not present and sequence expected)) then
6137 error_out(KRB_AP_ERR_BADORDER);
6139 if (packet.timestamp not present and packet.seq-number not present)
6141 error_out(KRB_AP_ERR_MODIFIED);
6144 save_identifier(packet.{timestamp,usec,s-address},
6145 sender_principal(packet));
6147 return PACKET_IS_OK;
6149 A.16. KRB_PRIV generation
6151 collect user data in buffer;
6153 /* assemble packet: */
6154 packet.pvno := protocol version; /* 5 */
6155 packet.msg-type := message type; /* KRB_PRIV */
6157 packet.enc-part.etype := encryption type;
6159 body.user-data := buffer;
6160 if (using timestamp) then
6162 body.timestamp, body.usec := system_time;
6164 if (using sequence numbers) then
6165 body.seq-number := sequence number;
6167 body.s-address := sender host addresses;
6168 if (only one recipient) then
6169 body.r-address := recipient host address;
6171 Neuman, Ts'o, Kohl Expires: 18 May 1999
6174 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6179 encode body into OCTET STRING;
6181 select encryption type;
6182 encrypt OCTET STRING into packet.enc-part.cipher;
6184 A.17. KRB_PRIV verification
6187 if (packet.pvno != 5) then
6188 either process using other protocol spec
6189 or error_out(KRB_AP_ERR_BADVERSION);
6191 if (packet.msg-type != KRB_PRIV) then
6192 error_out(KRB_AP_ERR_MSG_TYPE);
6195 cleartext := decrypt(packet.enc-part) using negotiated key;
6196 if (decryption_error()) then
6197 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6200 if (safe_priv_common_checks_ok(cleartext)) then
6201 return(cleartext.DATA, PACKET_IS_GENUINE_AND_UNMODIFIED);
6203 return common_checks_error;
6206 A.18. KRB_CRED generation
6208 invoke KRB_TGS; /* obtain tickets to be provided to peer */
6210 /* assemble packet: */
6211 packet.pvno := protocol version; /* 5 */
6212 packet.msg-type := message type; /* KRB_CRED */
6214 for (tickets[n] in tickets to be forwarded) do
6215 packet.tickets[n] = tickets[n].ticket;
6218 packet.enc-part.etype := encryption type;
6220 for (ticket[n] in tickets to be forwarded) do
6221 body.ticket-info[n].key = tickets[n].session;
6222 body.ticket-info[n].prealm = tickets[n].crealm;
6223 body.ticket-info[n].pname = tickets[n].cname;
6224 body.ticket-info[n].flags = tickets[n].flags;
6225 body.ticket-info[n].authtime = tickets[n].authtime;
6226 body.ticket-info[n].starttime = tickets[n].starttime;
6227 body.ticket-info[n].endtime = tickets[n].endtime;
6228 body.ticket-info[n].renew-till = tickets[n].renew-till;
6229 body.ticket-info[n].srealm = tickets[n].srealm;
6230 body.ticket-info[n].sname = tickets[n].sname;
6231 body.ticket-info[n].caddr = tickets[n].caddr;
6235 body.timestamp, body.usec := system_time;
6237 Neuman, Ts'o, Kohl Expires: 18 May 1999
6240 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6244 if (using nonce) then
6245 body.nonce := nonce;
6248 if (using s-address) then
6249 body.s-address := sender host addresses;
6251 if (limited recipients) then
6252 body.r-address := recipient host address;
6255 encode body into OCTET STRING;
6257 select encryption type;
6258 encrypt OCTET STRING into packet.enc-part.cipher
6259 using negotiated encryption key;
6261 A.19. KRB_CRED verification
6264 if (packet.pvno != 5) then
6265 either process using other protocol spec
6266 or error_out(KRB_AP_ERR_BADVERSION);
6268 if (packet.msg-type != KRB_CRED) then
6269 error_out(KRB_AP_ERR_MSG_TYPE);
6272 cleartext := decrypt(packet.enc-part) using negotiated key;
6273 if (decryption_error()) then
6274 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6276 if ((packet.r-address is present or required) and
6277 (packet.s-address != O/S_sender(packet)) then
6278 /* O/S report of sender not who claims to have sent it */
6279 error_out(KRB_AP_ERR_BADADDR);
6281 if ((packet.r-address is present) and
6282 (packet.r-address != local_host_address)) then
6283 /* was not sent to proper place */
6284 error_out(KRB_AP_ERR_BADADDR);
6286 if (not in_clock_skew(packet.timestamp,packet.usec)) then
6287 error_out(KRB_AP_ERR_SKEW);
6289 if (repeated(packet.timestamp,packet.usec,packet.s-address)) then
6290 error_out(KRB_AP_ERR_REPEAT);
6292 if (packet.nonce is required or present) and
6293 (packet.nonce != expected-nonce) then
6294 error_out(KRB_AP_ERR_MODIFIED);
6297 for (ticket[n] in tickets that were forwarded) do
6298 save_for_later(ticket[n],key[n],principal[n],
6299 server[n],times[n],flags[n]);
6303 Neuman, Ts'o, Kohl Expires: 18 May 1999
6306 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6309 A.20. KRB_ERROR generation
6311 /* assemble packet: */
6312 packet.pvno := protocol version; /* 5 */
6313 packet.msg-type := message type; /* KRB_ERROR */
6316 packet.stime, packet.susec := system_time;
6317 packet.realm, packet.sname := server name;
6319 if (client time available) then
6320 packet.ctime, packet.cusec := client_time;
6322 packet.error-code := error code;
6323 if (client name available) then
6324 packet.cname, packet.crealm := client name;
6326 if (error text available) then
6327 packet.e-text := error text;
6329 if (error data available) then
6330 packet.e-data := error data;
6333 B. Definition of common authorization data elements
6335 This appendix contains the definitions of common authorization data
6336 elements. These common authorization data elements are recursivly defined,
6337 meaning the ad-data for these types will itself contain a sequence of
6338 authorization data whose interpretation is affected by the encapsulating
6339 element. Depending on the meaning of the encapsulating element, the
6340 encapsulated elements may be ignored, might be interpreted as issued
6341 directly by the KDC, or they might be stored in a separate plaintext part
6342 of the ticket. The types of the encapsulating elements are specified as
6343 part of the Kerberos specification because the behavior based on these
6344 values should be understood across implementations whereas other elements
6345 need only be understood by the applications which they affect.
6347 In the definitions that follow, the value of the ad-type for the element
6348 will be specified in the subsection number, and the value of the ad-data
6349 will be as shown in the ASN.1 structure that follows the subsection
6354 AD-KDCIssued SEQUENCE {
6355 ad-checksum[0] Checksum,
6356 i-realm[1] Realm OPTIONAL,
6357 i-sname[2] PrincipalName OPTIONAL,
6358 elements[3] AuthorizationData.
6362 A checksum over the elements field using a cryptographic checksum
6363 method that is identical to the checksum used to protect the ticket
6364 itself (i.e. using the same hash function and the same encryption
6365 algorithm used to encrypt the ticket) and using a key derived from the
6366 same key used to protect the ticket.
6369 Neuman, Ts'o, Kohl Expires: 18 May 1999
6372 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6375 The name of the issuing principal if different from the KDC itself.
6376 This field would be used when the KDC can verify the authenticity of
6377 elements signed by the issuing principal and it allows this KDC to
6378 notify the application server of the validity of those elements.
6380 A sequence of authorization data elements issued by the KDC.
6382 The KDC-issued ad-data field is intended to provide a means for Kerberos
6383 principal credentials to embed within themselves privilege attributes and
6384 other mechanisms for positive authorization, amplifying the priveleges of
6385 the principal beyond what can be done using a credentials without such an
6388 This can not be provided without this element because the definition of the
6389 authorization-data field allows elements to be added at will by the bearer
6390 of a TGT at the time that they request service tickets and elements may
6391 also be added to a delegated ticket by inclusion in the authenticator.
6393 For KDC-issued elements this is prevented because the elements are signed
6394 by the KDC by including a checksum encrypted using the server's key (the
6395 same key used to encrypt the ticket - or a key derived from that key).
6396 Elements encapsulated with in the KDC-issued element will be ignored by the
6397 application server if this "signature" is not present. Further, elements
6398 encapsulated within this element from a ticket granting ticket may be
6399 interpreted by the KDC, and used as a basis according to policy for
6400 including new signed elements within derivative tickets, but they will not
6401 be copied to a derivative ticket directly. If they are copied directly to a
6402 derivative ticket by a KDC that is not aware of this element, the signature
6403 will not be correct for the application ticket elements, and the field will
6404 be ignored by the application server.
6406 This element and the elements it encapulates may be safely ignored by
6407 applications, application servers, and KDCs that do not implement this
6410 B.2. Intended for server
6412 AD-INTENDED-FOR-SERVER SEQUENCE {
6413 intended-server[0] SEQUENCE OF PrincipalName
6414 elements[1] AuthorizationData
6417 AD elements encapsulated within the intended-for-server element may be
6418 ignored if the application server is not in the list of principal names of
6419 intended servers. Further, a KDC issuing a ticket for an application server
6420 can remove this element if the application server is not in the list of
6423 Application servers should check for their principal name in the
6424 intended-server field of this element. If their principal name is not
6425 found, this element should be ignored. If found, then the encapsulated
6426 elements should be evaluated in the same manner as if they were present in
6427 the top level authorization data field. Applications and application
6428 servers that do not implement this element should reject tickets that
6429 contain authorization data elements of this type.
6431 B.3. Intended for application class
6433 AD-INTENDED-FOR-APPLICATION-CLASS SEQUENCE { intended-application-class[0]
6435 Neuman, Ts'o, Kohl Expires: 18 May 1999
6438 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6441 SEQUENCE OF GeneralString elements[1] AuthorizationData } AD elements
6442 encapsulated within the intended-for-application-class element may be
6443 ignored if the application server is not in one of the named classes of
6444 application servers. Examples of application server classes include
6445 "FILESYSTEM", and other kinds of servers.
6447 This element and the elements it encapulates may be safely ignored by
6448 applications, application servers, and KDCs that do not implement this
6453 AD-IF-RELEVANT AuthorizationData
6455 AD elements encapsulated within the if-relevant element are intended for
6456 interpretation only by application servers that understand the particular
6457 ad-type of the embedded element. Application servers that do not understand
6458 the type of an element embedded within the if-relevant element may ignore
6459 the uninterpretable element. This element promotes interoperability across
6460 implementations which may have local extensions for authorization.
6464 AD-AND-OR SEQUENCE {
6465 condition-count[0] INTEGER,
6466 elements[1] AuthorizationData
6469 When restrictive AD elements encapsulated within the and-or element are
6470 encountered, only the number specified in condition-count of the
6471 encapsulated conditions must be met in order to satisfy this element. This
6472 element may be used to implement an "or" operation by setting the
6473 condition-count field to 1, and it may specify an "and" operation by
6474 setting the condition count to the number of embedded elements. Application
6475 servers that do not implement this element must reject tickets that contain
6476 authorization data elements of this type.
6478 B.6. Mandatory ticket extensions
6480 AD-Mandatory-Ticket-Extensions Checksum
6482 An authorization data element of type mandatory-ticket-extensions specifies
6483 a collision-proof checksum using the same hash algorithm used to protect
6484 the integrity of the ticket itself. This checksum will be calculated over
6485 an individual extension field. If there are more than one extension,
6486 multiple Mandatory-Ticket-Extensions authorization data elements may be
6487 present, each with a checksum for a different extension field. This
6488 restriction indicates that the ticket should not be accepted if a ticket
6489 extension is not present in the ticket for which the checksum does not
6490 match that checksum specified in the authorization data element.
6491 Application servers that do not implement this element must reject tickets
6492 that contain authorization data elements of this type.
6494 B.7. Authorization Data in ticket extensions
6496 AD-IN-Ticket-Extensions Checksum
6498 An authorization data element of type in-ticket-extensions specifies a
6499 collision-proof checksum using the same hash algorithm used to protect the
6501 Neuman, Ts'o, Kohl Expires: 18 May 1999
6504 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6507 integrity of the ticket itself. This checksum is calculated over a separate
6508 external AuthorizationData field carried in the ticket extensions.
6509 Application servers that do not implement this element must reject tickets
6510 that contain authorization data elements of this type. Application servers
6511 that do implement this element will search the ticket extensions for
6512 authorization data fields, calculate the specified checksum over each
6513 authorization data field and look for one matching the checksum in this
6514 in-ticket-extensions element. If not found, then the ticket must be
6515 rejected. If found, the corresponding authorization data elements will be
6516 interpreted in the same manner as if they were contained in the top level
6517 authorization data field.
6519 Note that if multiple external authorization data fields are present in a
6520 ticket, each will have a corresponding element of type in-ticket-extensions
6521 in the top level authorization data field, and the external entries will be
6522 linked to the corresponding element by their checksums.
6524 C. Definition of common ticket extensions
6526 This appendix contains the definitions of common ticket extensions. Support
6527 for these extensions is optional. However, certain extensions have
6528 associated authorization data elements that may require rejection of a
6529 ticket containing an extension by application servers that do not implement
6530 the particular extension. Other extensions have been defined beyond those
6531 described in this specification. Such extensions are described elswhere and
6532 for some of those extensions the reserved number may be found in the list
6535 It is known that older versions of Kerberos did not support this field, and
6536 that some clients will strip this field from a ticket when they parse and
6537 then reassemble a ticket as it is passed to the application servers. The
6538 presence of the extension will not break such clients, but any functionaly
6539 dependent on the extensions will not work when such tickets are handled by
6540 old clients. In such situations, some implementation may use alternate
6541 methods to transmit the information in the extensions field.
6543 C.1. Null ticket extension
6545 TE-NullExtension OctetString -- The empty Octet String
6547 The te-data field in the null ticket extension is an octet string of lenght
6548 zero. This extension may be included in a ticket granting ticket so that
6549 the KDC can determine on presentation of the ticket granting ticket whether
6550 the client software will strip the extensions field.
6552 C.2. External Authorization Data
6554 TE-ExternalAuthorizationData AuthorizationData
6556 The te-data field in the external authorization data ticket extension is
6557 field of type AuthorizationData containing one or more authorization data
6558 elements. If present, a corresponding authorization data element will be
6559 present in the primary authorization data for the ticket and that element
6560 will contain a checksum of the external authorization data ticket
6562 ------------------------------------------------------------------------
6563 [TM] Project Athena, Athena, and Kerberos are trademarks of the
6564 Massachusetts Institute of Technology (MIT). No commercial use of these
6565 trademarks may be made without prior written permission of MIT.
6567 Neuman, Ts'o, Kohl Expires: 18 May 1999
6570 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6574 [1] Note, however, that many applications use Kerberos' functions only upon
6575 the initiation of a stream-based network connection. Unless an application
6576 subsequently provides integrity protection for the data stream, the
6577 identity verification applies only to the initiation of the connection, and
6578 does not guarantee that subsequent messages on the connection originate
6579 from the same principal.
6581 [2] Secret and private are often used interchangeably in the literature. In
6582 our usage, it takes two (or more) to share a secret, thus a shared DES key
6583 is a secret key. Something is only private when no one but its owner knows
6584 it. Thus, in public key cryptosystems, one has a public and a private key.
6586 [3] Of course, with appropriate permission the client could arrange
6587 registration of a separately-named prin- cipal in a remote realm, and
6588 engage in normal exchanges with that realm's services. However, for even
6589 small numbers of clients this becomes cumbersome, and more automatic
6590 methods as described here are necessary.
6592 [4] Though it is permissible to request or issue tick- ets with no network
6593 addresses specified.
6595 [5] The password-changing request must not be honored unless the requester
6596 can provide the old password (the user's current secret key). Otherwise, it
6597 would be possible for someone to walk up to an unattended ses- sion and
6598 change another user's password.
6600 [6] To authenticate a user logging on to a local system, the credentials
6601 obtained in the AS exchange may first be used in a TGS exchange to obtain
6602 credentials for a local server. Those credentials must then be verified by
6603 a local server through successful completion of the Client/Server exchange.
6605 [7] "Random" means that, among other things, it should be impossible to
6606 guess the next session key based on knowledge of past session keys. This
6607 can only be achieved in a pseudo-random number generator if it is based on
6608 cryptographic principles. It is more desirable to use a truly random number
6609 generator, such as one based on measurements of random physical phenomena.
6611 [8] Tickets contain both an encrypted and unencrypted portion, so cleartext
6612 here refers to the entire unit, which can be copied from one message and
6613 replayed in another without any cryptographic skill.
6615 [9] Note that this can make applications based on unreliable transports
6616 difficult to code correctly. If the transport might deliver duplicated
6617 messages, either a new authenticator must be generated for each retry, or
6618 the application server must match requests and replies and replay the first
6619 reply in response to a detected duplicate.
6621 [10] This is used for user-to-user authentication as described in [8].
6623 [11] Note that the rejection here is restricted to authenticators from the
6624 same principal to the same server. Other client principals communicating
6625 with the same server principal should not be have their authenticators
6626 rejected if the time and microsecond fields happen to match some other
6627 client's authenticator.
6629 [12] In the Kerberos version 4 protocol, the timestamp in the reply was the
6630 client's timestamp plus one. This is not necessary in version 5 because
6631 version 5 messages are formatted in such a way that it is not possible to
6633 Neuman, Ts'o, Kohl Expires: 18 May 1999
6636 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6639 create the reply by judicious message surgery (even in encrypted form)
6640 without knowledge of the appropriate encryption keys.
6642 [13] Note that for encrypting the KRB_AP_REP message, the sub-session key
6643 is not used, even if present in the Authenticator.
6645 [14] Implementations of the protocol may wish to provide routines to choose
6646 subkeys based on session keys and random numbers and to generate a
6647 negotiated key to be returned in the KRB_AP_REP message.
6649 [15]This can be accomplished in several ways. It might be known beforehand
6650 (since the realm is part of the principal identifier), it might be stored
6651 in a nameserver, or it might be obtained from a configura- tion file. If
6652 the realm to be used is obtained from a nameserver, there is a danger of
6653 being spoofed if the nameservice providing the realm name is not authenti-
6654 cated. This might result in the use of a realm which has been compromised,
6655 and would result in an attacker's ability to compromise the authentication
6656 of the application server to the client.
6658 [16] If the client selects a sub-session key, care must be taken to ensure
6659 the randomness of the selected sub- session key. One approach would be to
6660 generate a random number and XOR it with the session key from the
6661 ticket-granting ticket.
6663 [17] This allows easy implementation of user-to-user authentication [8],
6664 which uses ticket-granting ticket session keys in lieu of secret server
6665 keys in situa- tions where such secret keys could be easily comprom- ised.
6667 [18] For the purpose of appending, the realm preceding the first listed
6668 realm is considered to be the null realm ("").
6670 [19] For the purpose of interpreting null subfields, the client's realm is
6671 considered to precede those in the transited field, and the server's realm
6672 is considered to follow them.
6674 [20] This means that a client and server running on the same host and
6675 communicating with one another using the KRB_SAFE messages should not share
6676 a common replay cache to detect KRB_SAFE replays.
6678 [21] The implementation of the Kerberos server need not combine the
6679 database and the server on the same machine; it is feasible to store the
6680 principal database in, say, a network name service, as long as the entries
6681 stored therein are protected from disclosure to and modification by
6682 unauthorized parties. However, we recommend against such strategies, as
6683 they can make system management and threat analysis quite complex.
6685 [22] See the discussion of the padata field in section 5.4.2 for details on
6686 why this can be useful.
6688 [23] Warning for implementations that unpack and repack data structures
6689 during the generation and verification of embedded checksums: Because any
6690 checksums applied to data structures must be checked against the original
6691 data the length of bit strings must be preserved within a data structure
6692 between the time that a checksum is generated through transmission to the
6693 time that the checksum is verified.
6695 [24] It is NOT recommended that this time value be used to adjust the
6696 workstation's clock since the workstation cannot reliably determine that
6697 such a KRB_AS_REP actually came from the proper KDC in a timely manner.
6699 Neuman, Ts'o, Kohl Expires: 18 May 1999
6702 INTERNET-DRAFT draft-ietf-cat-kerberos-r-03 November 18 1998
6706 [25] Note, however, that if the time is used as the nonce, one must make
6707 sure that the workstation time is monotonically increasing. If the time is
6708 ever reset backwards, there is a small, but finite, probability that a
6709 nonce will be reused.
6711 [27] An application code in the encrypted part of a message provides an
6712 additional check that the message was decrypted properly.
6714 [29] An application code in the encrypted part of a message provides an
6715 additional check that the message was decrypted properly.
6717 [31] An application code in the encrypted part of a message provides an
6718 additional check that the message was decrypted properly.
6720 [32] If supported by the encryption method in use, an initialization vector
6721 may be passed to the encryption procedure, in order to achieve proper
6722 cipher chaining. The initialization vector might come from the last block
6723 of the ciphertext from the previous KRB_PRIV message, but it is the
6724 application's choice whether or not to use such an initialization vector.
6725 If left out, the default initialization vector for the encryption algorithm
6728 [33] This prevents an attacker who generates an incorrect AS request from
6729 obtaining verifiable plaintext for use in an off-line password guessing
6732 [35] In the above specification, UNTAGGED OCTET STRING(length) is the
6733 notation for an octet string with its tag and length removed. It is not a
6734 valid ASN.1 type. The tag bits and length must be removed from the
6735 confounder since the purpose of the confounder is so that the message
6736 starts with random data, but the tag and its length are fixed. For other
6737 fields, the length and tag would be redundant if they were included because
6738 they are specified by the encryption type. [36] The ordering of the fields
6739 in the CipherText is important. Additionally, messages encoded in this
6740 format must include a length as part of the msg-seq field. This allows the
6741 recipient to verify that the message has not been truncated. Without a
6742 length, an attacker could use a chosen plaintext attack to generate a
6743 message which could be truncated, while leaving the checksum intact. Note
6744 that if the msg-seq is an encoding of an ASN.1 SEQUENCE or OCTET STRING,
6745 then the length is part of that encoding.
6747 [37] In some cases, it may be necessary to use a different "mix-in" string
6748 for compatibility reasons; see the discussion of padata in section 5.4.2.
6750 [38] In some cases, it may be necessary to use a different "mix-in" string
6751 for compatibility reasons; see the discussion of padata in section 5.4.2.
6753 [39] A variant of the key is used to limit the use of a key to a particular
6754 function, separating the functions of generating a checksum from other
6755 encryption performed using the session key. The constant F0F0F0F0F0F0F0F0
6756 was chosen because it maintains key parity. The properties of DES precluded
6757 the use of the complement. The same constant is used for similar purpose in
6758 the Message Integrity Check in the Privacy Enhanced Mail standard.
6760 [40] This error carries additional information in the e- data field. The
6761 contents of the e-data field for this message is described in section
6765 Neuman, Ts'o, Kohl Expires: 18 May 1999