tech-invite   World Map     

3GPP     Specs     Glossaries     Architecture     IMS     UICC       IETF     RFCs     Groups     SIP     ABNFs       Search

RFC 4120

 
 
 

The Kerberos Network Authentication Service (V5)

Part 3 of 6, p. 42 to 73
Prev RFC Part       Next RFC Part

 


prevText      Top      Up      ToC       Page 42 
3.4.  The KRB_SAFE Exchange

   The KRB_SAFE message MAY be used by clients requiring the ability to
   detect modifications of messages they exchange.  It achieves this by
   including a keyed collision-proof checksum of the user data and some
   control information.  The checksum is keyed with an encryption key
   (usually the last key negotiated via subkeys, or the session key if
   no negotiation has occurred).

3.4.1.  Generation of a KRB_SAFE Message

   When an application wishes to send a KRB_SAFE message, it collects
   its data and the appropriate control information and computes a
   checksum over them.  The checksum algorithm should be the keyed
   checksum mandated to be implemented along with the crypto system used
   for the sub-session or session key.  The checksum is generated using
   the sub-session key, if present, or the session key.  Some
   implementations use a different checksum algorithm for the KRB_SAFE
   messages, but doing so in an interoperable manner is not always
   possible.

   The control information for the KRB_SAFE message includes both a
   timestamp and a sequence number.  The designer of an application

Top      Up      ToC       Page 43 
   using the KRB_SAFE message MUST choose at least one of the two
   mechanisms.  This choice SHOULD be based on the needs of the
   application protocol.

   Sequence numbers are useful when all messages sent will be received
   by one's peer.  Connection state is presently required to maintain
   the session key, so maintaining the next sequence number should not
   present an additional problem.

   If the application protocol is expected to tolerate lost messages
   without their being resent, the use of the timestamp is the
   appropriate replay detection mechanism.  Using timestamps is also the
   appropriate mechanism for multi-cast protocols in which all of one's
   peers share a common sub-session key, but some messages will be sent
   to a subset of one's peers.

   After computing the checksum, the client then transmits the
   information and checksum to the recipient in the message format
   specified in Section 5.6.1.

3.4.2.  Receipt of KRB_SAFE Message

   When an application receives a KRB_SAFE message, it verifies it as
   follows.  If any error occurs, an error code is reported for use by
   the application.

   The message is first checked by verifying that the protocol version
   and type fields match the current version and KRB_SAFE, respectively.
   A mismatch generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE
   error.  The application verifies that the checksum used is a
   collision-proof keyed checksum that uses keys compatible with the
   sub-session or session key as appropriate (or with the application
   key derived from the session or sub-session keys).  If it is not, a
   KRB_AP_ERR_INAPP_CKSUM error is generated.  The sender's address MUST
   be included in the control information; the recipient verifies that
   the operating system's report of the sender's address matches the
   sender's address in the message, and (if a recipient address is
   specified or the recipient requires an address) that one of the
   recipient's addresses appears as the recipient's address in the
   message.  To work with network address translation, senders MAY use
   the directional address type specified in Section 8.1 for the sender
   address and not include recipient addresses.  A failed match for
   either case generates a KRB_AP_ERR_BADADDR error.  Then the timestamp
   and usec and/or the sequence number fields are checked.  If timestamp
   and usec are expected and not present, or if they are present but not
   current, the KRB_AP_ERR_SKEW error is generated.  Timestamps are not
   required to be strictly ordered; they are only required to be in the
   skew window.  If the server name, along with the client name, time,

Top      Up      ToC       Page 44 
   and microsecond fields from the Authenticator match any recently-seen
   (sent or received) such tuples, the KRB_AP_ERR_REPEAT error is
   generated.  If an incorrect sequence number is included, or if a
   sequence number is expected but not present, the KRB_AP_ERR_BADORDER
   error is generated.  If neither a time-stamp and usec nor a sequence
   number is present, a KRB_AP_ERR_MODIFIED error is generated.
   Finally, the checksum is computed over the data and control
   information, and if it doesn't match the received checksum, a
   KRB_AP_ERR_MODIFIED error is generated.

   If all the checks succeed, the application is assured that the
   message was generated by its peer and was not modified in transit.

   Implementations SHOULD accept any checksum algorithm they implement
   that has both adequate security and keys compatible with the sub-
   session or session key.  Unkeyed or non-collision-proof checksums are
   not suitable for this use.

3.5.  The KRB_PRIV Exchange

   The KRB_PRIV message MAY be used by clients requiring confidentiality
   and the ability to detect modifications of exchanged messages.  It
   achieves this by encrypting the messages and adding control
   information.

3.5.1.  Generation of a KRB_PRIV Message

   When an application wishes to send a KRB_PRIV message, it collects
   its data and the appropriate control information (specified in
   Section 5.7.1) and encrypts them under an encryption key (usually the
   last key negotiated via subkeys, or the session key if no negotiation
   has occurred).  As part of the control information, the client MUST
   choose to use either a timestamp or a sequence number (or both); see
   the discussion in Section 3.4.1 for guidelines on which to use.
   After the user data and control information are encrypted, the client
   transmits the ciphertext and some 'envelope' information to the
   recipient.

3.5.2.  Receipt of KRB_PRIV Message

   When an application receives a KRB_PRIV message, it verifies it as
   follows.  If any error occurs, an error code is reported for use by
   the application.

   The message is first checked by verifying that the protocol version
   and type fields match the current version and KRB_PRIV, respectively.
   A mismatch generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE
   error.  The application then decrypts the ciphertext and processes

Top      Up      ToC       Page 45 
   the resultant plaintext.  If decryption shows that the data has been
   modified, a KRB_AP_ERR_BAD_INTEGRITY error is generated.

   The sender's address MUST be included in the control information; the
   recipient verifies that the operating system's report of the sender's
   address matches the sender's address in the message.  If a recipient
   address is specified or the recipient requires an address, then one
   of the recipient's addresses MUST also appear as the recipient's
   address in the message.  Where a sender's or receiver's address might
   not otherwise match the address in a message because of network
   address translation, an application MAY be written to use addresses
   of the directional address type in place of the actual network
   address.

   A failed match for either case generates a KRB_AP_ERR_BADADDR error.
   To work with network address translation, implementations MAY use the
   directional address type defined in Section 7.1 for the sender
   address and include no recipient address.

   Next the timestamp and usec and/or the sequence number fields are
   checked.  If timestamp and usec are expected and not present, or if
   they are present but not current, the KRB_AP_ERR_SKEW error is
   generated.  If the server name, along with the client name, time, and
   microsecond fields from the Authenticator match any such recently-
   seen tuples, the KRB_AP_ERR_REPEAT error is generated.  If an
   incorrect sequence number is included, or if a sequence number is
   expected but not present, the KRB_AP_ERR_BADORDER error is generated.
   If neither a time-stamp and usec nor a sequence number is present, a
   KRB_AP_ERR_MODIFIED error is generated.

   If all the checks succeed, the application can assume the message was
   generated by its peer and was securely transmitted (without intruders
   seeing the unencrypted contents).

3.6.  The KRB_CRED Exchange

   The KRB_CRED message MAY be used by clients requiring the ability to
   send Kerberos credentials from one host to another.  It achieves this
   by sending the tickets together with encrypted data containing the
   session keys and other information associated with the tickets.

3.6.1.  Generation of a KRB_CRED Message

   When an application wishes to send a KRB_CRED message, it first
   (using the KRB_TGS exchange) obtains credentials to be sent to the
   remote host.  It then constructs a KRB_CRED message using the ticket
   or tickets so obtained, placing the session key needed to use each

