Asha logs in at a workstation and opens a file on server FS. List each message, who can read it, and which keys exist at the end.
Kerberos is a ticket-based network authentication service from MIT's Project Athena. A trusted Key Distribution Centre proves users to servers, and servers to users, without passwords ever crossing the network, and gives single sign-on.
kinit, klist, kdestroy.Picture a campus in the 1980s: thousands of students sit at workstations, and dozens of servers hold mail, files and printers. Anyone can plug a machine into the network and anyone can listen to the cables. Authentication here means a server must be sure which user is really calling, before it decides what that user may do.
Three naive designs all fail. If the server trusts the workstation to say who is logged in, an attacker simply runs a modified workstation. If the user types a password to every server, the password crosses the open network each time, and every server must store it. If every user and every server shared a pairwise key, the number of keys explodes and no one could manage them.
Kerberos answers with a trusted third party. Every user and every server shares one long-term secret key with a central authority, and nobody else. The authority vouches for users to servers (and servers to users) by handing out sealed tickets. Now N users and M servers need only N + M keys, all held by the authority.
| Fact | Detail |
|---|---|
| Origin | MIT, Project Athena (begun 1983), a campus-wide distributed computing experiment |
| Name | From Kerberos (Latin form Cerberus), the three-headed watchdog of the underworld in Greek myth. In MIT's dialogue the goddess Athena picks the name. Stories that explain the three heads as client, server and KDC, or as authentication, accounting and audit, are folklore, not documented fact |
| Version 4 | Public release in the late 1980s; DES only |
| Version 5 | RFC 1510 (September 1993); revised and obsoleted by RFC 4120 (July 2005) |
| Design model | Needham–Schroeder with Denning–Sacco timestamps; symmetric keys only in the core protocol |
Four roles appear in every Kerberos story. The client (C) acts for a user. The Authentication Server (AS) knows every principal's long-term key and issues the first ticket after login. The Ticket-Granting Server (TGS) issues tickets for individual services on presentation of that first ticket. The application server (V, for verifier; also called the service) is the machine the user finally wants, such as a file server.
The AS and TGS are logically separate but usually run together on one machine, with one database, and are jointly called the Key Distribution Centre (KDC). Many diagrams show the KDC as a single box; exam questions use both views, so know both.
Everything that can be authenticated is a principal: a user (alice), a service on a host (host/files.example.com), or the TGS itself. A principal's name has the shape primary/instance@REALM. A realm is an administrative domain with its own KDC and database; by convention the realm name is the organisation's DNS name in capitals, for example EXAMPLE.COM.
| Key | Notation (Stallings) | Who knows it | Used for |
|---|---|---|---|
| User key | Kc | Client's user (from the password) and the AS | Seals the AS reply, so only the real user can open it |
| TGS key | Ktgs | AS and TGS only | Seals the ticket-granting ticket |
| Server key | Kv | TGS and server V only | Seals each service ticket |
| TGS session key | Kc,tgs | Created by the AS; known to client and TGS | Seals authenticators and replies in the client–TGS exchange |
| Service session key | Kc,v | Created by the TGS; known to client and server V | Protects the client–server conversation |
Notation follows Stallings. E(K, [ ... ]) means the listed fields encrypted under key K, and ‖ means concatenation. IDc is the client's identity, ADc its network address, IDtgs and IDv name the TGS and server, TS is a timestamp and Lifetime says how long a ticket stays valid.
A ticket says: the KDC has verified that the principal named inside, at the address named inside, holds the session key named inside, until the lifetime ends. It is encrypted with the key of the server that will read it, so the client can carry the ticket but can neither read nor forge it. Alone it proves nothing about who is presenting it; anyone who copied a ticket could try to use it.
That is why an authenticator accompanies every ticket. It contains the client's name, address and a fresh timestamp, sealed under the session key from the ticket. Only someone who truly knows the session key can build one. The server compares the authenticator with the ticket: names must match, and the time must be close to the server's own clock.
Timestamps and lifetimes are the replay defence. An eavesdropper who records a ticket and authenticator and sends them again later is rejected, because the timestamp is stale. A copy sent immediately, inside the allowed window, is stopped in practice by a server-side cache of recent authenticators. Lifetime limits how long a stolen ticket remains useful and forces periodic re-checking with the KDC.
Because the TGT is reusable until it expires, one password entry per session is enough. Each service ticket is also reusable until its own expiry, so repeat visits to the same server need no KDC trip at all. The client stores tickets in a credential cache on the workstation, and uses them transparently. This is single sign-on (SSO): the user types a password once and reaches mail, files, printing and shell servers without being asked again.
| Command | What it does |
|---|---|
kinit | Asks for the password, runs the AS exchange and stores the TGT in the cache |
klist | Lists cached tickets: principal, start time, expiry, and service names such as krbtgt/EXAMPLE.COM |
kdestroy | Deletes the credential cache, which is the Kerberos equivalent of logging out |
A realm is one KDC with its principals and servers. A large organisation, or two cooperating universities, will have several realms. A client in realm A may need a server in realm B, and B's KDC knows nothing about A's users, so the realms must trust each other through a shared secret key.
In V4 the shared keys had to be set up pairwise: every realm that wants to interoperate with N − 1 others needs a key with each, so N realms need N(N−1)/2 keys. In V5 realms can be arranged in a hierarchy (often following DNS names), so a request may be passed through a chain of intermediate realms, each trusting the next. This needs only a key between each realm and its parent. The trade-off is that each realm on the path must be trusted.
Version 4 worked well but had environmental shortcomings (assumptions baked in about the network and the cipher) and technical ones (weaknesses in the protocol itself). Version 5 was designed to fix both lists. Stallings groups the changes this way:
| Aspect | Version 4 | Version 5 |
|---|---|---|
| Encryption system | DES only (export-controlled) | Any cipher; the type is tagged in each message |
| Network addresses | Internet (IP) addresses only | Many address types, tagged with a type and length |
| Message encoding | Byte ordering flag chosen by the sender | ASN.1 encoding (Stallings: BER; RFC 4120 profile: DER) |
| Ticket lifetime | 8-bit field in units of 5 minutes: 255 × 5 = 1275 min, about 21 hours | Explicit start and end times; practically unbounded |
| Authentication forwarding | Not possible: a ticket cannot be handed on to another host | Allowed, so a service can act for the user on another host |
| Inter-realm | Pairwise keys, N(N−1)/2 for N realms | Hierarchical paths, fewer keys |
| Double encryption | Ticket encrypted twice (inside the reply and under Ktgs/Kv) | Removed; the ticket is encrypted once |
| Block mode | Non-standard PCBC, found to be weak | Standard CBC with an integrity check |
| Session keys | One key per ticket, reused across connections | Optional sub-session key per connection, and nonces |
| Password guessing | AS reply to anyone can be captured and tried offline | Pre-authentication: the client must first prove it knows the key |
The MIT designers stated four requirements. It must be secure: an eavesdropper must not be able to impersonate a user. It must be reliable, since all services depend on it, so a distributed server architecture with fallbacks is expected. It must be transparent: the user should not notice more than typing a password. It must be scalable: it must support many clients and servers.
Try the problem first, then reveal the working one step at a time.
Asha logs in at a workstation and opens a file on server FS. List each message, who can read it, and which keys exist at the end.
A server accepts authenticators within 5 minutes of its clock. A workstation's clock is 12 minutes fast. Will its requests work? What if its clock is 3 minutes fast, and a copy of an authenticator is sent 20 minutes later?
A campus has 1000 users and 50 servers. Compare the keys needed with Kerberos and with pairwise shared keys between every user and every server.
(a) What is the longest ticket lifetime in Kerberos V4? (b) Ten realms want full pairwise interoperation under V4. How many inter-realm keys are needed?
In the client–TGS exchange, why can the client not read the TGT it carries, and why does this matter?
An attacker copies Ticketv and the authenticator from a recorded message (5) and sends both to server V one hour later. Explain why this fails, and say what a fresh Ticketv alone (without an authenticator) would not be able to prove.
Why does Kerberos use two separate exchanges (AS then TGS) instead of the client asking the AS for a service ticket every time?
Twelve realms must interoperate pairwise in Kerberos V4. (a) How many inter-realm keys are required? (b) Explain how a hierarchy in V5 reduces this.
10 questions. 70 % passes the topic quiz (+30 XP, +20 more for 100 %). Exam scoring: +1 correct, −⅓ wrong.
Modelled on real KPSC questions (reworded) with the same concept and answer; each links to its original paper.