xref: /minix3/crypto/external/bsd/heimdal/dist/doc/whatis.texi (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1ebfedea0SLionel Sambuc@c Id
2*0a6a1f1dSLionel Sambuc@c $NetBSD: whatis.texi,v 1.1.1.3 2014/04/24 12:45:27 pettai Exp $
3ebfedea0SLionel Sambuc
4ebfedea0SLionel Sambuc@node What is Kerberos?, Building and Installing, Introduction, Top
5ebfedea0SLionel Sambuc@chapter What is Kerberos?
6ebfedea0SLionel Sambuc
7ebfedea0SLionel Sambuc@quotation
8ebfedea0SLionel Sambuc@flushleft
9ebfedea0SLionel Sambuc        Now this Cerberus had three heads of dogs,
10ebfedea0SLionel Sambuc        the tail of a dragon, and on his back the
11ebfedea0SLionel Sambuc        heads of all sorts of snakes.
12ebfedea0SLionel Sambuc        --- Pseudo-Apollodorus Library 2.5.12
13ebfedea0SLionel Sambuc@end flushleft
14ebfedea0SLionel Sambuc@end quotation
15ebfedea0SLionel Sambuc
16ebfedea0SLionel SambucKerberos is a system for authenticating users and services on a network.
17ebfedea0SLionel SambucIt is built upon the assumption that the network is ``unsafe''.  For
18ebfedea0SLionel Sambucexample, data sent over the network can be eavesdropped and altered, and
19ebfedea0SLionel Sambucaddresses can also be faked.  Therefore they cannot be used for
20ebfedea0SLionel Sambucauthentication purposes.
21ebfedea0SLionel Sambuc@cindex authentication
22ebfedea0SLionel Sambuc
23ebfedea0SLionel SambucKerberos is a trusted third-party service.  That means that there is a
24ebfedea0SLionel Sambucthird party (the kerberos server) that is trusted by all the entities on
25ebfedea0SLionel Sambucthe network (users and services, usually called @dfn{principals}).  All
26ebfedea0SLionel Sambucprincipals share a secret password (or key) with the kerberos server and
27ebfedea0SLionel Sambucthis enables principals to verify that the messages from the kerberos
28ebfedea0SLionel Sambucserver are authentic.  Thus trusting the kerberos server, users and
29ebfedea0SLionel Sambucservices can authenticate each other.
30ebfedea0SLionel Sambuc
31ebfedea0SLionel Sambuc@section Basic mechanism
32ebfedea0SLionel Sambuc
33ebfedea0SLionel Sambuc@ifinfo
34ebfedea0SLionel Sambuc@macro sub{arg}
35ebfedea0SLionel Sambuc<\arg\>
36ebfedea0SLionel Sambuc@end macro
37ebfedea0SLionel Sambuc@end ifinfo
38ebfedea0SLionel Sambuc
39*0a6a1f1dSLionel Sambuc@iftex
40*0a6a1f1dSLionel Sambuc@macro sub{arg}
41*0a6a1f1dSLionel Sambuc@textsubscript{\arg\}
42*0a6a1f1dSLionel Sambuc@end macro
43*0a6a1f1dSLionel Sambuc@end iftex
44ebfedea0SLionel Sambuc
45ebfedea0SLionel Sambuc@ifhtml
46ebfedea0SLionel Sambuc@macro sub{arg}
47*0a6a1f1dSLionel Sambuc
48ebfedea0SLionel Sambuc@html
49ebfedea0SLionel Sambuc<sub>\arg\</sub>
50ebfedea0SLionel Sambuc@end html
51*0a6a1f1dSLionel Sambuc
52ebfedea0SLionel Sambuc@end macro
53ebfedea0SLionel Sambuc@end ifhtml
54ebfedea0SLionel Sambuc
55ebfedea0SLionel Sambuc@c ifdocbook
56ebfedea0SLionel Sambuc@c macro sub{arg}
57ebfedea0SLionel Sambuc@c docbook
58ebfedea0SLionel Sambuc@c <subscript>\arg\</subscript>
59ebfedea0SLionel Sambuc@c end docbook
60ebfedea0SLionel Sambuc@c end macro
61ebfedea0SLionel Sambuc@c end ifdocbook
62ebfedea0SLionel Sambuc
63ebfedea0SLionel Sambuc@quotation
64ebfedea0SLionel Sambuc@strong{Note} This discussion is about Kerberos version 4, but version
65ebfedea0SLionel Sambuc5 works similarly.
66ebfedea0SLionel Sambuc@end quotation
67ebfedea0SLionel Sambuc
68ebfedea0SLionel SambucIn Kerberos, principals use @dfn{tickets} to prove that they are who
69ebfedea0SLionel Sambucthey claim to be. In the following example, @var{A} is the initiator of
70ebfedea0SLionel Sambucthe authentication exchange, usually a user, and @var{B} is the service
71ebfedea0SLionel Sambucthat @var{A} wishes to use.
72ebfedea0SLionel Sambuc
73ebfedea0SLionel SambucTo obtain a ticket for a specific service, @var{A} sends a ticket
74ebfedea0SLionel Sambucrequest to the kerberos server. The request contains @var{A}'s and
75ebfedea0SLionel Sambuc@var{B}'s names (along with some other fields). The kerberos server
76ebfedea0SLionel Sambucchecks that both @var{A} and @var{B} are valid principals.
77ebfedea0SLionel Sambuc
78ebfedea0SLionel SambucHaving verified the validity of the principals, it creates a packet
79ebfedea0SLionel Sambuccontaining @var{A}'s and @var{B}'s names, @var{A}'s network address
80ebfedea0SLionel Sambuc(@var{A@sub{addr}}), the current time (@var{t@sub{issue}}), the lifetime
81ebfedea0SLionel Sambucof the ticket (@var{life}), and a secret @dfn{session key}
82ebfedea0SLionel Sambuc@cindex session key
83ebfedea0SLionel Sambuc(@var{K@sub{AB}}). This packet is encrypted with @var{B}'s secret key
84ebfedea0SLionel Sambuc(@var{K@sub{B}}).  The actual ticket (@var{T@sub{AB}}) looks like this:
85ebfedea0SLionel Sambuc(@{@var{A}, @var{B}, @var{A@sub{addr}}, @var{t@sub{issue}}, @var{life},
86ebfedea0SLionel Sambuc@var{K@sub{AB}}@}@var{K@sub{B}}).
87ebfedea0SLionel Sambuc
88ebfedea0SLionel SambucThe reply to @var{A} consists of the ticket (@var{T@sub{AB}}), @var{B}'s
89ebfedea0SLionel Sambucname, the current time, the lifetime of the ticket, and the session key, all
90ebfedea0SLionel Sambucencrypted in @var{A}'s secret key (@{@var{B}, @var{t@sub{issue}},
91ebfedea0SLionel Sambuc@var{life}, @var{K@sub{AB}}, @var{T@sub{AB}}@}@var{K@sub{A}}). @var{A}
92ebfedea0SLionel Sambucdecrypts the reply and retains it for later use.
93ebfedea0SLionel Sambuc
94ebfedea0SLionel Sambuc@sp 1
95ebfedea0SLionel Sambuc
96ebfedea0SLionel SambucBefore sending a message to @var{B}, @var{A} creates an authenticator
97ebfedea0SLionel Sambucconsisting of @var{A}'s name, @var{A}'s address, the current time, and a
98ebfedea0SLionel Sambuc``checksum'' chosen by @var{A}, all encrypted with the secret session
99ebfedea0SLionel Sambuckey (@{@var{A}, @var{A@sub{addr}}, @var{t@sub{current}},
100ebfedea0SLionel Sambuc@var{checksum}@}@var{K@sub{AB}}). This is sent together with the ticket
101ebfedea0SLionel Sambucreceived from the kerberos server to @var{B}.  Upon reception, @var{B}
102ebfedea0SLionel Sambucdecrypts the ticket using @var{B}'s secret key.  Since the ticket
103ebfedea0SLionel Sambuccontains the session key that the authenticator was encrypted with,
104ebfedea0SLionel Sambuc@var{B} can now also decrypt the authenticator. To verify that @var{A}
105ebfedea0SLionel Sambucreally is @var{A}, @var{B} now has to compare the contents of the ticket
106ebfedea0SLionel Sambucwith that of the authenticator. If everything matches, @var{B} now
107ebfedea0SLionel Sambucconsiders @var{A} as properly authenticated.
108ebfedea0SLionel Sambuc
109ebfedea0SLionel Sambuc@c (here we should have some more explanations)
110ebfedea0SLionel Sambuc
111ebfedea0SLionel Sambuc@section Different attacks
112ebfedea0SLionel Sambuc
113ebfedea0SLionel Sambuc@subheading Impersonating A
114ebfedea0SLionel Sambuc
115ebfedea0SLionel SambucAn impostor, @var{C} could steal the authenticator and the ticket as it
116ebfedea0SLionel Sambucis transmitted across the network, and use them to impersonate
117ebfedea0SLionel Sambuc@var{A}. The address in the ticket and the authenticator was added to
118ebfedea0SLionel Sambucmake it more difficult to perform this attack.  To succeed @var{C} will
119ebfedea0SLionel Sambuchave to either use the same machine as @var{A} or fake the source
120ebfedea0SLionel Sambucaddresses of the packets. By including the time stamp in the
121ebfedea0SLionel Sambucauthenticator, @var{C} does not have much time in which to mount the
122ebfedea0SLionel Sambucattack.
123ebfedea0SLionel Sambuc
124ebfedea0SLionel Sambuc@subheading Impersonating B
125ebfedea0SLionel Sambuc
126ebfedea0SLionel Sambuc@var{C} can hijack @var{B}'s network address, and when @var{A} sends
127ebfedea0SLionel Sambucher credentials, @var{C} just pretend to verify them. @var{C} can't
128ebfedea0SLionel Sambucbe sure that she is talking to @var{A}.
129ebfedea0SLionel Sambuc
130ebfedea0SLionel Sambuc@section Defence strategies
131ebfedea0SLionel Sambuc
132ebfedea0SLionel SambucIt would be possible to add a @dfn{replay cache}
133ebfedea0SLionel Sambuc@cindex replay cache
134ebfedea0SLionel Sambucto the server side.  The idea is to save the authenticators sent during
135ebfedea0SLionel Sambucthe last few minutes, so that @var{B} can detect when someone is trying
136ebfedea0SLionel Sambucto retransmit an already used message. This is somewhat impractical
137ebfedea0SLionel Sambuc(mostly regarding efficiency), and is not part of Kerberos 4; MIT
138ebfedea0SLionel SambucKerberos 5 contains it.
139ebfedea0SLionel Sambuc
140ebfedea0SLionel SambucTo authenticate @var{B}, @var{A} might request that @var{B} sends
141ebfedea0SLionel Sambucsomething back that proves that @var{B} has access to the session
142ebfedea0SLionel Sambuckey. An example of this is the checksum that @var{A} sent as part of the
143ebfedea0SLionel Sambucauthenticator. One typical procedure is to add one to the checksum,
144ebfedea0SLionel Sambucencrypt it with the session key and send it back to @var{A}.  This is
145ebfedea0SLionel Sambuccalled @dfn{mutual authentication}.
146ebfedea0SLionel Sambuc
147ebfedea0SLionel SambucThe session key can also be used to add cryptographic checksums to the
148ebfedea0SLionel Sambucmessages sent between @var{A} and @var{B} (known as @dfn{message
149ebfedea0SLionel Sambucintegrity}).  Encryption can also be added (@dfn{message
150ebfedea0SLionel Sambucconfidentiality}). This is probably the best approach in all cases.
151ebfedea0SLionel Sambuc@cindex integrity
152ebfedea0SLionel Sambuc@cindex confidentiality
153ebfedea0SLionel Sambuc
154ebfedea0SLionel Sambuc@section Further reading
155ebfedea0SLionel Sambuc
156ebfedea0SLionel SambucThe original paper on Kerberos from 1988 is @cite{Kerberos: An
157ebfedea0SLionel SambucAuthentication Service for Open Network Systems}, by Jennifer Steiner,
158ebfedea0SLionel SambucClifford Neuman and Jeffrey I. Schiller.
159ebfedea0SLionel Sambuc
160ebfedea0SLionel SambucA less technical description can be found in @cite{Designing an
161ebfedea0SLionel SambucAuthentication System: a Dialogue in Four Scenes} by Bill Bryant, also
162ebfedea0SLionel Sambucfrom 1988.
163ebfedea0SLionel Sambuc
164ebfedea0SLionel SambucThese documents can be found on our web-page at
165ebfedea0SLionel Sambuc@url{http://www.pdc.kth.se/kth-krb/}.
166