Top      Up      ToC       Page 46 
   ticket in the key field of the corresponding KrbCredInfo sequence of
   the encrypted part of the KRB_CRED message.

   Other information associated with each ticket and obtained during the
   KRB_TGS exchange is also placed in the corresponding KrbCredInfo
   sequence in the encrypted part of the KRB_CRED message.  The current
   time and, if they are specifically required by the application, the
   nonce, s-address, and r-address fields are placed in the encrypted
   part of the KRB_CRED message, which is then encrypted under an
   encryption key previously exchanged in the KRB_AP exchange (usually
   the last key negotiated via subkeys, or the session key if no
   negotiation has occurred).

   Implementation note: When constructing a KRB_CRED message for
   inclusion in a GSSAPI initial context token, the MIT implementation
   of Kerberos will not encrypt the KRB_CRED message if the session key
   is a DES or triple DES key.  For interoperability with MIT, the
   Microsoft implementation will not encrypt the KRB_CRED in a GSSAPI
   token if it is using a DES session key.  Starting at version 1.2.5,
   MIT Kerberos can receive and decode either encrypted or unencrypted
   KRB_CRED tokens in the GSSAPI exchange.  The Heimdal implementation
   of Kerberos can also accept either encrypted or unencrypted KRB_CRED
   messages.  Since the KRB_CRED message in a GSSAPI token is encrypted
   in the authenticator, the MIT behavior does not present a security
   problem, although it is a violation of the Kerberos specification.

3.6.2.  Receipt of KRB_CRED Message

   When an application receives a KRB_CRED message, it verifies it.  If
   any error occurs, an error code is reported for use by the
   application.  The message is verified by checking that the protocol
   version and type fields match the current version and KRB_CRED,
   respectively.  A mismatch generates a KRB_AP_ERR_BADVERSION or
   KRB_AP_ERR_MSG_TYPE error.  The application then decrypts the
   ciphertext and processes the resultant plaintext.  If decryption
   shows the data to have been modified, a KRB_AP_ERR_BAD_INTEGRITY
   error is generated.

   If present or required, the recipient MAY verify that the operating
   system's report of the sender's address matches the sender's address
   in the message, and that one of the recipient's addresses appears as
   the recipient's address in the message.  The address check does not
   provide any added security, since the address, if present, has
   already been checked in the KRB_AP_REQ message and there is not any
   benefit to be gained by an attacker in reflecting a KRB_CRED message
   back to its originator.  Thus, the recipient MAY ignore the address
   even if it is present in order to work better in Network Address
   Translation (NAT) environments.  A failed match for either case

Top      Up      ToC       Page 47 
   generates a KRB_AP_ERR_BADADDR error.  Recipients MAY skip the
   address check, as the KRB_CRED message cannot generally be reflected
   back to the originator.  The timestamp and usec fields (and the nonce
   field, if required) are checked next.  If the timestamp and usec are
   not present, or if they are present but not current, the
   KRB_AP_ERR_SKEW error is generated.

   If all the checks succeed, the application stores each of the new
   tickets in its credentials cache together with the session key and
   other information in the corresponding KrbCredInfo sequence from the
   encrypted part of the KRB_CRED message.

3.7.  User-to-User Authentication Exchanges

   User-to-User authentication provides a method to perform
   authentication when the verifier does not have a access to long-term
   service key.  This might be the case when running a server (for
   example, a window server) as a user on a workstation.  In such cases,
   the server may have access to the TGT obtained when the user logged
   in to the workstation, but because the server is running as an
   unprivileged user, it might not have access to system keys.  Similar
   situations may arise when running peer-to-peer applications.

                             Summary

       Message direction                    Message type     Sections
       0. Message from application server   Not specified
       1. Client to Kerberos                KRB_TGS_REQ      3.3 & 5.4.1
       2. Kerberos to client                KRB_TGS_REP or   3.3 & 5.4.2
                                            KRB_ERROR        5.9.1
       3. Client to application server      KRB_AP_REQ       3.2 & 5.5.1

   To address this problem, the Kerberos protocol allows the client to
   request that the ticket issued by the KDC be encrypted using a
   session key from a TGT issued to the party that will verify the
   authentication.  This TGT must be obtained from the verifier by means
   of an exchange external to the Kerberos protocol, usually as part of
   the application protocol.  This message is shown in the summary above
   as message 0.  Note that because the TGT is encrypted in the KDC's
   secret key, it cannot be used for authentication without possession
   of the corresponding secret key.  Furthermore, because the verifier
   does not reveal the corresponding secret key, providing a copy of the
   verifier's TGT does not allow impersonation of the verifier.

   Message 0 in the table above represents an application-specific
   negotiation between the client and server, at the end of which both
   have determined that they will use user-to-user authentication, and
   the client has obtained the server's TGT.

Top      Up      ToC       Page 48 
   Next, the client includes the server's TGT as an additional ticket in
   its KRB_TGS_REQ request to the KDC (message 1 in the table above) and
   specifies the ENC-TKT-IN-SKEY option in its request.

   If validated according to the instructions in Section 3.3.3, the
   application ticket returned to the client (message 2 in the table
   above) will be encrypted using the session key from the additional
   ticket and the client will note this when it uses or stores the
   application ticket.

   When contacting the server using a ticket obtained for user-to-user
   authentication (message 3 in the table above), the client MUST
   specify the USE-SESSION-KEY flag in the ap-options field.  This tells
   the application server to use the session key associated with its TGT
   to decrypt the server ticket provided in the application request.

4.  Encryption and Checksum Specifications

   The Kerberos protocols described in this document are designed to
   encrypt messages of arbitrary sizes, using stream or block encryption
   ciphers.  Encryption is used to prove the identities of the network
   entities participating in message exchanges.  The Key Distribution
   Center for each realm is trusted by all principals registered in that
   realm to store a secret key in confidence.  Proof of knowledge of
   this secret key is used to verify the authenticity of a principal.

   The KDC uses the principal's secret key (in the AS exchange) or a
   shared session key (in the TGS exchange) to encrypt responses to
   ticket requests; the ability to obtain the secret key or session key
   implies the knowledge of the appropriate keys and the identity of the
   KDC.  The ability of a principal to decrypt the KDC response and to
   present a Ticket and a properly formed Authenticator (generated with
   the session key from the KDC response) to a service verifies the
   identity of the principal; likewise the ability of the service to
   extract the session key from the Ticket and to prove its knowledge
   thereof in a response verifies the identity of the service.

   [RFC3961] defines a framework for defining encryption and checksum
   mechanisms for use with Kerberos.  It also defines several such
   mechanisms, and more may be added in future updates to that document.

   The string-to-key operation provided by [RFC3961] is used to produce
   a long-term key for a principal (generally for a user).  The default
   salt string, if none is provided via pre-authentication data, is the
   concatenation of the principal's realm and name components, in order,
   with no separators.  Unless it is indicated otherwise, the default
   string-to-key opaque parameter set as defined in [RFC3961] is used.

