HostedDB - Dedicated UNIX Servers

-->
Internet Security Professional Reference:Kerberos
Previous Table of Contents Next


KRB_KDC_REQ Definition

The KRB_KDC_REQ message has no type of its own. Instead, its type is either KRB_AS_REQ or KRB_TGS_REQ, depending on whether the request is for an initial ticket or an additional ticket. In either case, the message is sent from the client to the Authentication Server to request credentials for a service.

The message fields are as follows:

AS-REQ  = KDC-REQ
TGS-REQ = KDC-REQ

KDC-REQ = {
           pvno[1]               INTEGER,
           msg-type[2]           INTEGER,
           padata[3]             SEQUENCE OF PA-DATA OPTIONAL,
           req-body[4]           KDC-REQ-BODY
          }

PA-DATA = {
           padata-type[1]        INTEGER,
           padata-value[2]       BYTE STRING,
          }
                         -- might be encoded AP-REQ
padata-type  = PA-ENC-TIMESTAMP
padata-value = EncryptedData -- PA-ENC-TS-ENC

PA-ENC-TS-ENC = {
                 patimestamp[0] KerberosTime, -- client’s time
                 pausec[1]      INTEGER OPTIONAL
                }

KDC-REQ-BODY = {
           kdc-options[0] KDCOptions,
           cname[1]       PrincipalName OPTIONAL,
                          -- Used only in AS-REQ
           realm[2]       Realm, -- Server’s realm
                          -- Also client’s in AS-REQ
           sname[3]       PrincipalName OPTIONAL,
           from[4]        KerberosTime OPTIONAL,
           till[5]        KerberosTime,
           rtime[6]       KerberosTime OPTIONAL,
           nonce[7]       INTEGER,
           etype[8]       SEQUENCE OF INTEGER, -- EncryptionType,
                          -- in preference order
           addresses[9]   HostAddresses OPTIONAL,
enc-authorization-data[10]   EncryptedData OPTIONAL,
                          -- Encrypted AuthorizationData encoding
           additional-tickets[11]   SEQUENCE OF Ticket OPTIONAL

The fields in this message are described in table 9.5.

Table 9.5
KRB_KDC_REQ Message Fields

Field Description

pvno Specifies the protocol version number of each message.
msg-type Indicates the type of protocol message. Almost always the same as the application identifier associated with a message. Included to make the identifier more readily accessible to the application. For the KDC-REQ message, the type is KRB_AS_REQ or KRB_TGS_REQ.
padata Contains authentication information that may be needed before credentials can be issued or decrypted. In the case of requests for additional tickets (KRB_TGS_REQ), this field includes an element that has padata-type of PA-TGS-REQ and data of an authentication header (Ticket Granting Ticket and authenticator). The checksum in the authenticator (which must be collision-proof) is to be computed over the KDC-REQ-BODY encoding. In most requests for initial authentication and most replies, the padata field is left out.
Also can contain information needed by certain extensions to the Kerberos protocol. It might be used, for example, to initially verify the identity of a client before any response is returned.
patimestamp Contains the client’s time.
pausec Contains the microseconds. It may be omitted if a client cannot generate more than one request per second.
Also contains information needed to help the KDC or the client select the key needed for generating or decrypting the response, which is useful for supporting the use of certain “smartcards” with Kerberos.
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.
req-body Delimits the extent of the remaining fields. If a checksum is to be calculated over the request, it is calculated over an encoding of the KDC-REQ-BODY sequence that is enclosed within the req-body field.
kdc-options Appears in the KRB_AS_REQ and KRB_TGS_REQ requests to the Key Distribution Center. Indicates the flags that the client wants set on the tickets as well as other information to modify the behavior of the Key Distribution Center.
cname and sname Same as those described for the ticket. sname may only be absent when the ENC-TKT-IN-SKEY option is specified. If absent, the name of the server is taken from the name of the client in the ticket passed as additional-tickets.
enc-authorization-data The enc-authorization-data, if present (and it can only be present in the TGS_REQ form), is an encoding of the desired authorization-data. It is encrypted under the sub-session key if present in the Authenticator, or alternatively from the session key in the Ticket Granting Ticket, both from the padata field in the KRB_AP_REQ.
realm Specifies the realm part of the server’s principal identifier. In the Authentication Server exchange, this is also the realm part of the client’s principal identifier.
from Included in the KRB_AS_REQ and KRB_TGS_REQ ticket requests when the requested ticket is to be postdated and specifies the desired start time for the requested ticket.
till Contains the expiration date requested by the client in a ticket request.
rtime (optional) The requested renew-till time sent from a client to the Key Distribution Center in a ticket request.
nonce Part of the Key Distribution Center request and response. Holds a random number generated by the client. If the same number is included in the encrypted response from the Key Distribution Center, it provides evidence that the response is fresh and has not been replayed by an attacker. Nonces must never be reused. Ideally it should be generated randomly, but if the correct time is known, it may suffice. If the time is used as the nonce, and the time is ever reset backward, there is a small, but finite, probability that a nonce will be reused.
etype Specifies the desired encryption algorithm to be used in the response.
addresses Included in the initial request for tickets, and optionally included in requests for additional tickets from the Ticket Granting Service ; specifies the addresses from which the requested ticket is to be valid. Usually includes the addresses for the client’s host. If a proxy is requested, contains other addresses. The contents of this field are usually copied by the Key Distribution Center into the caddr field of the resulting ticket.
additional-tickets Additional tickets may be optionally included in a request to the Ticket Granting Service. If the ENC-TKT-IN-SKEY option has been specified, then the session key from the additional ticket will be used in place of the server’s key to encrypt the new ticket. If more than one option that requires additional tickets has been specified, then the additional tickets are used in the order specified by the ordering of the options bits (see kdc-options, earlier).

The optional fields are included only if necessary to perform the operation specified in the kdc-options field.

In KRB_TGS_REQ, the protocol version number appears twice and two different message types appear. The KRB_TGS_REQ message contains these fields, as does the authentication header (KRB_AP_RE Q) passed in the padata field.

KRB_KDC_REP Definition

The KRB_KDC_REP message format is used for the reply from the Key Distribution Center for an initial (Authentication Server) request or a subsequent (Ticket Granting Service) request. The message type is KRB_AS_REP or KRB_TGS_REP.

The key used to encrypt the ciphertext part of the reply depends on the message type. For KRB_AS_REP, the ciphertext is encrypted in the client’s secret key, and the client’s key version number is included in the key version number for the encrypted data. For KRB_TGS_REP, the ciphertext is encrypted in the subsession key from the Authenticator, or if absent, the session key from the Ticket Granting Ticket used in the request. In that case, no version number is present in the EncryptedData sequence.

The KRB_KDC_REP message contains the following fields:

AS-REP  =  KDC-REP
TGS-REP =  KDC-REP

KDC-REP = {
           pvno[0]            INTEGER,
           msg-type[1]        INTEGER,
           padata[2]          SEQUENCE OF PA-DATA OPTIONAL,
           crealm[3]          Realm,
           cname[4]           PrincipalName,
           ticket[5]          Tket,
           enc-part[6]        EncryptedData
          }

EncASRepPart  = EncKDCRepPart
EncTGSRepPart = EncKDCRepPart

EncKDCRepPart = {
           key[0]                      EncryptionKey,
           last-req[1]                 LastReq,
           nonce[2]                    INTEGER,
           key-expiration[3]           KerberosTime OPTIONAL,
           flags[4]                    TicketFlags,
           authtime[5]                 KerberosTime,
           starttime[6]                KerberosTime OPTIONAL,
           endtime[7]                  KerberosTime,
           renew-till[8]               KerberosTime OPTIONAL,
           srealm[9]                   Realm,
           sname[10]                   PrincipalName,
           caddr[11]                   HostAddresses OPTIONAL
                }

Table 9.6 describes the fields in this message.

Table 9.6
KRB_KDC_REP Message Fields

Field Description

pvno and msg-type Described earlier. msg-type is KRB_AS_REP or KRB_TGS_REP.
padata Described in detail earlier.
crealm, cname, srealm, and sname Same as those described for the ticket.
ticket The newly issued ticket.
enc-part Serves as placeholder for the ciphertext and related information that forms the encrypted part of a message.
key Same as described for the ticket.
last-req Returned by the Key Distribution Center and specifies the time(s) of the last request by a principal. Depending on what information is available, this might be the last time that a request for a Ticket Granting Ticket was made, or the last time that a request based on a Ticket Granting Ticket was successful. It might cover all servers for a realm, or just the particular server. Some implementations may display this information to the user to aid in discovering unauthorized use of one’s identity. It is similar in spirit to the last login time displayed when logging into timesharing systems.
nonce Described earlier.
key-expiration Part of the response from the Key Distribution Center and specifies the time that the client’s secret key is due to expire.
flags, authtime, starttime, endtime, renew-till, and caddr All duplicates of those found in the encrypted portion of the attached ticket.


Previous Table of Contents Next