1 INTERNET-DRAFT Clifford Neuman
9 The Kerberos Network Authentication Service (V5)
10 draft-ietf-cat-kerberos-revisions-10
15 This document is an Internet-Draft and is in full conformance with all
16 provisions of Section 10 of RFC 2026. Internet-Drafts are working documents
17 of the Internet Engineering Task Force (IETF), its areas, and its working
18 groups. Note that other groups may also distribute working documents as
21 Internet-Drafts are draft documents valid for a maximum of six months and
22 may be updated, replaced, or obsoleted by other documents at any time. It is
23 inappropriate to use Internet-Drafts as reference material or to cite them
24 other than as "work in progress."
26 The list of current Internet-Drafts can be accessed at
27 http://www.ietf.org/ietf/1id-abstracts.txt
29 The list of Internet-Draft Shadow Directories can be accessed at
30 http://www.ietf.org/shadow.html.
32 To learn the current status of any Internet-Draft, please check the
33 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
34 Directories on ftp.ietf.org (US East Coast), nic.nordu.net (Europe),
35 ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
37 The distribution of this memo is unlimited. It is filed as
38 draft-ietf-cat-kerberos-revisions-10.txt, and expires May 20, 2002. Please
39 send comments to: ietf-krb-wg@anl.gov
43 This document provides an overview and specification of Version 5 of the
44 Kerberos protocol, and updates RFC1510 to clarify aspects of the protocol
45 and its intended use that require more detailed or clearer explanation than
46 was provided in RFC1510. This document is intended to provide a detailed
47 description of the protocol, suitable for implementation, together with
48 descriptions of the appropriate use of protocol messages and fields within
51 This document is not intended to describe Kerberos to the end user, system
52 administrator, or application developer. Higher level papers describing
53 Version 5 of the Kerberos system [NT94] and documenting version 4 [SNS88],
54 are available elsewhere.
56 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
60 This INTERNET-DRAFT describes the concepts and model upon which the Kerberos
61 network authentication system is based. It also specifies Version 5 of the
64 The motivations, goals, assumptions, and rationale behind most design
65 decisions are treated cursorily; they are more fully described in a paper
66 available in IEEE communications [NT94] and earlier in the Kerberos portion
67 of the Athena Technical Plan [MNSS87]. The protocols have been a proposed
68 standard and are being considered for advancement for draft standard through
69 the IETF standard process. Comments are encouraged on the presentation, but
70 only minor refinements to the protocol as implemented or extensions that fit
71 within current protocol framework will be considered at this time.
73 Requests for addition to an electronic mailing list for discussion of
74 Kerberos, kerberos@MIT.EDU, may be addressed to kerberos-request@MIT.EDU.
75 This mailing list is gatewayed onto the Usenet as the group
76 comp.protocols.kerberos. Requests for further information, including
77 documents and code availability, may be sent to info-kerberos@MIT.EDU.
81 The Kerberos model is based in part on Needham and Schroeder's trusted
82 third-party authentication protocol [NS78] and on modifications suggested by
83 Denning and Sacco [DS81]. The original design and implementation of Kerberos
84 Versions 1 through 4 was the work of two former Project Athena staff
85 members, Steve Miller of Digital Equipment Corporation and Clifford Neuman
86 (now at the Information Sciences Institute of the University of Southern
87 California), along with Jerome Saltzer, Technical Director of Project
88 Athena, and Jeffrey Schiller, MIT Campus Network Manager. Many other members
89 of Project Athena have also contributed to the work on Kerberos.
91 Version 5 of the Kerberos protocol (described in this document) has evolved
92 from Version 4 based on new requirements and desires for features not
93 available in Version 4. The design of Version 5 of the Kerberos protocol was
94 led by Clifford Neuman and John Kohl with much input from the community. The
95 development of the MIT reference implementation was led at MIT by John Kohl
96 and Theodore T'so, with help and contributed code from many others. Since
97 RFC1510 was issued, extensions and revisions to the protocol have been
98 proposed by many individuals. Some of these proposals are reflected in this
99 document. Where such changes involved significant effort, the document cites
100 the contribution of the proposer.
102 Reference implementations of both version 4 and version 5 of Kerberos are
103 publicly available and commercial implementations have been developed and
104 are widely used. Details on the differences between Kerberos Versions 4 and
105 5 can be found in [KNT92].
108 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
112 Kerberos provides a means of verifying the identities of principals, (e.g. a
113 workstation user or a network server) on an open (unprotected) network. This
114 is accomplished without relying on assertions by the host operating system,
115 without basing trust on host addresses, without requiring physical security
116 of all the hosts on the network, and under the assumption that packets
117 traveling along the network can be read, modified, and inserted at
118 will[1.1]. Kerberos performs authentication under these conditions as a
119 trusted third-party authentication service by using conventional (shared
120 secret key [1.2]) cryptography. Kerberos extensions (outside the scope of
121 this document) can provide for the use of public key cryptography during
122 certain phases of the authentication protocol [@RFCE: if PKINIT advances
123 concurrently include reference to the RFC here]. Such extensions support
124 Kerberos authentication for users registered with public key certification
125 authorities and provide certain benefits of public key cryptography in
126 situations where they are needed.
128 The basic Kerberos authentication process proceeds as follows: A client
129 sends a request to the authentication server (AS) requesting "credentials"
130 for a given server. The AS responds with these credentials, encrypted in the
131 client's key. The credentials consist of a "ticket" for the server and a
132 temporary encryption key (often called a "session key"). The client
133 transmits the ticket (which contains the client's identity and a copy of the
134 session key, all encrypted in the server's key) to the server. The session
135 key (now shared by the client and server) is used to authenticate the
136 client, and may optionally be used to authenticate the server. It may also
137 be used to encrypt further communication between the two parties or to
138 exchange a separate sub-session key to be used to encrypt further
141 Implementation of the basic protocol consists of one or more authentication
142 servers running on physically secure hosts. The authentication servers
143 maintain a database of principals (i.e., users and servers) and their secret
144 keys. Code libraries provide encryption and implement the Kerberos protocol.
145 In order to add authentication to its transactions, a typical network
146 application adds one or two calls to the Kerberos library directly or
147 through the Generic Security Services Application Programming Interface,
148 GSSAPI, described in separate document [ref to GSSAPI RFC]. These calls
149 result in the transmission of the necessary messages to achieve
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 for
155 a ticket for the desired server to the AS. The reply is sent encrypted in
156 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 uses
159 the TGT to authenticate itself to the TGS in the same manner as if it were
160 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 points
164 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 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
174 To verify the identities of the principals in a transaction, the client
175 transmits the ticket to the application server. Since the ticket is sent "in
176 the clear" (parts of it are encrypted, but this encryption doesn't thwart
177 replay) and might be intercepted and reused by an attacker, additional
178 information is sent to prove that the message originated with the principal
179 to whom the ticket was issued. This information (called the authenticator)
180 is encrypted in the session key, and includes a timestamp. The timestamp
181 proves that the message was recently generated and is not a replay.
182 Encrypting the authenticator in the session key proves that it was generated
183 by a party possessing the session key. Since no one except the requesting
184 principal and the server know the session key (it is never sent over the
185 network in the clear) this guarantees the identity of the client.
187 The integrity of the messages exchanged between principals can also be
188 guaranteed using the session key (passed in the ticket and contained in the
189 credentials). This approach provides detection of both replay attacks and
190 message stream modification attacks. It is accomplished by generating and
191 transmitting a collision-proof checksum (elsewhere called a hash or digest
192 function) of the client's message, keyed with the session key. Privacy and
193 integrity of the messages exchanged between principals can be secured by
194 encrypting the data to be passed using the session key contained in the
195 ticket or the sub-session key found in the authenticator.
197 The authentication exchanges mentioned above require read-only access to the
198 Kerberos database. Sometimes, however, the entries in the database must be
199 modified, such as when adding new principals or changing a principal's key.
200 This is done using a protocol between a client and a third Kerberos server,
201 the Kerberos Administration Server (KADM). There is also a protocol for
202 maintaining multiple copies of the Kerberos database. Neither of these
203 protocols are described in this document.
205 1.1. Cross-realm operation
207 The Kerberos protocol is designed to operate across organizational
208 boundaries. A client in one organization can be authenticated to a server in
209 another. Each organization wishing to run a Kerberos server establishes its
210 own "realm". The name of the realm in which a client is registered is part
211 of the client's name, and can be used by the end-service to decide whether
214 By establishing "inter-realm" keys, the administrators of two realms can
215 allow a client authenticated in the local realm to prove its identity to
216 servers in other realms[1.3]. The exchange of inter-realm keys (a separate
217 key may be used for each direction) registers the ticket-granting service of
218 each realm as a principal in the other realm. A client is then able to
219 obtain a ticket-granting ticket for the remote realm's ticket-granting
220 service from its local realm. When that ticket-granting ticket is used, the
221 remote ticket-granting service uses the inter-realm key (which usually
222 differs from its own normal TGS key) to decrypt the ticket-granting ticket,
223 and is thus certain that it was issued by the client's own TGS. Tickets
224 issued by the remote ticket-granting service will indicate to the
225 end-service that the client was authenticated from another realm.
227 A realm is said to communicate with another realm if the two realms share an
228 inter-realm key, or if the local realm shares an inter-realm key with an
229 intermediate realm that communicates with the remote realm. An
230 authentication path is the sequence of intermediate realms that are
231 transited in communicating from one realm to another.
234 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
236 Realms are typically organized hierarchically. Each realm shares a key with
237 its parent and a different key with each child. If an inter-realm key is not
238 directly shared by two realms, the hierarchical organization allows an
239 authentication path to be easily constructed. If a hierarchical organization
240 is not used, it may be necessary to consult a database in order to construct
241 an authentication path between realms.
243 Although realms are typically hierarchical, intermediate realms may be
244 bypassed to achieve cross-realm authentication through alternate
245 authentication paths (these might be established to make communication
246 between two realms more efficient). It is important for the end-service to
247 know which realms were transited when deciding how much faith to place in
248 the authentication process. To facilitate this decision, a field in each
249 ticket contains the names of the realms that were involved in authenticating
252 The application server is ultimately responsible for accepting or rejecting
253 authentication and should check the transited field. The application server
254 may choose to rely on the KDC for the application server's realm to check
255 the transited field. The application server's KDC will set the
256 TRANSITED-POLICY-CHECKED flag in this case. The KDC's for intermediate
257 realms may also check the transited field as they issue
258 ticket-granting-tickets for other realms, but they are encouraged not to do
259 so. A client may request that the KDC's not check the transited field by
260 setting the DISABLE-TRANSITED-CHECK flag. KDC's are encouraged but not
261 required to honor this flag.
263 1.2. Choosing a principal with which to communicate
265 The Kerberos protocol provides the means for verifying (subject to the
266 assumptions in 1.4) that the entity with which one communicates is the same
267 entity that was registered with the KDC using the claimed identity
268 (principal name). It is still necessary to determine whether that identity
269 corresponds to the entity with which one intends to communicate.
271 When appropriate data has been exchanged in advance, this determination may
272 be performed syntactically by the application based on the application
273 protocol specification, information provided by the user, and configuration
274 files. For example, the server principal name (including realm) for a telnet
275 server might be derived from the user specified host name (from the telnet
276 command line), the "host/" prefix specified in the application protocol
277 specification, and a mapping to a Kerberos realm derived syntactically from
278 the domain part of the specified hostname and information from the local
279 Kerberos realms database.
281 One can also rely on trusted third parties to make this determination, but
282 only when the data obtained from the third party is suitably integrity
283 protected wile resident on the third party server and when transmitted.
284 Thus, for example, one should not rely on an unprotected domain name system
285 record to map a host alias to the primary name of a server, accepting the
286 primary name as the party one intends to contact, since an attacker can
287 modify the mapping and impersonate the party with which one intended to
291 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
295 As an authentication service, Kerberos provides a means of verifying the
296 identity of principals on a network. Authentication is usually useful
297 primarily as a first step in the process of authorization, determining
298 whether a client may use a service, which objects the client is allowed to
299 access, and the type of access allowed for each. Kerberos does not, by
300 itself, provide authorization. Possession of a client ticket for a service
301 provides only for authentication of the client to that service, and in the
302 absence of a separate authorization procedure, it should not be considered
303 by an application as authorizing the use of that service.
305 Such separate authorization methods may be implemented as application
306 specific access control functions and may utilize files on the application
307 server, or on separately issued authorization credentials such as those
308 based on proxies [Neu93], or on other authorization services. Separately
309 authenticated authorization credentials may be embedded in a tickets
310 authorization data when encapsulated by the kdc-issued authorization data
313 Applications should not accept the mere issuance of a service ticket by the
314 Kerberos server (even by a modified Kerberos server) as granting authority
315 to use the service, since such applications may become vulnerable to the
316 bypass of this authorization check in an environment if they interoperate
317 with other KDCs or where other options for application authentication (e.g.
318 the PKTAPP proposal) are provided.
320 1.4. Environmental assumptions
322 Kerberos imposes a few assumptions on the environment in which it can
325 * "Denial of service" attacks are not solved with Kerberos. There are
326 places in the protocols where an intruder can prevent an application
327 from participating in the proper authentication steps. Detection and
328 solution of such attacks (some of which can appear to be not-uncommon
329 "normal" failure modes for the system) is usually best left to the
330 human administrators and users.
331 * Principals must keep their secret keys secret. If an intruder somehow
332 steals a principal's key, it will be able to masquerade as that
333 principal or impersonate any server to the legitimate principal.
334 * "Password guessing" attacks are not solved by Kerberos. If a user
335 chooses a poor password, it is possible for an attacker to successfully
336 mount an offline dictionary attack by repeatedly attempting to decrypt,
337 with successive entries from a dictionary, messages obtained which are
338 encrypted under a key derived from the user's password.
339 * Each host on the network must have a clock which is "loosely
340 synchronized" to the time of the other hosts; this synchronization is
341 used to reduce the bookkeeping needs of application servers when they
342 do replay detection. The degree of "looseness" can be configured on a
343 per-server basis, but is typically on the order of 5 minutes. If the
344 clocks are synchronized over the network, the clock synchronization
345 protocol must itself be secured from network attackers.
346 * Principal identifiers are not recycled on a short-term basis. A typical
347 mode of access control will use access control lists (ACLs) to grant
348 permissions to particular principals. If a stale ACL entry remains for
349 a deleted principal and the principal identifier is reused, the new
350 principal will inherit rights specified in the stale ACL entry. By not
351 re-using principal identifiers, the danger of inadvertent access is
355 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
357 1.5. Glossary of terms
359 Below is a list of terms used throughout this document.
362 Verifying the claimed identity of a principal.
363 Authentication header
364 A record containing a Ticket and an Authenticator to be presented to a
365 server as part of the authentication process.
367 A sequence of intermediate realms transited in the authentication
368 process when communicating from one realm to another.
370 A record containing information that can be shown to have been recently
371 generated using the session key known only by the client and server.
373 The process of determining whether a client may use a service, which
374 objects the client is allowed to access, and the type of access allowed
377 A token that grants the bearer permission to access an object or
378 service. In Kerberos, this might be a ticket whose use is restricted by
379 the contents of the authorization data field, but which lists no
380 network addresses, together with the session key necessary to use the
383 The output of an encryption function. Encryption transforms plaintext
386 A process that makes use of a network service on behalf of a user. Note
387 that in some cases a Server may itself be a client of some other server
388 (e.g. a print server may be a client of a file server).
390 A ticket plus the secret session key necessary to successfully use that
391 ticket in an authentication exchange.
393 Key Distribution Center, a network service that supplies tickets and
394 temporary session keys; or an instance of that service or the host on
395 which it runs. The KDC services both initial ticket and ticket-granting
396 ticket requests. The initial ticket portion is sometimes referred to as
397 the Authentication Server (or service). The ticket-granting ticket
398 portion is sometimes referred to as the ticket-granting server (or
401 Aside from the 3-headed dog guarding Hades, the name given to Project
402 Athena's authentication service, the protocol used by that service, or
403 the code used to implement the authentication service.
405 The input to an encryption function or the output of a decryption
406 function. Decryption transforms ciphertext into plaintext.
408 A named client or server entity that participates in a network
409 communication, with one name that is considered canonical.
411 The canonical name used to uniquely identify each different principal.
413 To encipher a record containing several fields in such a way that the
414 fields cannot be individually replaced without either knowledge of the
415 encryption key or leaving evidence of tampering.
417 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
420 An encryption key shared by a principal and the KDC, distributed
421 outside the bounds of the system, with a long lifetime. In the case of
422 a human user's principal, the secret key may be derived from a
425 A particular Principal which provides a resource to network clients.
426 The server is sometimes referred to as the Application Server.
428 A resource provided to network clients; often provided by more than one
429 server (for example, remote file service).
431 A temporary encryption key used between two principals, with a lifetime
432 limited to the duration of a single login "session".
434 A temporary encryption key used between two principals, selected and
435 exchanged by the principals using the session key, and with a lifetime
436 limited to the duration of a single association.
438 A record that helps a client authenticate itself to a server; it
439 contains the client's identity, a session key, a timestamp, and other
440 information, all sealed using the server's secret key. It only serves
441 to authenticate a client when presented along with a fresh
444 2. Ticket flag uses and requests
446 Each Kerberos ticket contains a set of flags which are used to indicate
447 attributes of that ticket. Most flags may be requested by a client when the
448 ticket is obtained; some are automatically turned on and off by a Kerberos
449 server as required. The following sections explain what the various flags
450 mean, and gives examples of reasons to use such a flag. With the excepttion
451 of the ANONYMOUS and INVALID flags clients may ignore ticket flags that are
454 2.1. Initial, pre-authenticated, and hardware authenticated tickets
456 The INITIAL flag indicates that a ticket was issued using the AS protocol
457 and not issued based on a ticket-granting ticket. Application servers that
458 want to require the demonstrated knowledge of a client's secret key (e.g. a
459 password-changing program) can insist that this flag be set in any tickets
460 they accept, and thus be assured that the client's key was recently
461 presented to the application client.
463 The PRE-AUTHENT and HW-AUTHENT flags provide additional information about
464 the initial authentication, regardless of whether the current ticket was
465 issued directly (in which case INITIAL will also be set) or issued on the
466 basis of a ticket-granting ticket (in which case the INITIAL flag is clear,
467 but the PRE-AUTHENT and HW-AUTHENT flags are carried forward from the
468 ticket-granting ticket).
472 The INVALID flag indicates that a ticket is invalid. Application servers
473 must reject tickets which have this flag set. A postdated ticket will
474 usually be issued in this form. Invalid tickets must be validated by the KDC
475 before use, by presenting them to the KDC in a TGS request with the VALIDATE
476 option specified. The KDC will only validate tickets after their starttime
477 has passed. The validation is required so that postdated tickets which have
478 been stolen before their starttime can be rendered permanently invalid
479 (through a hot-list mechanism) (see section 3.3.3.1).
482 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
484 2.3. Renewable tickets
486 Applications may desire to hold tickets which can be valid for long periods
487 of time. However, this can expose their credentials to potential theft for
488 equally long periods, and those stolen credentials would be valid until the
489 expiration time of the ticket(s). Simply using short-lived tickets and
490 obtaining new ones periodically would require the client to have long-term
491 access to its secret key, an even greater risk. Renewable tickets can be
492 used to mitigate the consequences of theft. Renewable tickets have two
493 "expiration times": the first is when the current instance of the ticket
494 expires, and the second is the latest permissible value for an individual
495 expiration time. An application client must periodically (i.e. before it
496 expires) present a renewable ticket to the KDC, with the RENEW option set in
497 the KDC request. The KDC will issue a new ticket with a new session key and
498 a later expiration time. All other fields of the ticket are left unmodified
499 by the renewal process. When the latest permissible expiration time arrives,
500 the ticket expires permanently. At each renewal, the KDC may consult a
501 hot-list to determine if the ticket had been reported stolen since its last
502 renewal; it will refuse to renew such stolen tickets, and thus the usable
503 lifetime of stolen tickets is reduced.
505 The RENEWABLE flag in a ticket is normally only interpreted by the
506 ticket-granting service (discussed below in section 3.3). It can usually be
507 ignored by application servers. However, some particularly careful
508 application servers may wish to disallow renewable tickets.
510 If a renewable ticket is not renewed by its expiration time, the KDC will
511 not renew the ticket. The RENEWABLE flag is reset by default, but a client
512 may request it be set by setting the RENEWABLE option in the KRB_AS_REQ
513 message. If it is set, then the renew-till field in the ticket contains the
514 time after which the ticket may not be renewed.
516 2.4. Postdated tickets
518 Applications may occasionally need to obtain tickets for use much later,
519 e.g. a batch submission system would need tickets to be valid at the time
520 the batch job is serviced. However, it is dangerous to hold valid tickets in
521 a batch queue, since they will be on-line longer and more prone to theft.
522 Postdated tickets provide a way to obtain these tickets from the KDC at job
523 submission time, but to leave them "dormant" until they are activated and
524 validated by a further request of the KDC. If a ticket theft were reported
525 in the interim, the KDC would refuse to validate the ticket, and the thief
528 The MAY-POSTDATE flag in a ticket is normally only interpreted by the
529 ticket-granting service. It can be ignored by application servers. This flag
530 must be set in a ticket-granting ticket in order to issue a postdated ticket
531 based on the presented ticket. It is reset by default; it may be requested
532 by a client by setting the ALLOW-POSTDATE option in the KRB_AS_REQ message.
533 This flag does not allow a client to obtain a postdated ticket-granting
534 ticket; postdated ticket-granting tickets can only by obtained by requesting
535 the postdating in the KRB_AS_REQ message. The life (endtime-starttime) of a
536 postdated ticket will be the remaining life of the ticket-granting ticket at
537 the time of the request, unless the RENEWABLE option is also set, in which
538 case it can be the full life (endtime-starttime) of the ticket-granting
539 ticket. The KDC may limit how far in the future a ticket may be postdated.
542 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
544 The POSTDATED flag indicates that a ticket has been postdated. The
545 application server can check the authtime field in the ticket to see when
546 the original authentication occurred. Some services may choose to reject
547 postdated tickets, or they may only accept them within a certain period
548 after the original authentication. When the KDC issues a POSTDATED ticket,
549 it will also be marked as INVALID, so that the application client must
550 present the ticket to the KDC to be validated before use.
552 2.5. Proxiable and proxy tickets
554 At times it may be necessary for a principal to allow a service to perform
555 an operation on its behalf. The service must be able to take on the identity
556 of the client, but only for a particular purpose. A principal can allow a
557 service to take on the principal's identity for a particular purpose by
560 The process of granting a proxy using the proxy and proxiable flags is used
561 to provide credentials for use with specific services. Though conceptually
562 also a proxy, user's wishing to delegate their identity for ANY purpose must
563 use the ticket forwarding mechanism described in the next section to forward
564 a ticket granting ticket.
566 The PROXIABLE flag in a ticket is normally only interpreted by the
567 ticket-granting service. It can be ignored by application servers. When set,
568 this flag tells the ticket-granting server that it is OK to issue a new
569 ticket (but not a ticket-granting ticket) with a different network address
570 based on this ticket. This flag is set if requested by the client on initial
571 authentication. By default, the client will request that it be set when
572 requesting a ticket granting ticket, and reset when requesting any other
575 This flag allows a client to pass a proxy to a server to perform a remote
576 request on its behalf, e.g. a print service client can give the print server
577 a proxy to access the client's files on a particular file server in order to
578 satisfy a print request.
580 In order to complicate the use of stolen credentials, Kerberos tickets are
581 usually valid from only those network addresses specifically included in the
582 ticket[2.1]. When granting a proxy, the client must specify the new network
583 address from which the proxy is to be used, or indicate that the proxy is to
584 be issued for use from any address.
586 The PROXY flag is set in a ticket by the TGS when it issues a proxy ticket.
587 Application servers may check this flag and at their option they may require
588 additional authentication from the agent presenting the proxy in order to
589 provide an audit trail.
591 2.6. Forwardable tickets
593 Authentication forwarding is an instance of a proxy where the service
594 granted is complete use of the client's identity. An example where it might
595 be used is when a user logs in to a remote system and wants authentication
596 to work from that system as if the login were local.
598 The FORWARDABLE flag in a ticket is normally only interpreted by the
599 ticket-granting service. It can be ignored by application servers. The
600 FORWARDABLE flag has an interpretation similar to that of the PROXIABLE
601 flag, except ticket-granting tickets may also be issued with different
602 network addresses. This flag is reset by default, but users may request that
603 it be set by setting the FORWARDABLE option in the AS request when they
604 request their initial ticket-granting ticket.
607 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
609 This flag allows for authentication forwarding without requiring the user to
610 enter a password again. If the flag is not set, then authentication
611 forwarding is not permitted, but the same result can still be achieved if
612 the user engages in the AS exchange specifying the requested network
613 addresses and supplies a password.
615 The FORWARDED flag is set by the TGS when a client presents a ticket with
616 the FORWARDABLE flag set and requests a forwarded ticket by specifying the
617 FORWARDED KDC option and supplying a set of addresses for the new ticket. It
618 is also set in all tickets issued based on tickets with the FORWARDED flag
619 set. Application servers may choose to process FORWARDED tickets differently
620 than non-FORWARDED tickets.
622 2.7 Transited Policy Checking
624 In Kerberos, the application server is ultimately responsible for accepting
625 or rejecting authentication and should check that only suitably trusted
626 KDC's are relied upon to authenticate a principal. The transited field in
627 the ticket identifies which KDC's were involved in the authentication
628 process and an application server would normally check this field. While the
629 end server ultimately decides whether authentication is valid, the KDC for
630 the end server's realm may apply a realm specific policy for validating the
631 transited field and accepting credentials for cross-realm authentication.
632 When the KDC applies such checks and accepts such cross-realm authentication
633 it will set the TRANSITED-POLICY-CHECKED flag in the service tickets it
634 issues based on the cross-realm TGT. A client may request that the KDC's not
635 check the transited field by setting the DISABLE-TRANSITED-CHECK flag. KDC's
636 are encouraged but not required to honor this flag.
638 2.8 Anonymous Tickets
640 When policy allows, a KDC may issue anonymous tickets for the purpose of
641 enabling encrypted communication between a client and server without
642 identifying the client to the server. Such anonymous tickets are issued with
643 a generic principal name configured on the KDC (e.g. "anonymous@") and will
644 have the ANONYMOUS flag set. A server accepting such a ticket may assume
645 that subsequent requests using the same ticket and session key originate
646 from the same user. Requests with the same username but different tickets
647 are likely to originate from different users. Users request anonymous ticket
648 by setting the REQUEST-ANONYMOUS option in an AS or TGS request.
650 2.9. Other KDC options
652 There are three additional options which may be set in a client's request of
657 The RENEWABLE-OK option indicates that the client will accept a renewable
658 ticket if a ticket with the requested life cannot otherwise be provided. If
659 a ticket with the requested life cannot be provided, then the KDC may issue
660 a renewable ticket with a renew-till equal to the the requested endtime. The
661 value of the renew-till field may still be adjusted by site-determined
662 limits or limits imposed by the individual principal or server.
665 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
667 2.9.2 ENC-TKT-IN-SKEY
669 In its basic form the Kerberos protocol supports authentication in a client
670 server setting and is not well suited to authentication in a peer-to-peer
671 environment because the long term key of the user does not remain on the
672 workstation after initial login. Authentication of such peers may be
673 supported by Kerberos in its user-to-user variant. The ENC-TKT-IN-SKEY
674 option supports user-to-user authentication by allowing the KDC to issue a
675 service ticket encrypted using the session key from another ticket granting
676 ticket issued to another user. The ENC-TKT-IN-SKEY option is honored only by
677 the ticket-granting service. It indicates that the ticket to be issued for
678 the end server is to be encrypted in the session key from the additional
679 second ticket-granting ticket provided with the request. See section 3.3.3
680 for specific details.
684 The following sections describe the interactions between network clients and
685 servers and the messages involved in those exchanges.
687 3.1. The Authentication Service Exchange
690 Message direction Message type Section
691 1. Client to Kerberos KRB_AS_REQ 5.4.1
692 2. Kerberos to client KRB_AS_REP or 5.4.2
695 The Authentication Service (AS) Exchange between the client and the Kerberos
696 Authentication Server is initiated by a client when it wishes to obtain
697 authentication credentials for a given server but currently holds no
698 credentials. In its basic form, the client's secret key is used for
699 encryption and decryption. This exchange is typically used at the initiation
700 of a login session to obtain credentials for a Ticket-Granting Server which
701 will subsequently be used to obtain credentials for other servers (see
702 section 3.3) without requiring further use of the client's secret key. This
703 exchange is also used to request credentials for services which must not be
704 mediated through the Ticket-Granting Service, but rather require a
705 principal's secret key, such as the password-changing service[3.1]. This
706 exchange does not by itself provide any assurance of the the identity of the
709 The exchange consists of two messages: KRB_AS_REQ from the client to
710 Kerberos, and KRB_AS_REP or KRB_ERROR in reply. The formats for these
711 messages are described in sections 5.4.1, 5.4.2, and 5.9.1.
713 In the request, the client sends (in cleartext) its own identity and the
714 identity of the server for which it is requesting credentials. The response,
715 KRB_AS_REP, contains a ticket for the client to present to the server, and a
716 session key that will be shared by the client and the server. The session
717 key and additional information are encrypted in the client's secret key. The
718 KRB_AS_REP message contains information which can be used to detect replays,
719 and to associate it with the message to which it replies.
721 Without pre-authentication, the authentication server does not know whether
722 the client is actually the principal named in the request. It simply sends a
723 reply without knowing or caring whether they are the same. This is
724 acceptable because nobody but the principal whose identity was given in the
725 request will be able to use the reply. Its critical information is encrypted
726 in that principal's key. The initial request supports an optional field that
727 can be used to pass additional information that might be needed for the
728 initial exchange. This field may be used for pre-authentication as described
732 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
734 Various errors can occur; these are indicated by an error response
735 (KRB_ERROR) instead of the KRB_AS_REP response. The error message is not
736 encrypted. The KRB_ERROR message contains information which can be used to
737 associate it with the message to which it replies. If suitable
738 preauthentication has occurred, an optional checksum may be included in the
739 KRB_ERROR message to prevent fabrication or modification of the KRB_ERROR
740 message. When a checksum is not present, the lack of integrity protection
741 precludes the ability to detect replays, fabrications, or modifications of
742 the message, and the client must not depend on information in the KRB_ERROR
743 message for security critical operations.
745 3.1.1. Generation of KRB_AS_REQ message
747 The client may specify a number of options in the initial request. Among
748 these options are whether pre-authentication is to be performed; whether the
749 requested ticket is to be renewable, proxiable, or forwardable; whether it
750 should be postdated or allow postdating of derivative tickets; whether the
751 client requests an anonymous ticket; and whether a renewable ticket will be
752 accepted in lieu of a non-renewable ticket if the requested ticket
753 expiration date cannot be satisfied by a non-renewable ticket (due to
754 configuration constraints; see section 4). See section A.1 for pseudocode.
756 The client prepares the KRB_AS_REQ message and sends it to the KDC.
758 3.1.2. Receipt of KRB_AS_REQ message
760 If all goes well, processing the KRB_AS_REQ message will result in the
761 creation of a ticket for the client to present to the server. The format for
762 the ticket is described in section 5.3.1. The contents of the ticket are
763 determined as follows.
765 3.1.3. Generation of KRB_AS_REP message
767 The authentication server looks up the client and server principals named in
768 the KRB_AS_REQ in its database, extracting their respective keys. If the
769 requested client principal named in the request is not known because it
770 doesn't exist in the KDC's principal database, then an error message with a
771 KDC_ERR_C_PRINCIPAL_UNKNOWN is returned.
773 If required, the server pre-authenticates the request, and if the
774 pre-authentication check fails, an error message with the code
775 KDC_ERR_PREAUTH_FAILED is returned. If pre-authentication is required, but
776 was not present in the request, an error message with the code
777 KDC_ERR_PREAUTH_REQUIRED is returned and the PA-ETYPE-INFO
778 pre-authentication field will be included in the KRB-ERROR message. If the
779 server cannot accommodate an encryption type requested by the client, an
780 error message with code KDC_ERR_ETYPE_NOSUPP is returned. Otherwise the KDC
781 generates a 'random' session key[3.3].
783 When responding to an AS request, if there are multiple encryption keys
784 registered for a client in the Kerberos database (or if the key registered
785 supports multiple encryption types; e.g. DES3-CBC-SHA1 and
786 DES3-CBC-SHA1-KD), then the etype field from the AS request is used by the
787 KDC to select the encryption method to be used to protect the encrypted part
788 of the KRB_AS_REP message which is sent to the client. If there is more than
789 one supported strong encryption type in the etype list, the first valid
790 etype for which an encryption key is available is used. The encryption
791 method used to protect the encrypted part of the KRB_TGS_REP message is the
792 keytype of the session key found in the ticket granting ticket presented in
796 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
798 If the user's key was generated using an alternate string to key function
799 than that used by the selected encryption type, information needed by the
800 string to key function will be returned to the client in the padata field of
801 the KRB_AS_REP message using the PA-PW-SALT, PA-AFS3-SALT, or similar
802 pre-authentication typed values. This does not affect the encryption
803 performed by the KDC since the key stored in the principal database already
804 has the string to key transformation applied.
806 When the etype field is present in a KDC request, whether an AS or TGS
807 request, the KDC will attempt to assign the type of the random session key
808 from the list of methods in the etype field. The KDC will select the
809 appropriate type using the list of methods provided together with
810 information from the Kerberos database indicating acceptable encryption
811 methods for the application server. The KDC will not issue tickets with a
812 weak session key encryption type.
814 If the requested start time is absent, indicates a time in the past, or is
815 within the window of acceptable clock skew for the KDC and the POSTDATE
816 option has not been specified, then the start time of the ticket is set to
817 the authentication server's current time. If it indicates a time in the
818 future beyond the acceptable clock skew, but the POSTDATED option has not
819 been specified then the error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise
820 the requested start time is checked against the policy of the local realm
821 (the administrator might decide to prohibit certain types or ranges of
822 postdated tickets), and if acceptable, the ticket's start time is set as
823 requested and the INVALID flag is set in the new ticket. The postdated
824 ticket must be validated before use by presenting it to the KDC after the
825 start time has been reached.
827 The expiration time of the ticket will be set to the earlier of the
828 requested endtime and a time determined by local policy, possibly determined
829 using realm or principal specific factors. For example, the expiration time
830 may be set to the minimum of the following:
832 * The expiration time (endtime) requested in the KRB_AS_REQ message.
833 * The ticket's start time plus the maximum allowable lifetime associated
834 with the client principal from the authentication server's database
836 * The ticket's start time plus the maximum allowable lifetime associated
837 with the server principal.
838 * The ticket's start time plus the maximum lifetime set by the policy of
841 If the requested expiration time minus the start time (as determined above)
842 is less than a site-determined minimum lifetime, an error message with code
843 KDC_ERR_NEVER_VALID is returned. If the requested expiration time for the
844 ticket exceeds what was determined as above, and if the 'RENEWABLE-OK'
845 option was requested, then the 'RENEWABLE' flag is set in the new ticket,
846 and the renew-till value is set as if the 'RENEWABLE' option were requested
847 (the field and option names are described fully in section 5.4.1).
849 If the RENEWABLE option has been requested or if the RENEWABLE-OK option has
850 been set and a renewable ticket is to be issued, then the renew-till field
851 is set to the minimum of:
853 * Its requested value.
854 * The start time of the ticket plus the minimum of the two maximum
855 renewable lifetimes associated with the principals' database entries.
856 * The start time of the ticket plus the maximum renewable lifetime set by
857 the policy of the local realm.
860 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
862 The flags field of the new ticket will have the following options set if
863 they have been requested and if the policy of the local realm allows:
864 FORWARDABLE, MAY-POSTDATE, POSTDATED, PROXIABLE, RENEWABLE, ANONYMOUS. If
865 the new ticket is post-dated (the start time is in the future), its INVALID
866 flag will also be set.
868 If all of the above succeed, the server will encrypt ciphertext part of the
869 ticket using the encryption key extracted from the server principal's record
870 in the Kerberos database using the encryption type associated with the
871 server principal's key (this choice is NOT affected by the etype field in
872 the request). It then formats a KRB_AS_REP message (see section 5.4.2),
873 copying the addresses in the request into the caddr of the response, placing
874 any required pre-authentication data into the padata of the response, and
875 encrypts the ciphertext part in the client's key using an acceptable
876 encryption method requested in the etype field of the request, and sends the
877 message to the client. See section A.2 for pseudocode.
879 3.1.4. Generation of KRB_ERROR message
881 Several errors can occur, and the Authentication Server responds by
882 returning an error message, KRB_ERROR, to the client, with the error-code,
883 e-text, and optional e-cksum fields set to appropriate values. The error
884 message contents and details are described in Section 5.9.1.
886 3.1.5. Receipt of KRB_AS_REP message
888 If the reply message type is KRB_AS_REP, then the client verifies that the
889 cname and crealm fields in the cleartext portion of the reply match what it
890 requested. If any padata fields are present, they may be used to derive the
891 proper secret key to decrypt the message. The client decrypts the encrypted
892 part of the response using its secret key, verifies that the nonce in the
893 encrypted part matches the nonce it supplied in its request (to detect
894 replays). It also verifies that the sname and srealm in the response match
895 those in the request (or are otherwise expected values), and that the host
896 address field is also correct. It then stores the ticket, session key, start
897 and expiration times, and other information for later use. The
898 key-expiration field from the encrypted part of the response may be checked
899 to notify the user of impending key expiration (the client program could
900 then suggest remedial action, such as a password change). See section A.3
903 Proper decryption of the KRB_AS_REP message is not sufficient for the host
904 to verify the identity of the user; the user and an attacker could cooperate
905 to generate a KRB_AS_REP format message which decrypts properly but is not
906 from the proper KDC. If the host wishes to verify the identity of the user,
907 it must require the user to present application credentials which can be
908 verified using a securely-stored secret key for the host. If those
909 credentials can be verified, then the identity of the user can be assured.
911 3.1.6. Receipt of KRB_ERROR message
913 If the reply message type is KRB_ERROR, then the client interprets it as an
914 error and performs whatever application-specific tasks are necessary to
918 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
920 3.2. The Client/Server Authentication Exchange
923 Message direction Message type Section
924 Client to Application server KRB_AP_REQ 5.5.1
925 [optional] Application server to client KRB_AP_REP or 5.5.2
928 The client/server authentication (CS) exchange is used by network
929 applications to authenticate the client to the server and vice versa. The
930 client must have already acquired credentials for the server using the AS or
933 3.2.1. The KRB_AP_REQ message
935 The KRB_AP_REQ contains authentication information which should be part of
936 the first message in an authenticated transaction. It contains a ticket, an
937 authenticator, and some additional bookkeeping information (see section
938 5.5.1 for the exact format). The ticket by itself is insufficient to
939 authenticate a client, since tickets are passed across the network in
940 cleartext[3.4], so the authenticator is used to prevent invalid replay of
941 tickets by proving to the server that the client knows the session key of
942 the ticket and thus is entitled to use the ticket. The KRB_AP_REQ message is
943 referred to elsewhere as the 'authentication header.'
945 3.2.2. Generation of a KRB_AP_REQ message
947 When a client wishes to initiate authentication to a server, it obtains
948 (either through a credentials cache, the AS exchange, or the TGS exchange) a
949 ticket and session key for the desired service. The client may re-use any
950 tickets it holds until they expire. To use a ticket the client constructs a
951 new Authenticator from the the system time, its name, and optionally an
952 application specific checksum, an initial sequence number to be used in
953 KRB_SAFE or KRB_PRIV messages, and/or a session subkey to be used in
954 negotiations for a session key unique to this particular session.
955 Authenticators may not be re-used and will be rejected if replayed to a
956 server[3.5]. If a sequence number is to be included, it should be randomly
957 chosen so that even after many messages have been exchanged it is not likely
958 to collide with other sequence numbers in use.
960 The client may indicate a requirement of mutual authentication or the use of
961 a session-key based ticket by setting the appropriate flag(s) in the
962 ap-options field of the message.
964 The Authenticator is encrypted in the session key and combined with the
965 ticket to form the KRB_AP_REQ message which is then sent to the end server
966 along with any additional application-specific information. See section A.9
969 3.2.3. Receipt of KRB_AP_REQ message
971 Authentication is based on the server's current time of day (clocks must be
972 loosely synchronized), the authenticator, and the ticket. Several errors are
973 possible. If an error occurs, the server is expected to reply to the client
974 with a KRB_ERROR message. This message may be encapsulated in the
975 application protocol if its 'raw' form is not acceptable to the protocol.
976 The format of error messages is described in section 5.9.1.
979 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
981 The algorithm for verifying authentication information is as follows. If the
982 message type is not KRB_AP_REQ, the server returns the KRB_AP_ERR_MSG_TYPE
983 error. If the key version indicated by the Ticket in the KRB_AP_REQ is not
984 one the server can use (e.g., it indicates an old key, and the server no
985 longer possesses a copy of the old key), the KRB_AP_ERR_BADKEYVER error is
986 returned. If the USE-SESSION-KEY flag is set in the ap-options field, it
987 indicates to the server that the ticket is encrypted in the session key from
988 the server's ticket-granting ticket rather than its secret key [3.6].
990 Since it is possible for the server to be registered in multiple realms,
991 with different keys in each, the srealm field in the unencrypted portion of
992 the ticket in the KRB_AP_REQ is used to specify which secret key the server
993 should use to decrypt that ticket. The KRB_AP_ERR_NOKEY error code is
994 returned if the server doesn't have the proper key to decipher the ticket.
996 The ticket is decrypted using the version of the server's key specified by
997 the ticket. If the decryption routines detect a modification of the ticket
998 (each encryption system must provide safeguards to detect modified
999 ciphertext; see section 6), the KRB_AP_ERR_BAD_INTEGRITY error is returned
1000 (chances are good that different keys were used to encrypt and decrypt).
1002 The authenticator is decrypted using the session key extracted from the
1003 decrypted ticket. If decryption shows it to have been modified, the
1004 KRB_AP_ERR_BAD_INTEGRITY error is returned. The name and realm of the client
1005 from the ticket are compared against the same fields in the authenticator.
1006 If they don't match, the KRB_AP_ERR_BADMATCH error is returned (they might
1007 not match, for example, if the wrong session key was used to encrypt the
1008 authenticator). The addresses in the ticket (if any) are then searched for
1009 an address matching the operating-system reported address of the client. If
1010 no match is found or the server insists on ticket addresses but none are
1011 present in the ticket, the KRB_AP_ERR_BADADDR error is returned. If the
1012 local (server) time and the client time in the authenticator differ by more
1013 than the allowable clock skew (e.g., 5 minutes), the KRB_AP_ERR_SKEW error
1016 Unless the application server provides its own suitable means to protect
1017 against replay (for example, a challenge-response sequence initiated by the
1018 server after authentication, or use of a server-generated encryption
1019 subkey), the server must utilize a replay cache to remember any
1020 authenticator presented within the allowable clock skew. Careful analysis of
1021 the application protocol and implementation is recommended before
1022 eliminating this cache. The replay cache will store the server name, along
1023 with the client name, time and microsecond fields from the recently-seen
1024 authenticators and if a matching tuple is found, the KRB_AP_ERR_REPEAT error
1025 is returned [3.7]. If a server loses track of authenticators presented
1026 within the allowable clock skew, it must reject all requests until the clock
1027 skew interval has passed, providing assurance that any lost or re-played
1028 authenticators will fall outside the allowable clock skew and can no longer
1029 be successfully replayed[3.8].
1031 If a sequence number is provided in the authenticator, the server saves it
1032 for later use in processing KRB_SAFE and/or KRB_PRIV messages. If a subkey
1033 is present, the server either saves it for later use or uses it to help
1034 generate its own choice for a subkey to be returned in a KRB_AP_REP message.
1036 If multiple servers (for example, different services on one machine, or a
1037 single service implemented on multiple machines) share a service principal
1038 (a practice we do not recommend in general, but acknowledge will be used in
1039 some cases), they should also share this replay cache, or the application
1040 protocol should be designed so as to eliminate the need for it. Note that
1042 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1044 this applies to all of the services, if any of the application protocols
1045 does not have replay protection built in; an authenticator used with such a
1046 service could later be replayed to a different service with the same service
1047 principal but no replay protection, if the former doesn't record the
1048 authenticator information in the common replay cache.
1050 The server computes the age of the ticket: local (server) time minus the
1051 start time inside the Ticket. If the start time is later than the current
1052 time by more than the allowable clock skew or if the INVALID flag is set in
1053 the ticket, the KRB_AP_ERR_TKT_NYV error is returned. Otherwise, if the
1054 current time is later than end time by more than the allowable clock skew,
1055 the KRB_AP_ERR_TKT_EXPIRED error is returned.
1057 If all these checks succeed without an error, the server is assured that the
1058 client possesses the credentials of the principal named in the ticket and
1059 thus, the client has been authenticated to the server. See section A.10 for
1062 Passing these checks provides only authentication of the named principal; it
1063 does not imply authorization to use the named service. Applications must
1064 make a separate authorization decisions based upon the authenticated name of
1065 the user, the requested operation, local access control information such as
1066 that contained in a .k5login or .k5users file, and possibly a separate
1067 distributed authorization service.
1069 3.2.4. Generation of a KRB_AP_REP message
1071 Typically, a client's request will include both the authentication
1072 information and its initial request in the same message, and the server need
1073 not explicitly reply to the KRB_AP_REQ. However, if mutual authentication
1074 (not only authenticating the client to the server, but also the server to
1075 the client) is being performed, the KRB_AP_REQ message will have
1076 MUTUAL-REQUIRED set in its ap-options field, and a KRB_AP_REP message is
1077 required in response. As with the error message, this message may be
1078 encapsulated in the application protocol if its "raw" form is not acceptable
1079 to the application's protocol. The timestamp and microsecond field used in
1080 the reply must be the client's timestamp and microsecond field (as provided
1081 in the authenticator)[3.9]. If a sequence number is to be included, it
1082 should be randomly chosen as described above for the authenticator. A subkey
1083 may be included if the server desires to negotiate a different subkey. The
1084 KRB_AP_REP message is encrypted in the session key extracted from the
1085 ticket. See section A.11 for pseudocode.
1087 3.2.5. Receipt of KRB_AP_REP message
1089 If a KRB_AP_REP message is returned, the client uses the session key from
1090 the credentials obtained for the server[3.10] to decrypt the message, and
1091 verifies that the timestamp and microsecond fields match those in the
1092 Authenticator it sent to the server. If they match, then the client is
1093 assured that the server is genuine. The sequence number and subkey (if
1094 present) are retained for later use. See section A.12 for pseudocode.
1096 3.2.6. Using the encryption key
1098 After the KRB_AP_REQ/KRB_AP_REP exchange has occurred, the client and server
1099 share an encryption key which can be used by the application. In some cases,
1100 the use of this session key will be implicit in the protocol; in others the
1101 method of use must be chosen from several alternatives. The 'true session
1102 key' to be used for KRB_PRIV, KRB_SAFE, or other application-specific uses
1103 may be chosen by the application based on the session key from the ticket
1105 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1107 and subkeys in the KRB_AP_REP message and the authenticator[3.11]. To
1108 mitigate the effect of failures in random number generation on the client it
1109 is strongly encouraged that any key derived by an application for subsequent
1110 use include the full key entropy derived from the KDC generated session key
1111 carried in the ticket. We leave the protocol negotiations of how to use the
1112 key (e.g. selecting an encryption or checksum type) to the application
1113 programmer; the Kerberos protocol does not constrain the implementation
1114 options, but an example of how this might be done follows.
1116 One way that an application may choose to negotiate a key to be used for
1117 subsequent integrity and privacy protection is for the client to propose a
1118 key in the subkey field of the authenticator. The server can then choose a
1119 key using the proposed key from the client as input, returning the new
1120 subkey in the subkey field of the application reply. This key could then be
1121 used for subsequent communication.
1123 To make this example more concrete, if the communication patterns of an
1124 application dictates the use of encryption modes of operation incompatible
1125 with the encryption system used for the authenticator, then a key compatible
1126 with the required encryption system may be generated by either the client,
1127 the server, or collaboratively by both and exchanged using the subkey field.
1128 This generation might involve the use of a random number as a pre-key,
1129 initially generated by either party, which could then be encrypted using the
1130 session key from the ticket, and the result exchanged and used for
1131 subsequent encryption. By encrypting the pre-key with the session key from
1132 the ticket, randomness from the KDC generated key is assured of being
1133 present in the negotiated key. Application developers must be careful
1134 however, to use a means of introducing this entropy that does not allow an
1135 attacker to learn the session key from the ticket if it learns the key
1136 generated and used for subsequent communication. The reader should note that
1137 this is only an example, and that an analysis of the particular cryptosystem
1138 to be used, must be made before deciding how to generate values for the
1139 subkey fields, and the key to be used for subsequent communication.
1141 With both the one-way and mutual authentication exchanges, the peers should
1142 take care not to send sensitive information to each other without proper
1143 assurances. In particular, applications that require privacy or integrity
1144 should use the KRB_AP_REP response from the server to client to assure both
1145 client and server of their peer's identity. If an application protocol
1146 requires privacy of its messages, it can use the KRB_PRIV message (section
1147 3.5). The KRB_SAFE message (section 3.4) can be used to assure integrity.
1149 3.3. The Ticket-Granting Service (TGS) Exchange
1152 Message direction Message type Section
1153 1. Client to Kerberos KRB_TGS_REQ 5.4.1
1154 2. Kerberos to client KRB_TGS_REP or 5.4.2
1157 The TGS exchange between a client and the Kerberos Ticket-Granting Server is
1158 initiated by a client when it wishes to obtain authentication credentials
1159 for a given server (which might be registered in a remote realm), when it
1160 wishes to renew or validate an existing ticket, or when it wishes to obtain
1161 a proxy ticket. In the first case, the client must already have acquired a
1162 ticket for the Ticket-Granting Service using the AS exchange (the
1163 ticket-granting ticket is usually obtained when a client initially
1164 authenticates to the system, such as when a user logs in). The message
1166 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1168 format for the TGS exchange is almost identical to that for the AS exchange.
1169 The primary difference is that encryption and decryption in the TGS exchange
1170 does not take place under the client's key. Instead, the session key from
1171 the ticket-granting ticket or renewable ticket, or sub-session key from an
1172 Authenticator is used. As is the case for all application servers, expired
1173 tickets are not accepted by the TGS, so once a renewable or ticket-granting
1174 ticket expires, the client must use a separate exchange to obtain valid
1177 The TGS exchange consists of two messages: A request (KRB_TGS_REQ) from the
1178 client to the Kerberos Ticket-Granting Server, and a reply (KRB_TGS_REP or
1179 KRB_ERROR). The KRB_TGS_REQ message includes information authenticating the
1180 client plus a request for credentials. The authentication information
1181 consists of the authentication header (KRB_AP_REQ) which includes the
1182 client's previously obtained ticket-granting, renewable, or invalid ticket.
1183 In the ticket-granting ticket and proxy cases, the request may include one
1184 or more of: a list of network addresses, a collection of typed authorization
1185 data to be sealed in the ticket for authorization use by the application
1186 server, or additional tickets (the use of which are described later). The
1187 TGS reply (KRB_TGS_REP) contains the requested credentials, encrypted in the
1188 session key from the ticket-granting ticket or renewable ticket, or if
1189 present, in the sub-session key from the Authenticator (part of the
1190 authentication header). The KRB_ERROR message contains an error code and
1191 text explaining what went wrong. The KRB_ERROR message is not encrypted. The
1192 KRB_TGS_REP message contains information which can be used to detect
1193 replays, and to associate it with the message to which it replies. The
1194 KRB_ERROR message also contains information which can be used to associate
1195 it with the message to which it replies, but except when an optional
1196 checksum is included in the KRB_ERROR message, it is not possible to detect
1197 replays or fabrications of such messages.
1199 3.3.1. Generation of KRB_TGS_REQ message
1201 Before sending a request to the ticket-granting service, the client must
1202 determine in which realm the application server is believed to be
1203 registered[3.12]. If the client knows the service principal name and realm
1204 and it does not already possess a ticket-granting ticket for the appropriate
1205 realm, then one must be obtained. This is first attempted by requesting a
1206 ticket-granting ticket for the destination realm from a Kerberos server for
1207 which the client possesses a ticket-granting ticket (using the KRB_TGS_REQ
1208 message recursively). The Kerberos server may return a TGT for the desired
1209 realm in which case one can proceed. Alternatively, the Kerberos server may
1210 return a TGT for a realm which is 'closer' to the desired realm (further
1211 along the standard hierarchical path between the client's realm and the
1212 requested realm server's realm).
1214 Once the client obtains a ticket-granting ticket for the appropriate realm,
1215 it determines which Kerberos servers serve that realm, and contacts one. The
1216 list might be obtained through a configuration file or network service or it
1217 may be generated from the name of the realm; as long as the secret keys
1218 exchanged by realms are kept secret, only denial of service results from
1219 using a false Kerberos server.
1221 As in the AS exchange, the client may specify a number of options in the
1222 KRB_TGS_REQ message. The client prepares the KRB_TGS_REQ message, providing
1223 an authentication header as an element of the padata field, and including
1224 the same fields as used in the KRB_AS_REQ message along with several
1225 optional fields: the enc-authorization-data field for application server use
1226 and additional tickets required by some options.
1229 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1231 In preparing the authentication header, the client can select a sub-session
1232 key under which the response from the Kerberos server will be
1233 encrypted[3.13]. If the sub-session key is not specified, the session key
1234 from the ticket-granting ticket will be used. If the enc-authorization-data
1235 is present, it must be encrypted in the sub-session key, if present, from
1236 the authenticator portion of the authentication header, or if not present,
1237 using the session key from the ticket-granting ticket.
1239 Once prepared, the message is sent to a Kerberos server for the destination
1240 realm. See section A.5 for pseudocode.
1242 3.3.2. Receipt of KRB_TGS_REQ message
1244 The KRB_TGS_REQ message is processed in a manner similar to the KRB_AS_REQ
1245 message, but there are many additional checks to be performed. First, the
1246 Kerberos server must determine which server the accompanying ticket is for
1247 and it must select the appropriate key to decrypt it. For a normal
1248 KRB_TGS_REQ message, it will be for the ticket granting service, and the
1249 TGS's key will be used. If the TGT was issued by another realm, then the
1250 appropriate inter-realm key must be used. If the accompanying ticket is not
1251 a ticket granting ticket for the current realm, but is for an application
1252 server in the current realm, the RENEW, VALIDATE, or PROXY options are
1253 specified in the request, and the server for which a ticket is requested is
1254 the server named in the accompanying ticket, then the KDC will decrypt the
1255 ticket in the authentication header using the key of the server for which it
1256 was issued. If no ticket can be found in the padata field, the
1257 KDC_ERR_PADATA_TYPE_NOSUPP error is returned.
1259 Once the accompanying ticket has been decrypted, the user-supplied checksum
1260 in the Authenticator must be verified against the contents of the request,
1261 and the message rejected if the checksums do not match (with an error code
1262 of KRB_AP_ERR_MODIFIED) or if the checksum is not keyed or not
1263 collision-proof (with an error code of KRB_AP_ERR_INAPP_CKSUM). If the
1264 checksum type is not supported, the KDC_ERR_SUMTYPE_NOSUPP error is
1265 returned. If the authorization-data are present, they are decrypted using
1266 the sub-session key from the Authenticator.
1268 If any of the decryptions indicate failed integrity checks, the
1269 KRB_AP_ERR_BAD_INTEGRITY error is returned.
1271 3.3.3. Generation of KRB_TGS_REP message
1273 The KRB_TGS_REP message shares its format with the KRB_AS_REP (KRB_KDC_REP),
1274 but with its type field set to KRB_TGS_REP. The detailed specification is in
1277 The response will include a ticket for the requested server or for a ticket
1278 granting server of an intermediate KDC to be contacted to obtain the
1279 requested ticket. The Kerberos database is queried to retrieve the record
1280 for the appropriate server (including the key with which the ticket will be
1281 encrypted). If the request is for a ticket granting ticket for a remote
1282 realm, and if no key is shared with the requested realm, then the Kerberos
1283 server will select the realm 'closest' to the requested realm with which it
1284 does share a key, and use that realm instead. If the requested server cannot
1285 be found in the TGS database, then a TGT for another trusted realm may be
1286 returned instead of a ticket for the service. This TGT is a referral
1287 mechanism to cause the client to retry the request to the realm of the TGT.
1288 These are the only cases where the response for the KDC will be for a
1289 different server than that requested by the client.
1292 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1294 By default, the address field, the client's name and realm, the list of
1295 transited realms, the time of initial authentication, the expiration time,
1296 and the authorization data of the newly-issued ticket will be copied from
1297 the ticket-granting ticket (TGT) or renewable ticket. If the transited field
1298 needs to be updated, but the transited type is not supported, the
1299 KDC_ERR_TRTYPE_NOSUPP error is returned.
1301 If the request specifies an endtime, then the endtime of the new ticket is
1302 set to the minimum of (a) that request, (b) the endtime from the TGT, and
1303 (c) the starttime of the TGT plus the minimum of the maximum life for the
1304 application server and the maximum life for the local realm (the maximum
1305 life for the requesting principal was already applied when the TGT was
1306 issued). If the new ticket is to be a renewal, then the endtime above is
1307 replaced by the minimum of (a) the value of the renew_till field of the
1308 ticket and (b) the starttime for the new ticket plus the life
1309 (endtime-starttime) of the old ticket.
1311 If the FORWARDED option has been requested, then the resulting ticket will
1312 contain the addresses specified by the client. This option will only be
1313 honored if the FORWARDABLE flag is set in the TGT. The PROXY option is
1314 similar; the resulting ticket will contain the addresses specified by the
1315 client. It will be honored only if the PROXIABLE flag in the TGT is set. The
1316 PROXY option will not be honored on requests for additional ticket-granting
1319 If the requested start time is absent, indicates a time in the past, or is
1320 within the window of acceptable clock skew for the KDC and the POSTDATE
1321 option has not been specified, then the start time of the ticket is set to
1322 the authentication server's current time. If it indicates a time in the
1323 future beyond the acceptable clock skew, but the POSTDATED option has not
1324 been specified or the MAY-POSTDATE flag is not set in the TGT, then the
1325 error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise, if the ticket-granting
1326 ticket has the MAY-POSTDATE flag set, then the resulting ticket will be
1327 postdated and the requested starttime is checked against the policy of the
1328 local realm. If acceptable, the ticket's start time is set as requested, and
1329 the INVALID flag is set. The postdated ticket must be validated before use
1330 by presenting it to the KDC after the starttime has been reached. However,
1331 in no case may the starttime, endtime, or renew-till time of a newly-issued
1332 postdated ticket extend beyond the renew-till time of the ticket-granting
1335 If the ENC-TKT-IN-SKEY option has been specified and an additional ticket
1336 has been included in the request, the KDC will decrypt the additional ticket
1337 using the key for the server to which the additional ticket was issued and
1338 verify that it is a ticket-granting ticket. If the name of the requested
1339 server is missing from the request, the name of the client in the additional
1340 ticket will be used. Otherwise the name of the requested server will be
1341 compared to the name of the client in the additional ticket and if
1342 different, the request will be rejected. If the request succeeds, the
1343 session key from the additional ticket will be used to encrypt the new
1344 ticket that is issued instead of using the key of the server for which the
1345 new ticket will be used.
1348 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1350 If the name of the server in the ticket that is presented to the KDC as part
1351 of the authentication header is not that of the ticket-granting server
1352 itself, the server is registered in the realm of the KDC, and the RENEW
1353 option is requested, then the KDC will verify that the RENEWABLE flag is set
1354 in the ticket, that the INVALID flag is not set in the ticket, and that the
1355 renew_till time is still in the future. If the VALIDATE option is requested,
1356 the KDC will check that the starttime has passed and the INVALID flag is
1357 set. If the PROXY option is requested, then the KDC will check that the
1358 PROXIABLE flag is set in the ticket. If the tests succeed, and the ticket
1359 passes the hotlist check described in the next section, the KDC will issue
1360 the appropriate new ticket.
1362 The ciphertext part of the response in the KRB_TGS_REP message is encrypted
1363 in the sub-session key from the Authenticator, if present, or the session
1364 key key from the ticket-granting ticket. It is not encrypted using the
1365 client's secret key. Furthermore, the client's key's expiration date and the
1366 key version number fields are left out since these values are stored along
1367 with the client's database record, and that record is not needed to satisfy
1368 a request based on a ticket-granting ticket. See section A.6 for pseudocode.
1370 3.3.3.1. Checking for revoked tickets
1372 Whenever a request is made to the ticket-granting server, the presented
1373 ticket(s) is(are) checked against a hot-list of tickets which have been
1374 canceled. This hot-list might be implemented by storing a range of issue
1375 timestamps for 'suspect tickets'; if a presented ticket had an authtime in
1376 that range, it would be rejected. In this way, a stolen ticket-granting
1377 ticket or renewable ticket cannot be used to gain additional tickets
1378 (renewals or otherwise) once the theft has been reported to the KDC for the
1379 realm in which the server resides. Any normal ticket obtained before it was
1380 reported stolen will still be valid (because they require no interaction
1381 with the KDC), but only until their normal expiration time. If TGT's have
1382 been issued for cross-realm authentication, use of the cross-realm TGT will
1383 not be affected unless the hot-list is propagated to the KDC's for the
1384 realms for which such cross-realm tickets were issued.
1386 3.3.3.2. Encoding the transited field
1388 If the identity of the server in the TGT that is presented to the KDC as
1389 part of the authentication header is that of the ticket-granting service,
1390 but the TGT was issued from another realm, the KDC will look up the
1391 inter-realm key shared with that realm and use that key to decrypt the
1392 ticket. If the ticket is valid, then the KDC will honor the request, subject
1393 to the constraints outlined above in the section describing the AS exchange.
1394 The realm part of the client's identity will be taken from the
1395 ticket-granting ticket. The name of the realm that issued the
1396 ticket-granting ticket will be added to the transited field of the ticket to
1397 be issued. This is accomplished by reading the transited field from the
1398 ticket-granting ticket (which is treated as an unordered set of realm
1399 names), adding the new realm to the set, then constructing and writing out
1400 its encoded (shorthand) form (this may involve a rearrangement of the
1403 Note that the ticket-granting service does not add the name of its own
1404 realm. Instead, its responsibility is to add the name of the previous realm.
1405 This prevents a malicious Kerberos server from intentionally leaving out its
1406 own name (it could, however, omit other realms' names).
1409 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1411 The names of neither the local realm nor the principal's realm are to be
1412 included in the transited field. They appear elsewhere in the ticket and
1413 both are known to have taken part in authenticating the principal. Since the
1414 endpoints are not included, both local and single-hop inter-realm
1415 authentication result in a transited field that is empty.
1417 Because the name of each realm transited is added to this field, it might
1418 potentially be very long. To decrease the length of this field, its contents
1419 are encoded. The initially supported encoding is optimized for the normal
1420 case of inter-realm communication: a hierarchical arrangement of realms
1421 using either domain or X.500 style realm names. This encoding (called
1422 DOMAIN-X500-COMPRESS) is now described.
1424 Realm names in the transited field are separated by a ",". The ",", "\",
1425 trailing "."s, and leading spaces (" ") are special characters, and if they
1426 are part of a realm name, they must be quoted in the transited field by
1427 preceding them with a "\".
1429 A realm name ending with a "." is interpreted as being prepended to the
1430 previous realm. For example, we can encode traversal of EDU, MIT.EDU,
1431 ATHENA.MIT.EDU, WASHINGTON.EDU, and CS.WASHINGTON.EDU as:
1433 "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.".
1435 Note that if ATHENA.MIT.EDU, or CS.WASHINGTON.EDU were end-points, that they
1436 would not be included in this field, and we would have:
1438 "EDU,MIT.,WASHINGTON.EDU"
1440 A realm name beginning with a "/" is interpreted as being appended to the
1441 previous realm[18]. If it is to stand by itself, then it should be preceded
1442 by a space (" "). For example, we can encode traversal of /COM/HP/APOLLO,
1443 /COM/HP, /COM, and /COM/DEC as:
1445 "/COM,/HP,/APOLLO, /COM/DEC".
1447 Like the example above, if /COM/HP/APOLLO and /COM/DEC are endpoints, they
1448 they would not be included in this field, and we would have:
1452 A null subfield preceding or following a "," indicates that all realms
1453 between the previous realm and the next realm have been traversed[19]. Thus,
1454 "," means that all realms along the path between the client and the server
1455 have been traversed. ",EDU, /COM," means that that all realms from the
1456 client's realm up to EDU (in a domain style hierarchy) have been traversed,
1457 and that everything from /COM down to the server's realm in an X.500 style
1458 has also been traversed. This could occur if the EDU realm in one hierarchy
1459 shares an inter-realm key directly with the /COM realm in another hierarchy.
1461 3.3.4. Receipt of KRB_TGS_REP message
1463 When the KRB_TGS_REP is received by the client, it is processed in the same
1464 manner as the KRB_AS_REP processing described above. The primary difference
1465 is that the ciphertext part of the response must be decrypted using the
1466 session key from the ticket-granting ticket rather than the client's secret
1467 key. The server name returned in the reply is the true principal name of the
1468 service. See section A.7 for pseudocode.
1471 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1473 3.4. The KRB_SAFE Exchange
1475 The KRB_SAFE message may be used by clients requiring the ability to detect
1476 modifications of messages they exchange. It achieves this by including a
1477 keyed collision-proof checksum of the user data and some control
1478 information. The checksum is keyed with an encryption key (usually the last
1479 key negotiated via subkeys, or the session key if no negotiation has
1482 3.4.1. Generation of a KRB_SAFE message
1484 When an application wishes to send a KRB_SAFE message, it collects its data
1485 and the appropriate control information and computes a checksum over them.
1486 The checksum algorithm should be a keyed one-way hash function (such as the
1487 RSA- MD5-DES checksum algorithm specified in section 6.4.5, or the DES MAC),
1488 generated using the sub-session key if present, or the session key.
1489 Different algorithms may be selected by changing the checksum type in the
1490 message. Unkeyed or non-collision-proof checksums are not suitable for this
1493 The control information for the KRB_SAFE message includes both a timestamp
1494 and a sequence number. The designer of an application using the KRB_SAFE
1495 message must choose at least one of the two mechanisms. This choice should
1496 be based on the needs of the application protocol.
1498 Sequence numbers are useful when all messages sent will be received by one's
1499 peer. Connection state is presently required to maintain the session key, so
1500 maintaining the next sequence number should not present an additional
1503 If the application protocol is expected to tolerate lost messages without
1504 them being resent, the use of the timestamp is the appropriate replay
1505 detection mechanism. Using timestamps is also the appropriate mechanism for
1506 multi-cast protocols where all of one's peers share a common sub-session
1507 key, but some messages will be sent to a subset of one's peers.
1509 After computing the checksum, the client then transmits the information and
1510 checksum to the recipient in the message format specified in section 5.6.1.
1512 3.4.2. Receipt of KRB_SAFE message
1514 When an application receives a KRB_SAFE message, it verifies it as follows.
1515 If any error occurs, an error code is reported for use by the application.
1517 The message is first checked by verifying that the protocol version and type
1518 fields match the current version and KRB_SAFE, respectively. A mismatch
1519 generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The
1520 application verifies that the checksum used is a collision-proof keyed
1521 checksum, and if it is not, a KRB_AP_ERR_INAPP_CKSUM error is generated. If
1522 the sender's address was included in the control information, the recipient
1523 verifies that the operating system's report of the sender's address matches
1524 the sender's address in the message, and (if a recipient address is
1525 specified or the recipient requires an address) that one of the recipient's
1526 addresses appears as the recipient's address in the message. A failed match
1527 for either case generates a KRB_AP_ERR_BADADDR error. Then the timestamp and
1528 usec and/or the sequence number fields are checked. If timestamp and usec
1529 are expected and not present, or they are present but not current, the
1530 KRB_AP_ERR_SKEW error is generated. If the server name, along with the
1532 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1534 client name, time and microsecond fields from the Authenticator match any
1535 recently-seen (sent or received[20] ) such tuples, the KRB_AP_ERR_REPEAT
1536 error is generated. If an incorrect sequence number is included, or a
1537 sequence number is expected but not present, the KRB_AP_ERR_BADORDER error
1538 is generated. If neither a time-stamp and usec or a sequence number is
1539 present, a KRB_AP_ERR_MODIFIED error is generated. Finally, the checksum is
1540 computed over the data and control information, and if it doesn't match the
1541 received checksum, a KRB_AP_ERR_MODIFIED error is generated.
1543 If all the checks succeed, the application is assured that the message was
1544 generated by its peer and was not modified in transit.
1546 3.5. The KRB_PRIV Exchange
1548 The KRB_PRIV message may be used by clients requiring confidentiality and
1549 the ability to detect modifications of exchanged messages. It achieves this
1550 by encrypting the messages and adding control information.
1552 3.5.1. Generation of a KRB_PRIV message
1554 When an application wishes to send a KRB_PRIV message, it collects its data
1555 and the appropriate control information (specified in section 5.7.1) and
1556 encrypts them under an encryption key (usually the last key negotiated via
1557 subkeys, or the session key if no negotiation has occurred). As part of the
1558 control information, the client must choose to use either a timestamp or a
1559 sequence number (or both); see the discussion in section 3.4.1 for
1560 guidelines on which to use. After the user data and control information are
1561 encrypted, the client transmits the ciphertext and some 'envelope'
1562 information to the recipient.
1564 3.5.2. Receipt of KRB_PRIV message
1566 When an application receives a KRB_PRIV message, it verifies it as follows.
1567 If any error occurs, an error code is reported for use by the application.
1569 The message is first checked by verifying that the protocol version and type
1570 fields match the current version and KRB_PRIV, respectively. A mismatch
1571 generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The
1572 application then decrypts the ciphertext and processes the resultant
1573 plaintext. If decryption shows the data to have been modified, a
1574 KRB_AP_ERR_BAD_INTEGRITY error is generated. If the sender's address was
1575 included in the control information, the recipient verifies that the
1576 operating system's report of the sender's address matches the sender's
1577 address in the message, and (if a recipient address is specified or the
1578 recipient requires an address) that one of the recipient's addresses appears
1579 as the recipient's address in the message. A failed match for either case
1580 generates a KRB_AP_ERR_BADADDR error. Then the timestamp and usec and/or the
1581 sequence number fields are checked. If timestamp and usec are expected and
1582 not present, or they are present but not current, the KRB_AP_ERR_SKEW error
1583 is generated. If the server name, along with the client name, time and
1584 microsecond fields from the Authenticator match any recently-seen such
1585 tuples, the KRB_AP_ERR_REPEAT error is generated. If an incorrect sequence
1586 number is included, or a sequence number is expected but not present, the
1587 KRB_AP_ERR_BADORDER error is generated. If neither a time-stamp and usec or
1588 a sequence number is present, a KRB_AP_ERR_MODIFIED error is generated.
1590 If all the checks succeed, the application can assume the message was
1591 generated by its peer, and was securely transmitted (without intruders able
1592 to see the unencrypted contents).
1595 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1597 3.6. The KRB_CRED Exchange
1599 The KRB_CRED message may be used by clients requiring the ability to send
1600 Kerberos credentials from one host to another. It achieves this by sending
1601 the tickets together with encrypted data containing the session keys and
1602 other information associated with the tickets.
1604 3.6.1. Generation of a KRB_CRED message
1606 When an application wishes to send a KRB_CRED message it first (using the
1607 KRB_TGS exchange) obtains credentials to be sent to the remote host. It then
1608 constructs a KRB_CRED message using the ticket or tickets so obtained,
1609 placing the session key needed to use each ticket in the key field of the
1610 corresponding KrbCredInfo sequence of the encrypted part of the the KRB_CRED
1613 Other information associated with each ticket and obtained during the
1614 KRB_TGS exchange is also placed in the corresponding KrbCredInfo sequence in
1615 the encrypted part of the KRB_CRED message. The current time and, if
1616 specifically required by the application the nonce, s-address, and r-address
1617 fields, are placed in the encrypted part of the KRB_CRED message which is
1618 then encrypted under an encryption key previously exchanged in the KRB_AP
1619 exchange (usually the last key negotiated via subkeys, or the session key if
1620 no negotiation has occurred).
1622 3.6.2. Receipt of KRB_CRED message
1624 When an application receives a KRB_CRED message, it verifies it. If any
1625 error occurs, an error code is reported for use by the application. The
1626 message is verified by checking that the protocol version and type fields
1627 match the current version and KRB_CRED, respectively. A mismatch generates a
1628 KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The application then
1629 decrypts the ciphertext and processes the resultant plaintext. If decryption
1630 shows the data to have been modified, a KRB_AP_ERR_BAD_INTEGRITY error is
1633 If present or required, the recipient verifies that the operating system's
1634 report of the sender's address matches the sender's address in the message,
1635 and that one of the recipient's addresses appears as the recipient's address
1636 in the message. A failed match for either case generates a
1637 KRB_AP_ERR_BADADDR error. The timestamp and usec fields (and the nonce field
1638 if required) are checked next. If the timestamp and usec are not present, or
1639 they are present but not current, the KRB_AP_ERR_SKEW error is generated.
1641 If all the checks succeed, the application stores each of the new tickets in
1642 its ticket cache together with the session key and other information in the
1643 corresponding KrbCredInfo sequence from the encrypted part of the KRB_CRED
1646 4. The Kerberos Database
1648 The Kerberos server must have access to a database containing the principal
1649 identifiers and secret keys of any principals to be authenticated[4.1] using
1650 such secret keys. The keying material in the database must be protected so
1651 that they are only accessible to the Kerberos server and administrative
1652 functions specifically authorized to access such material. Specific
1653 implementations may handle the storage of keying material separate from the
1654 Kerberos database (e.g. in hardware) or by encrypting the keying material
1655 before placing it in the Kerberos database. Some implementations might
1656 provide a means for using long term secret keys, but not for retrieving them
1657 from the Kerberos database.
1660 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1662 4.1. Database contents
1664 A database entry will typically contain the following fields, though in some
1665 instances a KDC may obtain these values through other means:
1669 name Principal's identifier
1670 key Principal's secret key
1671 p_kvno Principal's key version
1672 max_life Maximum lifetime for Tickets
1673 max_renewable_life Maximum total lifetime for renewable Tickets
1675 The name field is an encoding of the principal's identifier. The key field
1676 contains an encryption key. This key is the principal's secret key. (The key
1677 can be encrypted before storage under a Kerberos "master key" to protect it
1678 in case the database is compromised but the master key is not. In that case,
1679 an extra field must be added to indicate the master key version used, see
1680 below.) The p_kvno field is the key version number of the principal's secret
1681 key. The max_life field contains the maximum allowable lifetime (endtime -
1682 starttime) for any Ticket issued for this principal. The max_renewable_life
1683 field contains the maximum allowable total lifetime for any renewable Ticket
1684 issued for this principal. (See section 3.1 for a description of how these
1685 lifetimes are used in determining the lifetime of a given Ticket.)
1687 A server may provide KDC service to several realms, as long as the database
1688 representation provides a mechanism to distinguish between principal records
1689 with identifiers which differ only in the realm name.
1691 When an application server's key changes, if the change is routine (i.e. not
1692 the result of disclosure of the old key), the old key should be retained by
1693 the server until all tickets that had been issued using that key have
1694 expired. Because of this, it is possible for several keys to be active for a
1695 single principal. Ciphertext encrypted in a principal's key is always tagged
1696 with the version of the key that was used for encryption, to help the
1697 recipient find the proper key for decryption.
1699 When more than one key is active for a particular principal, the principal
1700 will have more than one record in the Kerberos database. The keys and key
1701 version numbers will differ between the records (the rest of the fields may
1702 or may not be the same). Whenever Kerberos issues a ticket, or responds to a
1703 request for initial authentication, the most recent key (known by the
1704 Kerberos server) will be used for encryption. This is the key with the
1705 highest key version number.
1707 4.2. Additional fields
1709 Project Athena's KDC implementation uses additional fields in its database:
1713 K_kvno Kerberos' key version
1714 expiration Expiration date for entry
1715 attributes Bit field of attributes
1716 mod_date Timestamp of last modification
1717 mod_name Modifying principal's identifier
1719 The K_kvno field indicates the key version of the Kerberos master key under
1720 which the principal's secret key is encrypted.
1723 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1725 After an entry's expiration date has passed, the KDC will return an error to
1726 any client attempting to gain tickets as or for the principal. (A database
1727 may want to maintain two expiration dates: one for the principal, and one
1728 for the principal's current key. This allows password aging to work
1729 independently of the principal's expiration date. However, due to the
1730 limited space in the responses, the KDC combines the key expiration and
1731 principal expiration date into a single value called 'key_exp', which is
1732 used as a hint to the user to take administrative action.)
1734 The attributes field is a bitfield used to govern the operations involving
1735 the principal. This field might be useful in conjunction with user
1736 registration procedures, for site-specific policy implementations (Project
1737 Athena currently uses it for their user registration process controlled by
1738 the system-wide database service, Moira [LGDSR87]), to identify whether a
1739 principal can play the role of a client or server or both, to note whether a
1740 server is appropriately trusted to receive credentials delegated by a
1741 client, or to identify the 'string to key' conversion algorithm used for a
1742 principal's key[4.2]. Other bits are used to indicate that certain ticket
1743 options should not be allowed in tickets encrypted under a principal's key
1744 (one bit each): Disallow issuing postdated tickets, disallow issuing
1745 forwardable tickets, disallow issuing tickets based on TGT authentication,
1746 disallow issuing renewable tickets, disallow issuing proxiable tickets, and
1747 disallow issuing tickets for which the principal is the server.
1749 The mod_date field contains the time of last modification of the entry, and
1750 the mod_name field contains the name of the principal which last modified
1753 4.3. Frequently Changing Fields
1755 Some KDC implementations may wish to maintain the last time that a request
1756 was made by a particular principal. Information that might be maintained
1757 includes the time of the last request, the time of the last request for a
1758 ticket-granting ticket, the time of the last use of a ticket-granting
1759 ticket, or other times. This information can then be returned to the user in
1760 the last-req field (see section 5.2).
1762 Other frequently changing information that can be maintained is the latest
1763 expiration time for any tickets that have been issued using each key. This
1764 field would be used to indicate how long old keys must remain valid to allow
1765 the continued use of outstanding tickets.
1769 The KDC implementation should have the following configurable constants or
1770 options, to allow an administrator to make and enforce policy decisions:
1772 * The minimum supported lifetime (used to determine whether the
1773 KDC_ERR_NEVER_VALID error should be returned). This constant should
1774 reflect reasonable expectations of round-trip time to the KDC,
1775 encryption/decryption time, and processing time by the client and
1776 target server, and it should allow for a minimum 'useful' lifetime.
1777 * The maximum allowable total (renewable) lifetime of a ticket
1778 (renew_till - starttime).
1779 * The maximum allowable lifetime of a ticket (endtime - starttime).
1780 * Whether to allow the issue of tickets with empty address fields
1781 (including the ability to specify that such tickets may only be issued
1782 if the request specifies some authorization_data).
1783 * Whether proxiable, forwardable, renewable or post-datable tickets are
1787 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1789 5. Message Specifications
1791 NOTE: We are continuing to work on changes to message format extensibility
1792 as discussed at the London meeting. We believe the general form discussed in
1793 London will continue to be a useful strategy for pursuing this goal. We
1794 expect to have additional information by the Salt Lake City meeting. TODO:
1795 TypedData needs to be looked at carefully, particularly with regard to
1796 TD-APP-DEFINED-ERROR, etc. Some significant changes from 1510 to here have
1797 been written up; more proofreading is needed. - tlyu
1799 The Kerberos protocol is defined here in terms of Abstract Syntax Notation
1800 One (ASN.1), which provides a syntax for specifying both the abstract layout
1801 of protocol messages as well as their encodings. Implementors not utilizing
1802 an existing ASN.1 compiler or support library are cautioned to thoroughly
1803 understand the actual ASN.1 specification to ensure correct implementation
1804 behavior, as there is more complexity in the notation than is immediately
1805 obvious, and some tutorials and guides to ASN.1 are misleading or erroneous.
1807 Note that in several places, there have been changes here from RFC 1510 that
1808 change the abstract types. This is in part to address widespread assumptions
1809 that various implementations have made, in some cases unintentionally
1810 violating the ASN.1 standard in various ways. These will be clearly flagged
1811 when they occur. The changes to the abstract types can cause incompatible
1812 encodings to be emitted when certain encoding rules, e.g. the Packed
1813 Encoding Rules (PER) are used. This should not be relevant for Kerberos,
1814 since Kerberos explicitly specifies the use of the Distinguished Encoding
1815 Rules (DER). This might be an issue for protocols wishing to use Kerberos
1816 types with other encoding rules. (This practice is not recommended.) With
1817 very few exceptions (most notably the usages of BIT STRING), the encodings
1818 emitted by the DER, which are the only encodings permitted by this document
1819 and by RFC 1510, remain identical.
1821 The type definitions in this section assume an ASN.1 module definition of
1825 iso (1), org(3), dod(6), internet(1), security(5), kerberosV5(2)
1826 } DEFINITIONS ::= BEGIN
1828 -- rest of definitions here
1832 This specifies an explicit non-automatic tagging for the ASN.1 type
1835 Note that in some other publications [RFC1510] [RFC1964], the "dod" portion
1836 of the object identifier is erroneously specified as having the value "5".
1838 Note that elsewhere in this document, nomenclature for various message types
1839 is inconsistent, but seems to largely follow C language conventions,
1840 including use of underscore (_) characters and all-caps spelling of names
1841 intended to be numeric constants. Also, in some places, identifiers
1842 (especially ones refering to constants) are written in all-caps in order to
1843 distinguish them from surrounding explanatory text.
1845 The ASN.1 notation does not permit underscores in identifiers, so in actual
1846 ASN.1 definitions, underscores are replaced with hyphens (-). Additionally,
1847 structure member names and defined values in ASN.1 must begin with a
1848 lowercase letter, while type names must begin with an uppercase letter.
1851 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1853 5.1. Specific Compatibility Notes on ASN.1
1855 For compatibility purposes, implementors should heed the following specific
1856 notes regarding the use of ASN.1 in Kerberos. These notes do not describe a
1857 non-standard usage of ASN.1, but rather some historical quirks and
1858 non-compliance of various implementations, as well as historical
1859 ambiguities, which, while being valid ASN.1, can lead to confusion during
1862 5.1.1. ASN.1 Distinguished Encoding Rules
1864 The encoding of Kerberos protocol messages shall obey the Distinguished
1865 Encoding Rules (DER) of ASN.1 as described in X.690 (1997). Some
1866 implementations (believed to be primarly ones derived from DCE 1.1 and
1867 earlier) are known to use the more general Basic Encoding Rules (BER); in
1868 particular, these implementations send indefinite encodings of lengths.
1869 Implementations may accept such encodings in the interests of backwards
1870 compatibility, though implementors are warned that decoding fully-general
1871 BER is fraught with peril.
1873 5.1.2. Optional Fields in ASN.1 Sequences
1875 Some implementations behave as if certain default values are equivalent to
1876 omission of an optional value. Implementations should handle this case
1877 gracefully. For example, the seq-number field in an Authenticator is
1878 optional, but some implementations use an internal value of zero to indicate
1879 that the field is to be omitted upon encoding. [While it is possible to use
1880 the DEFAULT qualifier for the ASN.1 notation of a SEQUENCE member in order
1881 to mandate this behavior, the result would be that the member would be
1882 mandatory to omit if the value intended is that specified by the DEFAULT
1883 keyword. This limits the possible semantics of the protocol.]
1885 5.1.3. Zero-length SEQUENCE Types
1887 There are places in the protocol where a message contains a SEQUENCE OF type
1888 as an optional member, or a SEQUENCE type where all members are optional.
1889 This can result in an encoding that contains an zero-length SEQUENCE or
1890 SEQUENCE OF encoding. In general, implementations should not send
1891 zero-length SEQUENCE OF or SEQUENCE encodings that are marked OPTIONAL, but
1892 should accept them. [XXX there may be cases where an empty SEQUENCE type has
1893 useful semantics, though]
1895 5.1.4. Unrecognized Tag Numbers
1897 Future revisions to this protocol may include new message types with
1898 different APPLICATION class tag numbers. Such revisions should protect older
1899 implementations by only sending the message types to parties that are known
1900 to understand them, e.g. by means of a flag bit set by the receiver in a
1901 preceding request. In the interest of robust error handling, implementations
1902 should gracefully handle receiving a message with an unrecognized tag
1903 anyway, and return an error message if appropriate.
1905 5.1.5. Tag Numbers Greater Than 30
1907 A naive implementation of a DER ASN.1 decoder may experience problems with
1908 ASN.1 tag numbers greater than 30, due such tag numbers being encoded using
1909 more than one byte. Future revisions of this protocol may utilize tag
1910 numbers greater than 30, and implementations should be prepared to
1911 gracefully return an error, if appropriate, if they do not recognize the
1915 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1917 5.2. Basic Kerberos Types
1919 This section defines a number of basic types that are potentially used in
1920 multiple Kerberos protocol messages.
1922 5.2.1. KerberosString
1924 [XXX The following paragraphs may need some editing, or maybe they want to
1927 The original specification of the Kerberos protocol in RFC 1510 uses
1928 GeneralString in numerous places for human-readable string data. Historical
1929 implementations of Kerberos cannot utilize the full power of GeneralString.
1930 This ASN.1 type requires the use of designation and invocation escape
1931 sequences as specified in ISO 2022 to switch character sets, and the default
1932 character set that is designated for G0 is basically US ASCII, which mostly
1933 works. In practice, many implementations end up treating GeneralStrings as
1934 if they were strings of whatever character set the implementation defaults
1935 to, without regard for correct usage of character set designation escape
1938 Also, DER prohibits the invocation of character sets into any but the G0 and
1939 C0 sets, which seems to outright prohibit the encoding of characters with
1940 the high bit set. Unfortunately, this seems to have the side effect of
1941 prohibiting the transmission of Latin-1 characters or any other characters
1942 that belong to a 96-character set, since it is prohibited to invoke them
1943 into G0. Some inconclusive discussion has taken place within the ASN.1
1944 community on this subject. For now, we must assume that the ASN.1
1945 specification of GeneralString as currently published is fundamentally
1946 flawed in several ways.
1948 One method of resolving these myriad difficulties is to constrain the use of
1949 GeneralString to only include IA5String, which is essentially the US-ASCII.
1950 US-ASCII control characters should in general not be used in KerberosString,
1951 except for cases such as newlines in lengthy error messages.
1953 The new (since RFC 1510) type KerberosString, defined below, is a CHOICE
1954 containing a GeneralString that is constrained to only contain characters in
1955 IA5String (which are US-ASCII). Note that the ASN.1 standard does not permit
1956 the use of escape sequences to change the character sets while encoding an
1959 KerberosString ::= CHOICE {
1960 general GeneralString (IA5String),
1964 This CHOICE is extensible, so that when an interoperable solution for
1965 internationalization is chosen, it will be easier to specify the changed
1966 types. In the future, changes to this protocol that allow for extensions to
1967 this CHOICE will be specified so that the transmitting party has some way of
1968 knowing whether the receiving party can accept the chosen alternative of the
1971 Implementations may choose to accept GeneralString values that contain
1972 characters other than those permitted by IA5String, but they should be aware
1973 that character set designation codes will likely be absent, and that the
1974 encoding should probably be treated as locale-specific in almost every way.
1975 Implementations may also choose to emit GeneralString values that are beyond
1976 those permitted by IA5String, but should be aware that doing so is
1977 extraordinarily risky from an interoperability perspective.
1980 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
1982 Some existing implementations use GeneralString to encode unescaped
1983 locale-specific characters. This is in violation of the ASN.1 standard. Most
1984 of these implementations encode US-ASCII in the left-hand half, so as long
1985 the implementation transmits only US-ASCII, the ASN.1 standard is not
1986 violated in this regard. As soon as such an implementation encodes unescaped
1987 locale-specific characters with the high bit set, it violates the ASN.1
1990 Other implementations have been known to use GeneralString to contain a
1991 UTF-8 encoding. This also violates the ASN.1 standard, since UTF-8 is a
1992 different encoding, not a 94 or 96 character "G" set as defined by ISO 2022.
1993 It is believed that these implementations do not even use the ISO 2022
1994 escape sequence to change the character encoding. Even if implementations
1995 were to announce the change of encoding by using that escape sequence, the
1996 ASN.1 standard prohibits the use of any escape sequences other than those
1997 used to designate/invoke "G" or "C" sets allowed by GeneralString.
1999 Future revisions to this protocol will almost certainly allow for a more
2000 interoperable representation of principal names, probably including
2003 Note that both applying a new constraint to a previously unconstrained type
2004 and replacing a type with a CHOICE containing that type constitute creations
2005 of new ASN.1 types. In the case here, the change here does not result in a
2006 changed encoding under DER. Also, note that various text in the ASN.1
2007 standard actually suggests the strategy of replacing a type with a CHOICE
2008 containing that type for certain deprecated types, even though this creates
2011 5.2.2. Realm and PrincipalName
2013 Realm ::= KerberosString
2014 PrincipalName ::= SEQUENCE {
2016 name-string[1] SEQUENCE OF KerberosString
2019 Kerberos realm names are encoded as KerberosStrings. Realms shall not
2020 contain a character with the code 0 (the ASCII NUL). Most realms will
2021 usually consist of several components separated by periods (.), in the style
2022 of Internet Domain Names, or separated by slashes (/) in the style of X.500
2023 names. Acceptable forms for realm names are specified in section 7. A
2024 PrincipalName is a typed sequence of components consisting of the following
2028 This field specifies the type of name that follows. Pre-defined values
2029 for this field are specified in section 7.2. The name-type should be
2030 treated as a hint. Ignoring the name type, no two names can be the same
2031 (i.e. at least one of the components, or the realm, must be different).
2032 This constraint may be eliminated in the future.
2034 This field encodes a sequence of components that form a name, each
2035 component encoded as a KerberosString. Taken together, a PrincipalName
2036 and a Realm form a principal identifier. Most PrincipalNames will have
2037 only a few components (typically one or two).
2040 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2044 KerberosTime ::= GeneralizedTime
2045 -- with no fractional seconds
2047 The timestamps used in Kerberos are encoded as GeneralizedTimes. A
2048 KerberosTime value shall not include any fractional portions of the seconds.
2049 As required by the DER, it further shall not include any separators, and it
2050 shall specify the UTC time zone (Z). Example: The only valid format for UTC
2051 time 6 minutes, 27 seconds after 9 pm on 6 November 1985 is 19851106210627Z.
2053 5.2.4. Constrained Integer types
2055 Some integer members of types should be constrained to values representable
2056 in 32 bits, for compatibility with reasonable implementation limits.
2058 Int32 ::= INTEGER (-2147483648..2147483647)
2059 -- signed values representable in 32 bits
2061 UInt32 :: = INTEGER (0..4294967295)
2062 -- unsigned 32 bit values
2064 Microseconds ::= INTEGER (0..99999)
2067 While this results in changes to the abstract types from the RFC 1510
2068 version, the encoding in DER should be unaltered. Historical implementations
2069 were typically limited to 32-bit integer values anyway, and assigned numbers
2070 should fall in the space of integer values representable in 32 bits in order
2071 to promote interoperability anyway.
2073 There are some members of messages types that are still defined as
2074 unconstrained INTEGER types, but many of these have a (non-ASN.1) constraint
2075 applied in the descriptive text. There are specific cases where more
2076 discussion needs to occur regarding possible constraints, such as for the
2077 nonce fields in various messages.
2079 5.2.5. HostAddress and HostAddresses
2081 HostAddress ::= SEQUENCE {
2083 address[1] OCTET STRING
2086 HostAddresses ::= SEQUENCE OF HostAddress
2088 The host address encodings consists of two fields:
2091 This field specifies the type of address that follows. Pre-defined
2092 values for this field are specified in section 8.1.
2094 This field encodes a single address of type addr-type.
2096 The two forms differ slightly. HostAddress contains exactly one address;
2097 HostAddresses contains a sequence of possibly many addresses.
2100 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2102 5.2.6. AuthorizationData
2104 AuthorizationData ::= SEQUENCE OF SEQUENCE {
2106 ad-data[1] OCTET STRING
2110 This field contains authorization data to be interpreted according to
2111 the value of the corresponding ad-type field.
2113 This field specifies the format for the ad-data subfield. All negative
2114 values are reserved for local use. Non-negative values are reserved for
2117 Each sequence of type and data is referred to as an authorization element.
2118 Elements may be application specific, however, there is a common set of
2119 recursive elements that should be understood by all implementations. These
2120 elements contain other elements embedded within them, and the interpretation
2121 of the encapsulating element determines which of the embedded elements must
2122 be interpreted, and which may be ignored. Definitions for these common
2123 elements may be found in Appendix B.
2127 Historically, PA-DATA have been known as "pre-authentication data", meaning
2128 that they were used to augment the initial authentication with the KDC.
2129 Since that time, they have also been used as a typed hole with which to
2130 extend protocol exchanges with the KDC.
2132 PA-DATA ::= SEQUENCE {
2133 padata-type[1] Int32,
2134 padata-value[2] OCTET STRING
2135 -- might be encoded AP-REQ
2139 indicates the way that the padata-value element is to be interpreted.
2140 Negative values of padata-type are reserved for unregistered use;
2141 non-negative values are used for a registered interpretation of the
2144 Usually contains the DER encoding of another type; the padata-type
2145 field identifies which type is encoded here.
2147 padata-type name contents of padata-value
2149 1 pa-tgs-req DER encoding of AP-REQ
2151 2 pa-enc-timestamp DER encoding of PA-ENC-TIMESTAMP
2153 3 pa-pw-salt salt (not ASN.1 encoded)
2155 10 pa-etype-info DER encoding of PA-ETYPE-INFO
2157 20 pa-use-specified-kvno DER encoding of INTEGER
2159 [XXX -- the following paragraph needs discussion, as does the general
2160 concept of authenticating the cleartext pieces of the protocol]
2163 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2165 This field may also contain information needed by certain extensions to the
2166 Kerberos protocol. For example, it might be used to initially verify the
2167 identity of a client before any response is returned. When this field is
2168 used to authenticate or pre-authenticate a request, it should contain a
2169 keyed checksum over the KDC-REQ-BODY to bind the pre-authentication data to
2170 rest of the request. The KDC, as a matter of policy, may decide whether to
2171 honor a KDC-REQ which includes any pre-authentication data that does not
2172 contain the checksum field.
2174 It may also be used by the client to specify the version of a key that is
2175 being used for accompanying preauthentication, and/or which should be used
2176 to encrypt the reply from the KDC. [XXX the following paragraph should apply
2177 perhaps to PA-DATA in general]
2179 The padata field can also contain information needed to help the KDC or the
2180 client select the key needed for generating or decrypting the response. This
2181 form of the padata is useful for supporting the use of certain token cards
2182 with Kerberos. The details of such extensions are specified in separate
2183 documents. See [Pat92] for additional uses of this field.
2187 In the case of requests for additional tickets (KRB_TGS_REQ), padata-value
2188 will contain an encoded AP-REQ. The checksum in the authenticator (which
2189 must be collision-proof) is to be computed over the KDC-REQ-BODY encoding.
2191 5.2.7.2. Encrypted Timestamp Pre-authentication
2193 There are pre-authentication types that may be used to pre-authenticate a
2194 client by means of an encrypted timestamp. The original PA-ENC-TIMESTAMP
2195 does not contain a checksum of the KDC-REQ-BODY, while the PA-ENC-TIMESTAMP2
2198 PA-ENC-TIMESTAMP ::= EncryptedData -- encrypted PA-ENC-TS-ENC
2200 PA-ENC-TS-ENC ::= SEQUENCE {
2201 patimestamp[0] KerberosTime, -- client's time
2202 pausec[1] Microseconds OPTIONAL
2205 -- XXX maybe remove ENC-TIMESTAMP2 for now?
2207 PA-ENC-TIMESTAMP2 ::= EncryptedData -- encrypted PA-ENC-TS2-ENC
2209 PA-ENC-TS2-ENC ::= SEQUENCE {
2210 patimestamp[0] KerberosTime, -- client's time
2211 pausec[1] Microseconds OPTIONAL,
2212 pachecksum[2] Checksum OPTIONAL
2213 -- keyed checksum of KDC-REQ-BODY
2216 Patimestamp contains the client's time, and pausec contains the
2217 microseconds, which may be omitted if a client will not generate more than
2218 one request per second. The ciphertext (padata-value) consists of the
2219 PA-ENC-TS-ENC or PA-ENC-TS2-ENC encoding, encrypted using the client's
2222 This preauthentication type was not present in RFC 1510, but many
2223 implementations support it.
2226 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2230 The padata-value for this preauthentication type contains the salt for the
2231 string-to-key to be used by the client to obtain the key for decrypting the
2232 encrypted part of an AS-REP message. Unfortunately, for historical reasons,
2233 the character set to be used is unspecified and probably locale-specific.
2235 This preauthentication type was not present in RFC 1510, but many
2236 implementations support it. It is necessary in any case where the salt for
2237 the string-to-key algorithm is not the default.
2239 In the trivial example, a zero-length salt string is very commonplace for
2240 realms that have converted their principal databases from Kerberos 4.
2242 5.2.7.4. PA-ETYPE-INFO
2244 The ETYPE-INFO preauthentication type is sent by the KDC in a KRB-ERROR
2245 indicating a requirement for additional preauthentication. It is usually
2246 used to notify a client of which key to use for the encryption of an
2247 encrypted timestamp for the purposes of sending a PA-ENC-TIMESTAMP
2248 preauthentication value.
2250 ETYPE-INFO-ENTRY ::= SEQUENCE {
2252 salt[1] OCTET STRING OPTIONAL
2255 ETYPE-INFO ::= SEQUENCE OF ETYPE-INFO-ENTRY
2257 The salt, like that of PA-PW-SALT, is also completely unspecified with
2258 respect to character set and is probably locale-specific.
2260 [XXX -- not clear whether ETYPE-INFO or PW-SALT should take precedence if
2263 This preauthentication type was not present in RFC 1510, but many
2264 implementations that support encrypted timestamps for preauthentication need
2265 to support ETYPE-INFO as well.
2267 5.2.7.5. PA-USE-SPECIFIED-KVNO
2269 The KDC should only accept and abide by the value of the use-specified-kvno
2270 preauthentication data field when the specified key is still valid and until
2271 use of a new key is confirmed. This situation is likely to occur primarily
2272 during the period during which an updated key is propagating to other KDC's
2275 5.2.8. KerberosFlags
2277 For several message types, a specific constrained bit string type,
2278 KerberosFlags, is used.
2280 KerberosFlags ::= BIT STRING (SIZE (32..MAX))
2282 Compatibility note: the following paragraphs describe a change from the
2283 RFC1510 description of bit strings that would result in incompatility in the
2284 case of an implementation that strictly conformed to ASN.1 DER and RFC1510.
2287 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2289 ASN.1 bit strings have multiple uses. The simplest use of a bit string is to
2290 contain a vector of bits, with no particular meaning attached to individual
2291 bits. This vector of bits is not necessarily a multiple of eight bits long.
2292 The use in Kerberos of a bit string as a compact boolean vector wherein each
2293 element has a distinct meaning poses some problems. The natural notation for
2294 a compact boolean vector is the ASN.1 "NamedBit" notation, and the DER
2295 require that encodings of a bit string using "NamedBit" notation exclude any
2296 trailing zero bits. This truncation is easy to neglect, especially given C
2297 language implementations that may naturally choose to store boolean vectors
2300 For example, if the notation for KDCOptions were to include the "NamedBit"
2301 notation, as in RFC 1510, and a KDCOptions value to be encoded had only the
2302 "forwardable" (bit number one) bit set, the DER encoding must only include
2303 two bits: the first reserved bit ("reserved", bit number zero, value zero)
2304 and the one-valued bit (bit number one) for "forwardable".
2306 Most existing implementations of Kerberos unconditionally send 32 bits on
2307 the wire when encoding bit strings used as boolean vectors. This behavior
2308 violates the ASN.1 syntax used for flag values in RFC 1510, but occurs on
2309 such a widely installed base that the protocol description is being modified
2312 Consequently, this document removes the "NamedBit" notations for individual
2313 bits, relegating them to comments. The size constraint on the KerberosFlags
2314 type requires that at least 32 bits be encoded at all times, though a
2315 lenient implementation may choose to accept fewer than 32 bits and to treat
2316 the missing bits as set to zero.
2318 Currently, no uses of KerberosFlags specify more than 32 bits worth of
2319 flags, although future revisions of this document may do so. When more than
2320 32 bits are to be transmitted in a KerberosFlags value, future revisions to
2321 this document will likely specify that the smallest number of bits needed to
2322 encode the highest-numbered one-valued bit should be sent. This is somewhat
2323 similar to the DER encoding of a bit string that is declared with the
2324 "NamedBit" notation.
2326 5.2.9. Cryptosystem-related Types
2328 Many Kerberos protocol messages contain an EncryptedData as a container for
2329 arbitrary encrypted data, which is often the encrypted encoding of another
2330 data type. Fields within EncryptedData assist the recipient in selecting a
2331 key with which to decrypt the enclosed data.
2333 EncryptedData ::= SEQUENCE {
2334 etype[0] Int32, -- EncryptionType
2335 kvno[1] INTEGER OPTIONAL,
2336 cipher[2] OCTET STRING -- ciphertext
2340 This field identifies which encryption algorithm was used to encipher
2341 the cipher. Detailed specifications for selected encryption types
2342 appear in section 6.
2344 This field contains the version number of the key under which data is
2345 encrypted. It is only present in messages encrypted under long lasting
2346 keys, such as principals' secret keys.
2348 This field contains the enciphered text, encoded as an OCTET STRING.
2351 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2353 The EncryptionKey type is the means by which cryptographic keys used for
2354 encryption are transfered.
2356 EncryptionKey ::= SEQUENCE {
2357 keytype[0] Int32, -- actually encryption type
2358 keyvalue[1] OCTET STRING
2362 This field specifies the encryption type of the encryption key that
2363 follows in the keyvalue field. While its name is "keytype", it actually
2364 specifies an encryption type. Previously, multiple cryptosystems that
2365 performed encryption differently but were capable of using keys with
2366 the same characteristics were permitted to share an assigned number to
2367 designate the type of key; this usage is now deprecated.
2369 This field contains the key itself, encoded as an octet string.
2371 All negative values for the encryption key type are reserved for local
2372 use. All non-negative values are reserved for officially assigned type
2373 fields and interpretations.
2375 Messages containing cleartext data to be authenticated will usually do so by
2376 using a member of type Checksum. Most instances of Checksum use a keyed
2377 hash, though exceptions will be noted.
2379 Checksum ::= SEQUENCE {
2381 checksum[1] OCTET STRING
2385 This field indicates the algorithm used to generate the accompanying
2388 This field contains the checksum itself, encoded as an octet string.
2390 Detailed specification of selected checksum types appear in section 6.
2391 Negative values for the checksum type are reserved for local use. All
2392 non-negative values are reserved for officially assigned type fields
2393 and interpretations.
2395 5.3. Tickets and Authenticators
2397 This section describes the format and encryption parameters for tickets and
2398 authenticators. When a ticket or authenticator is included in a protocol
2399 message it is treated as an opaque object.
2402 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2406 A ticket is a record that helps a client authenticate to a service. A Ticket
2407 contains the following information:
2409 Ticket ::= [APPLICATION 1] SEQUENCE {
2412 sname[2] PrincipalName,
2413 enc-part[3] EncryptedData --EncTicketPart
2416 -- Encrypted part of ticket
2417 EncTicketPart ::= [APPLICATION 3] SEQUENCE {
2418 flags[0] TicketFlags,
2419 key[1] EncryptionKey,
2421 cname[3] PrincipalName,
2422 transited[4] TransitedEncoding,
2423 authtime[5] KerberosTime,
2424 starttime[6] KerberosTime OPTIONAL,
2425 endtime[7] KerberosTime,
2426 renew-till[8] KerberosTime OPTIONAL,
2427 caddr[9] HostAddresses OPTIONAL,
2428 authorization-data[10] AuthorizationData OPTIONAL
2431 -- encoded Transited field
2432 TransitedEncoding ::= SEQUENCE {
2433 tr-type[0] Int32, -- must be registered
2434 contents[1] OCTET STRING
2437 TicketFlags ::= KerberosFlags
2450 -- transited-policy-checked(12),
2451 -- ok-as-delegate(13)
2455 The encoding of EncTicketPart is encrypted in the key shared by Kerberos and
2456 the end server (the server's secret key). See section 6 for the format of
2460 This field specifies the version number for the ticket format. This
2461 document describes version number 5.
2463 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2466 This field specifies the realm that issued a ticket. It also serves to
2467 identify the realm part of the server's principal identifier. Since a
2468 Kerberos server can only issue tickets for servers within its realm,
2469 the two will always be identical.
2471 This field specifies all components of the name part of the server's
2472 identity, including those parts that identify a specific instance of a
2475 This field holds the encrypted encoding of the EncTicketPart sequence.
2477 This field indicates which of various options were used or requested
2478 when the ticket was issued. It is a bit-field, where the selected
2479 options are indicated by the bit being set (1), and the unselected
2480 options and reserved fields being reset (0). [XXX X.690 ref and notes
2481 on pitfalls?] The meanings of the flags are:
2482 Bit(s) Name Description
2484 0 reserved Reserved for future expansion of this
2487 The FORWARDABLE flag is normally only
2488 interpreted by the TGS, and can be
2489 ignored by end servers. When set, this
2490 1 forwardable flag tells the ticket-granting server
2491 that it is OK to issue a new
2492 ticket-granting ticket with a
2493 different network address based on the
2496 When set, this flag indicates that the
2497 ticket has either been forwarded or
2498 2 forwarded was issued based on authentication
2499 involving a forwarded ticket-granting
2502 The PROXIABLE flag is normally only
2503 interpreted by the TGS, and can be
2504 ignored by end servers. The PROXIABLE
2505 flag has an interpretation identical
2506 3 proxiable to that of the FORWARDABLE flag,
2507 except that the PROXIABLE flag tells
2508 the ticket-granting server that only
2509 non-ticket-granting tickets may be
2510 issued with different network
2513 4 proxy When set, this flag indicates that a
2516 The MAY-POSTDATE flag is normally only
2517 interpreted by the TGS, and can be
2518 5 may-postdate ignored by end servers. This flag
2519 tells the ticket-granting server that
2520 a post-dated ticket may be issued
2521 based on this ticket-granting ticket.
2523 This flag indicates that this ticket
2524 has been postdated. The end-service
2526 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2528 6 postdated can check the authtime field to see
2529 when the original authentication
2532 This flag indicates that a ticket is
2533 invalid, and it must be validated by
2534 7 invalid the KDC before use. Application
2535 servers must reject tickets which have
2538 The RENEWABLE flag is normally only
2539 interpreted by the TGS, and can
2540 usually be ignored by end servers
2541 8 renewable (some particularly careful servers may
2542 wish to disallow renewable tickets). A
2543 renewable ticket can be used to obtain
2544 a replacement ticket that expires at a
2547 This flag indicates that this ticket
2548 9 initial was issued using the AS protocol, and
2549 not issued based on a ticket-granting
2552 This flag indicates that during
2553 initial authentication, the client was
2554 authenticated by the KDC before a
2555 10 pre-authent ticket was issued. The strength of the
2556 preauthentication method is not
2557 indicated, but is acceptable to the
2560 This flag indicates that the protocol
2561 employed for initial authentication
2562 required the use of hardware expected
2563 11 hw-authent to be possessed solely by the named
2564 client. The hardware authentication
2565 method is selected by the KDC and the
2566 strength of the method is not
2569 This flag indicates that the KDC for
2570 the realm has checked the transited
2571 field against a realm defined policy
2572 for trusted certifiers. If this flag
2573 is reset (0), then the application
2574 server must check the transited field
2575 itself, and if unable to do so it must
2576 reject the authentication. If the flag
2578 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2580 12 transited- is set (1) then the application server
2582 may skip its own validation of the
2583 transited field, relying on the
2584 validation performed by the KDC. At
2585 its option the application server may
2586 still apply its own validation based
2587 on a separate policy for acceptance.
2589 This flag is new since RFC 1510.
2591 This flag indicates that the server
2592 (not the client) specified in the
2593 ticket has been determined by policy
2594 of the realm to be a suitable
2595 recipient of delegation. A client can
2596 use the presence of this flag to help
2597 it make a decision whether to delegate
2598 credentials (either grant a proxy or a
2599 forwarded ticket granting ticket) to
2600 13 ok-as-delegate this server. The client is free to
2601 ignore the value of this flag. When
2602 setting this flag, an administrator
2603 should consider the Security and
2604 placement of the server on which the
2605 service will run, as well as whether
2606 the service requires the use of
2607 delegated credentials.
2609 This flag is new since RFC 1510.
2611 This flag indicates that the principal
2612 named in the ticket is a generic
2613 principal for the realm and does not
2614 identify the individual using the
2615 ticket. The purpose of the ticket is
2616 only to securely distribute a session
2617 key, and not to identify the user.
2618 14 anonymous Subsequent requests using the same
2619 ticket and session may be considered
2620 as originating from the same user, but
2621 requests with the same username but a
2622 different ticket are likely to
2623 originate from different users.
2625 This flag is new since RFC 1510.
2627 15-31 reserved Reserved for future use.
2629 This field exists in the ticket and the KDC response and is used to
2630 pass the session key from Kerberos to the application server and the
2631 client. The field's encoding is described in section 6.2.
2633 This field contains the name of the realm in which the client is
2634 registered and in which initial authentication took place.
2636 This field contains the name part of the client's principal identifier.
2638 This field lists the names of the Kerberos realms that took part in
2639 authenticating the user to whom this ticket was issued. It does not
2641 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2643 specify the order in which the realms were transited. See section
2644 3.3.3.2 for details on how this field encodes the traversed realms.
2645 When the names of CA's are to be embedded in the transited field (as
2646 specified for some extensions to the protocol), the X.500 names of the
2647 CA's should be mapped into items in the transited field using the
2648 mapping defined by RFC2253.
2650 This field indicates the time of initial authentication for the named
2651 principal. It is the time of issue for the original ticket on which
2652 this ticket is based. It is included in the ticket to provide
2653 additional information to the end service, and to provide the necessary
2654 information for implementation of a `hot list' service at the KDC. An
2655 end service that is particularly paranoid could refuse to accept
2656 tickets for which the initial authentication occurred "too far" in the
2657 past. This field is also returned as part of the response from the KDC.
2658 When returned as part of the response to initial authentication
2659 (KRB_AS_REP), this is the current time on the Kerberos server[24].
2661 This field in the ticket specifies the time after which the ticket is
2662 valid. Together with endtime, this field specifies the life of the
2663 ticket. If it is absent from the ticket, its value should be treated as
2664 that of the authtime field.
2666 This field contains the time after which the ticket will not be honored
2667 (its expiration time). Note that individual services may place their
2668 own limits on the life of a ticket and may reject tickets which have
2669 not yet expired. As such, this is really an upper bound on the
2670 expiration time for the ticket.
2672 This field is only present in tickets that have the RENEWABLE flag set
2673 in the flags field. It indicates the maximum endtime that may be
2674 included in a renewal. It can be thought of as the absolute expiration
2675 time for the ticket, including all renewals.
2677 This field in a ticket contains zero (if omitted) or more (if present)
2678 host addresses. These are the addresses from which the ticket can be
2679 used. If there are no addresses, the ticket can be used from any
2680 location. The decision by the KDC to issue or by the end server to
2681 accept zero-address tickets is a policy decision and is left to the
2682 Kerberos and end-service administrators; they may refuse to issue or
2683 accept such tickets. The suggested and default policy, however, is that
2684 such tickets will only be issued or accepted when additional
2685 information that can be used to restrict the use of the ticket is
2686 included in the authorization_data field. Such a ticket is a
2689 Network addresses are included in the ticket to make it harder for an
2690 attacker to use stolen credentials. Because the session key is not sent
2691 over the network in cleartext, credentials can't be stolen simply by
2692 listening to the network; an attacker has to gain access to the session
2693 key (perhaps through operating system security breaches or a careless
2694 user's unattended session) to make use of stolen tickets.
2696 It is important to note that the network address from which a
2697 connection is received cannot be reliably determined. Even if it could
2698 be, an attacker who has compromised the client's workstation could use
2699 the credentials from there. Including the network addresses only makes
2700 it more difficult, not impossible, for an attacker to walk off with
2701 stolen credentials and then use them from a "safe" location.
2703 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2706 The authorization-data field is used to pass authorization data from
2707 the principal on whose behalf a ticket was issued to the application
2708 service. If no authorization data is included, this field will be left
2709 out. Experience has shown that the name of this field is confusing, and
2710 that a better name for this field would be restrictions. Unfortunately,
2711 it is not possible to change the name of this field at this time.
2713 This field contains restrictions on any authority obtained on the basis
2714 of authentication using the ticket. It is possible for any principal in
2715 posession of credentials to add entries to the authorization data field
2716 since these entries further restrict what can be done with the ticket.
2717 Such additions can be made by specifying the additional entries when a
2718 new ticket is obtained during the TGS exchange, or they may be added
2719 during chained delegation using the authorization data field of the
2722 Because entries may be added to this field by the holder of
2723 credentials, except when an entry is separately authenticated by
2724 encapsulation in the kdc-issued element, it is not allowable for the
2725 presence of an entry in the authorization data field of a ticket to
2726 amplify the privileges one would obtain from using a ticket.
2728 The data in this field may be specific to the end service; the field
2729 will contain the names of service specific objects, and the rights to
2730 those objects. The format for this field is described in section 5.2.
2731 Although Kerberos is not concerned with the format of the contents of
2732 the sub-fields, it does carry type information (ad-type).
2734 By using the authorization_data field, a principal is able to issue a
2735 proxy that is valid for a specific purpose. For example, a client
2736 wishing to print a file can obtain a file server proxy to be passed to
2737 the print server. By specifying the name of the file in the
2738 authorization_data field, the file server knows that the print server
2739 can only use the client's rights when accessing the particular file to
2742 A separate service providing authorization or certifying group
2743 membership may be built using the authorization-data field. In this
2744 case, the entity granting authorization (not the authorized entity),
2745 may obtain a ticket in its own name (e.g. the ticket is issued in the
2746 name of a privilege server), and this entity adds restrictions on its
2747 own authority and delegates the restricted authority through a proxy to
2748 the client. The client would then present this authorization credential
2749 to the application server separately from the authentication exchange.
2750 Alternatively, such authorization credentials may be embedded in the
2751 ticket authenticating the authorized entity, when the authorization is
2752 separately authenticated using the kdc-issued authorization data
2755 Similarly, if one specifies the authorization-data field of a proxy and
2756 leaves the host addresses blank, the resulting ticket and session key
2757 can be treated as a capability. See [Neu93] for some suggested uses of
2760 The authorization-data field is optional and does not have to be
2761 included in a ticket.
2764 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2766 5.3.2. Authenticators
2768 An authenticator is a record sent with a ticket to a server to certify the
2769 client's knowledge of the encryption key in the ticket, to help the server
2770 detect replays, and to help choose a "true session key" to use with the
2771 particular session. The encoding is encrypted in the ticket's session key
2772 shared by the client and the server:
2774 -- Unencrypted authenticator
2775 Authenticator ::= [APPLICATION 2] SEQUENCE {
2776 authenticator-vno[0] INTEGER,
2778 cname[2] PrincipalName,
2779 cksum[3] Checksum OPTIONAL,
2780 cusec[4] Microseconds,
2781 ctime[5] KerberosTime,
2782 subkey[6] EncryptionKey OPTIONAL,
2783 seq-number[7] UInt32 OPTIONAL,
2784 authorization-data[8] AuthorizationData OPTIONAL
2789 This field specifies the version number for the format of the
2790 authenticator. This document specifies version 5.
2792 These fields are the same as those described for the ticket in section
2795 This field contains a checksum of the the application data that
2796 accompanies the KRB_AP_REQ.
2798 This field contains the microsecond part of the client's timestamp. Its
2799 value (before encryption) ranges from 0 to 999999. It often appears
2800 along with ctime. The two fields are used together to specify a
2801 reasonably accurate timestamp.
2803 This field contains the current time on the client's host.
2805 This field contains the client's choice for an encryption key which is
2806 to be used to protect this specific application session. Unless an
2807 application specifies otherwise, if this field is left out the session
2808 key from the ticket will be used.
2810 This optional field includes the initial sequence number to be used by
2811 the KRB_PRIV or KRB_SAFE messages when sequence numbers are used to
2812 detect replays (It may also be used by application specific messages).
2813 When included in the authenticator this field specifies the initial
2814 sequence number for messages from the client to the server. When
2815 included in the AP-REP message, the initial sequence number is that for
2816 messages from the server to the client. When used in KRB_PRIV or
2817 KRB_SAFE messages, it is incremented by one after each message is sent.
2818 Sequence numbers fall in the range of 0 through 2^32 - 1 and wrap to
2819 zero following the value 2^32 - 1.
2821 For sequence numbers to adequately support the detection of replays
2822 they should be non-repeating, even across connection boundaries. The
2823 initial sequence number should be random and uniformly distributed
2824 across the full space of possible sequence numbers, so that it cannot
2825 be guessed by an attacker and so that it and the successive sequence
2826 numbers do not repeat other sequences.
2828 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2831 This field is the same as described for the ticket in section 5.3.1. It
2832 is optional and will only appear when additional restrictions are to be
2833 placed on the use of a ticket, beyond those carried in the ticket
2836 5.4. Specifications for the AS and TGS exchanges
2838 This section specifies the format of the messages used in the exchange
2839 between the client and the Kerberos server. The format of possible error
2840 messages appears in section 5.9.1.
2842 5.4.1. KRB_KDC_REQ definition
2844 The KRB_KDC_REQ message has no type of its own. Instead, its type is one of
2845 KRB_AS_REQ or KRB_TGS_REQ depending on whether the request is for an initial
2846 ticket or an additional ticket. In either case, the message is sent from the
2847 client to the Authentication Server to request credentials for a service.
2849 The message fields are:
2851 AS-REQ ::= [APPLICATION 10] KDC-REQ
2852 TGS-REQ ::= [APPLICATION 12] KDC-REQ
2854 KDC-REQ ::= SEQUENCE {
2856 msg-type[2] INTEGER,
2857 padata[3] SEQUENCE OF PA-DATA OPTIONAL,
2858 req-body[4] KDC-REQ-BODY
2861 KDC-REQ-BODY ::= SEQUENCE {
2862 kdc-options[0] KDCOptions,
2863 cname[1] PrincipalName OPTIONAL,
2864 -- Used only in AS-REQ
2865 realm[2] Realm, -- Server's realm
2866 -- Also client's in AS-REQ
2867 sname[3] PrincipalName OPTIONAL,
2868 from[4] KerberosTime OPTIONAL,
2869 till[5] KerberosTime,
2870 rtime[6] KerberosTime OPTIONAL,
2872 etype[8] SEQUENCE OF Int32,
2874 -- in preference order
2875 addresses[9] HostAddresses OPTIONAL,
2876 enc-authorization-data[10] EncryptedData OPTIONAL,
2877 -- Encrypted AuthorizationData
2879 additional-tickets[11] SEQUENCE OF Ticket OPTIONAL
2883 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2885 KDCOptions ::= KerberosFlags
2891 -- allow-postdate(5),
2900 -- requestanonymous(14),
2901 -- canonicalize(15),
2902 -- disable-transited-check(26),
2903 -- renewable-ok(27),
2904 -- enc-tkt-in-skey(28),
2908 The fields in this message are:
2911 This field is included in each message, and specifies the protocol
2912 version number. This document specifies protocol version 5.
2914 This field indicates the type of a protocol message. It will almost
2915 always be the same as the application identifier associated with a
2916 message. It is included to make the identifier more readily accessible
2917 to the application. For the KDC-REQ message, this type will be
2918 KRB_AS_REQ or KRB_TGS_REQ.
2920 Contains pre-authentication data. Requests for additional tickets
2921 (KRB_TGS_REQ) must contain a padata of PA-TGS-REQ.
2923 The padata (pre-authentication data) field contains a sequence of
2924 authentication information which may be needed before credentials can
2925 be issued or decrypted. In most requests for initial authentication
2926 (KRB_AS_REQ) and most replies (KDC-REP), the padata field will be left
2929 This field is a placeholder delimiting the extent of the remaining
2930 fields. If a checksum is to be calculated over the request, it is
2931 calculated over an encoding of the KDC-REQ-BODY sequence which is
2932 enclosed within the req-body field.
2934 This field appears in the KRB_AS_REQ and KRB_TGS_REQ requests to the
2935 KDC and indicates the flags that the client wants set on the tickets as
2936 well as other information that is to modify the behavior of the KDC.
2937 Where appropriate, the name of an option may be the same as the flag
2938 that is set by that option. Although in most case, the bit in the
2939 options field will be the same as that in the flags field, this is not
2940 guaranteed, so it is not acceptable to simply copy the options field to
2941 the flags field. There are various checks that must be made before
2942 honoring an option anyway.
2945 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
2947 The kdc_options field is a bit-field, where the selected options are
2948 indicated by the bit being set (1), and the unselected options and
2949 reserved fields being reset (0). The encoding of the bits is specified
2950 in section 5.2. The options are described in more detail above in
2951 section 2. The meanings of the options are:
2952 Bits Name Description
2954 0 RESERVED Reserved for future expansion of
2957 The FORWARDABLE option indicates
2958 that the ticket to be issued is to
2959 have its forwardable flag set. It
2960 1 FORWARDABLE may only be set on the initial
2961 request, or in a subsequent request
2962 if the ticket-granting ticket on
2963 which it is based is also
2966 The FORWARDED option is only
2967 specified in a request to the
2968 ticket-granting server and will only
2969 be honored if the ticket-granting
2970 ticket in the request has its
2971 2 FORWARDED FORWARDABLE bit set. This option
2972 indicates that this is a request for
2973 forwarding. The address(es) of the
2974 host from which the resulting ticket
2975 is to be valid are included in the
2976 addresses field of the request.
2978 The PROXIABLE option indicates that
2979 the ticket to be issued is to have
2980 its proxiable flag set. It may only
2981 3 PROXIABLE be set on the initial request, or in
2982 a subsequent request if the
2983 ticket-granting ticket on which it
2984 is based is also proxiable.
2986 The PROXY option indicates that this
2987 is a request for a proxy. This
2988 option will only be honored if the
2989 ticket-granting ticket in the
2990 4 PROXY request has its PROXIABLE bit set.
2991 The address(es) of the host from
2992 which the resulting ticket is to be
2993 valid are included in the addresses
2994 field of the request.
2996 The ALLOW-POSTDATE option indicates
2997 that the ticket to be issued is to
2998 have its MAY-POSTDATE flag set. It
2999 5 ALLOW-POSTDATE may only be set on the initial
3000 request, or in a subsequent request
3001 if the ticket-granting ticket on
3002 which it is based also has its
3003 MAY-POSTDATE flag set.
3005 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3008 The POSTDATED option indicates that
3009 this is a request for a postdated
3010 ticket. This option will only be
3011 honored if the ticket-granting
3012 ticket on which it is based has its
3013 6 POSTDATED MAY-POSTDATE flag set. The resulting
3014 ticket will also have its INVALID
3015 flag set, and that flag may be reset
3016 by a subsequent request to the KDC
3017 after the starttime in the ticket
3020 7 UNUSED This option is presently unused.
3022 The RENEWABLE option indicates that
3023 the ticket to be issued is to have
3024 its RENEWABLE flag set. It may only
3025 be set on the initial request, or
3026 when the ticket-granting ticket on
3027 8 RENEWABLE which the request is based is also
3028 renewable. If this option is
3029 requested, then the rtime field in
3030 the request contains the desired
3031 absolute expiration time for the
3034 9 RESERVED Reserved for PK-Cross
3036 10-13 UNUSED These options are presently unused.
3038 The REQUEST-ANONYMOUS option
3039 indicates that the ticket to be
3040 issued is not to identify the user
3041 to which it was issued. Instead, the
3042 principal identifier is to be
3043 generic, as specified by the policy
3044 of the realm (e.g. usually
3045 anonymous@realm). The purpose of the
3046 14 REQUEST-ANONYMOUS ticket is only to securely
3047 distribute a session key, and not to
3048 identify the user. The ANONYMOUS
3049 flag on the ticket to be returned
3050 should be set. If the local realms
3051 policy does not permit anonymous
3052 credentials, the request is to be
3055 This flag is new since RFC 1510
3057 The CANONICALIZE option indicates
3058 that the client will accept the
3059 return of a true server name instead
3060 of the name specified in the
3061 request. In addition the client will
3062 be able to process any TGT referrals
3063 that will direct the client to
3064 another realm to locate the
3065 15 CANONICALIZE requested server. If a KDC does not
3066 support name- canonicalization, the
3067 option is ignored and the
3069 KDC_ERR_C_PRINCIPAL_UNKNOWN or
3070 KDC_ERR_S_PRINCIPAL_UNKNOWN error is
3073 This flag is new since RFC 1510
3075 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3078 16-25 RESERVED Reserved for future use.
3080 By default the KDC will check the
3081 transited field of a
3082 ticket-granting-ticket against the
3083 policy of the local realm before it
3084 will issue derivative tickets based
3085 on the ticket granting ticket. If
3086 this flag is set in the request,
3087 checking of the transited field is
3088 disabled. Tickets issued without the
3089 26 DISABLE-TRANSITED-CHECK performance of this check will be
3090 noted by the reset (0) value of the
3091 TRANSITED-POLICY-CHECKED flag,
3092 indicating to the application server
3093 that the tranisted field must be
3094 checked locally. KDC's are
3095 encouraged but not required to honor
3096 the DISABLE-TRANSITED-CHECK option.
3098 This flag is new since RFC 1510
3100 The RENEWABLE-OK option indicates
3101 that a renewable ticket will be
3102 acceptable if a ticket with the
3103 requested life cannot otherwise be
3104 provided. If a ticket with the
3105 requested life cannot be provided,
3106 27 RENEWABLE-OK then a renewable ticket may be
3107 issued with a renew-till equal to
3108 the the requested endtime. The value
3109 of the renew-till field may still be
3110 limited by local limits, or limits
3111 selected by the individual principal
3114 This option is used only by the
3115 ticket-granting service. The
3116 ENC-TKT-IN-SKEY option indicates
3117 28 ENC-TKT-IN-SKEY that the ticket for the end server
3118 is to be encrypted in the session
3119 key from the additional
3120 ticket-granting ticket provided.
3122 29 RESERVED Reserved for future use.
3124 This option is used only by the
3125 ticket-granting service. The RENEW
3126 option indicates that the present
3127 request is for a renewal. The ticket
3128 provided is encrypted in the secret
3129 key for the server on which it is
3130 30 RENEW valid. This option will only be
3131 honored if the ticket to be renewed
3132 has its RENEWABLE flag set and if
3133 the time in its renew-till field has
3134 not passed. The ticket to be renewed
3135 is passed in the padata field as
3136 part of the authentication header.
3138 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3141 This option is used only by the
3142 ticket-granting service. The
3143 VALIDATE option indicates that the
3144 request is to validate a postdated
3145 ticket. It will only be honored if
3146 the ticket presented is postdated,
3147 presently has its INVALID flag set,
3148 31 VALIDATE and would be otherwise usable at
3149 this time. A ticket cannot be
3150 validated before its starttime. The
3151 ticket presented for validation is
3152 encrypted in the key of the server
3153 for which it is valid and is passed
3154 in the padata field as part of the
3155 authentication header.
3157 These fields are the same as those described for the ticket in section
3158 5.3.1. sname may only be absent when the ENC-TKT-IN-SKEY option is
3159 specified. If absent, the name of the server is taken from the name of
3160 the client in the ticket passed as additional-tickets.
3161 enc-authorization-data
3162 The enc-authorization-data, if present (and it can only be present in
3163 the TGS_REQ form), is an encoding of the desired authorization-data
3164 encrypted under the sub-session key if present in the Authenticator, or
3165 alternatively from the session key in the ticket-granting ticket, both
3166 from the padata field in the KRB_AP_REQ.
3168 This field specifies the realm part of the server's principal
3169 identifier. In the AS exchange, this is also the realm part of the
3170 client's principal identifier. If the CANONICALIZE option is set, the
3171 realm is used as a hint to the KDC for its database lookup.
3173 This field is included in the KRB_AS_REQ and KRB_TGS_REQ ticket
3174 requests when the requested ticket is to be postdated. It specifies the
3175 desired start time for the requested ticket. If this field is omitted
3176 then the KDC should use the current time instead.
3178 This field contains the expiration date requested by the client in a
3179 ticket request. [XXX This was optional in kerberos-revisions, but
3180 required in 1510. we should make it required and specify semantics for
3181 19700101000000Z] It is optional and if omitted the requested ticket is
3182 to have the maximum endtime permitted according to KDC policy for the
3183 parties to the authentication exchange as limited by expiration date of
3184 the ticket granting ticket or other preauthentication credentials.
3186 This field is the requested renew-till time sent from a client to the
3187 KDC in a ticket request. It is optional.
3189 This field is part of the KDC request and response. It it intended to
3190 hold a random number generated by the client. If the same number is
3191 included in the encrypted response from the KDC, it provides evidence
3192 that the response is fresh and has not been replayed by an attacker.
3193 Nonces must never be re-used. Ideally, it should be generated randomly,
3194 but if the correct time is known, it may suffice[25].
3196 This field specifies the desired encryption algorithm to be used in the
3199 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3202 This field is included in the initial request for tickets, and
3203 optionally included in requests for additional tickets from the
3204 ticket-granting server. It specifies the addresses from which the
3205 requested ticket is to be valid. Normally it includes the addresses for
3206 the client's host. If a proxy is requested, this field will contain
3207 other addresses. The contents of this field are usually copied by the
3208 KDC into the caddr field of the resulting ticket.
3210 Additional tickets may be optionally included in a request to the
3211 ticket-granting server. If the ENC-TKT-IN-SKEY option has been
3212 specified, then the session key from the additional ticket will be used
3213 in place of the server's key to encrypt the new ticket. When the
3214 ENC-TKT-IN-SKEY option is used for user-to-user authentication, this
3215 addional ticket may be a TGT issued by the local realm or an
3216 inter-realm TGT issued for the current KDC's realm by a remote KDC. If
3217 more than one option which requires additional tickets has been
3218 specified, then the additional tickets are used in the order specified
3219 by the ordering of the options bits (see kdc-options, above).
3221 The application tag number will be either ten (10) or twelve (12) depending
3222 on whether the request is for an initial ticket (AS-REQ) or for an
3223 additional ticket (TGS-REQ).
3225 The optional fields (addresses, authorization-data and additional-tickets)
3226 are only included if necessary to perform the operation specified in the
3229 It should be noted that in KRB_TGS_REQ, the protocol version number appears
3230 twice and two different message types appear: the KRB_TGS_REQ message
3231 contains these fields as does the authentication header (KRB_AP_REQ) that is
3232 passed in the padata field.
3234 5.4.2. KRB_KDC_REP definition
3236 The KRB_KDC_REP message format is used for the reply from the KDC for either
3237 an initial (AS) request or a subsequent (TGS) request. There is no message
3238 type for KRB_KDC_REP. Instead, the type will be either KRB_AS_REP or
3239 KRB_TGS_REP. The key used to encrypt the ciphertext part of the reply
3240 depends on the message type. For KRB_AS_REP, the ciphertext is encrypted in
3241 the client's secret key, and the client's key version number is included in
3242 the key version number for the encrypted data. For KRB_TGS_REP, the
3243 ciphertext is encrypted in the sub-session key from the Authenticator, or if
3244 absent, the session key from the ticket-granting ticket used in the request.
3245 In that case, no version number will be present in the EncryptedData
3248 The KRB_KDC_REP message contains the following fields:
3250 AS-REP ::= [APPLICATION 11] KDC-REP
3251 TGS-REP ::= [APPLICATION 13] KDC-REP
3253 KDC-REP ::= SEQUENCE {
3255 msg-type[1] INTEGER,
3256 padata[2] SEQUENCE OF PA-DATA OPTIONAL,
3258 cname[4] PrincipalName,
3260 enc-part[6] EncryptedData
3261 -- EncASREpPart or EncTGSReoOart
3265 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3267 EncASRepPart ::= [APPLICATION 25] EncKDCRepPart -- note [27]
3268 EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart
3270 EncKDCRepPart ::= SEQUENCE {
3271 key[0] EncryptionKey,
3272 last-req[1] LastReq,
3274 key-expiration[3] KerberosTime OPTIONAL,
3275 flags[4] TicketFlags,
3276 authtime[5] KerberosTime,
3277 starttime[6] KerberosTime OPTIONAL,
3278 endtime[7] KerberosTime,
3279 renew-till[8] KerberosTime OPTIONAL,
3281 sname[10] PrincipalName,
3282 caddr[11] HostAddresses OPTIONAL
3284 LastReq ::= SEQUENCE OF SEQUENCE {
3286 lr-value[1] KerberosTime
3290 These fields are described above in section 5.4.1. msg-type is either
3291 KRB_AS_REP or KRB_TGS_REP.
3293 This field is described in detail in section 5.4.1. One possible use
3294 for this field is to encode an alternate "mix-in" string to be used
3295 with a string-to-key algorithm (such as is described in section 6.3.2).
3296 This ability is useful to ease transitions if a realm name needs to
3297 change (e.g. when a company is acquired); in such a case all existing
3298 password-derived entries in the KDC database would be flagged as
3299 needing a special mix-in string until the next password change.
3300 crealm, cname, srealm and sname
3301 These fields are the same as those described for the ticket in section
3304 The newly-issued ticket, from section 5.3.1.
3306 This field is a place holder for the ciphertext and related information
3307 that forms the encrypted part of a message. The description of the
3308 encrypted part of the message follows each appearance of this field.
3309 The encrypted part is encoded as described in section 6.1.
3311 This field is the same as described for the ticket in section 5.3.1.
3313 This field is returned by the KDC and specifies the time(s) of the last
3314 request by a principal. Depending on what information is available,
3315 this might be the last time that a request for a ticket-granting ticket
3316 was made, or the last time that a request based on a ticket-granting
3317 ticket was successful. It also might cover all servers for a realm, or
3318 just the particular server. Some implementations may display this
3319 information to the user to aid in discovering unauthorized use of one's
3320 identity. It is similar in spirit to the last login time displayed when
3321 logging into timesharing systems.
3323 This field indicates how the following lr-value field is to be
3324 interpreted. Negative values indicate that the information
3325 pertains only to the responding server. Non-negative values
3326 pertain to all servers for the realm.
3329 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3331 If the lr-type field is zero (0), then no information is conveyed
3332 by the lr-value subfield. If the absolute value of the lr-type
3333 field is one (1), then the lr-value subfield is the time of last
3334 initial request for a TGT. If it is two (2), then the lr-value
3335 subfield is the time of last initial request. If it is three (3),
3336 then the lr-value subfield is the time of issue for the newest
3337 ticket-granting ticket used. If it is four (4), then the lr-value
3338 subfield is the time of the last renewal. If it is five (5), then
3339 the lr-value subfield is the time of last request (of any type).
3340 If it is (6), then the lr-value subfield is the time when the
3341 password will expire.
3343 This field contains the time of the last request. the time must be
3344 interpreted according to the contents of the accompanying lr-type
3347 This field is described above in section 5.4.1.
3349 The key-expiration field is part of the response from the KDC and
3350 specifies the time that the client's secret key is due to expire. The
3351 expiration might be the result of password aging or an account
3352 expiration. This field will usually be left out of the TGS reply since
3353 the response to the TGS request is encrypted in a session key and no
3354 client information need be retrieved from the KDC database. It is up to
3355 the application client (usually the login program) to take appropriate
3356 action (such as notifying the user) if the expiration time is imminent.
3357 flags, authtime, starttime, endtime, renew-till and caddr
3358 These fields are duplicates of those found in the encrypted portion of
3359 the attached ticket (see section 5.3.1), provided so the client may
3360 verify they match the intended request and to assist in proper ticket
3361 caching. If the message is of type KRB_TGS_REP, the caddr field will
3362 only be filled in if the request was for a proxy or forwarded ticket,
3363 or if the user is substituting a subset of the addresses from the
3364 ticket granting ticket. If the client-requested addresses are not
3365 present or not used, then the addresses contained in the ticket will be
3366 the same as those included in the ticket-granting ticket.
3368 5.5. Client/Server (CS) message specifications
3370 This section specifies the format of the messages used for the
3371 authentication of the client to the application server.
3373 5.5.1. KRB_AP_REQ definition
3375 The KRB_AP_REQ message contains the Kerberos protocol version number, the
3376 message type KRB_AP_REQ, an options field to indicate any options in use,
3377 and the ticket and authenticator themselves. The KRB_AP_REQ message is often
3378 referred to as the 'authentication header'.
3380 AP-REQ ::= [APPLICATION 14] SEQUENCE {
3382 msg-type[1] INTEGER,
3383 ap-options[2] APOptions,
3385 authenticator[4] EncryptedData
3386 -- Authenticator from 5.3.2
3390 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3392 APOptions ::= KerberosFlags
3394 -- use-session-key(1),
3395 -- mutual-required(2)
3399 These fields are described above in section 5.4.1. msg-type is
3402 This field appears in the application request (KRB_AP_REQ) and affects
3403 the way the request is processed. It is a bit-field, where the selected
3404 options are indicated by the bit being set (1), and the unselected
3405 options and reserved fields being reset (0). The encoding of the bits
3406 is specified in section 5.2. The meanings of the options are:
3407 Bit(s) Name Description
3409 0 reserved Reserved for future expansion of this field.
3411 The USE-SESSION-KEY option indicates that the
3412 ticket the client is presenting to a server
3413 1 use-session-key is encrypted in the session key from the
3414 server's ticket-granting ticket. When this
3415 option is not specified, the ticket is
3416 encrypted in the server's secret key.
3418 The MUTUAL-REQUIRED option tells the server
3419 2 mutual-required that the client requires mutual
3420 authentication, and that it must respond with
3421 a KRB_AP_REP message.
3423 3-31 reserved Reserved for future use.
3425 This field is a ticket authenticating the client to the server.
3427 This contains the authenticator, which includes the client's choice of
3428 a subkey. Its encoding is described in section 5.3.2.
3430 5.5.2. KRB_AP_REP definition
3432 The KRB_AP_REP message contains the Kerberos protocol version number, the
3433 message type, and an encrypted time- stamp. The message is sent in in
3434 response to an application request (KRB_AP_REQ) where the mutual
3435 authentication option has been selected in the ap-options field.
3437 AP-REP ::= [APPLICATION 15] SEQUENCE {
3439 msg-type[1] INTEGER,
3440 enc-part[2] EncryptedData
3444 EncAPRepPart ::= [APPLICATION 27] SEQUENCE { -- note [29]
3445 ctime[0] KerberosTime,
3446 cusec[1] Microseconds,
3447 subkey[2] EncryptionKey OPTIONAL,
3448 seq-number[3] UInt32 OPTIONAL
3452 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3454 The encoded EncAPRepPart is encrypted in the shared session key of the
3455 ticket. The optional subkey field can be used in an application-arranged
3456 negotiation to choose a per association session key.
3459 These fields are described above in section 5.4.1. msg-type is
3462 This field is described above in section 5.4.2.
3464 This field contains the current time on the client's host.
3466 This field contains the microsecond part of the client's timestamp.
3468 This field contains an encryption key which is to be used to protect
3469 this specific application session. See section 3.2.6 for specifics on
3470 how this field is used to negotiate a key. Unless an application
3471 specifies otherwise, if this field is left out, the sub-session key
3472 from the authenticator, or if also left out, the session key from the
3473 ticket will be used.
3475 This field is described above in section 5.3.2.
3477 5.5.3. Error message reply
3479 If an error occurs while processing the application request, the KRB_ERROR
3480 message will be sent in response. See section 5.9.1 for the format of the
3481 error message. The cname and crealm fields may be left out if the server
3482 cannot determine their appropriate values from the corresponding KRB_AP_REQ
3483 message. If the authenticator was decipherable, the ctime and cusec fields
3484 will contain the values from it.
3486 5.6. KRB_SAFE message specification
3488 This section specifies the format of a message that can be used by either
3489 side (client or server) of an application to send a tamper-proof message to
3490 its peer. It presumes that a session key has previously been exchanged (for
3491 example, by using the KRB_AP_REQ/KRB_AP_REP messages).
3493 There are two KRB_SAFE messages; the KRB-SAFE message is the one specified
3494 in RFC 1510. The KRB-SAFE2 message is new with this document, and shares a
3495 number of fields with the old KRB-SAFE message.
3497 5.6.1. KRB_SAFE definition
3499 The KRB_SAFE message contains user data along with a collision-proof
3500 checksum keyed with the last encryption key negotiated via subkeys, or the
3501 session key if no negotiation has occurred. The message fields are:
3503 KRB-SAFE ::= [APPLICATION 20] SEQUENCE {
3505 msg-type[1] INTEGER,
3506 safe-body[2] KRB-SAFE-BODY,
3510 KRB-SAFE-BODY ::= SEQUENCE {
3511 user-data[0] OCTET STRING,
3512 timestamp[1] KerberosTime OPTIONAL,
3513 usec[2] Microseconds OPTIONAL,
3514 seq-number[3] UInt32 OPTIONAL,
3515 s-address[4] HostAddress,
3516 r-address[5] HostAddress OPTIONAL
3520 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3523 These fields are described above in section 5.4.1. msg-type is KRB_SAFE
3524 or KRB_SAFE2, respectively, for the KRB-SAFE and KRB-SAFE2 messages.
3526 This field is a placeholder for the body of the KRB-SAFE message.
3528 This field contains the checksum of the application data. Checksum
3529 details are described in section 6.4.
3531 The checksum is computed over the encoding of the KRB-SAFE sequence.
3532 First, the cksum is set to a type zero, zero-length value and the
3533 checksum is computed over the encoding of the KRB-SAFE sequence, then
3534 the checksum is set to the result of that computation, and finally the
3535 KRB-SAFE sequence is encoded again. This method, while different than
3536 the one specified in RFC 1510, corresponds to existing practice.
3538 This field is part of the KRB_SAFE and KRB_PRIV messages and contain
3539 the application specific data that is being passed from the sender to
3542 This field is part of the KRB_SAFE and KRB_PRIV messages. Its contents
3543 are the current time as known by the sender of the message. By checking
3544 the timestamp, the recipient of the message is able to make sure that
3545 it was recently generated, and is not a replay.
3547 This field is part of the KRB_SAFE and KRB_PRIV headers. It contains
3548 the microsecond part of the timestamp.
3550 This field is described above in section 5.3.2.
3554 This field specifies the address in use by the sender of the message.
3555 It may be omitted if not required by the application protocol.
3557 This field specifies the address in use by the recipient of the
3558 message. It may be omitted for some uses (such as broadcast protocols),
3559 but the recipient may arbitrarily reject such messages. This field,
3560 along with s-address, can be used to help detect messages which have
3561 been incorrectly or maliciously delivered to the wrong recipient.
3563 5.7. KRB_PRIV message specification
3565 This section specifies the format of a message that can be used by either
3566 side (client or server) of an application to securely and privately send a
3567 message to its peer. It presumes that a session key has previously been
3568 exchanged (for example, by using the KRB_AP_REQ/KRB_AP_REP messages).
3570 5.7.1. KRB_PRIV definition
3572 The KRB_PRIV message contains user data encrypted in the Session Key. The
3575 KRB-PRIV ::= [APPLICATION 21] SEQUENCE {
3577 msg-type[1] INTEGER,
3578 enc-part[3] EncryptedData
3583 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3585 EncKrbPrivPart ::= [APPLICATION 28] SEQUENCE { --note [31]
3586 user-data[0] OCTET STRING,
3587 timestamp[1] KerberosTime OPTIONAL,
3588 usec[2] Microseconds OPTIONAL,
3589 seq-number[3] UInt32 OPTIONAL,
3590 s-address[4] HostAddress, -- sender's addr
3591 r-address[5] HostAddress OPTIONAL -- recip's addr
3595 These fields are described above in section 5.4.1. msg-type is
3598 This field holds an encoding of the EncKrbPrivPart sequence encrypted
3599 under the session key[32]. This encrypted encoding is used for the
3600 enc-part field of the KRB-PRIV message. See section 6 for the format of
3602 user-data, timestamp, usec, s-address and r-address
3603 These fields are described above in section 5.6.1.
3605 This field is described above in section 5.3.2.
3607 5.8. KRB_CRED message specification
3609 This section specifies the format of a message that can be used to send
3610 Kerberos credentials from one principal to another. It is presented here to
3611 encourage a common mechanism to be used by applications when forwarding
3612 tickets or providing proxies to subordinate servers. It presumes that a
3613 session key has already been exchanged perhaps by using the
3614 KRB_AP_REQ/KRB_AP_REP messages.
3616 5.8.1. KRB_CRED definition
3618 The KRB_CRED message contains a sequence of tickets to be sent and
3619 information needed to use the tickets, including the session key from each.
3620 The information needed to use the tickets is encrypted under an encryption
3621 key previously exchanged or transferred alongside the KRB_CRED message. The
3624 KRB-CRED ::= [APPLICATION 22] SEQUENCE {
3626 msg-type[1] INTEGER, -- KRB_CRED
3627 tickets[2] SEQUENCE OF Ticket,
3628 enc-part[3] EncryptedData -- EncKrbCredPart
3631 EncKrbCredPart ::= [APPLICATION 29] SEQUENCE {
3632 ticket-info[0] SEQUENCE OF KrbCredInfo,
3633 nonce[1] INTEGER OPTIONAL,
3634 timestamp[2] KerberosTime OPTIONAL,
3635 usec[3] Microseconds OPTIONAL,
3636 s-address[4] HostAddress OPTIONAL,
3637 r-address[5] HostAddress OPTIONAL
3641 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3643 KrbCredInfo ::= SEQUENCE {
3644 key[0] EncryptionKey,
3645 prealm[1] Realm OPTIONAL,
3646 pname[2] PrincipalName OPTIONAL,
3647 flags[3] TicketFlags OPTIONAL,
3648 authtime[4] KerberosTime OPTIONAL,
3649 starttime[5] KerberosTime OPTIONAL,
3650 endtime[6] KerberosTime OPTIONAL
3651 renew-till[7] KerberosTime OPTIONAL,
3652 srealm[8] Realm OPTIONAL,
3653 sname[9] PrincipalName OPTIONAL,
3654 caddr[10] HostAddresses OPTIONAL
3658 These fields are described above in section 5.4.1. msg-type is
3661 These are the tickets obtained from the KDC specifically for use by the
3662 intended recipient. Successive tickets are paired with the
3663 corresponding KrbCredInfo sequence from the enc-part of the KRB-CRED
3666 This field holds an encoding of the EncKrbCredPart sequence encrypted
3667 under the session key shared between the sender and the intended
3668 recipient. This encrypted encoding is used for the enc-part field of
3669 the KRB-CRED message. See section 6 for the format of the ciphertext.
3671 If practical, an application may require the inclusion of a nonce
3672 generated by the recipient of the message. If the same value is
3673 included as the nonce in the message, it provides evidence that the
3674 message is fresh and has not been replayed by an attacker. A nonce must
3675 never be re-used; it should be generated randomly by the recipient of
3676 the message and provided to the sender of the message in an application
3679 These fields specify the time that the KRB-CRED message was generated.
3680 The time is used to provide assurance that the message is fresh.
3681 s-address and r-address
3682 These fields are described above in section 5.6.1. They are used
3683 optionally to provide additional assurance of the integrity of the
3686 This field exists in the corresponding ticket passed by the KRB-CRED
3687 message and is used to pass the session key from the sender to the
3688 intended recipient. The field's encoding is described in section 6.2.
3690 The following fields are optional. If present, they can be associated with
3691 the credentials in the remote ticket file. If left out, then it is assumed
3692 that the recipient of the credentials already knows their value.
3695 The name and realm of the delegated principal identity.
3696 flags, authtime, starttime, endtime, renew-till, srealm, sname, and caddr
3697 These fields contain the values of the corresponding fields from the
3698 ticket found in the ticket field. Descriptions of the fields are
3699 identical to the descriptions in the KDC-REP message.
3702 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3704 5.9. Error message specification
3706 This section specifies the format for the KRB_ERROR message. The fields
3707 included in the message are intended to return as much information as
3708 possible about an error. It is not expected that all the information
3709 required by the fields will be available for all types of errors. If the
3710 appropriate information is not available when the message is composed, the
3711 corresponding field will be left out of the message.
3713 Note that since the KRB_ERROR message is only optionally integrity
3714 protected, it is quite possible for an intruder to synthesize or modify such
3715 a message. In particular, this means that unless appropriate integrity
3716 protection mechanisms have been applied to the KRB_ERROR message, the client
3717 should not use any fields in this message for security-critical purposes,
3718 such as setting a system clock or generating a fresh authenticator. The
3719 message can be useful, however, for advising a user on the reason for some
3722 5.9.1. KRB_ERROR definition
3724 The KRB_ERROR message consists of the following fields:
3726 KRB-ERROR ::= [APPLICATION 30] SEQUENCE {
3728 msg-type[1] INTEGER,
3729 ctime[2] KerberosTime OPTIONAL,
3730 cusec[3] Microseconds OPTIONAL,
3731 stime[4] KerberosTime,
3732 susec[5] Microseconds,
3733 error-code[6] Int32,
3734 crealm[7] Realm OPTIONAL,
3735 cname[8] PrincipalName OPTIONAL,
3736 realm[9] Realm, -- Correct realm
3737 sname[10] PrincipalName, -- Correct name
3738 e-text[11] KerberosString OPTIONAL,
3739 e-data[12] OCTET STRING OPTIONAL
3744 These fields are described above in section 5.4.1. msg-type is
3747 This field is described above in section 5.4.1.
3749 This field is described above in section 5.5.2.
3751 This field contains the current time on the server. It is of type
3754 This field contains the microsecond part of the server's timestamp. Its
3755 value ranges from 0 to 999999. It appears along with stime. The two
3756 fields are used in conjunction to specify a reasonably accurate
3759 This field contains the error code returned by Kerberos or the server
3760 when a request fails. To interpret the value of this field see the list
3761 of error codes in section 8. Implementations are encouraged to provide
3762 for national language support in the display of error messages.
3763 crealm, cname, srealm and sname
3764 These fields are described above in section 5.3.1.
3766 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3769 This field contains additional text to help explain the error code
3770 associated with the failed request (for example, it might include a
3771 principal name which was unknown).
3773 This field contains additional data about the error for use by the
3774 application to help it recover from or handle the error. If present,
3775 this field will contain the encoding of a sequence of TypedData
3776 (TYPED-DATA below), unless the errorcode is KDC_ERR_PREAUTH_REQUIRED,
3777 in which case it will contain the encoding of a sequence of of padata
3778 fields (METHOD-DATA below), each corresponding to an acceptable
3779 pre-authentication method and optionally containing data for the
3782 TYPED-DATA ::= SEQUENCE of TypedData
3783 METHOD-DATA ::= SEQUENCE of PA-DATA
3785 TypedData ::= SEQUENCE {
3787 data-value[1] OCTET STRING OPTIONAL
3790 Note that the padata-type field in the PA-DATA structure and the
3791 data-type field in the TypedData structure share a common range of
3792 allocated values which are coordinated to avoid conflicts. One Kerberos
3793 error message, KDC_ERR_PREAUTH_REQUIRED, embeds elements of type
3794 PA-DATA, while all other error messages embed TypedData.
3796 While preauthentication methods of type PA-DATA should be encapsulated
3797 within a TypedData element of type TD-PADATA, for compatibility with
3798 old clients, the KDC should include PA-DATA types below 22 directly as
3799 method-data. All new implementations interpreting the METHOD-DATA field
3800 for the KDC_ERR_PREAUTH_REQUIRED message must accept a type of
3801 TD-PADATA, extract the typed data field and interpret the use any
3802 elements encapsulated in the TD-PADATA elements as if they were present
3803 in the METHOD-DATA sequence.
3805 Unless otherwise specified, unrecognized TypedData elements within the
3806 KRB-ERROR message MAY be ignored by implementations that do not support
3807 them. Note that all TypedData MAY be bound to the KRB-ERROR message via
3810 An application may use the TD-APP-DEFINED-ERROR typed data type for
3811 data carried in a Kerberos error message that is specific to the
3812 application. TD-APP-SPECIFIC must set the data-type value of TypedData
3813 to TD-APP-SPECIFIC and the data-value field to
3815 AppSpecificTypedData as follows:
3816 AppSpecificTypedData ::= SEQUENCE {
3817 oid[0] OPTIONAL OBJECT IDENTIFIER,
3818 -- identifies the application
3819 data-value[1] OCTET STRING
3825 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3827 o The TD-REQ-NONCE TypedData MAY be used to bind a KRB-ERROR to a
3828 KDC-REQ. The data-value is an INTEGER that is equivalent to the
3831 o The TD-REQ-SEQ TypedData MAY be used for binding a KRB-ERROR to
3832 the sequence number from an authenticator. The data-value is an
3833 INTEGER, and it is identical to sequence number sent in the
3836 o The data-value for TD-KRB-PRINCIPAL is the Kerberos-defined
3837 PrincipalName. The data-value for TD-KRB-REALM is the
3838 Kerberos-defined Realm. These TypedData types MAY be used to
3839 indicate principal and realm name when appropriate.
3841 ------------------------------------------------------------------------
3843 5.10. Application Tag Numbers
3845 The following table lists the application class tag numbers used by various
3846 data types defined in this section.
3847 Tag Number(s) Type Name Comments
3888 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3898 6. Encryption and Checksum Specifications
3900 Work is still needed on this section.
3902 * Re-synchronize the key usage value list with any changes Tom
3903 makes to the message definitions. KRB-ERROR checksum, for
3904 example, and any new message types.
3905 * More talking with cryptographers about the "combine-keys"
3906 function in the simplified profile. I've been talking a
3907 little with Uri Blumenthal, but he hasn't had a lot of time
3909 * Test vections need to go into an appendix. Submitted,
3910 appendix letter not yet assigned; I'm using "Z" in this text.
3911 Appendix letter also not yet assigned for deprecated checksum
3912 algorithms, assuming "Y".
3913 * More detailed list of differences from RFC 1510, to update
3914 the "Significant changes" appendix.
3915 * Are sections 6.2 and 6.3 what we want to recommend for
3916 external use in section 6.7, or just a subset?
3917 * Fix up reference to Bellovin paper.
3918 * Fix anything marked with "@@".
3920 See end notes for other issues.
3924 The Kerberos protocols described in this document are designed to encrypt
3925 blocks of arbitrary sizes, using stream encryption ciphers, or more
3926 commonly, block encryption ciphers, such as the Data Encryption Standard
3927 [DES77], and triple DES variants, in conjunction with block chaining and
3928 checksum methods [DESM80]. Encryption is used to prove the identities of the
3929 network entities participating in message exchanges. The Key Distribution
3930 Center for each realm is trusted by all principals registered in that realm
3931 to store a secret key in confidence. Proof of knowledge of this secret key
3932 is used to verify the authenticity of a principal.
3934 The KDC uses the principal's secret key (in the AS exchange) or a shared
3935 session key (in the TGS exchange) to encrypt responses to ticket requests;
3936 the ability to obtain the secret key or session key implies the knowledge of
3937 the appropriate keys and the identity of the KDC. The ability of a principal
3938 to decrypt the KDC response and present a Ticket and a properly formed
3939 Authenticator (generated with the session key from the KDC response) to a
3940 service verifies the identity of the principal; likewise the ability of the
3941 service to extract the session key from the Ticket and prove its knowledge
3942 thereof in a response verifies the identity of the service.
3944 The Kerberos protocols generally assume that the encryption used is secure
3945 from cryptanalysis; however, in some cases, the order of fields in the
3946 encrypted portions of messages as defined in this section is chosen to
3947 minimize the effects of poorly chosen keys under certain types of
3948 cryptographic attacks. It is still important to choose good keys. If keys
3949 are derived from user-typed passwords, those passwords need to be well
3950 chosen to make brute force attacks more difficult. Poorly chosen keys still
3951 make easy targets for intruders.
3954 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
3956 The following sections specify the encryption and checksum mechanisms
3957 currently defined for Kerberos, as well as a framework for defining future
3958 mechanisms. The encodings, chaining, padding and other requirements for each
3959 are described. Test vectors for several functions are given in appendix Z.
3961 See also appendix Y for deprecated checksum algorithms defined in RFC 1510,
3962 which may still be in use by some implementations, but are not part of this
3963 version of the specification.
3967 Both encryption and checksum mechanism are defined in terms of profiles,
3968 detailed in later sections. Each specifies a collection of operations and
3969 attributes that must be defined for a mechanism. A Kerberos encryption or
3970 checksum mechanism is not complete if it does not specify all of these
3971 operations and attributes.
3973 An encryption mechanism must provide for confidentiality and integrity of
3974 the original plaintext. (Integrity checking may be achieved by incorporating
3975 a checksum, if the encryption mode does not provide an integrity check
3976 itself.) It must also provide non-malleability [Bellare98, Dolev91]. Use of
3977 a random confounder prepended to the plaintext is recommended. It should not
3978 be possible to determine if two ciphertexts correspond to the same
3979 plaintext, without knowledge of the key.
3981 A checksum mechanism[6.1] must provide proof of the integrity of the
3982 associated message, and must preserve the confidentiality of the message in
3983 case it is not sent in the clear. It should be infeasible to find two
3984 plaintexts which have the same checksum. It is NOT required that an
3985 eavesdropper be unable to determine if two checksums are for the same
3986 message; it is assumed that the messages themselves will be visible to any
3989 Due to advances in cryptography, it is considered unwise by some
3990 cryptographers to use the same key for multiple purposes [@@reference??].
3991 Since keys are used in performing a number of different functions in
3992 Kerberos, it is desirable to use different keys for each of these purposes,
3993 even though we start with a single long-term or session key.
3995 We do this by enumerating the different uses of keys within Kerberos, and
3996 making the "usage number" an input to the encryption or checksum mechanisms.
3997 Later sections define simplified profile templates for encryption and
3998 checksum mechanisms that use a key derivation function applied to a CBC mode
3999 (or similar) cipher and a checksum or hash algorithm.
4001 We distinguish the "base key" used in the EncryptedKey object from the
4002 "specific key" to be used for a particular instance of encryption or
4003 checksum operations. It is expected but not required that the specific key
4004 will be one or more separate keys derived from the original protocol key and
4005 the key usage number. The specific key is not explicitly referenced outside
4006 of section 6 in this document; when other sections mention encrypting or
4007 decrypting data with a given key, that key is the "base key", and the
4008 "specific key" generation and use is implicit, as is the use of a key usage
4012 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4016 This is a list of key usage number definitions and reserved ranges,
4017 including values for all places keys are used in the Kerberos protocol and
4018 associated section numbers.
4020 1. AS-REQ PA-ENC-TIMESTAMP padata timestamp, encrypted with the
4021 client key (section 5.4.1)
4022 2. AS-REP Ticket and TGS-REP Ticket (includes TGS session key or
4023 application session key), encrypted with the service key
4025 3. AS-REP encrypted part (includes TGS session key or application
4026 session key), encrypted with the client key (section 5.4.2)
4027 4. TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the TGS
4028 session key (section 5.4.1)
4029 5. TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the TGS
4030 authenticator subkey (section 5.4.1)
4031 6. TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator cksum, keyed with
4032 the TGS session key (sections 5.3.2, 5.4.1)
4033 7. TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator (includes TGS
4034 authenticator subkey), encrypted with the TGS session key
4036 8. TGS-REP encrypted part (includes application session key),
4037 encrypted with the TGS session key (section 5.4.2)
4038 9. TGS-REP encrypted part (includes application session key),
4039 encrypted with the TGS authenticator subkey (section 5.4.2)
4040 10. AP-REQ Authenticator cksum, keyed with the application session
4042 11. AP-REQ Authenticator (includes application authenticator
4043 subkey), encrypted with the application session key (section
4045 12. AP-REP encrypted part (includes application session subkey),
4046 encrypted with the application session key (section 5.5.2)
4047 13. KRB-PRIV encrypted part, encrypted with a key chosen by the
4048 application (section 5.7.1)
4049 14. KRB-CRED encrypted part, encrypted with a key chosen by the
4050 application (section 5.6.1)
4051 15. KRB-SAFE cksum, keyed with a key chosen by the application
4053 18. KRB-ERROR checksum (e-cksum in section 5.9.1)
4054 19. AD-KDCIssued checksum (ad-checksum in appendix B.4)
4055 20. Checksum for Mandatory Ticket Extensions (appendix B.6)
4056 21. Checksum in Authorization Data in Ticket Extensions (appendix
4058 22-24. Reserved for use in GSSAPI mechanisms derived from RFC 1964.
4060 25-511. Reserved for future use in Kerberos and related protocols.
4061 512-1023. Reserved for uses internal to a Kerberos implementation. [6.2]
4063 A few of these key usages need a little clarification. A service which
4064 receives an AP-REQ has no way to know if the enclosed Ticket was part of an
4065 AS-REP or TGS-REP. Therefore, key usage 2 must always be used for generating
4066 a Ticket, whether it is in response to an AS-REQ or TGS-REQ.
4068 Key usage values between 1024 and 2047 (inclusive) are reserved for
4069 application use. Applications should use even values for encryption and odd
4070 values for checksums within this range.
4073 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4075 There might exist other documents which define protocols in terms of the
4076 RFC1510 encryption types or checksum types. Such documents would not know
4077 about key usages. In order that these documents continue to be meaningful
4078 until they are updated, key usages 1024 and 1025 must be used to derive keys
4079 for encryption and checksums, respectively.[6.3] New protocols defined in
4080 terms of the Kerberos encryption and checksum types should use their own key
4081 usage values. Key usages are unsigned 32 bit integers; zero is not
4082 permitted. Usage numbers may be registered with IANA to avoid conflicts.
4084 6.2. Encryption mechanism attributes
4086 An encryption mechanism profile must define the following attributes and
4090 This describes what OCTET STRING values represent valid keys. For
4091 encryption mechanisms that don't have perfectly dense key spaces, this
4092 will describe the representation used for encoding keys. It need not
4093 describe specific values that are not valid or desirable for use; such
4094 values should be avoid by all key generation routines.
4095 specific key structure
4096 This is not a protocol format at all, but a description of the keying
4097 material derived from the chosen key and used to encrypt or decrypt
4098 data or compute or verify a checksum. It may be a single key, a set of
4099 keys, or a combination of the original key with additional data. The
4100 authors recommend using one or more keys derived from the original key
4101 via one-way functions.
4102 required checksum mechanism
4103 This indicates a checksum mechanism that must be available when this
4104 encryption mechanism is used. Since Kerberos has no built in mechanism
4105 for negotiating checksum mechanisms, once an encryption mechanism has
4106 been decided upon, the corresponding checksum mechanism can simply be
4108 key-generation seed length, K
4109 This is the length of the random bitstring needed to generate a key
4110 with the encryption scheme's random-to-key function (described below).
4111 This must be a fixed value so that various techniques for producing a
4112 random bitstring of a given length may be used with key generation
4114 key generation functions
4115 Keys must be generated in a number of cases, from different types of
4116 inputs. All function specifications must indicate how to generate keys
4117 in the proper wire format, and must avoid generation of "weak" keys if
4118 the cryptosystem has such. Entropy from each source should be preserved
4119 as much as possible. Many of the inputs, while unknown, may be at least
4120 partly predictable (e.g., a password string is likely to be entirely in
4121 the ASCII subset and of fairly short length in many environments; a
4122 semi-random string may include timestamps); the benefit of such
4123 predictability to an attacker must be minimized.
4125 string-to-key (UTF8String, UTF8String, integer)->(protocol-key)
4126 This function generates a key from two UTF-8 strings and an
4127 integer. One of the strings is normally the principal's password,
4128 but is in general merely a secret string. The other string is a
4129 "salt" intended to produce different keys from the same password
4130 for different users or realms. The integer is known for historical
4131 reasons as the "salt type", but may be used for selection between
4132 multiple string-to-key algorithms. The salt string and type may be
4133 altered by preauth data from the KDC; in the default case, the
4134 salt string is simply a concatenation of the principal's realm and
4135 name components, with no separators, and the salt type is zero.
4137 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4140 This should be a one-way function, so that compromising a user's
4141 key in one realm does not compromise the user's key in another
4142 realm, even if the same password (but a different salt string) is
4145 random-to-key (bitstring[K])->(protocol-key)
4146 This function generates a key from a random bit string of a
4147 specific size. It may be assumed that all the bits of the input
4148 string are equally random, even though the entropy present in the
4149 random source may be limited.
4150 combine-keys (protocol-key, protocol-key)->(protocol-key)
4151 This function takes two input keys and produces a new key. This
4152 function is not used in this RFC, but may be used by
4153 preauthentication methods or other applications to be defined
4154 later. This operation must be commutative; this requirement lets
4155 us specify "combine keys A and B" in other documents without
4156 worrying about ordering.
4157 key-derivation (protocol-key, integer)->(specific-key)
4158 In this function, the byte string input is based on the key usage
4159 values specified above; the usage values must be assumed to be
4160 known to an attacker. For cryptosystems with dense key spaces,
4161 this function should be the key derivation function outlined in
4164 initial cipher state (specific-key)->(state)
4165 This describes any initial state setup needed before encrypting
4166 arbitrary amounts of data with a given specific key; the specific key
4167 must be the only input needed for this initialization. For example, a
4168 block cipher used in CBC mode must specify an initial vector. (For
4169 security reasons, the key itself should not be used as the IVEC.) This
4170 data may be carried over from one encryption or decryption operation to
4171 another. Unless otherwise specified, however, each encryption or
4172 decryption operation in this RFC uses a freshly initialized state and
4173 is thus independent of all other encryptions and decryptions.
4175 This state should be treated as opaque in any uses outside of an
4176 encryption algorithm definition.
4177 encrypt (specific-key, state, bytestring)->(state, bytestring)
4178 This function takes the specific key, cipher state, and plaintext as
4179 input, and generates ciphertext and a new cipher state as outputs. If
4180 the basic encryption algorithm itself does not provide for integrity
4181 protection (as DES in CBC mode does not do), then some form of MAC or
4182 checksum must be included that can be verified by the receiver. Some
4183 random factor such as a confounder should be included so that an
4184 observer cannot know if two messages contain the same plaintext, even
4185 if the cipher state and specific keys are the same. The exact length of
4186 the plaintext need not be encoded, but if it is not and if padding is
4187 required, the padding must be added at the end of the string so that
4188 the decrypted version may be parsed from the beginning.
4190 The output will be used as the OCTET STRING in the EncryptedData type,
4191 defined in section 5.1.
4194 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4196 decrypt (specific-key, state, bytestring)->(state, bytestring)
4197 This function takes the specific key, cipher state, and ciphertext as
4198 inputs, and verifies the integrity of the supplied ciphertext. If the
4199 ciphertext's integrity is intact, this function produces the plaintext
4200 and a new cipher state as outputs; otherwise, an error indication must
4201 be returned, and the data discarded.
4203 This function's byte string input is the OCTET STRING from the
4204 EncryptedData type, defined in section 5.1.
4206 The result of the decryption may be longer than the original plaintext,
4207 if the encryption mode requires padding to a multiple of a block size.
4208 If this is the case, any extra padding will be after the decoded
4209 plaintext. An application protocol which needs to know the exact length
4210 of the message must encode a length or recognizable "end of message"
4211 marker within the plaintext.
4213 These operations and attributes are all that should be required to support
4214 Kerberos and various proposed preauthentication schemes.
4216 The reader is reminded that cryptography is a complex and growing field, and
4217 proof of the security of an algorithm is often difficult, even for those
4218 with extensive training in the field. Merely making an algorithm complicated
4219 is more likely to make it hard to analyze than it is to make it secure. This
4220 should be kept in mind when defining functions for new cryptosystems; simple
4221 applications of existing, trusted algorithms are more likely to be secure
4222 than a complicated home-grown scheme.
4224 6.3. Checksum mechanism attributes
4226 A checksum mechanism profile must define the following attributes and
4229 associated encryption algorithm(s)
4230 This essentially indicates the type of encryption key this checksum
4231 mechanism can be used with. A single checksum mechanism may have more
4232 than one associated encryption algorithm if they share the same wire
4233 key format, string-to-key function, and key derivation function. (This
4234 combination means that, for example, a checksum type and password are
4235 adequate to get the specific key used to compute a checksum.)
4237 This function generates a MIC token for a given specific key (see
4238 section 6.2), and message (represented as an octet string), that may be
4239 used to verify the integrity of the associated message. This function
4240 is not required to return the same deterministic result on every use;
4241 it need only generate a token that the verify_mic routine can check.
4243 The output of this function will also dictate the size of the checksum.
4244 It must be a fixed size.
4247 Given a specific key, message, and MIC, this function ascertains
4248 whether the message integrity has been compromised. For a deterministic
4249 get_mic routine, the corresponding verify_mic may simply generate
4250 another checksum and compare them.
4252 The get_mic and verify_mic operations must be able to handle inputs of
4253 arbitrary length; if any padding is needed, the padding scheme must be
4254 specified as part of these functions.
4256 These operations and attributes are all that should be required to support
4257 Kerberos and various proposed preauthentication schemes.
4260 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4262 6.4. A simplified profile for CBC-mode ciphers using key derivation
4264 The profile outlines in sections 6.2 and 6.3 describes a large number of
4265 operations that must be defined for encryption and checksum algorithms to be
4266 used with Kerberos. We describe here a simpler profile from which both
4267 encryption and checksum mechanism definitions can be generated, filling in
4268 uses of key derivation in appropriate places, providing integrity
4269 protection, and defining multiple operations for the cryptosystem profile
4270 based on a smaller set of operations given in the simplified profile. Not
4271 all of the existing cryptosystems for Kerberos fit into this simplified
4272 profile, but we recommend that future cryptosystems use it or something
4275 Not all of the operations in the complete profiles are defined through this
4276 mechanism; several must still be defined for each new algorithm pair.
4278 A key derivation function [Horowitz]
4280 Rather than define some scheme by which a "protocol key" is composed of a
4281 large number of encryption keys, we use keys derived from a base key to
4282 perform cryptographic operations. The base key must be used only for
4283 generating the derived keys, and this derivation must be non-invertible and
4284 entropy-preserving. Given these restrictions, compromise of one derived key
4285 does not compromise the other subkeys. Attack of the base key is limited,
4286 since it is only used for derivation, and is not exposed to any user data.
4288 Since the derived key has as much entropy as the base keys (if the
4289 cryptosystem is good), password-derived keys have the full benefit of all
4290 the entropy in the password.
4292 To generate a derived key from a base key, we generate a pseudorandom byte
4293 string, using an algorithm DR described below, and generate a key from that
4294 byte string using a function dependent on the encryption algorithm; the
4295 input length needed for that function, which is also dependent on the
4296 encryption algorithm, dictates the length of the string to be generated by
4297 the DR algorithm (the value "k" below).
4299 Derived Key = DK(Base Key, Well-Known Constant)
4301 DK(Key, Constant) = random-to-key(DR(Key, Constant))
4303 DR(Key, Constant) = k-truncate(E(Key, Constant))
4305 Here DR is the random-byte generation function described below, and DK is
4306 the key-derivation function produced from it. In this construction, E(Key,
4307 Plaintext) is a block cipher, Constant is a well-known constant determined
4308 by the specific usage of this function, and k-truncate truncates its
4309 argument by taking the first k bits. Here, k is the key generation seed
4310 length needed for the encryption system.
4312 The output of the DR function is a string of bits; the actual key is
4313 produced by applying the cryptosystem's random-to-key operation on this
4316 If the output of E is shorter than k bits, then some entropy in the key will
4317 be lost. If the Constant is smaller than the block size of E, then it must
4318 be padded so it may be encrypted.
4320 In either of these situations, a variation of the above construction is
4321 used, where the folded Constant is encrypted, and the resulting output is
4322 fed back into the encryption as necessary (the | indicates concatentation):
4325 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4327 K1 = E(Key, n-fold(Constant))
4332 DR(Key, Constant) = k-truncate(K1 | K2 | K3 | K4 ...)
4334 n-fold is an algorithm which takes m input bits and ``stretches'' them to
4335 form n output bits with equal contribution from each input bit to the
4336 output, as described in [Blumenthal96]:
4338 We first define a primitive called n-folding, which takes a
4339 variable-length input block and produces a fixed-length output
4340 sequence. The intent is to give each input bit approximately equal
4341 weight in determining the value of each output bit. Note that
4342 whenever we need to treat a string of bytes as a number, the
4343 assumed representation is Big-Endian -- Most Significant Byte
4346 To n-fold a number X, replicate the input value to a length that
4347 is the least common multiple of n and the length of X. Before each
4348 repetition, the input is rotated to the right by 13 bit positions.
4349 The successive n-bit chunks are added together using
4350 1's-complement addition (that is, with end-around carry) to yield
4353 Test vectors for n-fold are supplied in Appendix Z. [6.4]
4355 In this document, n-fold is always used to produce n bits of output, where n
4356 is the block size of E.
4358 The size of the Constant must not be larger than the block size of E,
4359 because reducing the length of the Constant by n-folding can cause
4362 If the size of the Constant is smaller than the block size of E, then the
4363 Constant must be n-folded to the block size of E. This string is used as
4364 input to E. If the block size of E is less than the key size, then the
4365 output from E is taken as input to a second invocation of E. This process is
4366 repeated until the number of bits accumulated is greater than or equal to
4367 the key size of E. When enough bits have been computed, the first k are
4368 taken as the derived key.
4370 Since the derived key is the result of one or more encryptions in the base
4371 key, deriving the base key from the derived key is equivalent to determining
4372 the key from a very small number of plaintext/ciphertext pairs. Thus, this
4373 construction is as strong as the cryptosystem itself.
4375 6.4.1. Simplified profile parameters
4377 These are the operations and attributes that must be defined:
4380 string-to-key function
4381 key-generation seed length, k
4382 random-to-key function
4383 As above for the normal encryption mechanism profile.
4384 unkeyed hash algorithm, H
4385 This should be a collision-resistant hash algorithm such as SHA-1,
4386 suitable for use in an HMAC. It must support inputs of arbitrary
4389 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4391 encryption block size, n
4392 encryption/decryption functions, E and D
4393 These are basic encryption and decryption functions for messages of
4394 sizes that are multiples of the block size. No integrity checking or
4395 confounder should be included here. They take as input the IV or
4396 similar data, a protocol-format key, and a byte string, returning a new
4399 The encryption function is not required to use CBC mode, but is assumed
4400 to be using something with similar properties. In particular,
4401 prepending a one-block confounder to the plaintext should alter the
4402 entire ciphertext (comparable to choosing and including a random
4403 initial vector for CBC mode).
4405 While there are still a number of properties to specify, they are fewer and
4406 simpler than in the full profile.
4408 6.4.2. Cryptosystem profile based on simplified profile
4410 protocol key As given.
4412 specific key Three protocol-format keys: { Kc, Ke, Ki }.
4414 key-generation As given.
4416 required The checksum mechanism defined by the simplified checksum
4417 checksum profile given later.
4419 cipher state Initial vector, initialized to all zero.
4420 encryption The ciphertext output is the concatenation of the output of
4421 function the basic encryption function E and an HMAC using the
4422 specified hash function H, both applied to the padded
4423 plaintext with a confounder:
4425 ciphertext = E(Ke, confounder | plaintext | padding) |
4426 HMAC(Ki, confounder | plaintext | padding)
4427 HMAC(K,M) = H(K | H(K | M))
4429 One block of random confounder data is prepended to the
4430 plaintext, and padding added to the end to bring the length
4431 to a multiple of the encryption algorithm's block size. The
4432 initial vector for encryption is supplied by the cipher
4433 state, and the last block of the output of E is the new
4434 IVEC for the new cipher state.
4435 decryption Decryption is performed by extracting the encrypted portion
4436 function of the ciphertext, decrypting using key Ke from the
4437 specific key, and verifying the HMAC. If the HMAC is
4438 incorrect, an error must be reported. Otherwise, the
4439 confounder and padding are discarded and the remaining
4440 plaintext returned. As with encryption, the cipher state
4441 input indicates the IVEC to use, and the last block of the
4442 encrypted portion of the ciphertext is put into the new
4443 cipher state to be used as the next IVEC.
4446 string-to-key As given.
4448 random-to-key As given.
4451 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4453 combine-keys @@ Needs to be specified. How about:
4456 /* First, protect original keys against exposure
4458 R1 = DR(K1, n-fold(K2)) /* length k */
4459 R2 = DR(K2, n-fold(K1)) /* length k */
4460 /* Using k-fold on length 2k means just add with
4461 wrap-around carry. */
4462 rnd = k-fold(R1 | R2)
4463 tkey = random-to-key(rnd)
4464 key = DK(tkey, CombineConstant)
4466 @@ This should be commutative, which keeps the
4467 specifications simpler, and I think should protect each
4468 key's contribution from exposure of the other key. Or
4469 should we just go with an XOR combination of the random
4470 bytes? (But that works poorly should the two keys happen to
4471 be the same due to sloppy or weird protocol specs, or
4472 parallel construction of contributed keys.) Do we need the
4473 two DK invocations at the start? Would one at the end be
4474 better? Do we need either?
4476 Here CombineConstant is the byte string {0x63 0x6f 0x6d
4477 0x62 0x69 0x6e 0x65} corresponding to the ASCII encoding of
4478 the string "combine".
4480 @@ Need a cryptographer to review this. Asked Uri
4481 Blumenthal, he said he'd look it over when he has time.
4482 key-derivation Three keys are generated, using the DK function described
4483 function above, and the key usage number, represented as a 32-bit
4484 integer in big-endian byte order. One is used for
4485 generating checksums only; the other two are used for
4486 encrypting and integrity protection for ciphertext. These
4487 keys are generated as follows (with "|" indicating
4490 Kc = DK(base-key, usage|0x99));
4491 Ke = DK(base-key, usage|0xAA);
4492 Ki = DK(base-key, usage|0x55);
4494 6.4.3. Checksum profiles based on simplified profile
4496 When an encryption system is defined using the simplified profile given in
4497 section 6.4.1, a checksum algorithm may be defined for it as follows:
4499 associated cryptosystem as defined above
4500 get_mic HMAC(Kc, message)
4501 verify_mic get_mic and compare
4503 The HMAC function and key Kc are as described in section 6.4.2.
4505 6.5. Profiles for Kerberos encryption systems
4507 These are the currently defined encryption systems for Kerberos. The astute
4508 reader will notice that some of them do not fulfill all of the requirements
4509 outlined above. These weaker encryption systems are defined for backwards
4510 compatibility; newer implementations should attempt to make use of the
4511 stronger encryption systems when possible.
4513 The full list of encryption type number assignments is given in section 8.3.
4516 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4520 If no encryption is in use, the encryption system is said to be the NULL
4521 encryption system. In the NULL encryption system there is no checksum,
4522 confounder or padding. The ciphertext is simply the plaintext. The NULL Key
4523 is used by the null encryption system and is zero octets in length.
4525 This encryption system should not be used for protection of data. It exists
4526 primarily to associate with the rsa-md5 checksum type, but may also be
4527 useful for testing protocol implementations.
4529 protocol key format zero-length bit string
4530 specific key structure empty
4531 required checksum mechanism rsa-md5
4532 key-generation seed length 0
4534 initial cipher state none
4535 encryption function identity
4536 decryption function identity, no integrity check
4537 key generation functions:
4538 string-to-key empty string
4539 random-to-key empty string
4540 combine-keys empty string
4541 key-derivation empty string
4543 The null encryption algorithm is assigned the etype value zero (0).
4547 The des-cbc-md5 encryption mode encrypts information under the Data
4548 Encryption Standard [DES77] using the cipher block chaining mode [DESM80].
4549 An MD5 checksum (described in [MD5-92]) is applied to the confounder and
4550 message sequence (msg-seq) and placed in the cksum field. DES blocks are 8
4551 bytes. As a result, the data to be encrypted (the concatenation of
4552 confounder, checksum, and message) must be padded to an 8 byte boundary
4555 Plaintext and DES ciphtertext are encoded as blocks of 8 octets which are
4556 concatenated to make the 64-bit inputs for the DES algorithms. The first
4557 octet supplies the 8 most significant bits (with the octet's MSbit used as
4558 the DES input block's MSbit, etc.), the second octet the next 8 bits, ...,
4559 and the eighth octet supplies the 8 least significant bits.
4561 Encryption under DES using cipher block chaining requires an additional
4562 input in the form of an initialization vector. Unless otherwise specified,
4563 zero should be used as the initialization vector. Kerberos' use of DES
4564 requires an 8 octet confounder.
4566 The DES specifications identify some 'weak' and 'semi-weak' keys; those keys
4567 shall not be used for encrypting messages for use in Kerberos. Additionally,
4568 because of the way that keys are derived for the encryption of checksums,
4569 keys shall not be used that yield 'weak' or 'semi-weak' keys when
4570 eXclusive-ORed with the hexadecimal constant F0F0F0F0F0F0F0F0.
4572 A DES key is 8 octets of data, with keytype one (1). This consists of 56
4573 bits of key, and 8 parity bits (one per octet). The key is encoded as a
4574 series of 8 octets written in MSB-first order. The bits within the key are
4575 also encoded in MSB order. For example, if the encryption key is
4576 (B1,B2,...,B7,P1,B8,...,B14,P2,B15,...,B49,P7,B50,...,B56,P8) where
4577 B1,B2,...,B56 are the key bits in MSB order, and P1,P2,...,P8 are the parity
4578 bits, the first octet of the key would be B1,B2,...,B7,P1 (with B1 as the
4579 MSbit). [See the FIPS 81 introduction for reference.]
4582 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4584 Encryption data format
4586 The format for the data to be encrypted includes a one-block confounder, a
4587 checksum, the encoded plaintext, and any necessary padding, as described in
4588 the following diagram. The msg-seq field contains the part of the protocol
4589 message described in section 5 which is to be encrypted. The confounder,
4590 checksum, and padding are all untagged and untyped.
4592 +-----------+----------+-------------+-----+
4593 |confounder | check | msg-seq | pad |
4594 +-----------+----------+-------------+-----+
4596 One generates a random confounder of one block, placing it in confounder;
4597 zeroes out check; calculates the appropriate checksum over confounder,
4598 check, and msg-seq, placing the result in check; adds the necessary padding;
4599 then encrypts using the specified encryption type and the appropriate key.
4601 String to key transformation
4603 To generate a DES key from a UTF-8 text string (password), a "salt" is
4604 concatenated to the text string, and then padded with ASCII nulls to an 8
4607 This string is then fan-folded and eXclusive-ORed with itself to form an 8
4608 byte DES key. Before eXclusive-ORing a block, every byte is shifted one bit
4609 to the left to leave the lowest bit zero. The key is the "corrected" by
4610 correcting the parity on the key, and if the key matches a 'weak' or
4611 'semi-weak' key as described in the DES specification, it is eXclusive-ORed
4612 with the constant 00000000000000F0. This key is then used to generate a DES
4613 CBC checksum on the initial string (with the salt appended). The result of
4614 the CBC checksum is the "corrected" as described above to form the result
4615 which is return as the key.
4619 key_correction(key) {
4621 if (is_weak_key_key(key))
4626 mit_des_string_to_key(string,salt) {
4630 pad(s); /* with nulls to 8 byte boundary */
4631 for (8byteblock in s) {
4637 left shift every byte in 8byteblock one bit;
4638 tempkey = tempkey XOR 8byteblock;
4640 tempkey = key_correction(tempkey);
4641 key = key_correction(DES-CBC-check(s,tempkey));
4646 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4648 des_string_to_key(type,string,salt) {
4650 mit_des_string_to_key(string,salt);
4652 afs_des_string_to_key(string,salt);
4655 The AFS string-to-key algorithm is not defined here, but salt type value one
4656 (1) is reserved for that use.
4658 The encryption system parameters for des-cbc-md5 are:
4660 protocol key format 8 bytes, parity in low bit of each
4661 specific key structure copy of original key
4662 required checksum mechanism rsa-md5-des
4663 key-generation seed length 8 bytes
4664 cipher state 8 bytes (CBC initial vector)
4665 initial cipher state all-zero
4666 encryption function des-cbc(confounder | checksum | msg | pad)
4668 with checksum computed as described above
4669 decryption function decrypt encrypted text and verify checksum
4670 key generation functions:
4671 string-to-key des_string_to_key
4672 random-to-key copy input, then fix parity bits
4673 (discards low bit of each input byte)
4674 combine-keys bitwise XOR, then fix parity bits
4675 key-derivation identity
4677 The des-cbc-md5 encryption type is assigned the etype value three (3).
4681 The des-cbc-md4 encryption mode encrypts information under the Data
4682 Encryption Standard [DES77] using the cipher block chaining mode [DESM80].
4683 An MD4 checksum (described in [MD492]) is applied to the confounder and
4684 message sequence (msg-seq) and placed in the cksum field. DES blocks are 8
4685 bytes. As a result, the data to be encrypted (the concatenation of
4686 confounder, checksum, and message) must be padded to an 8 byte boundary
4687 before encryption. The details of the encryption of this data are identical
4688 to those for the des-cbc-md5 encryption mode.
4690 protocol key format 8 bytes, parity in low bit of each
4691 specific key structure copy of original key
4692 required checksum mechanism rsa-md4-des
4693 key-generation seed length 8 bytes
4694 cipher state 8 bytes (CBC initial vector)
4695 initial cipher state all-zero
4696 encryption function des-cbc(confounder | checksum | msg | pad)
4698 with checksum computed as described above
4699 decryption function decrypt encrypted text and verify checksum
4700 key generation functions:
4701 string-to-key des_string_to_key
4702 random-to-key copy input, then fix parity bits
4703 combine-keys bitwise XOR, then fix parity bits
4704 key-derivation identity
4706 The des-cbc-md4 encryption algorithm is assigned the etype value two (2).
4709 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4713 The des-cbc-crc encryption mode encrypts information under the Data
4714 Encryption Standard [DES77] using the cipher block chaining mode [DESM80]. A
4715 4-octet CRC-32 checksum (described in ISO 3309 [ISO3309]) is computed over
4716 the confounder and message sequence (msg-seq) and placed in the cksum field.
4717 DES blocks are 8 bytes. As a result, the data to be encrypted (the
4718 concatenation of confounder, checksum, and message) must be padded to an 8
4719 byte boundary before encryption. Unless otherwise specified, the key should
4720 be used as the initialization vector, unlike for the other Kerberos DES
4721 encryption schemes. The other details of the encryption of this data are
4722 identical to those for the des-cbc-md5 encryption mode.
4724 Note that, since the CRC-32 checksum is not collision-proof, an attacker
4725 could use a probabilistic chosen-plaintext attack to generate a valid
4726 message even if a confounder is used [SG92]. The use of collision-proof
4727 checksums is recommended for environments where such attacks represent a
4728 significant threat. The use of the CRC-32 as the checksum for ticket or
4729 authenticator is no longer mandated as an interoperability requirement for
4730 Kerberos Version 5 Specification 1 (See section 9.1 for specific details).
4732 protocol key format 8 bytes, parity in low bit of each
4733 specific key structure copy of original key
4734 required checksum mechanism rsa-md5-des
4735 key-generation seed length 8 bytes
4736 cipher state 8 bytes (CBC initial vector)
4737 initial cipher state copy of original key
4738 encryption function des-cbc(confounder | checksum | msg | pad)
4740 with checksum computed as described above
4741 decryption function decrypt encrypted text and verify checksum
4742 key generation functions:
4743 string-to-key des_string_to_key
4744 random-to-key copy input, then fix parity bits
4745 combine-keys bitwise XOR, then fix parity bits
4746 key-derivation identity
4748 The des-cbc-crc encryption algorithm is assigned the etype value one (1).
4750 6.5.5. des3-cbc-hmac-sha1-kd
4752 This encryption type is based on the Triple DES cryptosystem in Outer-CBC
4753 mode, and the HMAC-SHA1 [Krawczyk96] message authentication algorithm.
4755 A Triple DES key is the concatenation of three DES keys as described above
4756 for des-cbc-md5. A Triple DES key is generated from random data by creating
4757 three DES keys from separate sequences of random data.
4759 EncryptedData using this type must be generated as described in section
4760 6.4.2. If the length of the input data is not a multiple of the block size,
4761 zero octets must be used to pad the plaintext to the next eight-octet
4762 boundary. The counfounder must be eight random octets (one block).
4765 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4767 The simplified profile for Triple DES, with key derivation as defined in
4768 section 6.4, is as follows:
4770 protocol key format 24 bytes, parity in low bit of each
4771 key-generation seed length 21 bytes
4774 encryption, decryption functions triple-DES EDE in outer CBC mode
4775 key generation functions:
4776 random-to-key see below
4777 string-to-key DES3string-to-key (see below)
4779 The des3-cbc-hmac-sha1-kd encryption type is assigned the value sixteen
4782 Triple DES Key Production (random-to-key, string-to-key)
4784 The 168 bits of random key data are converted to a protocol key value as
4785 follows. First, the 168 bits are divided into three groups of 56 bits, which
4786 are expanded individually into 64 bits as follows:
4789 9 10 11 12 13 14 15 p
4790 17 18 19 20 21 22 23 p
4791 25 26 27 28 29 30 31 p
4792 33 34 35 36 37 38 39 p
4793 41 42 43 44 45 46 47 p
4794 49 50 51 52 53 54 55 p
4795 56 48 40 32 24 16 8 p
4797 The "p" bits are parity bits computed over the data bits. The output of the
4798 three expansions are concatenated to form the protocol key value.
4800 When the HMAC-SHA1 of a string is computed, the key is used in the protocol
4803 The string-to-key function is used to tranform UTF-8 passwords into DES3
4804 keys. The DES3 string-to-key function relies on the "N-fold" algorithm and
4805 DK function, described in section 6.4.
4807 The n-fold algorithm is applied to the password string concatenated with a
4808 salt value. For 3-key triple DES, the operation will involve a 168-fold of
4809 the input password string, to generate an intermediate key, from which the
4810 user's long-term key will be derived with the DK function. The DES3
4811 string-to-key function is shown here in pseudocode:
4813 DES3string-to-key(passwordString, salt, key)
4815 s = passwordString + salt
4816 tmpKey = random-to-key(168-fold(s))
4817 key = DK (tmpKey, KerberosConstant)
4819 No weak-key checking is performed. The KerberosConstant value is the byte
4820 string {0x6b 0x65 0x72 0x62 0x65 0x72 0x6f 0x73}. These values correspond to
4821 the ASCII encoding for the string "kerberos".
4823 6.6. Profiles for Kerberos checksums
4825 These are the checksum types currently defined for Kerberos. The full list
4826 of checksum type number assignments is given in section 8.3.
4829 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4831 6.6.1. RSA MD4 Cryptographic Checksum Using DES (rsa-md4-des)
4833 The RSA-MD4-DES checksum calculates a keyed collision-proof checksum by
4834 prepending an 8 octet confounder before the text, applying the RSA MD4
4835 checksum algorithm [MD4-92], and encrypting the confounder and the checksum
4836 using DES in cipher-block-chaining (CBC) mode using a variant of the key,
4837 where the variant is computed by eXclusive-ORing the key with the constant
4838 F0F0F0F0F0F0F0F0[39]. The initialization vector should be zero. The
4839 resulting checksum is 24 octets long. This checksum is tamper-proof and
4840 believed to be collision-proof.
4842 The DES specifications identify some weak keys' and 'semi-weak keys'; those
4843 keys shall not be used for generating RSA-MD4 checksums for use in Kerberos.
4845 The format for the checksum is described in the following diagram:
4847 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4848 | des-cbc(confounder + rsa-md4(confounder+msg),key=var(key),iv=0) |
4849 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4851 associated cryptosystem des-cbc-md5, des-cbc-md4, des-cbc-crc
4852 get_mic des-cbc(key XOR F0F0F0F0F0F0F0F0,
4853 confounder | rsa-md4(confounder | msg))
4855 verify_mic decrypt and verify rsa-md4 checksum
4857 The rsa-md4-des checksum algorithm is assigned a checksum type number of
4860 6.6.2. The RSA MD5 Checksum (rsa-md5)
4862 The RSA-MD5 checksum calculates a checksum using the RSA MD5 algorithm
4863 [MD5-92]. The algorithm takes as input an input message of arbitrary length
4864 and produces as output a 128-bit (16 octet) checksum. RSA-MD5 is believed to
4865 be collision-proof. However, since it is unkeyed, it must be used with
4866 caution. Currently it is used by some implementations in places where the
4867 checksum itself is part of a larger message that will be encrypted. Its use
4870 associated cryptosystem null
4871 get_mic rsa-md5(msg)
4872 verify_mic get_mic and compare
4874 The rsa-md5 checksum algorithm is assigned a checksum type number of seven
4877 6.6.3. RSA MD5 Cryptographic Checksum Using DES (rsa-md5-des)
4879 The RSA-MD5-DES checksum calculates a keyed collision-proof checksum by
4880 prepending an 8 octet confounder before the text, applying the RSA MD5
4881 checksum algorithm, and encrypting the confounder and the checksum using DES
4882 in cipher-block-chaining (CBC) mode using a variant of the key, where the
4883 variant is computed by eXclusive-ORing the key with the hexadecimal constant
4884 F0F0F0F0F0F0F0F0. The initialization vector should be zero. The resulting
4885 checksum is 24 octets long. This checksum is tamper-proof and believed to be
4889 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4891 The DES specifications identify some 'weak keys' and 'semi-weak keys'; those
4892 keys shall not be used for encrypting RSA-MD5 checksums for use in Kerberos.
4894 The format for the checksum is described in the following diagram:
4896 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4897 | des-cbc(confounder + rsa-md5(confounder+msg),key=var(key),iv=0) |
4898 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
4900 associated cryptosystem des-cbc-md5, des-cbc-md4, des-cbc-crc
4901 get_mic des-cbc(key XOR F0F0F0F0F0F0F0F0,
4902 confounder | rsa-md5(confounder | msg))
4904 verify_mic decrypt and verify rsa-md5 checksum
4906 The rsa-md5-des checksum algorithm is assigned a checksum type number of
4909 6.6.4. The HMAC-SHA1-DES3-KD Checksum (hmac-sha1-des3-kd)
4911 This checksum type is defined as outlined in section 6.3 above, using the
4912 des3-hmac-sha1-kd encryption algorithm parameters. The checksum is thus a
4913 SHA-1 HMAC using the computed key Kc over the message to be protected.
4915 The hmac-sha1-des3-kd checksum algorithm is assigned a checksum type number
4918 6.7. Use of Kerberos encryption outside this specification
4920 Several Kerberos-based application protocols and preauthentication systems
4921 have been designed and deployed that perform encryption and message
4922 integrity checks in various ways. While in some cases there may be good
4923 reason for specifying these protocols in terms of specific encryption or
4924 checksum algorithms, we anticipate that in many cases this will not be true,
4925 and more generic approaches independent of particular algorithms will be
4926 desirable. Rather than having each protocol designer reinvent schemes for
4927 protecting data, using multiple keys, etc, we have attempted to present in
4928 this section a general framework that should be sufficient not only for the
4929 Kerberos protocol itself but also for many preauthentication systems and
4930 application protocols, while trying to avoid some of the assumptions that
4931 can work their way into such protocol designs.[6.5] Such assumptions, while
4932 they may hold for any given set of encryption and checksum algorithms, may
4933 not be true of the next algorithms to be defined, leaving the application
4934 protocol unable to make use of those algorithms without updates to its
4937 The Kerberos protocol uses only the attributes and operations described in
4938 sections 6.2 and 6.3. Preauthentication systems and application protocols
4939 making use of Kerberos are encouraged to use them as well.
4941 While we don't recommend it, undoubtedly some application protocols will
4942 continue to use the key data directly, even if only in some of the currently
4943 existing protocol specifications. An implementation intended to support
4944 general Kerberos applications may therefore need to make the key data
4945 available, as well as the attributes and operations described in sections
4949 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
4951 7. Naming Constraints
4955 Although realm names are encoded as GeneralStrings and although a realm can
4956 technically select any name it chooses, interoperability across realm
4957 boundaries requires agreement on how realm names are to be assigned, and
4958 what information they imply.
4960 To enforce these conventions, each realm must conform to the conventions
4961 itself, and it must require that any realms with which inter-realm keys are
4962 shared also conform to the conventions and require the same from its
4965 Kerberos realm names are case sensitive. Realm names that differ only in the
4966 case of the characters are not equivalent. There are presently four styles
4967 of realm names: domain, X500, other, and reserved. Examples of each style
4970 domain: ATHENA.MIT.EDU (example)
4971 X500: C=US/O=OSF (example)
4972 other: NAMETYPE:rest/of.name=without-restrictions (example)
4973 reserved: reserved, but will not conflict with above
4975 Domain names must look like domain names: they consist of components
4976 separated by periods (.) and they contain neither colons (:) nor slashes
4977 (/). Though domain names themselves are case insensitive, in order for
4978 realms to match, the case must match as well. When establishing a new realm
4979 name based on an internet domain name it is recommended by convention that
4980 the characters be converted to upper case.
4982 X.500 names contain an equal (=) and cannot contain a colon (:) before the
4983 equal. The realm names for X.500 names will be string representations of the
4984 names with components separated by slashes. Leading and trailing slashes
4985 will not be included. Note that the slash separator is consistent with
4986 Kerberos implementations based on RFC1510, but it is different from the
4987 separator recommended in RFC2253.
4989 Names that fall into the other category must begin with a prefix that
4990 contains no equal (=) or period (.) and the prefix must be followed by a
4991 colon (:) and the rest of the name. All prefixes must be assigned before
4992 they may be used. Presently none are assigned.
4994 The reserved category includes strings which do not fall into the first
4995 three categories. All names in this category are reserved. It is unlikely
4996 that names will be assigned to this category unless there is a very strong
4997 argument for not using the 'other' category.
4999 These rules guarantee that there will be no conflicts between the various
5000 name styles. The following additional constraints apply to the assignment of
5001 realm names in the domain and X.500 categories: the name of a realm for the
5002 domain or X.500 formats must either be used by the organization owning (to
5003 whom it was assigned) an Internet domain name or X.500 name, or in the case
5004 that no such names are registered, authority to use a realm name may be
5005 derived from the authority of the parent realm. For example, if there is no
5006 domain name for E40.MIT.EDU, then the administrator of the MIT.EDU realm can
5007 authorize the creation of a realm with that name.
5010 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5012 This is acceptable because the organization to which the parent is assigned
5013 is presumably the organization authorized to assign names to its children in
5014 the X.500 and domain name systems as well. If the parent assigns a realm
5015 name without also registering it in the domain name or X.500 hierarchy, it
5016 is the parent's responsibility to make sure that there will not in the
5017 future exist a name identical to the realm name of the child unless it is
5018 assigned to the same entity as the realm name.
5020 7.2. Principal Names
5022 As was the case for realm names, conventions are needed to ensure that all
5023 agree on what information is implied by a principal name. The name-type
5024 field that is part of the principal name indicates the kind of information
5025 implied by the name. The name-type should be treated as a hint. Ignoring the
5026 name type, no two names can be the same (i.e. at least one of the
5027 components, or the realm, must be different). The following name types are
5030 name-type value meaning
5032 NT-UNKNOWN 0 Name type not known
5033 NT-PRINCIPAL 1 General principal name (e.g. username, or
5035 NT-SRV-INST 2 Service and other unique instance (krbtgt)
5036 NT-SRV-HST 3 Service with host name as instance (telnet, rcommands)
5037 NT-SRV-XHST 4 Service with slash-separated host name components
5039 NT-X500-PRINCIPAL 6 Encoded X.509 Distingished name [RFC 1779]
5040 NT-SMTP-NAME 7 Name in form of SMTP email name (e.g. user@foo.com)
5041 NT-ENTERPRISE 10 Enterprise name - may be mapped to principal name
5043 When a name implies no information other than its uniqueness at a particular
5044 time the name type PRINCIPAL should be used. The principal name type should
5045 be used for users, and it might also be used for a unique server. If the
5046 name is a unique machine generated ID that is guaranteed never to be
5047 reassigned then the name type of UID should be used (note that it is
5048 generally a bad idea to reassign names of any type since stale entries might
5049 remain in access control lists).
5051 If the first component of a name identifies a service and the remaining
5052 components identify an instance of the service in a server specified manner,
5053 then the name type of SRV-INST should be used. An example of this name type
5054 is the Kerberos ticket-granting service whose name has a first component of
5055 krbtgt and a second component identifying the realm for which the ticket is
5058 If instance is a single component following the service name and the
5059 instance identifies the host on which the server is running, then the name
5060 type SRV-HST should be used. This type is typically used for Internet
5061 services such as telnet and the Berkeley R commands. If the separate
5062 components of the host name appear as successive components following the
5063 name of the service, then the name type SRV-XHST should be used. This type
5064 might be used to identify servers on hosts with X.500 names where the slash
5065 (/) might otherwise be ambiguous.
5067 A name type of NT-X500-PRINCIPAL should be used when a name from an X.509
5068 certificate is translated into a Kerberos name. The encoding of the X.509
5069 name as a Kerberos principal shall conform to the encoding rules specified
5073 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5075 A name type of SMTP allows a name to be of a form that resembles a SMTP
5076 email name. This name, including an "@" and a domain name, is used as the
5077 one component of the principal name.
5079 A name type of UNKNOWN should be used when the form of the name is not
5080 known. When comparing names, a name of type UNKNOWN will match principals
5081 authenticated with names of any type. A principal authenticated with a name
5082 of type UNKNOWN, however, will only match other names of type UNKNOWN.
5084 Names of any type with an initial component of 'krbtgt' are reserved for the
5085 Kerberos ticket granting service. See section 8.2.3 for the form of such
5088 7.2.1. Name of server principals
5090 The principal identifier for a server on a host will generally be composed
5091 of two parts: (1) the realm of the KDC with which the server is registered,
5092 and (2) a two-component name of type NT-SRV-HST if the host name is an
5093 Internet domain name or a multi-component name of type NT-SRV-XHST if the
5094 name of the host is of a form such as X.500 that allows slash (/)
5095 separators. The first component of the two- or multi-component name will
5096 identify the service and the latter components will identify the host. Where
5097 the name of the host is not case sensitive (for example, with Internet
5098 domain names) the name of the host must be lower case. If specified by the
5099 application protocol for services such as telnet and the Berkeley R commands
5100 which run with system privileges, the first component may be the string
5101 'host' instead of a service specific identifier. When a host has an official
5102 name and one or more aliases and the official name can be reliably
5103 determined, the official name of the host should be used when constructing
5104 the name of the server principal.
5106 8. Constants and other defined values
5108 8.1. Host address types
5110 All negative values for the host address type are reserved for local use.
5111 All non-negative values are reserved for officially assigned type fields and
5114 The values of the types for the following addresses are chosen to match the
5115 defined address family constants in the Berkeley Standard Distributions of
5116 Unix. They can be found in with symbolic names AF_xxx (where xxx is an
5117 abbreviation of the address family name).
5119 Internet (IPv4) Addresses
5121 Internet (IPv4) addresses are 32-bit (4-octet) quantities, encoded in MSB
5122 order. The IPv4 loopback address should not appear in a Kerberos packet. The
5123 type of IPv4 addresses is two (2).
5125 Internet (IPv6) Addresses [Westerlund]
5127 IPv6 addresses are 128-bit (16-octet) quantities, encoded in MSB order. The
5128 type of IPv6 addresses is twenty-four (24). [RFC2373]. The following
5129 addresses (see [RFC1884]) MUST not appear in any Kerberos packet:
5131 * the Unspecified Address
5132 * the Loopback Address
5133 * Link-Local addresses
5136 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5138 IPv4-mapped IPv6 addresses MUST be represented as addresses of type 2.
5142 CHAOSnet addresses are 16-bit (2-octet) quantities, encoded in MSB order.
5143 The type of CHAOSnet addresses is five (5).
5147 ISO addresses are variable-length. The type of ISO addresses is seven (7).
5149 Xerox Network Services (XNS) addresses
5151 XNS addresses are 48-bit (6-octet) quantities, encoded in MSB order. The
5152 type of XNS addresses is six (6).
5154 AppleTalk Datagram Delivery Protocol (DDP) addresses
5156 AppleTalk DDP addresses consist of an 8-bit node number and a 16-bit network
5157 number. The first octet of the address is the node number; the remaining two
5158 octets encode the network number in MSB order. The type of AppleTalk DDP
5159 addresses is sixteen (16).
5161 DECnet Phase IV addresses
5163 DECnet Phase IV addresses are 16-bit addresses, encoded in LSB order. The
5164 type of DECnet Phase IV addresses is twelve (12).
5168 Netbios addresses are 16-octet addresses typically composed of 1 to 15
5169 characters, trailing blank (ascii char 20) filled, with a 16th octet of 0x0.
5170 The type of Netbios addresses is 20 (0x14).
5174 8.2.1. UDP/IP transport
5176 When contacting a Kerberos server (KDC) for a KRB_KDC_REQ request using UDP
5177 IP transport, the client shall send a UDP datagram containing only an
5178 encoding of the request to port 88 (decimal) at the KDC's IP address; the
5179 KDC will respond with a reply datagram containing only an encoding of the
5180 reply message (either a KRB_ERROR or a KRB_KDC_REP) to the sending port at
5181 the sender's IP address. Kerberos servers supporting IP transport must
5182 accept UDP requests on port 88 (decimal). The response to a request made
5183 through UDP/IP transport must also use UDP/IP transport.
5185 8.2.2. TCP/IP transport [Westerlund,Danielsson]
5187 Kerberos servers (KDC's) should accept TCP requests on port 88 (decimal) and
5188 clients should support the sending of TCP requests on port 88 (decimal).
5189 When the KRB_KDC_REQ message is sent to the KDC over a TCP stream, a new
5190 connection will be established for each authentication exchange (request and
5191 response). The KRB_KDC_REP or KRB_ERROR message will be returned to the
5192 client on the same TCP stream that was established for the request. The
5193 response to a request made through TCP/IP transport must also use TCP/IP
5194 transport. Implementors should note that some extensions to the Kerberos
5195 protocol will not work if any implementation not supporting the TCP
5196 transport is involved (client or KDC). Implementors are strongly urged to
5197 support the TCP transport on both the client and server and are advised that
5199 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5201 the current notation of "should" support will likely change in the future to
5202 must support. The KDC may close the TCP stream after sending a response, but
5203 may leave the stream open if it expects a followup - in which case it may
5204 close the stream at any time if resource constraints or other factors make
5205 it desirable to do so. Care must be taken in managing TCP/IP connections
5206 with the KDC to prevent denial of service attacks based on the number of
5207 TCP/IP connections with the KDC that remain open. If multiple exchanges with
5208 the KDC are needed for certain forms of preauthentication, multiple TCP
5209 connections may be required. A client may close the stream after receiving
5210 response, and should close the stream if it does not expect to send followup
5211 messages. The client must be prepared to have the stream closed by the KDC
5212 at anytime, in which case it must simply connect again when it is ready to
5213 send subsequent messages.
5215 The first four octets of the TCP stream used to transmit the request request
5216 will encode in network byte order the length of the request (KRB_KDC_REQ),
5217 and the length will be followed by the request itself. The response will
5218 similarly be preceded by a 4 octet encoding in network byte order of the
5219 length of the KRB_KDC_REP or the KRB_ERROR message and will be followed by
5220 the KRB_KDC_REP or the KRB_ERROR response. If the sign bit is set on the
5221 integer represented by the first 4 octets, then the next 4 octets will be
5222 read, extending the length of the field by another 4 octets (less the sign
5223 bit of the additional four octets which is reserved for future expansion and
5224 which at present must be zero).
5226 8.2.3. OSI transport
5228 During authentication of an OSI client to an OSI server, the mutual
5229 authentication of an OSI server to an OSI client, the transfer of
5230 credentials from an OSI client to an OSI server, or during exchange of
5231 private or integrity checked messages, Kerberos protocol messages may be
5232 treated as opaque objects and the type of the authentication mechanism will
5235 OBJECT IDENTIFIER ::= {iso (1), org(3), dod(6),internet(1), security(5), kerberosv5(2)}
5237 Depending on the situation, the opaque object will be an authentication
5238 header (KRB_AP_REQ), an authentication reply (KRB_AP_REP), a safe message
5239 (KRB_SAFE), a private message (KRB_PRIV), or a credentials message
5240 (KRB_CRED). The opaque data contains an application code as specified in the
5241 ASN.1 description for each message. The application code may be used by
5242 Kerberos to determine the message type.
5244 8.2.4. Name of the TGS
5246 The principal identifier of the ticket-granting service shall be composed of
5247 three parts: (1) the realm of the KDC issuing the TGS ticket (2) a two-part
5248 name of type NT-SRV-INST, with the first part "krbtgt" and the second part
5249 the name of the realm which will accept the ticket-granting ticket. For
5250 example, a ticket-granting ticket issued by the ATHENA.MIT.EDU realm to be
5251 used to get tickets from the ATHENA.MIT.EDU KDC has a principal identifier
5252 of "ATHENA.MIT.EDU" (realm), ("krbtgt", "ATHENA.MIT.EDU") (name). A
5253 ticket-granting ticket issued by the ATHENA.MIT.EDU realm to be used to get
5254 tickets from the MIT.EDU realm has a principal identifier of
5255 "ATHENA.MIT.EDU" (realm), ("krbtgt", "MIT.EDU") (name).
5258 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5260 8.3. Protocol constants and associated values
5262 The following tables list constants used in the protocol and define their
5263 meanings. Ranges are specified in the "specification" section that limit the
5264 values of constants for which values are defined here. This allows
5265 implementations to make assumptions about the maximum values that will be
5266 received for these constants. Implementation receiving values outside the
5267 range specified in the "specification" section may reject the request, but
5268 they must recover cleanly.
5270 Encryption type etype value block size minimum pad size confounder size
5276 des3-cbc-md5 5 8 0 8
5278 des3-cbc-sha1 7 8 0 8
5279 dsaWithSHA1-CmsOID 9 (pkinit)
5280 md5WithRSAEncryption-CmsOID 10 (pkinit)
5281 sha1WithRSAEncryption-CmsOID 11 (pkinit)
5282 rc2CBC-EnvOID 12 (pkinit)
5283 rsaEncryption-EnvOID 13 (pkinit from PKCS#1 v1.5)
5284 rsaES-OAEP-ENV-OID 14 (pkinit from PKCS#1 v2.0)
5285 des-ede3-cbc-Env-OID 15 (pkinit)
5286 des3-cbc-sha1-kd 16 (Tom Yu)
5288 rc4-hmac-exp 24 (swift)
5289 subkey-keynaterial 65 (opaque mhur)
5293 Checksum type sumtype value checksum size
5299 rsa-md4-des-k 6 16 (drop rsa ?)
5300 rsa-md5 7 16 (drop rsa ?)
5301 rsa-md5-des 8 24 (drop rsa ?)
5302 rsa-md5-des3 9 24 (drop rsa ?)
5303 hmac-sha1-des3-kd 12 20
5304 hmac-sha1-des3 13 20
5305 sha1 (unkeyed) 14 20
5307 padata and data types padata-type value comment
5313 PA-ENC-UNIX-TIME 5 (depricated)
5314 PA-SANDIA-SECUREID 6
5317 PA-CYBERSAFE-SECUREID 9
5320 PA-SAM-CHALLENGE 12 (sam/otp)
5321 PA-SAM-RESPONSE 13 (sam/otp)
5322 PA-PK-AS-REQ 14 (pkinit)
5324 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5326 PA-PK-AS-REP 15 (pkinit)
5327 PA-USE-SPECIFIED-KVNO 20
5328 PA-SAM-REDIRECT 21 (sam/otp)
5329 PA-GET-FROM-TYPED-DATA 22 (embedded in typed data)
5330 TD-PADATA 22 (embeds padata)
5331 PA-SAM-ETYPE-INFO 23 (sam/otp)
5332 PA-ALT-PRINC 24 (crawdad@fnal.gov)
5333 TD-PKINIT-CMS-CERTIFICATES 101 CertificateSet from CMS
5334 TD-KRB-PRINCIPAL 102 PrincipalName (see Sec.5.9.1)
5335 TD-KRB-REALM 103 Realm (see Sec.5.9.1)
5336 TD-TRUSTED-CERTIFIERS 104 from PKINIT
5337 TD-CERTIFICATE-INDEX 105 from PKINIT
5338 TD-APP-DEFINED-ERROR 106 application specific (see Sec.5.9.1)
5339 TD-REQ-NONCE 107 INTEGER (see Sec.5.9.1)
5340 TD-REQ-SEQ 108 INTEGER (see Sec.5.9.1)
5341 PA-PAC-REQUEST 128 (jbrezak@exchange.microsoft.com)
5343 authorization data type ad-type value
5345 AD-INTENDED-FOR-SERVER 2
5346 AD-INTENDED-FOR-APPLICATION-CLASS 3
5349 AD-MANDATORY-TICKET-EXTENSIONS 6
5350 AD-IN-TICKET-EXTENSIONS 7
5351 reserved values 8-63
5354 AD-OSF-DCE-PKI-CERTID 66 (hemsath@us.ibm.com)
5355 AD-WIN2K-PAC 128 (jbrezak@exchange.microsoft.com)
5357 Ticket Extension Types
5359 TE-TYPE-NULL 0 Null ticket extension
5360 TE-TYPE-EXTERNAL-ADATA 1 Integrity protected authorization data
5361 [reserved] 2 TE-TYPE-PKCROSS-KDC (I have reservations)
5362 TE-TYPE-PKCROSS-CLIENT 3 PKCROSS cross realm key ticket
5363 TE-TYPE-CYBERSAFE-EXT 4 Assigned to CyberSafe Corp
5364 [reserved] 5 TE-TYPE-DEST-HOST (I have reservations)
5366 alternate authentication type method-type value
5367 reserved values 0-63
5368 ATT-CHALLENGE-RESPONSE 64
5370 transited encoding type tr-type value
5371 DOMAIN-X500-COMPRESS 1
5372 reserved values all others
5374 Label Value Meaning or MIT code
5376 pvno 5 current Kerberos protocol version number
5379 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5381 message types (Will be updated to match section 5)
5383 KRB_AS_REQ 10 Request for initial authentication
5384 KRB_AS_REP 11 Response to KRB_AS_REQ request
5385 KRB_TGS_REQ 12 Request for authentication based on TGT
5386 KRB_TGS_REP 13 Response to KRB_TGS_REQ request
5387 KRB_AP_REQ 14 application request to server
5388 KRB_AP_REP 15 Response to KRB_AP_REQ_MUTUAL
5389 KRB_SAFE 20 Safe (checksummed) application message
5390 KRB_PRIV 21 Private (encrypted) application message
5391 KRB_CRED 22 Private (encrypted) message to forward credentials
5392 KRB_ERROR 30 Error response
5396 KRB_NT_UNKNOWN 0 Name type not known
5397 KRB_NT_PRINCIPAL 1 Just the name of the principal as in DCE, or for users
5398 KRB_NT_SRV_INST 2 Service and other unique instance (krbtgt)
5399 KRB_NT_SRV_HST 3 Service with host name as instance (telnet, rcommands)
5400 KRB_NT_SRV_XHST 4 Service with host as remaining components
5401 KRB_NT_UID 5 Unique ID
5402 KRB_NT_X500_PRINCIPAL 6 Encoded X.509 Distingished name [RFC 2253]
5406 KDC_ERR_NONE 0 No error
5407 KDC_ERR_NAME_EXP 1 Client's entry in database has expired
5408 KDC_ERR_SERVICE_EXP 2 Server's entry in database has expired
5409 KDC_ERR_BAD_PVNO 3 Requested protocol version number
5411 KDC_ERR_C_OLD_MAST_KVNO 4 Client's key encrypted in old master key
5412 KDC_ERR_S_OLD_MAST_KVNO 5 Server's key encrypted in old master key
5413 KDC_ERR_C_PRINCIPAL_UNKNOWN 6 Client not found in Kerberos database
5414 KDC_ERR_S_PRINCIPAL_UNKNOWN 7 Server not found in Kerberos database
5415 KDC_ERR_PRINCIPAL_NOT_UNIQUE 8 Multiple principal entries in database
5416 KDC_ERR_NULL_KEY 9 The client or server has a null key
5417 KDC_ERR_CANNOT_POSTDATE 10 Ticket not eligible for postdating
5418 KDC_ERR_NEVER_VALID 11 Requested start time is later than end time
5419 KDC_ERR_POLICY 12 KDC policy rejects request
5420 KDC_ERR_BADOPTION 13 KDC cannot accommodate requested option
5421 KDC_ERR_ETYPE_NOSUPP 14 KDC has no support for encryption type
5422 KDC_ERR_SUMTYPE_NOSUPP 15 KDC has no support for checksum type
5423 KDC_ERR_PADATA_TYPE_NOSUPP 16 KDC has no support for padata type
5424 KDC_ERR_TRTYPE_NOSUPP 17 KDC has no support for transited type
5425 KDC_ERR_CLIENT_REVOKED 18 Clients credentials have been revoked
5426 KDC_ERR_SERVICE_REVOKED 19 Credentials for server have been revoked
5427 KDC_ERR_TGT_REVOKED 20 TGT has been revoked
5428 KDC_ERR_CLIENT_NOTYET 21 Client not yet valid - try again later
5429 KDC_ERR_SERVICE_NOTYET 22 Server not yet valid - try again later
5430 KDC_ERR_KEY_EXPIRED 23 Password has expired - change password
5432 KDC_ERR_PREAUTH_FAILED 24 Pre-authentication information was invalid
5433 KDC_ERR_PREAUTH_REQUIRED 25 Additional pre-authenticationrequired [40]
5434 KDC_ERR_SERVER_NOMATCH 26 Requested server and ticket don't match
5435 KDC_ERR_MUST_USE_USER2USER 27 Server principal valid for user2user only
5436 KDC_ERR_PATH_NOT_ACCPETED 28 KDC Policy rejects transited path
5437 KDC_ERR_SVC_UNAVAILABLE 29 A service is not available
5438 KRB_AP_ERR_BAD_INTEGRITY 31 Integrity check on decrypted field failed
5439 KRB_AP_ERR_TKT_EXPIRED 32 Ticket expired
5440 KRB_AP_ERR_TKT_NYV 33 Ticket not yet valid
5442 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5444 KRB_AP_ERR_REPEAT 34 Request is a replay
5445 KRB_AP_ERR_NOT_US 35 The ticket isn't for us
5446 KRB_AP_ERR_BADMATCH 36 Ticket and authenticator don't match
5447 KRB_AP_ERR_SKEW 37 Clock skew too great
5448 KRB_AP_ERR_BADADDR 38 Incorrect net address
5449 KRB_AP_ERR_BADVERSION 39 Protocol version mismatch
5450 KRB_AP_ERR_MSG_TYPE 40 Invalid msg type
5451 KRB_AP_ERR_MODIFIED 41 Message stream modified
5452 KRB_AP_ERR_BADORDER 42 Message out of order
5453 KRB_AP_ERR_BADKEYVER 44 Specified version of key is not available
5454 KRB_AP_ERR_NOKEY 45 Service key not available
5455 KRB_AP_ERR_MUT_FAIL 46 Mutual authentication failed
5456 KRB_AP_ERR_BADDIRECTION 47 Incorrect message direction
5457 KRB_AP_ERR_METHOD 48 Alternative authentication method required
5458 KRB_AP_ERR_BADSEQ 49 Incorrect sequence number in message
5459 KRB_AP_ERR_INAPP_CKSUM 50 Inappropriate type of checksum in message
5460 KRB_AP_PATH_NOT_ACCEPTED 51 Policy rejects transited path
5461 KRB_ERR_RESPONSE_TOO_BIG 52 Response too big for UDP, retry with TCP
5462 KRB_ERR_GENERIC 60 Generic error (description in e-text)
5463 KRB_ERR_FIELD_TOOLONG 61 Field is too long for this implementation
5464 KDC_ERROR_CLIENT_NOT_TRUSTED 62 (pkinit)
5465 KDC_ERROR_KDC_NOT_TRUSTED 63 (pkinit)
5466 KDC_ERROR_INVALID_SIG 64 (pkinit)
5467 KDC_ERR_KEY_TOO_WEAK 65 (pkinit)
5468 KDC_ERR_CERTIFICATE_MISMATCH 66 (pkinit)
5469 KRB_AP_ERR_NO_TGT 67 (user-to-user)
5470 KDC_ERR_WRONG_REALM 68 (user-to-user)
5471 KRB_AP_ERR_USER_TO_USER_REQUIRED 69 (user-to-user)
5472 KDC_ERR_CANT_VERIFY_CERTIFICATE 70 (pkinit)
5473 KDC_ERR_INVALID_CERTIFICATE 71 (pkinit)
5474 KDC_ERR_REVOKED_CERTIFICATE 72 (pkinit)
5475 KDC_ERR_REVOCATION_STATUS_UNKNOWN 73 (pkinit)
5476 KDC_ERR_REVOCATION_STATUS_UNAVAILABLE 74 (pkinit)
5477 KDC_ERR_CLIENT_NAME_MISMATCH 75 (pkinit)
5478 KDC_ERR_KDC_NAME_MISMATCH 76 (pkinit)
5481 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5483 9. Interoperability requirements
5485 Version 5 of the Kerberos protocol supports a myriad of options. Among these
5486 are multiple encryption and checksum types, alternative encoding schemes for
5487 the transited field, optional mechanisms for pre-authentication, the
5488 handling of tickets with no addresses, options for mutual authentication,
5489 user to user authentication, support for proxies, forwarding, postdating,
5490 and renewing tickets, the format of realm names, and the handling of
5493 In order to ensure the interoperability of realms, it is necessary to define
5494 a minimal configuration which must be supported by all implementations. This
5495 minimal configuration is subject to change as technology does. For example,
5496 if at some later date it is discovered that one of the required encryption
5497 or checksum algorithms is not secure, it will be replaced.
5499 9.1. Specification 2
5501 This section defines the second specification of these options.
5502 Implementations which are configured in this way can be said to support
5503 Kerberos Version 5 Specification 2 (5.1). Specification 1 (deprecated) may
5504 be found in RFC1510.
5508 TCP/IP and UDP/IP transport must be supported by KDCs claiming conformance
5509 to specification 2. Kerberos clients claiming conformance to specification 2
5510 must support UDP/IP transport for messages with the KDC and should support
5513 Encryption and checksum methods
5515 The following encryption and checksum mechanisms must be supported.
5516 Implementations may support other mechanisms as well, but the additional
5517 mechanisms may only be used when communicating with principals known to also
5518 support them: This list is to be determined and should correspond to section
5521 Encryption: DES-CBC-MD5, DES3-CBC-SHA1-KD, RIJNDAEL(decide identifier)
5522 Checksums: CRC-32, DES-MAC, DES-MAC-K, DES-MD5, HMAC-SHA1-DES3-KD
5526 All implementations must understand hierarchical realms in both the Internet
5527 Domain and the X.500 style. When a ticket granting ticket for an unknown
5528 realm is requested, the KDC must be able to determine the names of the
5529 intermediate realms between the KDCs realm and the requested realm.
5531 Transited field encoding
5533 DOMAIN-X500-COMPRESS (described in section 3.3.3.2) must be supported.
5534 Alternative encodings may be supported, but they may be used only when that
5535 encoding is supported by ALL intermediate realms.
5537 Pre-authentication methods
5539 The TGS-REQ method must be supported. The TGS-REQ method is not used on the
5540 initial request. The PA-ENC-TIMESTAMP method must be supported by clients
5541 but whether it is enabled by default may be determined on a realm by realm
5542 basis. If not used in the initial request and the error
5544 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5546 KDC_ERR_PREAUTH_REQUIRED is returned specifying PA-ENC-TIMESTAMP as an
5547 acceptable method, the client should retry the initial request using the
5548 PA-ENC-TIMESTAMP preauthentication method. Servers need not support the
5549 PA-ENC-TIMESTAMP method, but if not supported the server should ignore the
5550 presence of PA-ENC-TIMESTAMP pre-authentication in a request.
5552 Mutual authentication
5554 Mutual authentication (via the KRB_AP_REP message) must be supported.
5556 Ticket addresses and flags
5558 All KDC's must pass through tickets that carry no addresses (i.e. if a TGT
5559 contains no addresses, the KDC will return derivative tickets), but each
5560 realm may set its own policy for issuing such tickets, and each application
5561 server will set its own policy with respect to accepting them.
5563 Proxies and forwarded tickets must be supported. Individual realms and
5564 application servers can set their own policy on when such tickets will be
5567 All implementations must recognize renewable and postdated tickets, but need
5568 not actually implement them. If these options are not supported, the
5569 starttime and endtime in the ticket shall specify a ticket's entire useful
5570 life. When a postdated ticket is decoded by a server, all implementations
5571 shall make the presence of the postdated flag visible to the calling server.
5573 User-to-user authentication
5575 Support for user to user authentication (via the ENC-TKT-IN-SKEY KDC option)
5576 must be provided by implementations, but individual realms may decide as a
5577 matter of policy to reject such requests on a per-principal or realm-wide
5582 Implementations must pass all authorization data subfields from
5583 ticket-granting tickets to any derivative tickets unless directed to
5584 suppress a subfield as part of the definition of that registered subfield
5585 type (it is never incorrect to pass on a subfield, and no registered
5586 subfield types presently specify suppression at the KDC).
5588 Implementations must make the contents of any authorization data subfields
5589 available to the server when a ticket is used. Implementations are not
5590 required to allow clients to specify the contents of the authorization data
5595 All protocol constants are constrained to 32 bit (signed) values unless
5596 further constrained by the protocol definition. This limit is provided to
5597 allow implementations to make assumptions about the maximum values that will
5598 be received for these constants. Implementation receiving values outside
5599 this range may reject the request, but they must recover cleanly.
5602 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5604 9.2. Recommended KDC values
5606 Following is a list of recommended values for a KDC implementation, based on
5607 the list of suggested configuration constants (see section 4.4).
5609 minimum lifetime 5 minutes
5610 maximum renewable lifetime 1 week
5611 maximum ticket lifetime 1 day
5612 empty addresses only when suitable restrictions appear
5613 in authorization data
5614 proxiable, etc. Allowed.
5616 10. IANA considerations
5618 An appendix will be created with the tables that IANA will need to start
5621 * cryptosystem registration
5622 * usage number registration
5624 11. ACKNOWLEDGEMENTS
5631 Blumenthal, U., "A Better Key Schedule for DES-Like Ciphers",
5632 Proceedings of PRAGOCRYPT '96, 1996.
5634 Bellare, M., Desai, A., Pointcheval, D., Rogaway, P., "Relations Among
5635 Notions of Security for Public-Key Encryption Schemes". Extended
5636 abstract published in Advances in Cryptology- Crypto 98 Proceedings,
5637 Lecture Notes in Computer Science Vol. 1462, H. Krawcyzk ed.,
5638 Springer-Verlag, 1998.
5640 National Bureau of Standards, U.S. Department of Commerce, "Data
5641 Encryption Standard," Federal Information Processing Standards
5642 Publication 46, Washington, DC (1977).
5644 National Bureau of Standards, U.S. Department of Com- merce, "DES Modes
5645 of Operation," Federal Information Processing Standards Publication 81,
5646 Springfield, VA (December 1980).
5648 Dolev, D., Dwork, C., Naor, M., "Non-malleable cryptography",
5649 Proceedings of the 23rd Annual Symposium on Theory of Computing, ACM,
5652 Dorothy E. Denning and Giovanni Maria Sacco, "Time- stamps in Key
5653 Distribution Protocols," Communications of the ACM, Vol. 24(8), pp.
5654 533-536 (August 1981).
5656 Don Davis and Ralph Swick, "Workstation Services and Kerberos
5657 Authentication at Project Athena," Technical Memorandum TM-424, MIT
5658 Laboratory for Computer Science (February 1990).
5660 Horowitz, M., "Key Derivation for Authentication, Integrity, and
5661 Privacy", draft-horowitz-key-derivation-02.txt, August 1998.
5663 Horowitz, M., "Key Derivation for Kerberos V5", draft-
5665 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5667 horowitz-kerb-key-derivation-01.txt, September 1998.
5669 International Organization for Standardization, "ISO Information
5670 Processing Systems - Data Communication - High-Level Data Link Control
5671 Procedure - Frame Struc- ture," IS 3309 (October 1984). 3rd Edition.
5673 H. Krawczyk, M. Bellare, and R. Canetti, "HMAC: Keyed- Hashing for
5674 Message Authentication," Working Draft
5675 draft-ietf-ipsec-hmac-md5-01.txt, (August 1996).
5677 John T. Kohl, B. Clifford Neuman, and Theodore Y. Ts'o, "The Evolution
5678 of the Kerberos Authentication Service," in an IEEE Computer Society
5679 Text soon to be published (June 1992).
5681 Krawczyk, H., Bellare, and M., Canetti, R., "HMAC: Keyed-Hashing for
5682 Message Authentication", draft-ietf-ipsec-hmac- md5-01.txt, August,
5685 P. J. Levine, M. R. Gretzinger, J. M. Diaz, W. E. Som- merfeld, and K.
5686 Raeburn, Section E.1: Service Manage- ment System, M.I.T. Project
5687 Athena, Cambridge, Mas- sachusetts (1987).
5689 R. Rivest, "The MD4 Message Digest Algorithm," RFC 1320, MIT Laboratory
5690 for Computer Science (April 1992).
5692 R. Rivest, "The MD5 Message Digest Algorithm," RFC 1321, MIT Laboratory
5693 for Computer Science (April 1992).
5695 S. P. Miller, B. C. Neuman, J. I. Schiller, and J. H. Saltzer, Section
5696 E.2.1: Kerberos Authentication and Authorization System, M.I.T. Project
5697 Athena, Cambridge, Massachusetts (December 21, 1987).
5699 B. Clifford Neuman, "Proxy-Based Authorization and Accounting for
5700 Distributed Systems," in Proceedings of the 13th International
5701 Conference on Distributed Com- puting Systems, Pittsburgh, PA (May,
5704 Roger M. Needham and Michael D. Schroeder, "Using Encryption for
5705 Authentication in Large Networks of Com- puters," Communications of the
5706 ACM, Vol. 21(12), pp. 993-999 (December, 1978).
5708 B. Clifford Neuman and Theodore Y. Ts'o, "An Authenti- cation Service
5709 for Computer Networks," IEEE Communica- tions Magazine, Vol. 32(9), pp.
5710 33-38 (September 1994).
5712 J. Pato, Using Pre-Authentication to Avoid Password Guessing Attacks,
5713 Open Software Foundation DCE Request for Comments 26 (December 1992).
5715 Stuart G. Stubblebine and Virgil D. Gligor, "On Message Integrity in
5716 Cryptographic Protocols," in Proceedings of the IEEE Symposium on
5717 Research in Security and Privacy, Oakland, California (May 1992).
5719 J. G. Steiner, B. C. Neuman, and J. I. Schiller, "Ker- beros: An
5720 Authentication Service for Open Network Sys- tems," pp. 191-202 in
5721 Usenix Conference Proceedings, Dallas, Texas (February, 1988).
5723 CCITT, Recommendation X.509: The Directory Authentica- tion Framework,
5727 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5729 A. Pseudo-code for protocol processing
5731 This appendix provides pseudo-code describing how the messages are to be
5732 constructed and interpreted by clients and servers. [we are waiting on
5733 verification code from Microsoft for possible replacement]
5735 A.1. KRB_AS_REQ generation
5737 request.pvno := protocol version; /* pvno = 5 */
5738 request.msg-type := message type; /* type = KRB_AS_REQ */
5740 if(pa_enc_timestamp_required) then
5741 request.padata.padata-type = PA-ENC-TIMESTAMP;
5743 padata-body.patimestamp,pausec = system_time;
5744 encrypt padata-body into request.padata.padata-value
5745 using client.key; /* derived from password */
5748 body.kdc-options := users's preferences;
5749 body.cname := user's name;
5750 body.realm := user's realm;
5751 body.sname := service's name; /* usually "krbtgt", =
5753 if (body.kdc-options.POSTDATED is set) then
5754 body.from := requested starting time;
5758 body.till := requested end time;
5759 if (body.kdc-options.RENEWABLE is set) then
5760 body.rtime := requested final renewal time;
5762 body.nonce := random_nonce();
5763 body.etype := requested etypes;
5764 if (user supplied addresses) then
5765 body.addresses := user's addresses;
5767 omit body.addresses;
5769 omit body.enc-authorization-data;
5770 request.req-body := body;
5772 kerberos := lookup(name of local kerberos server (or =
5774 send(packet,kerberos);
5778 retry or use alternate server;
5781 A.2. KRB_AS_REQ verification and KRB_AS_REP generation
5783 decode message into req;
5785 client := lookup(req.cname,req.realm);
5786 server := lookup(req.sname,req.realm);
5790 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5792 kdc_time := system_time.seconds;
5795 /* no client in Database */
5796 error_out(KDC_ERR_C_PRINCIPAL_UNKNOWN);
5799 /* no server in Database */
5800 error_out(KDC_ERR_S_PRINCIPAL_UNKNOWN);
5803 if(client.pa_enc_timestamp_required and
5804 pa_enc_timestamp not present) then
5805 error_out(KDC_ERR_PREAUTH_REQUIRED(PA_ENC_TIMESTAMP));
5808 if(pa_enc_timestamp present) then
5809 decrypt req.padata-value into decrypted_enc_timestamp
5811 using auth_hdr.authenticator.subkey;
5812 if (decrypt_error()) then
5813 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5814 if(decrypted_enc_timestamp is not within allowable skew) =
5816 error_out(KDC_ERR_PREAUTH_FAILED);
5818 if(decrypted_enc_timestamp and usec is replay)
5819 error_out(KDC_ERR_PREAUTH_FAILED);
5821 add decrypted_enc_timestamp and usec to replay cache;
5824 use_etype := first supported etype in req.etypes;
5826 if (no support for req.etypes) then
5827 error_out(KDC_ERR_ETYPE_NOSUPP);
5830 new_tkt.vno := ticket version; /* = 5 */
5831 new_tkt.sname := req.sname;
5832 new_tkt.srealm := req.srealm;
5833 reset all flags in new_tkt.flags;
5835 /* It should be noted that local policy may affect the */
5836 /* processing of any of these flags. For example, some */
5837 /* realms may refuse to issue renewable tickets */
5839 if (req.kdc-options.FORWARDABLE is set) then
5840 set new_tkt.flags.FORWARDABLE;
5842 if (req.kdc-options.PROXIABLE is set) then
5843 set new_tkt.flags.PROXIABLE;
5846 if (req.kdc-options.ALLOW-POSTDATE is set) then
5847 set new_tkt.flags.MAY-POSTDATE;
5849 if ((req.kdc-options.RENEW is set) or
5850 (req.kdc-options.VALIDATE is set) or
5851 (req.kdc-options.PROXY is set) or
5853 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5855 (req.kdc-options.FORWARDED is set) or
5856 (req.kdc-options.ENC-TKT-IN-SKEY is set)) then
5857 error_out(KDC_ERR_BADOPTION);
5860 new_tkt.session := random_session_key();
5861 new_tkt.cname := req.cname;
5862 new_tkt.crealm := req.crealm;
5863 new_tkt.transited := empty_transited_field();
5865 new_tkt.authtime := kdc_time;
5867 if (req.kdc-options.POSTDATED is set) then
5868 if (against_postdate_policy(req.from)) then
5869 error_out(KDC_ERR_POLICY);
5871 set new_tkt.flags.POSTDATED;
5872 set new_tkt.flags.INVALID;
5873 new_tkt.starttime := req.from;
5875 omit new_tkt.starttime; /* treated as authtime when omitted =
5878 if (req.till = 0) then
5884 new_tkt.endtime := min(till,
5885 new_tkt.starttime+client.max_life,
5886 new_tkt.starttime+server.max_life,
5887 new_tkt.starttime+max_life_for_realm);
5889 if ((req.kdc-options.RENEWABLE-OK is set) and
5890 (new_tkt.endtime < req.till)) then
5891 /* we set the RENEWABLE option for later processing */
5892 set req.kdc-options.RENEWABLE;
5893 req.rtime := req.till;
5896 if (req.rtime = 0) then
5902 if (req.kdc-options.RENEWABLE is set) then
5903 set new_tkt.flags.RENEWABLE;
5904 new_tkt.renew-till := min(rtime,
5905 new_tkt.starttime+client.max_rlife,
5906 new_tkt.starttime+server.max_rlife,
5907 new_tkt.starttime+max_rlife_for_realm);
5909 omit new_tkt.renew-till; /* only present if RENEWABLE */
5912 if (req.addresses) then
5913 new_tkt.caddr := req.addresses;
5916 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5921 new_tkt.authorization_data := empty_authorization_data();
5923 encode to-be-encrypted part of ticket into OCTET STRING;
5924 new_tkt.enc-part := encrypt OCTET STRING
5925 using etype_for_key(server.key), server.key, server.p_kvno;
5927 /* Start processing the response */
5930 resp.msg-type := KRB_AS_REP;
5931 resp.cname := req.cname;
5932 resp.crealm := req.realm;
5933 resp.ticket := new_tkt;
5935 resp.key := new_tkt.session;
5936 resp.last-req := fetch_last_request_info(client);
5937 resp.nonce := req.nonce;
5938 resp.key-expiration := client.expiration;
5939 resp.flags := new_tkt.flags;
5941 resp.authtime := new_tkt.authtime;
5942 resp.starttime := new_tkt.starttime;
5943 resp.endtime := new_tkt.endtime;
5945 if (new_tkt.flags.RENEWABLE) then
5946 resp.renew-till := new_tkt.renew-till;
5949 resp.realm := new_tkt.realm;
5950 resp.sname := new_tkt.sname;
5952 resp.caddr := new_tkt.caddr;
5954 encode body of reply into OCTET STRING;
5956 resp.enc-part := encrypt OCTET STRING
5957 using use_etype, client.key, client.p_kvno;
5960 A.3. KRB_AS_REP verification
5962 decode response into resp;
5964 if (resp.msg-type = KRB_ERROR) then
5965 if(error = KDC_ERR_PREAUTH_REQUIRED(PA_ENC_TIMESTAMP)) then
5966 set pa_enc_timestamp_required;
5969 process_error(resp);
5973 /* On error, discard the response, and zero the session key */
5974 /* from the response immediately */
5976 key = get_decryption_key(resp.enc-part.kvno, resp.enc-part.etype,
5979 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
5981 unencrypted part of resp := decode of decrypt of resp.enc-part
5982 using resp.enc-part.etype and key;
5985 if (common_as_rep_tgs_rep_checks fail) then
5990 if near(resp.princ_exp) then
5991 print(warning message);
5993 save_for_later(ticket,session,client,server,times,flags);
5995 A.4. KRB_AS_REP and KRB_TGS_REP common checks
5997 if (decryption_error() or
5998 (req.cname != resp.cname) or
5999 (req.realm != resp.crealm) or
6000 (req.sname != resp.sname) or
6001 (req.realm != resp.realm) or
6002 (req.nonce != resp.nonce) or
6003 (req.addresses != resp.caddr)) then
6005 return KRB_AP_ERR_MODIFIED;
6008 /* make sure no flags are set that shouldn't be, and that all that */
6009 /* should be are set */
6010 if (!check_flags_for_compatability(req.kdc-options,resp.flags)) then
6012 return KRB_AP_ERR_MODIFIED;
6015 if ((req.from = 0) and
6016 (resp.starttime is not within allowable skew)) then
6018 return KRB_AP_ERR_SKEW;
6020 if ((req.from != 0) and (req.from != resp.starttime)) then
6022 return KRB_AP_ERR_MODIFIED;
6024 if ((req.till != 0) and (resp.endtime > req.till)) then
6026 return KRB_AP_ERR_MODIFIED;
6029 if ((req.kdc-options.RENEWABLE is set) and
6030 (req.rtime != 0) and (resp.renew-till > req.rtime)) then
6032 return KRB_AP_ERR_MODIFIED;
6034 if ((req.kdc-options.RENEWABLE-OK is set) and
6035 (resp.flags.RENEWABLE) and
6037 (resp.renew-till > req.till)) then
6039 return KRB_AP_ERR_MODIFIED;
6042 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6045 A.5. KRB_TGS_REQ generation
6047 /* Note that make_application_request might have to recursivly */
6048 /* call this routine to get the appropriate ticket-granting ticket */
6050 request.pvno := protocol version; /* pvno = 5 */
6051 request.msg-type := message type; /* type = KRB_TGS_REQ */
6053 body.kdc-options := users's preferences;
6054 /* If the TGT is not for the realm of the end-server */
6055 /* then the sname will be for a TGT for the end-realm */
6056 /* and the realm of the requested ticket (body.realm) */
6057 /* will be that of the TGS to which the TGT we are */
6058 /* sending applies */
6059 body.sname := service's name;
6060 body.realm := service's realm;
6062 if (body.kdc-options.POSTDATED is set) then
6063 body.from := requested starting time;
6067 body.till := requested end time;
6068 if (body.kdc-options.RENEWABLE is set) then
6069 body.rtime := requested final renewal time;
6071 body.nonce := random_nonce();
6072 body.etype := requested etypes;
6073 if (user supplied addresses) then
6074 body.addresses := user's addresses;
6076 omit body.addresses;
6079 body.enc-authorization-data := user-supplied data;
6080 if (body.kdc-options.ENC-TKT-IN-SKEY) then
6081 body.additional-tickets_ticket := second TGT;
6084 request.req-body := body;
6085 check := generate_checksum (req.body,checksumtype);
6087 request.padata[0].padata-type := PA-TGS-REQ;
6088 request.padata[0].padata-value := create a KRB_AP_REQ using
6089 the TGT and checksum
6091 /* add in any other padata as required/supplied */
6093 kerberos := lookup(name of local kerberose server (or servers));
6094 send(packet,kerberos);
6098 retry or use alternate server;
6101 A.6. KRB_TGS_REQ verification and KRB_TGS_REP generation
6103 /* note that reading the application request requires first
6105 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6107 determining the server for which a ticket was issued, and choosing the
6108 correct key for decryption. The name of the server appears in the
6109 plaintext part of the ticket. */
6111 if (no KRB_AP_REQ in req.padata) then
6112 error_out(KDC_ERR_PADATA_TYPE_NOSUPP);
6114 verify KRB_AP_REQ in req.padata;
6116 /* Note that the realm in which the Kerberos server is operating is
6117 determined by the instance from the ticket-granting ticket. The realm
6118 in the ticket-granting ticket is the realm under which the ticket
6119 granting ticket was issued. It is possible for a single Kerberos
6120 server to support more than one realm. */
6122 auth_hdr := KRB_AP_REQ;
6123 tgt := auth_hdr.ticket;
6125 if (tgt.sname is not a TGT for local realm and is not req.sname) then
6126 error_out(KRB_AP_ERR_NOT_US);
6128 realm := realm_tgt_is_for(tgt);
6130 decode remainder of request;
6132 if (auth_hdr.authenticator.cksum is missing) then
6133 error_out(KRB_AP_ERR_INAPP_CKSUM);
6136 if (auth_hdr.authenticator.cksum type is not supported) then
6137 error_out(KDC_ERR_SUMTYPE_NOSUPP);
6139 if (auth_hdr.authenticator.cksum is not both collision-proof and keyed) then
6140 error_out(KRB_AP_ERR_INAPP_CKSUM);
6143 set computed_checksum := checksum(req);
6144 if (computed_checksum != auth_hdr.authenticatory.cksum) then
6145 error_out(KRB_AP_ERR_MODIFIED);
6148 server := lookup(req.sname,realm);
6151 if (is_foreign_tgt_name(req.sname)) then
6152 server := best_intermediate_tgs(req.sname);
6154 /* no server in Database */
6155 error_out(KDC_ERR_S_PRINCIPAL_UNKNOWN);
6159 session := generate_random_session_key();
6161 use_etype := first supported etype in req.etypes;
6163 if (no support for req.etypes) then
6164 error_out(KDC_ERR_ETYPE_NOSUPP);
6168 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6170 new_tkt.vno := ticket version; /* = 5 */
6171 new_tkt.sname := req.sname;
6172 new_tkt.srealm := realm;
6173 reset all flags in new_tkt.flags;
6175 /* It should be noted that local policy may affect the */
6176 /* processing of any of these flags. For example, some */
6177 /* realms may refuse to issue renewable tickets */
6179 new_tkt.caddr := tgt.caddr;
6180 resp.caddr := NULL; /* We only include this if they change */
6181 if (req.kdc-options.FORWARDABLE is set) then
6182 if (tgt.flags.FORWARDABLE is reset) then
6183 error_out(KDC_ERR_BADOPTION);
6185 set new_tkt.flags.FORWARDABLE;
6187 if (req.kdc-options.FORWARDED is set) then
6188 if (tgt.flags.FORWARDABLE is reset) then
6189 error_out(KDC_ERR_BADOPTION);
6191 set new_tkt.flags.FORWARDED;
6192 new_tkt.caddr := req.addresses;
6193 resp.caddr := req.addresses;
6195 if (tgt.flags.FORWARDED is set) then
6196 set new_tkt.flags.FORWARDED;
6199 if (req.kdc-options.PROXIABLE is set) then
6200 if (tgt.flags.PROXIABLE is reset)
6201 error_out(KDC_ERR_BADOPTION);
6203 set new_tkt.flags.PROXIABLE;
6205 if (req.kdc-options.PROXY is set) then
6206 if (tgt.flags.PROXIABLE is reset) then
6207 error_out(KDC_ERR_BADOPTION);
6209 set new_tkt.flags.PROXY;
6210 new_tkt.caddr := req.addresses;
6211 resp.caddr := req.addresses;
6214 if (req.kdc-options.ALLOW-POSTDATE is set) then
6215 if (tgt.flags.MAY-POSTDATE is reset)
6216 error_out(KDC_ERR_BADOPTION);
6218 set new_tkt.flags.MAY-POSTDATE;
6220 if (req.kdc-options.POSTDATED is set) then
6221 if (tgt.flags.MAY-POSTDATE is reset) then
6222 error_out(KDC_ERR_BADOPTION);
6224 set new_tkt.flags.POSTDATED;
6225 set new_tkt.flags.INVALID;
6226 if (against_postdate_policy(req.from)) then
6227 error_out(KDC_ERR_POLICY);
6229 new_tkt.starttime := req.from;
6231 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6235 if (req.kdc-options.VALIDATE is set) then
6236 if (tgt.flags.INVALID is reset) then
6237 error_out(KDC_ERR_POLICY);
6239 if (tgt.starttime > kdc_time) then
6240 error_out(KRB_AP_ERR_NYV);
6242 if (check_hot_list(tgt)) then
6243 error_out(KRB_AP_ERR_REPEAT);
6246 reset new_tkt.flags.INVALID;
6249 if (req.kdc-options.(any flag except ENC-TKT-IN-SKEY, RENEW,
6250 and those already processed) is set) then
6251 error_out(KDC_ERR_BADOPTION);
6254 new_tkt.authtime := tgt.authtime;
6256 if (req.kdc-options.RENEW is set) then
6257 /* Note that if the endtime has already passed, the ticket would */
6258 /* have been rejected in the initial authentication stage, so */
6259 /* there is no need to check again here */
6260 if (tgt.flags.RENEWABLE is reset) then
6261 error_out(KDC_ERR_BADOPTION);
6263 if (tgt.renew-till < kdc_time) then
6264 error_out(KRB_AP_ERR_TKT_EXPIRED);
6267 new_tkt.starttime := kdc_time;
6268 old_life := tgt.endttime - tgt.starttime;
6269 new_tkt.endtime := min(tgt.renew-till,
6270 new_tkt.starttime + old_life);
6272 new_tkt.starttime := kdc_time;
6273 if (req.till = 0) then
6278 new_tkt.endtime := min(till,
6279 new_tkt.starttime+client.max_life,
6280 new_tkt.starttime+server.max_life,
6281 new_tkt.starttime+max_life_for_realm,
6284 if ((req.kdc-options.RENEWABLE-OK is set) and
6285 (new_tkt.endtime < req.till) and
6286 (tgt.flags.RENEWABLE is set) then
6287 /* we set the RENEWABLE option for later processing */
6288 set req.kdc-options.RENEWABLE;
6289 req.rtime := min(req.till, tgt.renew-till);
6294 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6296 if (req.rtime = 0) then
6302 if ((req.kdc-options.RENEWABLE is set) and
6303 (tgt.flags.RENEWABLE is set)) then
6304 set new_tkt.flags.RENEWABLE;
6305 new_tkt.renew-till := min(rtime,
6306 new_tkt.starttime+client.max_rlife,
6307 new_tkt.starttime+server.max_rlife,
6308 new_tkt.starttime+max_rlife_for_realm,
6311 new_tkt.renew-till := OMIT; /* leave the renew-till field out */
6313 if (req.enc-authorization-data is present) then
6314 decrypt req.enc-authorization-data into decrypted_authorization_data
6315 using auth_hdr.authenticator.subkey;
6316 if (decrypt_error()) then
6317 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6320 new_tkt.authorization_data := req.auth_hdr.ticket.authorization_data +
6321 decrypted_authorization_data;
6323 new_tkt.key := session;
6324 new_tkt.crealm := tgt.crealm;
6325 new_tkt.cname := req.auth_hdr.ticket.cname;
6327 if (realm_tgt_is_for(tgt) := tgt.realm) then
6328 /* tgt issued by local realm */
6329 new_tkt.transited := tgt.transited;
6331 /* was issued for this realm by some other realm */
6332 if (tgt.transited.tr-type not supported) then
6333 error_out(KDC_ERR_TRTYPE_NOSUPP);
6335 new_tkt.transited := compress_transited(tgt.transited + tgt.realm)
6336 /* Don't check tranited field if TGT for foreign realm,=20
6337 * or requested not to check */
6338 if (is_not_foreign_tgt_name(new_tkt.server)=20
6339 && req.kdc-options.DISABLE-TRANSITED-CHECK not set) then
6340 /* Check it, so end-server does not have to=20
6341 * but don't fail, end-server may still accept it */
6342 if (check_transited_field(new_tkt.transited) == OK)
6344 new_tkt.flags.TRANSITED-POLICY-CHECKED;
6349 encode encrypted part of new_tkt into OCTET STRING;
6350 if (req.kdc-options.ENC-TKT-IN-SKEY is set) then
6351 if (server not specified) then
6352 server = req.second_ticket.client;
6354 if ((req.second_ticket is not a TGT) or
6355 (req.second_ticket.client != server)) then
6357 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6359 error_out(KDC_ERR_POLICY);
6362 new_tkt.enc-part := encrypt OCTET STRING using
6363 using etype_for_key(second-ticket.key), second-ticket.key;
6365 new_tkt.enc-part := encrypt OCTET STRING
6366 using etype_for_key(server.key), server.key, server.p_kvno;
6370 resp.msg-type := KRB_TGS_REP;
6371 resp.crealm := tgt.crealm;
6372 resp.cname := tgt.cname;
6373 resp.ticket := new_tkt;
6375 resp.key := session;
6376 resp.nonce := req.nonce;
6377 resp.last-req := fetch_last_request_info(client);
6378 resp.flags := new_tkt.flags;
6380 resp.authtime := new_tkt.authtime;
6381 resp.starttime := new_tkt.starttime;
6382 resp.endtime := new_tkt.endtime;
6384 omit resp.key-expiration;
6386 resp.sname := new_tkt.sname;
6387 resp.realm := new_tkt.realm;
6389 if (new_tkt.flags.RENEWABLE) then
6390 resp.renew-till := new_tkt.renew-till;
6393 encode body of reply into OCTET STRING;
6395 if (req.padata.authenticator.subkey)
6396 resp.enc-part := encrypt OCTET STRING using use_etype,
6397 req.padata.authenticator.subkey;
6398 else resp.enc-part := encrypt OCTET STRING using use_etype, tgt.key;
6404 A.7. KRB_TGS_REP verification
6406 decode response into resp;
6408 if (resp.msg-type = KRB_ERROR) then
6409 process_error(resp);
6413 /* On error, discard the response, and zero the session key from
6414 the response immediately */
6416 if (req.padata.authenticator.subkey)
6417 unencrypted part of resp := decode of decrypt of resp.enc-part
6418 using resp.enc-part.etype and subkey;
6420 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6422 else unencrypted part of resp := decode of decrypt of resp.enc-part
6423 using resp.enc-part.etype and tgt's session key;
6424 if (common_as_rep_tgs_rep_checks fail) then
6429 check authorization_data as necessary;
6430 save_for_later(ticket,session,client,server,times,flags);
6432 A.8. Authenticator generation
6434 body.authenticator-vno := authenticator vno; /* = 5 */
6435 body.cname, body.crealm := client name;
6436 if (supplying checksum) then
6437 body.cksum := checksum;
6440 body.ctime, body.cusec := system_time;
6441 if (selecting sub-session key) then
6442 select sub-session key;
6443 body.subkey := sub-session key;
6445 if (using sequence numbers) then
6446 select initial sequence number;
6447 body.seq-number := initial sequence;
6450 A.9. KRB_AP_REQ generation
6452 obtain ticket and session_key from cache;
6454 packet.pvno := protocol version; /* 5 */
6455 packet.msg-type := message type; /* KRB_AP_REQ */
6457 if (desired(MUTUAL_AUTHENTICATION)) then
6458 set packet.ap-options.MUTUAL-REQUIRED;
6460 reset packet.ap-options.MUTUAL-REQUIRED;
6462 if (using session key for ticket) then
6463 set packet.ap-options.USE-SESSION-KEY;
6465 reset packet.ap-options.USE-SESSION-KEY;
6467 packet.ticket := ticket; /* ticket */
6468 generate authenticator;
6469 encode authenticator into OCTET STRING;
6470 encrypt OCTET STRING into packet.authenticator using session_key;
6472 A.10. KRB_AP_REQ verification
6475 if (packet.pvno != 5) then
6476 either process using other protocol spec
6477 or error_out(KRB_AP_ERR_BADVERSION);
6479 if (packet.msg-type != KRB_AP_REQ) then
6480 error_out(KRB_AP_ERR_MSG_TYPE);
6483 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6485 if (packet.ticket.tkt_vno != 5) then
6486 either process using other protocol spec
6487 or error_out(KRB_AP_ERR_BADVERSION);
6489 if (packet.ap_options.USE-SESSION-KEY is set) then
6490 retrieve session key from ticket-granting ticket for
6491 packet.ticket.{sname,srealm,enc-part.etype};
6493 retrieve service key for
6494 packet.ticket.{sname,srealm,enc-part.etype,enc-part.skvno};
6496 if (no_key_available) then
6497 if (cannot_find_specified_skvno) then
6498 error_out(KRB_AP_ERR_BADKEYVER);
6500 error_out(KRB_AP_ERR_NOKEY);
6503 decrypt packet.ticket.enc-part into decr_ticket using retrieved key;
6504 if (decryption_error()) then
6505 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6507 decrypt packet.authenticator into decr_authenticator
6508 using decr_ticket.key;
6509 if (decryption_error()) then
6510 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6512 if (decr_authenticator.{cname,crealm} !=
6513 decr_ticket.{cname,crealm}) then
6514 error_out(KRB_AP_ERR_BADMATCH);
6516 if (decr_ticket.caddr is present) then
6517 if (sender_address(packet) is not in decr_ticket.caddr) then
6518 error_out(KRB_AP_ERR_BADADDR);
6520 elseif (application requires addresses) then
6521 error_out(KRB_AP_ERR_BADADDR);
6523 if (not in_clock_skew(decr_authenticator.ctime,
6524 decr_authenticator.cusec)) then
6525 error_out(KRB_AP_ERR_SKEW);
6527 if (repeated(decr_authenticator.{ctime,cusec,cname,crealm})) then
6528 error_out(KRB_AP_ERR_REPEAT);
6530 save_identifier(decr_authenticator.{ctime,cusec,cname,crealm});
6532 if ((decr_ticket.starttime-system_time > CLOCK_SKEW) or
6533 (decr_ticket.flags.INVALID is set)) then
6534 /* it hasn't yet become valid */
6535 error_out(KRB_AP_ERR_TKT_NYV);
6537 if (system_time-decr_ticket.endtime > CLOCK_SKEW) then
6538 error_out(KRB_AP_ERR_TKT_EXPIRED);
6540 if (decr_ticket.transited) then
6541 /* caller may ignore the TRANSITED-POLICY-CHECKED and do
6543 if (decr_ticket.flags.TRANSITED-POLICY-CHECKED not set) then
6544 if (check_transited_field(decr_ticket.transited) then
6546 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6548 error_out(KDC_AP_PATH_NOT_ACCPETED);
6552 /* caller must check decr_ticket.flags for any pertinent details */
6553 return(OK, decr_ticket, packet.ap_options.MUTUAL-REQUIRED);
6555 A.11. KRB_AP_REP generation
6557 packet.pvno := protocol version; /* 5 */
6558 packet.msg-type := message type; /* KRB_AP_REP */
6560 body.ctime := packet.ctime;
6561 body.cusec := packet.cusec;
6562 if (selecting sub-session key) then
6563 select sub-session key;
6564 body.subkey := sub-session key;
6566 if (using sequence numbers) then
6567 select initial sequence number;
6568 body.seq-number := initial sequence;
6571 encode body into OCTET STRING;
6573 select encryption type;
6574 encrypt OCTET STRING into packet.enc-part;
6576 A.12. KRB_AP_REP verification
6579 if (packet.pvno != 5) then
6580 either process using other protocol spec
6581 or error_out(KRB_AP_ERR_BADVERSION);
6583 if (packet.msg-type != KRB_AP_REP) then
6584 error_out(KRB_AP_ERR_MSG_TYPE);
6586 cleartext := decrypt(packet.enc-part) using ticket's session key;
6587 if (decryption_error()) then
6588 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6590 if (cleartext.ctime != authenticator.ctime) then
6591 error_out(KRB_AP_ERR_MUT_FAIL);
6593 if (cleartext.cusec != authenticator.cusec) then
6594 error_out(KRB_AP_ERR_MUT_FAIL);
6596 if (cleartext.subkey is present) then
6597 save cleartext.subkey for future use;
6599 if (cleartext.seq-number is present) then
6600 save cleartext.seq-number for future verifications;
6602 return(AUTHENTICATION_SUCCEEDED);
6604 A.13. KRB_SAFE generation
6606 collect user data in buffer;
6609 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6611 /* assemble packet: */
6612 packet.pvno := protocol version; /* 5 */
6613 packet.msg-type := message type; /* KRB_SAFE */
6615 body.user-data := buffer; /* DATA */
6616 if (using timestamp) then
6618 body.timestamp, body.usec := system_time;
6620 if (using sequence numbers) then
6621 body.seq-number := sequence number;
6623 body.s-address := sender host addresses;
6624 if (only one recipient) then
6625 body.r-address := recipient host address;
6627 checksum.cksumtype := checksum type;
6628 compute checksum over body;
6629 checksum.checksum := checksum value; /* checksum.checksum */
6630 packet.cksum := checksum;
6631 packet.safe-body := body;
6633 A.14. KRB_SAFE verification
6636 if (packet.pvno != 5) then
6637 either process using other protocol spec
6638 or error_out(KRB_AP_ERR_BADVERSION);
6640 if (packet.msg-type != KRB_SAFE) then
6641 error_out(KRB_AP_ERR_MSG_TYPE);
6643 if (packet.checksum.cksumtype is not both collision-proof and keyed) then
6644 error_out(KRB_AP_ERR_INAPP_CKSUM);
6646 if (safe_priv_common_checks_ok(packet)) then
6647 set computed_checksum := checksum(packet.body);
6648 if (computed_checksum != packet.checksum) then
6649 error_out(KRB_AP_ERR_MODIFIED);
6651 return (packet, PACKET_IS_GENUINE);
6653 return common_checks_error;
6656 A.15. KRB_SAFE and KRB_PRIV common checks
6658 if (packet.s-address != O/S_sender(packet)) then
6659 /* O/S report of sender not who claims to have sent it */
6660 error_out(KRB_AP_ERR_BADADDR);
6662 if ((packet.r-address is present) and
6663 (packet.r-address != local_host_address)) then
6664 /* was not sent to proper place */
6665 error_out(KRB_AP_ERR_BADADDR);
6667 if (((packet.timestamp is present) and
6668 (not in_clock_skew(packet.timestamp,packet.usec))) or
6669 (packet.timestamp is not present and timestamp expected)) then
6670 error_out(KRB_AP_ERR_SKEW);
6672 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6675 if (repeated(packet.timestamp,packet.usec,packet.s-address)) then
6676 error_out(KRB_AP_ERR_REPEAT);
6679 if (((packet.seq-number is present) and
6680 ((not in_sequence(packet.seq-number)))) or
6681 (packet.seq-number is not present and sequence expected)) then
6682 error_out(KRB_AP_ERR_BADORDER);
6684 if (packet.timestamp not present and packet.seq-number not present) then
6685 error_out(KRB_AP_ERR_MODIFIED);
6688 save_identifier(packet.{timestamp,usec,s-address},
6689 sender_principal(packet));
6691 return PACKET_IS_OK;
6693 A.16. KRB_PRIV generation
6695 collect user data in buffer;
6697 /* assemble packet: */
6698 packet.pvno := protocol version; /* 5 */
6699 packet.msg-type := message type; /* KRB_PRIV */
6701 packet.enc-part.etype := encryption type;
6703 body.user-data := buffer;
6704 if (using timestamp) then
6706 body.timestamp, body.usec := system_time;
6708 if (using sequence numbers) then
6709 body.seq-number := sequence number;
6711 body.s-address := sender host addresses;
6712 if (only one recipient) then
6713 body.r-address := recipient host address;
6716 encode body into OCTET STRING;
6718 select encryption type;
6719 encrypt OCTET STRING into packet.enc-part.cipher;
6721 A.17. KRB_PRIV verification
6724 if (packet.pvno != 5) then
6725 either process using other protocol spec
6726 or error_out(KRB_AP_ERR_BADVERSION);
6728 if (packet.msg-type != KRB_PRIV) then
6729 error_out(KRB_AP_ERR_MSG_TYPE);
6732 cleartext := decrypt(packet.enc-part) using negotiated key;
6733 if (decryption_error()) then
6735 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6737 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6740 if (safe_priv_common_checks_ok(cleartext)) then
6741 return(cleartext.DATA, PACKET_IS_GENUINE_AND_UNMODIFIED);
6743 return common_checks_error;
6746 A.18. KRB_CRED generation
6748 invoke KRB_TGS; /* obtain tickets to be provided to peer */
6750 /* assemble packet: */
6751 packet.pvno := protocol version; /* 5 */
6752 packet.msg-type := message type; /* KRB_CRED */
6754 for (tickets[n] in tickets to be forwarded) do
6755 packet.tickets[n] = tickets[n].ticket;
6758 packet.enc-part.etype := encryption type;
6760 for (ticket[n] in tickets to be forwarded) do
6761 body.ticket-info[n].key = tickets[n].session;
6762 body.ticket-info[n].prealm = tickets[n].crealm;
6763 body.ticket-info[n].pname = tickets[n].cname;
6764 body.ticket-info[n].flags = tickets[n].flags;
6765 body.ticket-info[n].authtime = tickets[n].authtime;
6766 body.ticket-info[n].starttime = tickets[n].starttime;
6767 body.ticket-info[n].endtime = tickets[n].endtime;
6768 body.ticket-info[n].renew-till = tickets[n].renew-till;
6769 body.ticket-info[n].srealm = tickets[n].srealm;
6770 body.ticket-info[n].sname = tickets[n].sname;
6771 body.ticket-info[n].caddr = tickets[n].caddr;
6775 body.timestamp, body.usec := system_time;
6777 if (using nonce) then
6778 body.nonce := nonce;
6781 if (using s-address) then
6782 body.s-address := sender host addresses;
6784 if (limited recipients) then
6785 body.r-address := recipient host address;
6788 encode body into OCTET STRING;
6790 select encryption type;
6791 encrypt OCTET STRING into packet.enc-part.cipher
6792 using negotiated encryption key;
6794 A.19. KRB_CRED verification
6798 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6800 if (packet.pvno != 5) then
6801 either process using other protocol spec
6802 or error_out(KRB_AP_ERR_BADVERSION);
6804 if (packet.msg-type != KRB_CRED) then
6805 error_out(KRB_AP_ERR_MSG_TYPE);
6808 cleartext := decrypt(packet.enc-part) using negotiated key;
6809 if (decryption_error()) then
6810 error_out(KRB_AP_ERR_BAD_INTEGRITY);
6812 if ((packet.r-address is present or required) and
6813 (packet.s-address != O/S_sender(packet)) then
6814 /* O/S report of sender not who claims to have sent it */
6815 error_out(KRB_AP_ERR_BADADDR);
6817 if ((packet.r-address is present) and
6818 (packet.r-address != local_host_address)) then
6819 /* was not sent to proper place */
6820 error_out(KRB_AP_ERR_BADADDR);
6822 if (not in_clock_skew(packet.timestamp,packet.usec)) then
6823 error_out(KRB_AP_ERR_SKEW);
6825 if (repeated(packet.timestamp,packet.usec,packet.s-address)) then
6826 error_out(KRB_AP_ERR_REPEAT);
6828 if (packet.nonce is required or present) and
6829 (packet.nonce != expected-nonce) then
6830 error_out(KRB_AP_ERR_MODIFIED);
6833 for (ticket[n] in tickets that were forwarded) do
6834 save_for_later(ticket[n],key[n],principal[n],
6835 server[n],times[n],flags[n]);
6838 A.20. KRB_ERROR generation
6840 /* assemble packet: */
6841 packet.pvno := protocol version; /* 5 */
6842 packet.msg-type := message type; /* KRB_ERROR */
6845 packet.stime, packet.susec := system_time;
6846 packet.realm, packet.sname := server name;
6848 if (client time available) then
6849 packet.ctime, packet.cusec := client_time;
6851 packet.error-code := error code;
6852 if (client name available) then
6853 packet.cname, packet.crealm := client name;
6855 if (error text available) then
6856 packet.e-text := error text;
6858 if (error data available) then
6859 packet.e-data := error data;
6863 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6865 B. Definition of common authorization data elements
6867 This appendix contains the definitions of common authorization data
6868 elements. These common authorization data elements are recursivly defined,
6869 meaning the ad-data for these types will itself contain a sequence of
6870 authorization data whose interpretation is affected by the encapsulating
6871 element. Depending on the meaning of the encapsulating element, the
6872 encapsulated elements may be ignored, might be interpreted as issued
6873 directly by the KDC, or they might be stored in a separate plaintext part of
6874 the ticket. The types of the encapsulating elements are specified as part of
6875 the Kerberos specification because the behavior based on these values should
6876 be understood across implementations whereas other elements need only be
6877 understood by the applications which they affect.
6879 In the definitions that follow, the value of the ad-type for the element
6880 will be specified in the subsection number, and the value of the ad-data
6881 will be as shown in the ASN.1 structure that follows the subsection heading.
6885 AD-IF-RELEVANT AuthorizationData
6887 AD elements encapsulated within the if-relevant element are intended for
6888 interpretation only by application servers that understand the particular
6889 ad-type of the embedded element. Application servers that do not understand
6890 the type of an element embedded within the if-relevant element may ignore
6891 the uninterpretable element. This element promotes interoperability across
6892 implementations which may have local extensions for authorization.
6894 B.2. Intended for server
6896 AD-INTENDED-FOR-SERVER SEQUENCE {
6897 intended-server[0] SEQUENCE OF PrincipalName
6898 elements[1] AuthorizationData
6901 AD elements encapsulated within the intended-for-server element may be
6902 ignored if the application server is not in the list of principal names of
6903 intended servers. Further, a KDC issuing a ticket for an application server
6904 can remove this element if the application server is not in the list of
6907 Application servers should check for their principal name in the
6908 intended-server field of this element. If their principal name is not found,
6909 this element should be ignored. If found, then the encapsulated elements
6910 should be evaluated in the same manner as if they were present in the top
6911 level authorization data field. Applications and application servers that do
6912 not implement this element should reject tickets that contain authorization
6913 data elements of this type.
6915 B.3. Intended for application class
6917 AD-INTENDED-FOR-APPLICATION-CLASS SEQUENCE { intended-application-class[0]
6918 SEQUENCE OF GeneralString elements[1] AuthorizationData } AD elements
6919 encapsulated within the intended-for-application-class element may be
6920 ignored if the application server is not in one of the named classes of
6921 application servers. Examples of application server classes include
6922 "FILESYSTEM", and other kinds of servers.
6924 This element and the elements it encapulates may be safely ignored by
6925 applications, application servers, and KDCs that do not implement this
6929 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6933 AD-KDCIssued SEQUENCE {
6934 ad-checksum[0] Checksum,
6935 i-realm[1] Realm OPTIONAL,
6936 i-sname[2] PrincipalName OPTIONAL,
6937 elements[3] AuthorizationData.
6941 A checksum over the elements field using a cryptographic checksum
6942 method that is identical to the checksum used to protect the ticket
6943 itself (i.e. using the same hash function and the same encryption
6944 algorithm used to encrypt the ticket) and using a key derived from the
6945 same key used to protect the ticket.
6947 The name of the issuing principal if different from the KDC itself.
6948 This field would be used when the KDC can verify the authenticity of
6949 elements signed by the issuing principal and it allows this KDC to
6950 notify the application server of the validity of those elements.
6952 A sequence of authorization data elements issued by the KDC.
6954 The KDC-issued ad-data field is intended to provide a means for Kerberos
6955 principal credentials to embed within themselves privilege attributes and
6956 other mechanisms for positive authorization, amplifying the priveleges of
6957 the principal beyond what can be done using a credentials without such an
6960 This can not be provided without this element because the definition of the
6961 authorization-data field allows elements to be added at will by the bearer
6962 of a TGT at the time that they request service tickets and elements may also
6963 be added to a delegated ticket by inclusion in the authenticator.
6965 For KDC-issued elements this is prevented because the elements are signed by
6966 the KDC by including a checksum encrypted using the server's key (the same
6967 key used to encrypt the ticket - or a key derived from that key). Elements
6968 encapsulated with in the KDC-issued element will be ignored by the
6969 application server if this "signature" is not present. Further, elements
6970 encapsulated within this element from a ticket granting ticket may be
6971 interpreted by the KDC, and used as a basis according to policy for
6972 including new signed elements within derivative tickets, but they will not
6973 be copied to a derivative ticket directly. If they are copied directly to a
6974 derivative ticket by a KDC that is not aware of this element, the signature
6975 will not be correct for the application ticket elements, and the field will
6976 be ignored by the application server.
6978 This element and the elements it encapulates may be safely ignored by
6979 applications, application servers, and KDCs that do not implement this
6983 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
6987 AD-AND-OR SEQUENCE {
6988 condition-count[0] INTEGER,
6989 elements[1] AuthorizationData
6992 When restrictive AD elements encapsulated within the and-or element are
6993 encountered, only the number specified in condition-count of the
6994 encapsulated conditions must be met in order to satisfy this element. This
6995 element may be used to implement an "or" operation by setting the
6996 condition-count field to 1, and it may specify an "and" operation by setting
6997 the condition count to the number of embedded elements. Application servers
6998 that do not implement this element must reject tickets that contain
6999 authorization data elements of this type.
7001 B.6. Mandatory ticket extensions
7003 AD-Mandatory-Ticket-Extensions SEQUENCE {
7005 te-checksum[0] Checksum
7008 An authorization data element of type mandatory-ticket-extensions specifies
7009 the type and a collision-proof checksum using the same hash algorithm used
7010 to protect the integrity of the ticket itself. This checksum will be
7011 calculated over an individual extension field of the type indicated. If
7012 there are more than one extension, multiple Mandatory-Ticket-Extensions
7013 authorization data elements may be present, each with a checksum for a
7014 different extension field. This restriction indicates that the ticket should
7015 not be accepted if a ticket extension is not present in the ticket for which
7016 the type and checksum do not match that checksum specified in the
7017 authorization data element. Note that although the type is redundant for the
7018 purposes of the comparison, it makes the comparison easier when multiple
7019 extensions are present. Application servers that do not implement this
7020 element must reject tickets that contain authorization data elements of this
7023 B.7. Authorization Data in ticket extensions
7025 AD-IN-Ticket-Extensions Checksum
7027 An authorization data element of type in-ticket-extensions specifies a
7028 collision-proof checksum using the same hash algorithm used to protect the
7029 integrity of the ticket itself. This checksum is calculated over a separate
7030 external AuthorizationData field carried in the ticket extensions.
7031 Application servers that do not implement this element must reject tickets
7032 that contain authorization data elements of this type. Application servers
7033 that do implement this element will search the ticket extensions for
7034 authorization data fields, calculate the specified checksum over each
7035 authorization data field and look for one matching the checksum in this
7036 in-ticket-extensions element. If not found, then the ticket must be
7037 rejected. If found, the corresponding authorization data elements will be
7038 interpreted in the same manner as if they were contained in the top level
7039 authorization data field.
7041 Note that if multiple external authorization data fields are present in a
7042 ticket, each will have a corresponding element of type in-ticket-extensions
7043 in the top level authorization data field, and the external entries will be
7044 linked to the corresponding element by their checksums.
7047 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7049 C. Definition of common ticket extensions
7051 This appendix contains the definitions of common ticket extensions. Support
7052 for these extensions is optional. However, certain extensions have
7053 associated authorization data elements that may require rejection of a
7054 ticket containing an extension by application servers that do not implement
7055 the particular extension. Other extensions have been defined beyond those
7056 described in this specification. Such extensions are described elswhere and
7057 for some of those extensions the reserved number may be found in the list of
7060 It is known that older versions of Kerberos did not support this field, and
7061 that some clients will strip this field from a ticket when they parse and
7062 then reassemble a ticket as it is passed to the application servers. The
7063 presence of the extension will not break such clients, but any functionaly
7064 dependent on the extensions will not work when such tickets are handled by
7065 old clients. In such situations, some implementation may use alternate
7066 methods to transmit the information in the extensions field.
7068 C.1. Null ticket extension
7070 TE-NullExtension OctetString -- The empty Octet String
7072 The te-data field in the null ticket extension is an octet string of lenght
7073 zero. This extension may be included in a ticket granting ticket so that the
7074 KDC can determine on presentation of the ticket granting ticket whether the
7075 client software will strip the extensions field. =20
7077 C.2. External Authorization Data
7079 TE-ExternalAuthorizationData AuthorizationData
7081 The te-data field in the external authorization data ticket extension is
7082 field of type AuthorizationData containing one or more authorization data
7083 elements. If present, a corresponding authorization data element will be
7084 present in the primary authorization data for the ticket and that element
7085 will contain a checksum of the external authorization data ticket extension.
7087 D. Significant changes since RFC 1510
7089 Section 1: The preamble and introduction does not define the protocol,
7090 mention is made in the introduction regarding the ability to rely on the KDC
7091 to check the transited field, and on the inclusion of a flag in a ticket
7092 indicating that this check has occurred. This is a new capability not
7093 present in RFC1510. Pre-existing implementation may ignore or not set this
7094 flag without negative security implications.
7096 The definition of the secret key says that in the case of a user the key may
7097 be derived from a password. In 1510, it said that the key was derived from
7098 the password. This change was made to accommodate situations where the user
7099 key might be stored on a smart-card, or otherwise obtained independent of a
7102 The introduction also mentions the use of public key for initial
7103 authentication in Kerberos by reference. RFC1510 did not include such a
7106 Section 1.2 was added to explain that while Kerberos provides authentication
7107 of a named principal, it is still the responsibility of the application to
7108 ensure that the authenticated name is the entity with which the application
7109 wishes to communicate.
7112 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7114 Section 2: No changes were made to existing options and flags specified in
7115 RFC1510, though text was revised to make the description and intent of
7116 existing options clearer, especially with respect to the ENC-TKT-IN-SKEY
7117 option (now section 2.9.3) which is used for user-to-user authentication.
7118 New options and ticket flags added since RFC1510 include transited policy
7119 checking (section 2.7), anonymous tickets (section 2.8) and name
7120 canonicalization (section since dropped, but flags remain).
7122 Section 3: Added mention of the optional checksum field in the KRB-ERROR
7123 message. Added mention of name canonicalization (since deleted) and
7124 anonymous tickets in exposition on KDC options. Mention of the name
7125 canonicalization case was included in the description of the KDC reply
7126 (3.1.3). A warning regarding generation of session keys for application use
7127 was added, urging the inclusion of key entropy from the KDC generated
7128 session key in the ticket. An example regarding use of the subsession key
7129 was added to section 3.2.6. Descriptions of the pa-etype-info, and
7130 pa-pw-salt preauthentication data items were added.
7132 Changes to section 4: Added language about who has access to the keys in the
7133 Kerberos database. Also made it clear that KDC's may obtain the information
7134 from some database field through other means - for example, one form of
7135 pkinit may extract some of these fields from a certificate.
7137 Section 5: The message specification section has undergone a major rewrite
7138 to eliminate confusion regarding different versions of ASN.1, and to
7139 highlight those areas where the Kerberos protocol does not strictly follow
7140 ASN.1. These are changes to make the description more clear, rather than
7141 changes to the protocol.
7143 Major changes were made to message numbers, providing a clearer
7144 interoperability path for messages that have new optional fields. The
7145 specific additions to these messages are listed specifically elswhere in
7148 A statement regarding the carrying of unrecognized additional fields in
7149 ASN.1 encoding through in tickets was added (still waiting on some better
7150 text regarding this).
7152 Ticket flags and KDC options were added to support the new functions
7153 described elsewhere in this document. The encoding of the options flags are
7154 now described to be no less than 32 bits, and the smallest number of bits
7155 beyond 32 needed to encode any set bits. It also describes the encoding of
7156 the bitstring as using "unnamed" bits.
7158 An optional ticket extensions field was added to support the carrying of
7159 auxiliary data that allows the passing of auxiliary that is to accompany a
7160 ticket to the verifier.
7162 (Still pending, Tom Yu's request to change the application codes on KDC
7163 message to indicate which minor rev of the protocol - I think this might
7164 break things, but am not sure).
7166 Definition of the PA-USE-SPECIFIED-KVNO preauthentication data field was
7169 The optional e-cksum field was added to the KRB-ERROR message and the e-data
7170 filed was generalized for use in other than the KDC_ERR_PREAUTH_REQUIRED
7171 error. The TypedData structure was defined. Type tags for TypedData are
7172 defined in the same sequence as the PA-DATA type space to avoid confusion
7173 with the use of the PA-DATA namespace previously used for the e-data field
7174 for the KDC_ERR_PREAUTH_REQUIRED error.
7177 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7179 Section 6: Section 6 has undergone a major rewrite to more redily convey how
7180 to add new encryption and checksum methods to Kerberos. New encryption
7181 methods were added. Existing methods that are in use have not changed, but
7182 their descriptions have to yield bettwer symmetry with the discussions of
7185 Section 7: Words were added describing the convention that domain based
7186 realm names for newly created realms should be specified as upper case. This
7187 recommendation does not make lower case realm names illegal. Words were
7188 added highlighting that the slash separated components in the X500 style of
7189 realm names is consistent with existing RFC1510 based implementations, but
7190 that it conflicts with the general recommendation of X.500 name
7191 representation specified in RFC2253.
7193 There were suggestions on the list regarding extensions to or new name
7194 types. These require discussion at the IETF meeting. My own feeling at this
7195 point is that in the absence of a strong consensus for adding new types at
7196 this time, I would rather not add new name types in the current draft, but
7197 leave things open for additions later.
7199 Section 8: Since RFC1510, the definition of the TCP transport for Kerberos
7202 Section 9: Requirements for supporting DES3-CBC-SHA1-KD encryption and
7203 HMAC-SHA1-DES3-KD checksums were added.
7205 I would like to make support for Rijndael mandatory and for us to have a
7206 SINGLE standard for use of Rijndale in these revisions.
7208 Y. Deprecated checksum types
7210 Work is still needed on this section.
7212 * More detailed list of differences from RFC 1510, to update
7213 the "Significant changes" appendix.
7214 * Compare specs against actual implementations (e.g., choice of
7215 ivec) and make sure they match.
7217 See end notes for other issues.
7221 Give me an appendix letter?
7223 This section describes some checksum mechanisms defined in RFC 1510 but
7224 considered deprecated in this specification. While the authors believe the
7225 mechanisms currently in common use have all been included in section 6,
7226 these deprecated mechanisms may still be available in older implementations,
7227 so we include them here, modified to fit the framework outlined in 6. They
7228 are not required for an implementation to be conformant to this
7232 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7234 Y.1. The CRC-32 Checksum (crc32)
7236 The CRC-32 checksum calculates a checksum based on a cyclic redundancy check
7237 as described in ISO 3309 [14]. The resulting checksum is four (4) octets in
7238 length. The CRC-32 is neither keyed nor collision-proof. The use of this
7239 checksum is not recommended. An attacker using a probabilistic
7240 chosen-plaintext attack as described in [13] might be able to generate an
7241 alternative message that satisfies the checksum. The use of collision-proof
7242 checksums is recommended for environments where such attacks represent a
7244 associated cryptosystem des-cbc-md5, des-cbc-md4, des-cbc-crc
7247 verify_mic compute checksum and compare
7248 The crc32 checksum algorithm is assigned a checksum type number of one (1).
7250 Y.2. The RSA MD4 Checksum (rsa-md4)
7252 The RSA-MD4 checksum calculates a checksum using the RSA MD4 algorithm [15].
7253 The algorithm takes as input an input message of arbitrary length and
7254 produces as output a 128-bit (16 octet) checksum. RSA-MD4 is believed to be
7256 associated cryptosystem des-cbc-md5, des-cbc-md4, des-cbc-crc
7259 verify_mic compute checksum and compare
7260 The rsa-md4 checksum algorithm is assigned a checksum type number of two
7263 Y.3. DES cipher-block chained checksum (des-mac)
7265 The DES-MAC checksum is computed by prepending an 8 octet confounder to the
7266 plaintext, performing a DES CBC-mode encryption on the result using the key
7267 and an initialization vector of zero, taking the last block of the
7268 ciphertext, prepending the same confounder and encrypting the pair using DES
7269 in cipher-block-chaining (CBC) mode using a a variant of the key, where the
7270 variant is computed by eXclusive-ORing the key with the constant
7271 F0F0F0F0F0F0F0F0. The initialization vector should be zero. The resulting
7272 checksum is 128 bits (16 octets) long, 64 bits of which are redundant. This
7273 checksum is tamper-proof and collision-proof. The DES specifications
7274 identify some "weak" and "semiweak" keys; those keys shall not be used for
7275 generating DES-MAC checksums for use in Kerberos, nor shall a key be used
7276 whose veriant is "weak" or "semi-weak".
7277 associated des-cbc-md5, des-cbc-md4, des-cbc-crc
7279 get_mic des-cbc(key XOR F0F0F0F0F0F0F0F0,
7280 confounder | des-mac(key, confounder | msg, ivec=0),
7283 verify_mic decrypt, compute DES MAC using confounder, compare
7284 The des-mac checksum algorithm is assigned a checksum type number of four
7288 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7290 Y.4. RSA MD4 Cryptographic Checksum Using DES alternative (rsa-md4-des-k)
7292 The RSA-MD4-DES-K checksum calculates a keyed collision-proof checksum by
7293 applying the RSA MD4 checksum algorithm and encrypting the results using DES
7294 in cipherblock-chaining (CBC) mode using a DES key as both key and
7295 initialization vector. The resulting checksum is 16 octets long. This
7296 checksum is tamper-proof and believed to be collision-proof. Note that this
7297 checksum type is the old method for encoding the RSA-MD4-DES checksum and it
7298 is no longer recommended.
7299 associated cryptosystem des-cbc-md5, des-cbc-md4, des-cbc-crc
7300 get_mic des-cbc(key, md4(msg), ivec=key)
7302 verify_mic compute CRC-32 and compare
7303 The rsa-md4-des-k checksum algorithm is assigned a checksum type number of
7306 Y.5. DES cipher-block chained checksum alternative (des-mac-k)
7308 The DES-MAC-K checksum is computed by performing a DES CBC-mode encryption
7309 of the plaintext, and using the last block of the ciphertext as the checksum
7310 value. It is keyed with an encryption key and an initialization vector; any
7311 uses which do not specify an additional initialization vector will use the
7312 key as both key and initialization vector. The resulting checksum is 64 bits
7313 (8 octets) long. This checksum is tamper-proof and collision-proof. Note
7314 that this checksum type is the old method for encoding the DESMAC checksum
7315 and it is no longer recommended. The DES specifications identify some "weak
7316 keys"; those keys shall not be used for generating DES-MAC checksums for use
7318 associated cryptosystem des-cbc-md5, des-cbc-md4, des-cbc-crc
7319 get_mic des-mac(key, msg, ivec=key or given)
7321 verify_mic compute MAC and compare
7322 The des-mac-k checksum algorithm is assigned a checksum type number of five
7326 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7328 Appendix Z. Test Vectors
7330 This section provides test vectors for various functions defined or
7331 described in section 6. For convenience, most inputs are ASCII strings,
7332 though some UTF-8 samples should be provided for string-to-key functions.
7333 Keys and other binary data are specified as hexadecimal strings.
7337 The n-fold function is defined in section 6.4. As noted there, the sample
7338 vector in the original paper defining the algorithm appears to be incorrect.
7339 Here are values provided by Marc Horowitz:
7342 64-fold(303132333435) = be072631276b1955
7344 56-fold("password") =
7345 56-fold(70617373776f7264) = 78a07b6caf85fa
7347 64-fold("Rough Consensus, and Running Code") =
7348 64-fold(526f75676820436f6e73656e7375732c20616e642052756e
7349 6e696e6720436f6465) = bb6ed30870b7f0e0
7351 168-fold("password") =
7352 168-fold(70617373776f7264) =
7353 59e4a8ca7c0385c3c37b3f6d2000247cb6e6bd5b3e
7355 192-fold("MASSACHVSETTS INSTITVTE OF TECHNOLOGY"
7356 192-fold(4d41535341434856534554545320494e5354495456544520
7357 4f4620544543484e4f4c4f4759) =
7358 db3b0d8f0b061e603282b308a50841229ad798fab9540c1b
7360 Z.2. mit_des_string_to_key
7362 The function mit_des_string_to_key is defined in section 6.5.2. We present
7363 here several test values, with some of the intermediate results. The fourth
7364 test demonstrates the use of UTF-8 with three characters. The last two tests
7365 are specifically constructed so as to trigger the weak-key fixups for the
7366 intermediate key produced by fan-folding; we have no test cases that cause
7367 such fixups for the final key.
7376 salt: "ATHENA.MIT.EDUraeburn" 415448454e412e4d49542e4544557261656275726e
7377 password: "password" 70617373776f7264
7378 fan-fold result: c01e38688ac86c2e
7379 intermediate key: c11f38688ac86d2f
7380 DES key: cbc22fae235298e3
7382 salt: "WHITEHOUSE.GOVdanny" 5748495445484f5553452e474f5664616e6e79
7383 password: "potatoe" 706f7461746f65
7384 fan-fold result: a028944ee63c0416
7385 intermediate key: a129944fe63d0416
7386 DES key: df3d32a74fd92a01
7389 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7391 salt: "EXAMPLE.COMbuckaroo" 4558414d504c452e434f4d6275636b61726f6f
7392 password: "penny" 70656e6e79
7393 fan-fold result: 96d2d87e925c64ee
7394 intermediate key: 97d3d97f925d64ef
7395 DES key: 9443a2e532fdc4f1
7397 salt: "ATHENA.MIT.EDUJuri" + s-caron + "i" + c-acute
7398 415448454e412e4d49542e4544554a757269c5a169c487
7399 password: eszett c39f
7400 fan-fold result: b8f6c40e305afc9e
7401 intermediate key: b9f7c40e315bfd9e
7402 DES key: 62c81a5232b5e69d
7404 salt: "AAAAAAAA" 4141414141414141
7405 password: "11119999" 3131313139393939
7406 fan-fold result: e0e0e0e0f0f0f0f0
7407 intermediate key: e0e0e0e0f1f1f101
7408 DES key: 984054d0f1a73e31
7410 salt: "FFFFAAAA" 4646464641414141
7411 password: "NNNN6666" 4e4e4e4e36363636
7412 fan-fold result: 1e1e1e1e0e0e0e0e
7413 intermediate key: 1f1f1f1f0e0e0efe
7414 DES key: c4bf6b25adf7a4f8
7418 These tests show the derived-random and derived-key values for the
7419 des3-hmac-sha1-kd encryption scheme, using the DR and DK functions defined
7420 in section 6.5.5. The input keys were randomly generated; the usage values
7421 are ones actually used by Kerberos.
7423 key: dce06b1f64c857a11c3db57c51899b2cc1791008ce973b92
7425 DR: 935079d14490a75c3093c4a6e8c3b049c71e6ee705
7426 DK: 925179d04591a79b5d3192c4a7e9c289b049c71f6ee604cd
7428 key: 5e13d31c70ef765746578531cb51c15bf11ca82c97cee9f2
7430 DR: 9f58e5a047d894101c469845d67ae3c5249ed812f2
7431 DK: 9e58e5a146d9942a101c469845d67a20e3c4259ed913f207
7433 key: 98e6fd8a04a4b6859b75a176540b9752bad3ecd610a252bc
7435 DR: 12fff90c773f956d13fc2ca0d0840349dbd39908eb
7436 DK: 13fef80d763e94ec6d13fd2ca1d085070249dad39808eabf
7438 key: 622aec25a2fe2cad7094680b7c64940280084c1a7cec92b5
7440 DR: f8debf05b097e7dc0603686aca35d91fd9a5516a70
7441 DK: f8dfbf04b097e6d9dc0702686bcb3489d91fd9a4516b703e
7443 key: d3f8298ccb166438dcb9b93ee5a7629286a491f838f802fb
7444 usage: 6b65726265726f73
7445 DR: 2270db565d2a3d64cfbfdc5305d4f778a6de42d9da
7446 DK: 2370da575d2a3da864cebfdc5204d56df779a7df43d9da43
7448 key: b55e983467e551b3e5d0e5b6c80d45769423a873dc62b30e
7449 usage: 636f6d62696e65
7450 DR: 0127398bacc81a2a62bc45f8d4c151bbcdd5cb788a
7451 DK: 0126388aadc81a1f2a62bc45f8d5c19151bacdd5cb798a3e
7454 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7456 key: c1081649ada74362e6a1459d01dfd30d67c2234c940704da
7458 DR: 348056ec98fcc517171d2b4d7a9493af482d999175
7459 DK: 348057ec98fdc48016161c2a4c7a943e92ae492c989175f7
7461 key: 5d154af238f46713155719d55e2f1f790dd661f279a7917c
7463 DR: a8818bc367dadacbe9a6c84627fb60c294b01215e5
7464 DK: a8808ac267dada3dcbe9a7c84626fbc761c294b01315e5c1
7466 key: 798562e049852f57dc8c343ba17f2ca1d97394efc8adc443
7468 DR: c813f88b3be2b2f75424ce9175fbc8483b88c8713a
7469 DK: c813f88a3be3b334f75425ce9175fbe3c8493b89c8703b49
7471 key: 26dce334b545292f2feab9a8701a89a4b99eb9942cecd016
7473 DR: f58efc6f83f93e55e695fd252cf8fe59f7d5ba37ec
7474 DK: f48ffd6e83f83e7354e694fd252cf83bfe58f7d5ba37ec5d
7476 Z.4. DES3string_to_key
7478 These are the keys generated for some of the above input strings for
7479 triple-DES with key derivation as defined in section 6.5.5.
7481 salt: "ATHENA.MIT.EDUraeburn"
7483 key: 850bb51358548cd05e86768c313e3bfef7511937dcf72c3e
7485 salt: "WHITEHOUSE.GOVdanny"
7487 key: dfcd233dd0a43204ea6dc437fb15e061b02979c1f74f377a
7489 salt: "EXAMPLE.COMbuckaroo"
7491 key: 6d2fcdf2d6fbbc3ddcadb5da5710a23489b0d3b69d5d9d4a
7493 salt: "ATHENA.MIT.EDUJuri" + s-caron + "i" + c-acute
7495 key: 16d5a40e1ce3bacb61b9dce00470324c831973a7b952feb0
7497 Z.5. DES3 combine-keys
7499 PLACEHOLDER FOR NEW DATA
7502 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7504 ------------------------------------------------------------------------
7509 Project Athena, Athena, and Kerberos are trademarks of the
7510 Massachusetts Institute of Technology (MIT). No commercial use of these
7511 trademarks may be made without prior written permission of MIT.
7514 Note, however, that many applications use Kerberos' functions only upon
7515 the initiation of a stream-based network connection. Unless an
7516 application subsequently provides integrity protection for the data
7517 stream, the identity verification applies only to the initiation of the
7518 connection, and does not guarantee that subsequent messages on the
7519 connection originate from the same principal.
7522 Secret and private are often used interchangeably in the literature. In
7523 our usage, it takes two (or more) to share a secret, thus a shared DES
7524 key is a secret key. Something is only private when no one but its
7525 owner knows it. Thus, in public key cryptosystems, one has a public and
7529 Of course, with appropriate permission the client could arrange
7530 registration of a separately-named principal in a remote realm, and
7531 engage in normal exchanges with that realm's services. However, for
7532 even small numbers of clients this becomes cumbersome, and more
7533 automatic methods as described here are necessary.
7536 Though it is permissible to request or issue tick- ets with no network
7537 addresses specified.
7540 It is important that the KDC be sent the name as typed by the user, and
7541 not only the canonical form of the name. If the domain name system was
7542 used to find the canonical name on the client side, the mapping is
7545 The password-changing request must not be honored unless the requester
7546 can provide the old password (the user's current secret key).
7547 Otherwise, it would be possible for someone to walk up to an unattended
7548 session and change another user's password.
7551 To authenticate a user logging on to a local system, the credentials
7552 obtained in the AS exchange may first be used in a TGS exchange to
7553 obtain credentials for a local server. Those credentials must then be
7554 verified by a local server through successful completion of the
7555 Client/Server exchange.
7558 "Random" means that, among other things, it should be impossible to
7559 guess the next session key based on knowledge of past session keys.
7560 This can only be achieved in a pseudo-random number generator if it is
7561 based on cryptographic principles. It is more desirable to use a truly
7562 random number generator, such as one based on measurements of random
7566 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7569 Tickets contain both an encrypted and unencrypted portion, so cleartext
7570 here refers to the entire unit, which can be copied from one message
7571 and replayed in another without any cryptographic skill.
7574 Note that this can make applications based on unreliable transports
7575 difficult to code correctly. If the transport might deliver duplicated
7576 messages, either a new authenticator must be generated for each retry,
7577 or the application server must match requests and replies and replay
7578 the first reply in response to a detected duplicate.
7581 This allows easy implementation of user-to-user authentication [8],
7582 which uses ticket-granting ticket session keys in lieu of secret server
7583 keys in situations where such secret keys could be easily compromised.
7586 Note also that the rejection here is restricted to authenticators from the
7587 same principal to the same server. Other client principals communicating
7588 with the same server principal should not be have their authenticators
7589 rejected if the time and microsecond fields happen to match some other
7590 client's authenticator.
7593 If this is not done, an attacker could subvert the authentication by
7594 recording the ticket and authenticator sent over the network to a
7595 server and replaying them following an event that caused the server to
7596 lose track of recently seen authenticators.
7599 In the Kerberos version 4 protocol, the timestamp in the reply was the
7600 client's timestamp plus one. This is not necessary in version 5 because
7601 version 5 messages are formatted in such a way that it is not possible
7602 to create the reply by judicious message surgery (even in encrypted
7603 form) without knowledge of the appropriate encryption keys.
7606 Note that for encrypting the KRB_AP_REP message, the sub-session key is
7607 not used, even if present in the Authenticator.
7610 Implementations of the protocol may wish to provide routines to choose
7611 subkeys based on session keys and random numbers and to generate a
7612 negotiated key to be returned in the KRB_AP_REP message.
7615 This can be accomplished in several ways. It might be known beforehand
7616 (since the realm is part of the principal identifier), it might be stored in
7617 a nameserver, or it might be obtained from a configuration file. If the
7618 realm to be used is obtained from a nameserver, there is a danger of being
7619 spoofed if the nameservice providing the realm name is not authenticated.
7620 This might result in the use of a realm which has been compromised, and
7621 would result in an attacker's ability to compromise the authentication of
7622 the application server to the client.
7625 If the client selects a sub-session key, care must be taken to ensure
7626 the randomness of the selected sub-session key. One approach would be
7627 to generate a random number and XOR it with the session key from the
7628 ticket-granting ticket.
7631 draft-ietf-cat-kerberos-revisions-10 Expires 20 May 2002
\f
7634 The implementation of the Kerberos server need not combine the database
7635 and the server on the same machine; it is feasible to store the
7636 principal database in, say, a network name service, as long as the
7637 entries stored therein are protected from disclosure to and
7638 modification by unauthorized parties. However, we recommend against
7639 such strategies, as they can make system management and threat analysis
7643 See the discussion of the padata field in section 5.4.2 for details on
7644 why this can be useful.
7647 While Message Authentication Code (MAC) or Message Integrity Check
7648 (MIC) would be more appropriate terms for many of the uses in this
7649 section, we continue to use the term "checksum" for historical reasons.
7651 For example, a pseudo-random number generator may be seeded with a
7652 session key, but to protect the original key from any accidental
7653 weakness in the PRNG, use possibly-known data encrypted or checksummed
7654 using the key rather than using the key directly. Usage numbers in this
7655 reserved range should help avoid accidentally seeding the PRNG with a
7656 value also computed and perhaps exposed to an attacker elsewhere.
7658 Of course, this does not apply to protocols that do their own
7659 encryption independent of this framework, directly using the key
7660 resulting from the Kerberos authentication exchange.
7662 It should be noted that the sample vector in Appendix B.2 of the
7663 original paper appears to be incorrect. Two independent implementations
7664 from the specification (one in C by Marc Horowitz, and another in
7665 Scheme by Bill Sommerfeld) agree on a value different from that in
7668 Some problematic assumptions we've seen, and sometimes made, include:
7669 that a random bitstring is always valid as a key (not true for DES keys
7670 with parity); that the basic block encryption chaining mode provides no
7671 integrity checking, or can easily be separated from such checking (not
7672 true for many modes in development that do both simultaneously); that a
7673 checksum for a message always results in the same value (not true if a
7674 confounder is incorporated); that an initial vector is used (may not be
7675 true if a block cipher in CBC mode is not in use); that the key is a
7676 clever thing to use as the initial vector for CBC mode encryption (not
7677 true @@REF Bellovin paper).
7679 Perhaps one of the more common reasons for directly performing
7680 encryption is direct control over the negotiation and to select a
7681 "sufficiently strong" encryption algorithm (whatever that means in the
7682 context of a given application). While Kerberos directly provides no
7683 facility for negotiating encryption types between the application
7684 client and server, there are other means for accomplishing similar
7685 goals. For example, requesting only "strong" session key types from the
7686 KDC, and assuming that the type actually returned by the KDC will be
7687 understood and supported by the application server.