Top      Up      ToC       Page 49 
   Encrypted data, keys, and checksums are transmitted using the
   EncryptedData, EncryptionKey, and Checksum data objects defined in
   Section 5.2.9.  The encryption, decryption, and checksum operations
   described in this document use the corresponding encryption,
   decryption, and get_mic operations described in [RFC3961], with
   implicit "specific key" generation using the "key usage" values
   specified in the description of each EncryptedData or Checksum object
   to vary the key for each operation.  Note that in some cases, the
   value to be used is dependent on the method of choosing the key or
   the context of the message.

   Key usages are unsigned 32-bit integers; zero is not permitted.  The
   key usage values for encrypting or checksumming Kerberos messages are
   indicated in Section 5 along with the message definitions.  The key
   usage values 512-1023 are reserved for uses internal to a Kerberos
   implementation.  (For example, seeding a pseudo-random number
   generator with a value produced by encrypting something with a
   session key and a key usage value not used for any other purpose.)
   Key usage values between 1024 and 2047 (inclusive) are reserved for
   application use; applications SHOULD use even values for encryption
   and odd values for checksums within this range.  Key usage values are
   also summarized in a table in Section 7.5.1.

   There might exist other documents that define protocols in terms of
   the RFC 1510 encryption types or checksum types.  These documents
   would not know about key usages.  In order that these specifications
   continue to be meaningful until they are updated, if no key usage
   values are specified, then key usages 1024 and 1025 must be used to
   derive keys for encryption and checksums, respectively.  (This does
   not apply to protocols that do their own encryption independent of
   this framework, by directly using the key resulting from the Kerberos
   authentication exchange.)  New protocols defined in terms of the
   Kerberos encryption and checksum types SHOULD use their own key usage
   values.

   Unless it is indicated otherwise, no cipher state chaining is done
   from one encryption operation to another.

   Implementation note: Although it is not recommended, some application
   protocols will continue to use the key data directly, even if only in
   currently existing protocol specifications.  An implementation
   intended to support general Kerberos applications may therefore need
   to make key data available, as well as the attributes and operations
   described in [RFC3961].  One of the more common reasons for directly
   performing encryption is direct control over negotiation and
   selection of a "sufficiently strong" encryption algorithm (in the
   context of a given application).  Although Kerberos does not directly
   provide a facility for negotiating encryption types between the

Top      Up      ToC       Page 50 
   application client and server, there are approaches for using
   Kerberos to facilitate this negotiation.  For example, a client may
   request only "sufficiently strong" session key types from the KDC and
   expect that any type returned by the KDC will be understood and
   supported by the application server.

5.  Message Specifications

   The ASN.1 collected here should be identical to the contents of
   Appendix A.  In the case of a conflict, the contents of Appendix A
   shall take precedence.

   The Kerberos protocol is defined here in terms of Abstract Syntax
   Notation One (ASN.1) [X680], which provides a syntax for specifying
   both the abstract layout of protocol messages as well as their
   encodings.  Implementors not utilizing an existing ASN.1 compiler or
   support library are cautioned to understand the actual ASN.1
   specification thoroughly in order to ensure correct implementation
   behavior.  There is more complexity in the notation than is
   immediately obvious, and some tutorials and guides to ASN.1 are
   misleading or erroneous.

   Note that in several places, changes to abstract types from RFC 1510
   have been made.  This is in part to address widespread assumptions
   that various implementors have made, in some cases resulting in
   unintentional violations of the ASN.1 standard.  These are clearly
   flagged where they occur.  The differences between the abstract types
   in RFC 1510 and abstract types in this document can cause
   incompatible encodings to be emitted when certain encoding rules,
   e.g., the Packed Encoding Rules (PER), are used.  This theoretical
   incompatibility should not be relevant for Kerberos, since Kerberos
   explicitly specifies the use of the Distinguished Encoding Rules
   (DER).  It might be an issue for protocols seeking to use Kerberos
   types with other encoding rules.  (This practice is not recommended.)
   With very few exceptions (most notably the usages of BIT STRING), the
   encodings resulting from using the DER remain identical between the
   types defined in RFC 1510 and the types defined in this document.

   The type definitions in this section assume an ASN.1 module
   definition of the following form:

Top      Up      ToC       Page 51 
   KerberosV5Spec2 {
           iso(1) identified-organization(3) dod(6) internet(1)
           security(5) kerberosV5(2) modules(4) krb5spec2(2)
   } DEFINITIONS EXPLICIT TAGS ::= BEGIN

   -- rest of definitions here

   END

   This specifies that the tagging context for the module will be
   explicit and non-automatic.

   Note that in some other publications (such as [RFC1510] and
   [RFC1964]), the "dod" portion of the object identifier is erroneously
   specified as having the value "5".  In the case of RFC 1964, use of
   the "correct" OID value would result in a change in the wire
   protocol; therefore, it remains unchanged for now.

   Note that elsewhere in this document, nomenclature for various
   message types is inconsistent, but it largely follows C language
   conventions, including use of underscore (_) characters and all-caps
   spelling of names intended to be numeric constants.  Also, in some
   places, identifiers (especially those referring to constants) are
   written in all-caps in order to distinguish them from surrounding
   explanatory text.

   The ASN.1 notation does not permit underscores in identifiers, so in
   actual ASN.1 definitions, underscores are replaced with hyphens (-).
   Additionally, structure member names and defined values in ASN.1 MUST
   begin with a lowercase letter, whereas type names MUST begin with an
   uppercase letter.

5.1.  Specific Compatibility Notes on ASN.1

   For compatibility purposes, implementors should heed the following
   specific notes regarding the use of ASN.1 in Kerberos.  These notes
   do not describe deviations from standard usage of ASN.1.  The purpose
   of these notes is instead to describe some historical quirks and
   non-compliance of various implementations, as well as historical
   ambiguities, which, although they are valid ASN.1, can lead to
   confusion during implementation.

5.1.1.  ASN.1 Distinguished Encoding Rules

   The encoding of Kerberos protocol messages shall obey the
   Distinguished Encoding Rules (DER) of ASN.1 as described in [X690].
   Some implementations (believed primarily to be those derived from DCE
   1.1 and earlier) are known to use the more general Basic Encoding

Top      Up      ToC       Page 52 
   Rules (BER); in particular, these implementations send indefinite
   encodings of lengths.  Implementations MAY accept such encodings in
   the interest of backward compatibility, though implementors are
   warned that decoding fully-general BER is fraught with peril.

5.1.2.  Optional Integer Fields

   Some implementations do not internally distinguish between an omitted
   optional integer value and a transmitted value of zero.  The places
   in the protocol where this is relevant include various microseconds
   fields, nonces, and sequence numbers.  Implementations SHOULD treat
   omitted optional integer values as having been transmitted with a
   value of zero, if the application is expecting this.

5.1.3.  Empty SEQUENCE OF Types

   There are places in the protocol where a message contains a SEQUENCE
   OF type as an optional member.  This can result in an encoding that
   contains an empty SEQUENCE OF encoding.  The Kerberos protocol does
   not semantically distinguish between an absent optional SEQUENCE OF
   type and a present optional but empty SEQUENCE OF type.
   Implementations SHOULD NOT send empty SEQUENCE OF encodings that are
   marked OPTIONAL, but SHOULD accept them as being equivalent to an
   omitted OPTIONAL type.  In the ASN.1 syntax describing Kerberos
   messages, instances of these problematic optional SEQUENCE OF types
   are indicated with a comment.

5.1.4.  Unrecognized Tag Numbers

   Future revisions to this protocol may include new message types with
   different APPLICATION class tag numbers.  Such revisions should
   protect older implementations by only sending the message types to
   parties that are known to understand them; e.g., by means of a flag
   bit set by the receiver in a preceding request.  In the interest of
   robust error handling, implementations SHOULD gracefully handle
   receiving a message with an unrecognized tag anyway, and return an
   error message, if appropriate.

   In particular, KDCs SHOULD return KRB_AP_ERR_MSG_TYPE if the
   incorrect tag is sent over a TCP transport.  The KDCs SHOULD NOT
   respond to messages received with an unknown tag over UDP transport
   in order to avoid denial of service attacks.  For non-KDC
   applications, the Kerberos implementation typically indicates an
   error to the application which takes appropriate steps based on the
   application protocol.

