Kerberos Architecture and Ticket Flow
Trace the full Kerberos flow: AS request, TGT issuance, service ticket, and mutual authentication.
Kerberos Architecture and Ticket Flow is a free Cryptology Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Kerberos Origins
Kerberos was developed at MIT as part of Project Athena in the 1980s to provide secure network authentication for a distributed computing environment. Named after the three-headed dog guarding the underworld, it provides mutual authentication between clients and services using a trusted third party: the Key Distribution Center.
Key Distribution Center Components
The KDC has two logical components: the Authentication Service (AS) and the Ticket Granting Service (TGS). In Microsoft Active Directory, both run on the domain controller. The AS handles initial login and issues Ticket Granting Tickets (TGTs). The TGS issues service tickets for accessing specific services.
Step 1: AS-REQ (Initial Authentication)
The client begins authentication by sending an AS-REQ to the Authentication Service. Modern Kerberos requires pre-authentication: the client encrypts a timestamp with its long-term key (derived from the password) to prove it knows the password. This prevents offline dictionary attacks against unprotected AS-REQ messages.
Step 2: AS-REP (TGT Issued)
The AS verifies the pre-authentication data and responds with an AS-REP containing a Ticket Granting Ticket (TGT) encrypted with the krbtgt account's long-term key (which the client cannot decrypt) and a session key encrypted with the client's long-term key. The client decrypts only its portion to obtain the TGS session key.
Step 3: TGS-REQ (Requesting Service Access)
When the client wants to access a service, it sends a TGS-REQ to the Ticket Granting Service, including the TGT (as proof of identity) and an authenticator encrypted with the TGS session key. The TGS decrypts the TGT with the krbtgt key to verify the client's identity.
Step 4: TGS-REP (Service Ticket Issued)
The TGS responds with a service ticket encrypted with the target service's long-term key, plus a new session key encrypted for the client. The client cannot read the service ticket contents, only the portion encrypted for it. This service ticket proves the client's identity to the service.
Step 5: AP-REQ (Accessing the Service)
The client sends an AP-REQ to the target service, including the service ticket and a new authenticator encrypted with the service session key. The service decrypts the service ticket using its own long-term key, verifies the authenticator, and authenticates the client. No password is ever sent to the service.
Kerberos Realms and Cross-Realm Trust
A Kerberos realm is an administrative domain managed by a single KDC. Cross-realm authentication is established through inter-realm keys shared between KDCs of different realms. When a client in Realm A accesses a service in Realm B, the KDC in Realm A issues a referral ticket that the client presents to Realm B's KDC.
Ticket Lifetime and Renewal
Kerberos tickets have a configured lifetime (typically 10 hours for TGTs) after which they expire and new authentication is required. TGTs can also be configured as renewable, allowing the client to request a fresh TGT from the KDC without re-entering credentials, up to a maximum renewable lifetime.
Long-Term Keys vs Session Keys
Kerberos uses two types of keys. Long-term keys are derived from account passwords and used only to encrypt portions of authentication messages. Session keys are negotiated fresh for each authentication exchange and used for the actual communication session. Compromising a session key does not expose the long-term key.
Security Properties of Kerberos
Kerberos provides mutual authentication (both client and service are verified), replay protection (via timestamps and authenticators), and forward secrecy of individual sessions. The KDC never exposes long-term keys during normal operation. The main trust assumption is that the KDC itself is not compromised.
Kerberos Ticket Types Check
What is the purpose of a Ticket Granting Ticket (TGT) in Kerberos?
Lesson Recap: Kerberos Ticket Flow
Kerberos uses a KDC with AS and TGS components. Login produces a TGT (AS-REQ/AS-REP). Service access requires exchanging the TGT for a service ticket (TGS-REQ/TGS-REP). The service ticket is presented to the target service (AP-REQ). Only the KDC and respective services can read tickets. Realms allow cross-domain authentication via inter-realm trust.
Frequently asked questions
Is the “Kerberos Architecture and Ticket Flow” lesson free?
Yes — the full text of “Kerberos Architecture and Ticket Flow” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “Kerberos Architecture and Ticket Flow”?
Trace the full Kerberos flow: AS request, TGT issuance, service ticket, and mutual authentication. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Kerberos Architecture and Ticket Flow” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.