Top      Up      ToC       Page 53 
5.1.5.  Tag Numbers Greater Than 30

   A naive implementation of a DER ASN.1 decoder may experience problems
   with ASN.1 tag numbers greater than 30, due to such tag numbers being
   encoded using more than one byte.  Future revisions of this protocol
   may utilize tag numbers greater than 30, and implementations SHOULD
   be prepared to gracefully return an error, if appropriate, when they
   do not recognize the tag.

5.2.  Basic Kerberos Types

   This section defines a number of basic types that are potentially
   used in multiple Kerberos protocol messages.

5.2.1.  KerberosString

   The original specification of the Kerberos protocol in RFC 1510 uses
   GeneralString in numerous places for human-readable string data.
   Historical implementations of Kerberos cannot utilize the full power
   of GeneralString.  This ASN.1 type requires the use of designation
   and invocation escape sequences as specified in ISO-2022/ECMA-35
   [ISO-2022/ECMA-35] to switch character sets, and the default
   character set that is designated as G0 is the ISO-646/ECMA-6
   [ISO-646/ECMA-6] International Reference Version (IRV) (a.k.a. U.S.
   ASCII), which mostly works.

   ISO-2022/ECMA-35 defines four character-set code elements (G0..G3)
   and two Control-function code elements (C0..C1).  DER prohibits the
   designation of character sets as any but the G0 and C0 sets.
   Unfortunately, this seems to have the side effect of prohibiting the
   use of ISO-8859 (ISO Latin) [ISO-8859] character sets or any other
   character sets that utilize a 96-character set, as ISO-2022/ECMA-35
   prohibits designating them as the G0 code element.  This side effect
   is being investigated in the ASN.1 standards community.

   In practice, many implementations treat GeneralStrings as if they
   were 8-bit strings of whichever character set the implementation
   defaults to, without regard to correct usage of character-set
   designation escape sequences.  The default character set is often
   determined by the current user's operating system-dependent locale.
   At least one major implementation places unescaped UTF-8 encoded
   Unicode characters in the GeneralString.  This failure to adhere to
   the GeneralString specifications results in interoperability issues
   when conflicting character encodings are utilized by the Kerberos
   clients, services, and KDC.

Top      Up      ToC       Page 54 
   This unfortunate situation is the result of improper documentation of
   the restrictions of the ASN.1 GeneralString type in prior Kerberos
   specifications.

   The new (post-RFC 1510) type KerberosString, defined below, is a
   GeneralString that is constrained to contain only characters in
   IA5String.

      KerberosString  ::= GeneralString (IA5String)

   In general, US-ASCII control characters should not be used in
   KerberosString.  Control characters SHOULD NOT be used in principal
   names or realm names.

   For compatibility, implementations MAY choose to accept GeneralString
   values that contain characters other than those permitted by
   IA5String, but they should be aware that character set designation
   codes will likely be absent, and that the encoding should probably be
   treated as locale-specific in almost every way.  Implementations MAY
   also choose to emit GeneralString values that are beyond those
   permitted by IA5String, but they should be aware that doing so is
   extraordinarily risky from an interoperability perspective.

   Some existing implementations use GeneralString to encode unescaped
   locale-specific characters.  This is a violation of the ASN.1
   standard.  Most of these implementations encode US-ASCII in the
   left-hand half, so as long as the implementation transmits only
   US-ASCII, the ASN.1 standard is not violated in this regard.  As soon
   as such an implementation encodes unescaped locale-specific
   characters with the high bit set, it violates the ASN.1 standard.

   Other implementations have been known to use GeneralString to contain
   a UTF-8 encoding.  This also violates the ASN.1 standard, since UTF-8
   is a different encoding, not a 94 or 96 character "G" set as defined
   by ISO 2022.  It is believed that these implementations do not even
   use the ISO 2022 escape sequence to change the character encoding.
   Even if implementations were to announce the encoding change by using
   that escape sequence, the ASN.1 standard prohibits the use of any
   escape sequences other than those used to designate/invoke "G" or "C"
   sets allowed by GeneralString.

   Future revisions to this protocol will almost certainly allow for a
   more interoperable representation of principal names, probably
   including UTF8String.

   Note that applying a new constraint to a previously unconstrained
   type constitutes creation of a new ASN.1 type.  In this particular
   case, the change does not result in a changed encoding under DER.

Top      Up      ToC       Page 55 
5.2.2.  Realm and PrincipalName

   Realm           ::= KerberosString

   PrincipalName   ::= SEQUENCE {
           name-type       [0] Int32,
           name-string     [1] SEQUENCE OF KerberosString
   }

   Kerberos realm names are encoded as KerberosStrings.  Realms shall
   not contain a character with the code 0 (the US-ASCII NUL).  Most
   realms will usually consist of several components separated by
   periods (.), in the style of Internet Domain Names, or separated by
   slashes (/), in the style of X.500 names.  Acceptable forms for realm
   names are specified in Section 6.1.  A PrincipalName is a typed
   sequence of components consisting of the following subfields:

   name-type
      This field specifies the type of name that follows.  Pre-defined
      values for this field are specified in Section 6.2.  The name-type
      SHOULD be treated as a hint.  Ignoring the name type, no two names
      can be the same (i.e., at least one of the components, or the
      realm, must be different).

   name-string
      This field encodes a sequence of components that form a name, each
      component encoded as a KerberosString.  Taken together, a
      PrincipalName and a Realm form a principal identifier.  Most
      PrincipalNames will have only a few components (typically one or
      two).

5.2.3.  KerberosTime

   KerberosTime    ::= GeneralizedTime -- with no fractional seconds

   The timestamps used in Kerberos are encoded as GeneralizedTimes.  A
   KerberosTime value shall not include any fractional portions of the
   seconds.  As required by the DER, it further shall not include any
   separators, and it shall specify the UTC time zone (Z).  Example: The
   only valid format for UTC time 6 minutes, 27 seconds after 9 pm on 6
   November 1985 is 19851106210627Z.

5.2.4.  Constrained Integer Types

   Some integer members of types SHOULD be constrained to values
   representable in 32 bits, for compatibility with reasonable
   implementation limits.

Top      Up      ToC       Page 56 
   Int32           ::= INTEGER (-2147483648..2147483647)
                       -- signed values representable in 32 bits

   UInt32          ::= INTEGER (0..4294967295)
                       -- unsigned 32 bit values

   Microseconds    ::= INTEGER (0..999999)
                       -- microseconds

   Although this results in changes to the abstract types from the RFC
   1510 version, the encoding in DER should be unaltered.  Historical
   implementations were typically limited to 32-bit integer values
   anyway, and assigned numbers SHOULD fall in the space of integer
   values representable in 32 bits in order to promote interoperability
   anyway.

   Several integer fields in messages are constrained to fixed values.

   pvno
      also TKT-VNO or AUTHENTICATOR-VNO, this recurring field is always
      the constant integer 5.  There is no easy way to make this field
      into a useful protocol version number, so its value is fixed.

   msg-type
      this integer field is usually identical to the application tag
      number of the containing message type.

5.2.5.  HostAddress and HostAddresses

   HostAddress     ::= SEQUENCE  {
           addr-type       [0] Int32,
           address         [1] OCTET STRING
   }

   -- NOTE: HostAddresses is always used as an OPTIONAL field and
   -- should not be empty.
   HostAddresses   -- NOTE: subtly different from rfc1510,
                   -- but has a value mapping and encodes the same
           ::= SEQUENCE OF HostAddress

   The host address encodings consist of two fields:

   addr-type
      This field specifies the type of address that follows.  Pre-
      defined values for this field are specified in Section 7.5.3.

   address
      This field encodes a single address of type addr-type.

Top      Up      ToC       Page 57 
5.2.6.  AuthorizationData

      -- NOTE: AuthorizationData is always used as an OPTIONAL field and
      -- should not be empty.
      AuthorizationData       ::= SEQUENCE OF SEQUENCE {
              ad-type         [0] Int32,
              ad-data         [1] OCTET STRING
      }

   ad-data
      This field contains authorization data to be interpreted according
      to the value of the corresponding ad-type field.

   ad-type
      This field specifies the format for the ad-data subfield.  All
      negative values are reserved for local use.  Non-negative values
      are reserved for registered use.

   Each sequence of type and data is referred to as an authorization
   element.  Elements MAY be application specific; however, there is a
   common set of recursive elements that should be understood by all
   implementations.  These elements contain other elements embedded
   within them, and the interpretation of the encapsulating element
   determines which of the embedded elements must be interpreted, and
   which may be ignored.

   These common authorization data elements are recursively defined,
   meaning that the ad-data for these types will itself contain a
   sequence of authorization data whose interpretation is affected by
   the encapsulating element.  Depending on the meaning of the
   encapsulating element, the encapsulated elements may be ignored,
   might be interpreted as issued directly by the KDC, or might be
   stored in a separate plaintext part of the ticket.  The types of the
   encapsulating elements are specified as part of the Kerberos
   specification because the behavior based on these values should be
   understood across implementations, whereas other elements need only
   be understood by the applications that they affect.

   Authorization data elements are considered critical if present in a
   ticket or authenticator.  If an unknown authorization data element
   type is received by a server either in an AP-REQ or in a ticket
   contained in an AP-REQ, then, unless it is encapsulated in a known
   authorization data element amending the criticality of the elements
   it contains, authentication MUST fail.  Authorization data is
   intended to restrict the use of a ticket.  If the service cannot
   determine whether the restriction applies to that service, then a

Top      Up      ToC       Page 58 
   security weakness may result if the ticket can be used for that
   service.  Authorization elements that are optional can be enclosed in
   an AD-IF-RELEVANT element.

   In the definitions that follow, the value of the ad-type for the
   element will be specified as the least significant part of the
   subsection number, and the value of the ad-data will be as shown in
   the ASN.1 structure that follows the subsection heading.

   Contents of ad-data                ad-type

   DER encoding of AD-IF-RELEVANT        1

   DER encoding of AD-KDCIssued          4

   DER encoding of AD-AND-OR             5

   DER encoding of AD-MANDATORY-FOR-KDC  8

5.2.6.1.  IF-RELEVANT

   AD-IF-RELEVANT          ::= AuthorizationData

   AD elements encapsulated within the if-relevant element are intended
   for interpretation only by application servers that understand the
   particular ad-type of the embedded element.  Application servers that
   do not understand the type of an element embedded within the
   if-relevant element MAY ignore the uninterpretable element.  This
   element promotes interoperability across implementations that may
   have local extensions for authorization.  The ad-type for
   AD-IF-RELEVANT is (1).

5.2.6.2.  KDCIssued

   AD-KDCIssued            ::= SEQUENCE {
           ad-checksum     [0] Checksum,
           i-realm         [1] Realm OPTIONAL,
           i-sname         [2] PrincipalName OPTIONAL,
           elements        [3] AuthorizationData
   }

   ad-checksum
      A cryptographic checksum computed over the DER encoding of the
      AuthorizationData in the "elements" field, keyed with the session
      key.  Its checksumtype is the mandatory checksum type for the
      encryption type of the session key, and its key usage value is 19.

Top      Up      ToC       Page 59 
   i-realm, i-sname
      The name of the issuing principal if different from that of the
      KDC itself.  This field would be used when the KDC can verify the
      authenticity of elements signed by the issuing principal, and it
      allows this KDC to notify the application server of the validity
      of those elements.

   elements
      A sequence of authorization data elements issued by the KDC.

   The KDC-issued ad-data field is intended to provide a means for
   Kerberos principal credentials to embed within themselves privilege
   attributes and other mechanisms for positive authorization,
   amplifying the privileges of the principal beyond what can be done
   using credentials without such an a-data element.

   The above means cannot be provided without this element because the
   definition of the authorization-data field allows elements to be
   added at will by the bearer of a TGT at the time when they request
   service tickets, and elements may also be added to a delegated ticket
   by inclusion in the authenticator.

   For KDC-issued elements, this is prevented because the elements are
   signed by the KDC by including a checksum encrypted using the
   server's key (the same key used to encrypt the ticket or a key
   derived from that key).  Elements encapsulated with in the KDC-issued
   element MUST be ignored by the application server if this "signature"
   is not present.  Further, elements encapsulated within this element
   from a TGT MAY be interpreted by the KDC, and used as a basis
   according to policy for including new signed elements within
   derivative tickets, but they will not be copied to a derivative
   ticket directly.  If they are copied directly to a derivative ticket
   by a KDC that is not aware of this element, the signature will not be
   correct for the application ticket elements, and the field will be
   ignored by the application server.

   This element and the elements it encapsulates MAY safely be ignored
   by applications, application servers, and KDCs that do not implement
   this element.

   The ad-type for AD-KDC-ISSUED is (4).

5.2.6.3.  AND-OR

   AD-AND-OR               ::= SEQUENCE {
           condition-count [0] Int32,
           elements        [1] AuthorizationData
   }

Top      Up      ToC       Page 60 
   When restrictive AD elements are encapsulated within the and-or
   element, the and-or element is considered satisfied if and only if at
   least the number of encapsulated elements specified in condition-
   count are satisfied.  Therefore, this element MAY be used to
   implement an "or" operation by setting the condition-count field to
   1, and it MAY specify an "and" operation by setting the condition
   count to the number of embedded elements.  Application servers that
   do not implement this element MUST reject tickets that contain
   authorization data elements of this type.

   The ad-type for AD-AND-OR is (5).

5.2.6.4.  MANDATORY-FOR-KDC

   AD-MANDATORY-FOR-KDC    ::= AuthorizationData

   AD elements encapsulated within the mandatory-for-kdc element are to
   be interpreted by the KDC.  KDCs that do not understand the type of
   an element embedded within the mandatory-for-kdc element MUST reject
   the request.

   The ad-type for AD-MANDATORY-FOR-KDC is (8).

5.2.7.  PA-DATA

   Historically, PA-DATA have been known as "pre-authentication data",
   meaning that they were used to augment the initial authentication
   with the KDC.  Since that time, they have also been used as a typed
   hole with which to extend protocol exchanges with the KDC.

   PA-DATA         ::= SEQUENCE {
           -- NOTE: first tag is [1], not [0]
           padata-type     [1] Int32,
           padata-value    [2] OCTET STRING -- might be encoded AP-REQ
   }

   padata-type
      Indicates the way that the padata-value element is to be
      interpreted.  Negative values of padata-type are reserved for
      unregistered use; non-negative values are used for a registered
      interpretation of the element type.

   padata-value
      Usually contains the DER encoding of another type; the padata-type
      field identifies which type is encoded here.

Top      Up      ToC       Page 61 
      padata-type  Name             Contents of padata-value

      1            pa-tgs-req       DER encoding of AP-REQ

      2            pa-enc-timestamp DER encoding of PA-ENC-TIMESTAMP

      3            pa-pw-salt       salt (not ASN.1 encoded)

      11           pa-etype-info    DER encoding of ETYPE-INFO

      19           pa-etype-info2   DER encoding of ETYPE-INFO2

      This field MAY also contain information needed by certain
      extensions to the Kerberos protocol.  For example, it might be
      used to verify the identity of a client initially before any
      response is returned.

      The padata field can also contain information needed to help the
      KDC or the client select the key needed for generating or
      decrypting the response.  This form of the padata is useful for
      supporting the use of certain token cards with Kerberos.  The
      details of such extensions are specified in separate documents.
      See [Pat92] for additional uses of this field.

5.2.7.1.  PA-TGS-REQ

   In the case of requests for additional tickets (KRB_TGS_REQ),
   padata-value will contain an encoded AP-REQ.  The checksum in the
   authenticator (which MUST be collision-proof) is to be computed over
   the KDC-REQ-BODY encoding.

5.2.7.2.  Encrypted Timestamp Pre-authentication

   There are pre-authentication types that may be used to pre-
   authenticate a client by means of an encrypted timestamp.

   PA-ENC-TIMESTAMP        ::= EncryptedData -- PA-ENC-TS-ENC

   PA-ENC-TS-ENC           ::= SEQUENCE {
           patimestamp     [0] KerberosTime -- client's time --,
           pausec          [1] Microseconds OPTIONAL
   }

   Patimestamp contains the client's time, and pausec contains the
   microseconds, which MAY be omitted if a client will not generate more
   than one request per second.  The ciphertext (padata-value) consists
   of the PA-ENC-TS-ENC encoding, encrypted using the client's secret
   key and a key usage value of 1.

Top      Up      ToC       Page 62 
   This pre-authentication type was not present in RFC 1510, but many
   implementations support it.

5.2.7.3.  PA-PW-SALT

   The padata-value for this pre-authentication type contains the salt
   for the string-to-key to be used by the client to obtain the key for
   decrypting the encrypted part of an AS-REP message.  Unfortunately,
   for historical reasons, the character set to be used is unspecified
   and probably locale-specific.

   This pre-authentication type was not present in RFC 1510, but many
   implementations support it.  It is necessary in any case where the
   salt for the string-to-key algorithm is not the default.

   In the trivial example, a zero-length salt string is very commonplace
   for realms that have converted their principal databases from
   Kerberos Version 4.

   A KDC SHOULD NOT send PA-PW-SALT when issuing a KRB-ERROR message
   that requests additional pre-authentication.  Implementation note:
   Some KDC implementations issue an erroneous PA-PW-SALT when issuing a
   KRB-ERROR message that requests additional pre-authentication.
   Therefore, clients SHOULD ignore a PA-PW-SALT accompanying a
   KRB-ERROR message that requests additional pre-authentication.  As
   noted in section 3.1.3, a KDC MUST NOT send PA-PW-SALT when the
   client's AS-REQ includes at least one "newer" etype.

5.2.7.4.  PA-ETYPE-INFO

   The ETYPE-INFO pre-authentication type is sent by the KDC in a
   KRB-ERROR indicating a requirement for additional pre-authentication.
   It is usually used to notify a client of which key to use for the
   encryption of an encrypted timestamp for the purposes of sending a
   PA-ENC-TIMESTAMP pre-authentication value.  It MAY also be sent in an
   AS-REP to provide information to the client about which key salt to
   use for the string-to-key to be used by the client to obtain the key
   for decrypting the encrypted part the AS-REP.

   ETYPE-INFO-ENTRY        ::= SEQUENCE {
           etype           [0] Int32,
           salt            [1] OCTET STRING OPTIONAL
   }

   ETYPE-INFO              ::= SEQUENCE OF ETYPE-INFO-ENTRY

   The salt, like that of PA-PW-SALT, is also completely unspecified
   with respect to character set and is probably locale-specific.

Top      Up      ToC       Page 63 
   If ETYPE-INFO is sent in an AS-REP, there shall be exactly one
   ETYPE-INFO-ENTRY, and its etype shall match that of the enc-part in
   the AS-REP.

   This pre-authentication type was not present in RFC 1510, but many
   implementations that support encrypted timestamps for pre-
   authentication need to support ETYPE-INFO as well.  As noted in
   Section 3.1.3, a KDC MUST NOT send PA-ETYPE-INFO when the client's
   AS-REQ includes at least one "newer" etype.

5.2.7.5.  PA-ETYPE-INFO2

   The ETYPE-INFO2 pre-authentication type is sent by the KDC in a
   KRB-ERROR indicating a requirement for additional pre-authentication.
   It is usually used to notify a client of which key to use for the
   encryption of an encrypted timestamp for the purposes of sending a
   PA-ENC-TIMESTAMP pre-authentication value.  It MAY also be sent in an
   AS-REP to provide information to the client about which key salt to
   use for the string-to-key to be used by the client to obtain the key
   for decrypting the encrypted part the AS-REP.

ETYPE-INFO2-ENTRY       ::= SEQUENCE {
        etype           [0] Int32,
        salt            [1] KerberosString OPTIONAL,
        s2kparams       [2] OCTET STRING OPTIONAL
}

ETYPE-INFO2              ::= SEQUENCE SIZE (1..MAX) OF ETYPE-INFO2-ENTRY

   The type of the salt is KerberosString, but existing installations
   might have locale-specific characters stored in salt strings, and
   implementors MAY choose to handle them.

   The interpretation of s2kparams is specified in the cryptosystem
   description associated with the etype.  Each cryptosystem has a
   default interpretation of s2kparams that will hold if that element is
   omitted from the encoding of ETYPE-INFO2-ENTRY.

   If ETYPE-INFO2 is sent in an AS-REP, there shall be exactly one
   ETYPE-INFO2-ENTRY, and its etype shall match that of the enc-part in
   the AS-REP.

   The preferred ordering of the "hint" pre-authentication data that
   affect client key selection is: ETYPE-INFO2, followed by ETYPE-INFO,
   followed by PW-SALT.  As noted in Section 3.1.3, a KDC MUST NOT send
   ETYPE-INFO or PW-SALT when the client's AS-REQ includes at least one
   "newer" etype.

Top      Up      ToC       Page 64 
   The ETYPE-INFO2 pre-authentication type was not present in RFC 1510.

5.2.8.  KerberosFlags

   For several message types, a specific constrained bit string type,
   KerberosFlags, is used.

   KerberosFlags   ::= BIT STRING (SIZE (32..MAX))
                       -- minimum number of bits shall be sent,
                       -- but no fewer than 32

   Compatibility note: The following paragraphs describe a change from
   the RFC 1510 description of bit strings that would result in
   incompatility in the case of an implementation that strictly
   conformed to ASN.1 DER and RFC 1510.

   ASN.1 bit strings have multiple uses.  The simplest use of a bit
   string is to contain a vector of bits, with no particular meaning
   attached to individual bits.  This vector of bits is not necessarily
   a multiple of eight bits long.  The use in Kerberos of a bit string
   as a compact boolean vector wherein each element has a distinct
   meaning poses some problems.  The natural notation for a compact
   boolean vector is the ASN.1 "NamedBit" notation, and the DER require
   that encodings of a bit string using "NamedBit" notation exclude any
   trailing zero bits.  This truncation is easy to neglect, especially
   given C language implementations that naturally choose to store
   boolean vectors as 32-bit integers.

   For example, if the notation for KDCOptions were to include the
   "NamedBit" notation, as in RFC 1510, and a KDCOptions value to be
   encoded had only the "forwardable" (bit number one) bit set, the DER
   encoding MUST include only two bits: the first reserved bit
   ("reserved", bit number zero, value zero) and the one-valued bit (bit
   number one) for "forwardable".

   Most existing implementations of Kerberos unconditionally send 32
   bits on the wire when encoding bit strings used as boolean vectors.
   This behavior violates the ASN.1 syntax used for flag values in RFC
   1510, but it occurs on such a widely installed base that the protocol
   description is being modified to accommodate it.

   Consequently, this document removes the "NamedBit" notations for
   individual bits, relegating them to comments.  The size constraint on
   the KerberosFlags type requires that at least 32 bits be encoded at
   all times, though a lenient implementation MAY choose to accept fewer
   than 32 bits and to treat the missing bits as set to zero.

Top      Up      ToC       Page 65 
   Currently, no uses of KerberosFlags specify more than 32 bits' worth
   of flags, although future revisions of this document may do so.  When
   more than 32 bits are to be transmitted in a KerberosFlags value,
   future revisions to this document will likely specify that the
   smallest number of bits needed to encode the highest-numbered one-
   valued bit should be sent.  This is somewhat similar to the DER
   encoding of a bit string that is declared with the "NamedBit"
   notation.

5.2.9.  Cryptosystem-Related Types

   Many Kerberos protocol messages contain an EncryptedData as a
   container for arbitrary encrypted data, which is often the encrypted
   encoding of another data type.  Fields within EncryptedData assist
   the recipient in selecting a key with which to decrypt the enclosed
   data.

   EncryptedData   ::= SEQUENCE {
           etype   [0] Int32 -- EncryptionType --,
           kvno    [1] UInt32 OPTIONAL,
           cipher  [2] OCTET STRING -- ciphertext
   }

   etype
      This field identifies which encryption algorithm was used to
      encipher the cipher.

   kvno
      This field contains the version number of the key under which data
      is encrypted.  It is only present in messages encrypted under long
      lasting keys, such as principals' secret keys.

   cipher
      This field contains the enciphered text, encoded as an OCTET
      STRING.  (Note that the encryption mechanisms defined in [RFC3961]
      MUST incorporate integrity protection as well, so no additional
      checksum is required.)

   The EncryptionKey type is the means by which cryptographic keys used
   for encryption are transferred.

   EncryptionKey   ::= SEQUENCE {
           keytype         [0] Int32 -- actually encryption type --,
           keyvalue        [1] OCTET STRING
   }

Top      Up      ToC       Page 66 
   keytype
      This field specifies the encryption type of the encryption key
      that follows in the keyvalue field.  Although its name is
      "keytype", it actually specifies an encryption type.  Previously,
      multiple cryptosystems that performed encryption differently but
      were capable of using keys with the same characteristics were
      permitted to share an assigned number to designate the type of
      key; this usage is now deprecated.

   keyvalue
      This field contains the key itself, encoded as an octet string.

   Messages containing cleartext data to be authenticated will usually
   do so by using a member of type Checksum.  Most instances of Checksum
   use a keyed hash, though exceptions will be noted.

   Checksum        ::= SEQUENCE {
           cksumtype       [0] Int32,
           checksum        [1] OCTET STRING
   }

   cksumtype
      This field indicates the algorithm used to generate the
      accompanying checksum.

   checksum
      This field contains the checksum itself, encoded as an octet
      string.

   See Section 4 for a brief description of the use of encryption and
   checksums in Kerberos.

5.3.  Tickets

   This section describes the format and encryption parameters for
   tickets and authenticators.  When a ticket or authenticator is
   included in a protocol message, it is treated as an opaque object.  A
   ticket is a record that helps a client authenticate to a service.  A
   Ticket contains the following information:

   Ticket          ::= [APPLICATION 1] SEQUENCE {
           tkt-vno         [0] INTEGER (5),
           realm           [1] Realm,
           sname           [2] PrincipalName,
           enc-part        [3] EncryptedData -- EncTicketPart
   }

   -- Encrypted part of ticket

Top      Up      ToC       Page 67 
   EncTicketPart   ::= [APPLICATION 3] SEQUENCE {
           flags                   [0] TicketFlags,
           key                     [1] EncryptionKey,
           crealm                  [2] Realm,
           cname                   [3] PrincipalName,
           transited               [4] TransitedEncoding,
           authtime                [5] KerberosTime,
           starttime               [6] KerberosTime OPTIONAL,
           endtime                 [7] KerberosTime,
           renew-till              [8] KerberosTime OPTIONAL,
           caddr                   [9] HostAddresses OPTIONAL,
           authorization-data      [10] AuthorizationData OPTIONAL
   }

   -- encoded Transited field
   TransitedEncoding       ::= SEQUENCE {
           tr-type         [0] Int32 -- must be registered --,
           contents        [1] OCTET STRING
   }

   TicketFlags     ::= KerberosFlags
           -- reserved(0),
           -- forwardable(1),
           -- forwarded(2),
           -- proxiable(3),
           -- proxy(4),
           -- may-postdate(5),
           -- postdated(6),
           -- invalid(7),
           -- renewable(8),
           -- initial(9),
           -- pre-authent(10),
           -- hw-authent(11),
   -- the following are new since 1510
           -- transited-policy-checked(12),
           -- ok-as-delegate(13)

   tkt-vno
      This field specifies the version number for the ticket format.
      This document describes version number 5.

   realm
      This field specifies the realm that issued a ticket.  It also
      serves to identify the realm part of the server's principal
      identifier.  Since a Kerberos server can only issue tickets for
      servers within its realm, the two will always be identical.

Top      Up      ToC       Page 68 
   sname
      This field specifies all components of the name part of the
      server's identity, including those parts that identify a specific
      instance of a service.

   enc-part
      This field holds the encrypted encoding of the EncTicketPart
      sequence.  It is encrypted in the key shared by Kerberos and the
      end server (the server's secret key), using a key usage value of
      2.

   flags
      This field indicates which of various options were used or
      requested when the ticket was issued.  The meanings of the flags
      are as follows:

   Bit(s)  Name             Description

   0       reserved         Reserved for future expansion of this field.

   1       forwardable      The FORWARDABLE flag is normally only
                            interpreted by the TGS, and can be ignored
                            by end servers.  When set, this flag tells
                            the ticket-granting server that it is OK to
                            issue a new TGT with a different network
                            address based on the presented ticket.

   2       forwarded        When set, this flag indicates that the
                            ticket has either been forwarded or was
                            issued based on authentication involving a
                            forwarded TGT.

   3       proxiable        The PROXIABLE flag is normally only
                            interpreted by the TGS, and can be ignored
                            by end servers.  The PROXIABLE flag has an
                            interpretation identical to that of the
                            FORWARDABLE flag, except that the PROXIABLE
                            flag tells the ticket-granting server that
                            only non-TGTs may be issued with different
                            network addresses.

   4       proxy            When set, this flag indicates that a ticket
                            is a proxy.

   5       may-postdate     The MAY-POSTDATE flag is normally only
                            interpreted by the TGS, and can be ignored
                            by end servers.  This flag tells the

Top      Up      ToC       Page 69 
                            ticket-granting server that a post-dated
                            ticket MAY be issued based on this TGT.

   6       postdated        This flag indicates that this ticket has
                            been postdated.  The end-service can check
                            the authtime field to see when the original
                            authentication occurred.

   7       invalid          This flag indicates that a ticket is
                            invalid, and it must be validated by the KDC
                            before use.  Application servers must reject
                            tickets which have this flag set.

   8       renewable        The RENEWABLE flag is normally only
                            interpreted by the TGS, and can usually be
                            ignored by end servers (some particularly
                            careful servers MAY disallow renewable
                            tickets).  A renewable ticket can be used to
                            obtain a replacement ticket that expires at
                            a later date.

   9       initial          This flag indicates that this ticket was
                            issued using the AS protocol, and not issued
                            based on a TGT.

   10      pre-authent      This flag indicates that during initial
                            authentication, the client was authenticated
                            by the KDC before a ticket was issued.  The
                            strength of the pre-authentication method is
                            not indicated, but is acceptable to the KDC.

   11      hw-authent       This flag indicates that the protocol
                            employed for initial authentication required
                            the use of hardware expected to be possessed
                            solely by the named client.  The hardware
                            authentication method is selected by the KDC
                            and the strength of the method is not
                            indicated.

   12      transited-       This flag indicates that the KDC for
           policy-checked   the realm has checked the transited field
                            against a realm-defined policy for trusted
                            certifiers.  If this flag is reset (0), then
                            the application server must check the
                            transited field itself, and if unable to do
                            so, it must reject the authentication.  If
                            the flag is set (1), then the application
                            server MAY skip its own validation of the

Top      Up      ToC       Page 70 
                            transited field, relying on the validation
                            performed by the KDC.  At its option the
                            application server MAY still apply its own
                            validation based on a separate policy for
                            acceptance.

                            This flag is new since RFC 1510.

   13      ok-as-delegate   This flag indicates that the server (not the
                            client) specified in the ticket has been
                            determined by policy of the realm to be a
                            suitable recipient of delegation.  A client
                            can use the presence of this flag to help it
                            decide whether to delegate credentials
                            (either grant a proxy or a forwarded TGT) to
                            this server.  The client is free to ignore
                            the value of this flag.  When setting this
                            flag, an administrator should consider the
                            security and placement of the server on
                            which the service will run, as well as
                            whether the service requires the use of
                            delegated credentials.

                            This flag is new since RFC 1510.

   14-31   reserved         Reserved for future use.

   key
      This field exists in the ticket and the KDC response and is used
      to pass the session key from Kerberos to the application server
      and the client.

   crealm
      This field contains the name of the realm in which the client is
      registered and in which initial authentication took place.

   cname
      This field contains the name part of the client's principal
      identifier.

   transited
      This field lists the names of the Kerberos realms that took part
      in authenticating the user to whom this ticket was issued.  It
      does not specify the order in which the realms were transited.
      See Section 3.3.3.2 for details on how this field encodes the
      traversed realms.  When the names of CAs are to be embedded in the
      transited field (as specified for some extensions to the

Top      Up      ToC       Page 71 
      protocol), the X.500 names of the CAs SHOULD be mapped into items
      in the transited field using the mapping defined by RFC 2253.

   authtime
      This field indicates the time of initial authentication for the
      named principal.  It is the time of issue for the original ticket
      on which this ticket is based.  It is included in the ticket to
      provide additional information to the end service, and to provide
      the necessary information for implementation of a "hot list"
      service at the KDC.  An end service that is particularly paranoid
      could refuse to accept tickets for which the initial
      authentication occurred "too far" in the past.  This field is also
      returned as part of the response from the KDC.  When it is
      returned as part of the response to initial authentication
      (KRB_AS_REP), this is the current time on the Kerberos server.  It
      is NOT recommended that this time value be used to adjust the
      workstation's clock, as the workstation cannot reliably determine
      that such a KRB_AS_REP actually came from the proper KDC in a
      timely manner.

   starttime
      This field in the ticket specifies the time after which the ticket
      is valid.  Together with endtime, this field specifies the life of
      the ticket.  If the starttime field is absent from the ticket,
      then the authtime field SHOULD be used in its place to determine
      the life of the ticket.

   endtime
      This field contains the time after which the ticket will not be
      honored (its expiration time).  Note that individual services MAY
      place their own limits on the life of a ticket and MAY reject
      tickets which have not yet expired.  As such, this is really an
      upper bound on the expiration time for the ticket.

   renew-till
      This field is only present in tickets that have the RENEWABLE flag
      set in the flags field.  It indicates the maximum endtime that may
      be included in a renewal.  It can be thought of as the absolute
      expiration time for the ticket, including all renewals.

   caddr
      This field in a ticket contains zero (if omitted) or more (if
      present) host addresses.  These are the addresses from which the
      ticket can be used.  If there are no addresses, the ticket can be
      used from any location.  The decision by the KDC to issue or by
      the end server to accept addressless tickets is a policy decision
      and is left to the Kerberos and end-service administrators; they
      MAY refuse to issue or accept such tickets.  Because of the wide

Top      Up      ToC       Page 72 
      deployment of network address translation, it is recommended that
      policy allow the issue and acceptance of such tickets.

      Network addresses are included in the ticket to make it harder for
      an attacker to use stolen credentials.  Because the session key is
      not sent over the network in cleartext, credentials can't be
      stolen simply by listening to the network; an attacker has to gain
      access to the session key (perhaps through operating system
      security breaches or a careless user's unattended session) to make
      use of stolen tickets.

      Note that the network address from which a connection is received
      cannot be reliably determined.  Even if it could be, an attacker
      who has compromised the client's workstation could use the
      credentials from there.  Including the network addresses only
      makes it more difficult, not impossible, for an attacker to walk
      off with stolen credentials and then to use them from a "safe"
      location.

   authorization-data
      The authorization-data field is used to pass authorization data
      from the principal on whose behalf a ticket was issued to the
      application service.  If no authorization data is included, this
      field will be left out.  Experience has shown that the name of
      this field is confusing, and that a better name would be
      "restrictions".  Unfortunately, it is not possible to change the
      name at this time.

      This field contains restrictions on any authority obtained on the
      basis of authentication using the ticket.  It is possible for any
      principal in possession of credentials to add entries to the
      authorization data field since these entries further restrict what
      can be done with the ticket.  Such additions can be made by
      specifying the additional entries when a new ticket is obtained
      during the TGS exchange, or they MAY be added during chained
      delegation using the authorization data field of the
      authenticator.

      Because entries may be added to this field by the holder of
      credentials, except when an entry is separately authenticated by
      encapsulation in the KDC-issued element, it is not allowable for
      the presence of an entry in the authorization data field of a
      ticket to amplify the privileges one would obtain from using a
      ticket.

      The data in this field may be specific to the end service; the
      field will contain the names of service specific objects, and the
      rights to those objects.  The format for this field is described

Top      Up      ToC       Page 73 
      in Section 5.2.6.  Although Kerberos is not concerned with the
      format of the contents of the subfields, it does carry type
      information (ad-type).

      By using the authorization_data field, a principal is able to
      issue a proxy that is valid for a specific purpose.  For example,
      a client wishing to print a file can obtain a file server proxy to
      be passed to the print server.  By specifying the name of the file
      in the authorization_data field, the file server knows that the
      print server can only use the client's rights when accessing the
      particular file to be printed.

      A separate service providing authorization or certifying group
      membership may be built using the authorization-data field.  In
      this case, the entity granting authorization (not the authorized
      entity) may obtain a ticket in its own name (e.g., the ticket is
      issued in the name of a privilege server), and this entity adds
      restrictions on its own authority and delegates the restricted
      authority through a proxy to the client.  The client would then
      present this authorization credential to the application server
      separately from the authentication exchange.  Alternatively, such
      authorization credentials MAY be embedded in the ticket
      authenticating the authorized entity, when the authorization is
      separately authenticated using the KDC-issued authorization data
      element (see 5.2.6.2).

      Similarly, if one specifies the authorization-data field of a
      proxy and leaves the host addresses blank, the resulting ticket
      and session key can be treated as a capability.  See [Neu93] for
      some suggested uses of this field.

      The authorization-data field is optional and does not have to be
      included in a ticket.



(page 73 continued on part 4)

Next RFC Part