2 INTERNET-DRAFT Clifford Neuman
3 draft-ietf-cat-kerberos-pk-init-01.txt Brian Tung
5 expires December 7, 1996 John Wray
6 Digital Equipment Corporation
9 Public Key Cryptography for Initial Authentication in Kerberos
12 0. Status Of this Memo
14 This document is an Internet-Draft. Internet-Drafts are working
15 documents of the Internet Engineering Task Force (IETF), its areas,
16 and its working groups. Note that other groups may also distribute
17 working documents as Internet-Drafts.
19 Internet-Drafts are draft documents valid for a maximum of six
20 months and may be updated, replaced, or obsoleted by other docu-
21 ments at any time. It is inappropriate to use Internet-Drafts as
22 reference material or to cite them other than as ``work in pro-
25 To learn the current status of any Internet-Draft, please check the
26 ``1id-abstracts.txt'' listing contained in the Internet-Drafts Sha-
27 dow Directories on ds.internic.net (US East Coast), nic.nordu.net
28 (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
31 The distribution of this memo is unlimited. It is filed as
32 draft-ietf-cat-kerberos-pk-init-01.txt, and expires December 7, 1996.
33 Please send comments to the authors.
38 This document defines extensions to the Kerberos protocol specifi-
39 cation (RFC 1510, "The Kerberos Network Authentication Service
40 (V5)", September 1993) to provide a method for using public key
41 cryptography during initial authentication. The method defined
42 specifies the way in which preauthentication data fields and error
43 data fields in Kerberos messages are to be used to transport public
48 Public key cryptography presents a means by which a principal may
49 demonstrate possession of a key, without ever having divulged this
50 key to anyone else. In conventional cryptography, the encryption key
51 and decryption key are either identical or can easily be derived from
52 one another. In public key cryptography, however, neither the public
53 key nor the private key can be derived from the other (although the
54 private key RECORD may include the information required to generate
55 BOTH keys). Hence, a message encrypted with a public key is private,
56 since only the person possessing the private key can decrypt it;
57 similarly, someone possessing the private key can also encrypt a
58 message, thus providing a digital signature.
60 Furthermore, conventional keys are often derived from passwords, so
61 messages encrypted with these keys are susceptible to dictionary
62 attacks, whereas public key pairs are generated from a pseudo-random
63 number sequence. While it is true that messages encrypted using
64 public key cryptography are actually encrypted with a conventional
65 secret key, which is in turn encrypted using the public key pair,
66 the secret key is also randomly generated and is hence not vulnerable
67 to a dictionary attack.
69 The advantages provided by public key cryptography have produced a
70 demand for its integration into the Kerberos authentication protocol.
71 The primary advantage of registering public keys with the KDC lies in
72 the ease of recovery in case the KDC is compromised. With Kerberos as
73 it currently stands, compromise of the KDC is disastrous. All
74 keys become known by the attacker and all keys must be changed.
76 If users register public keys, compromise of the KDC does not divulge
77 their private key. Compromise of security on the KDC is still a
78 problem, since an attacker can impersonate any user by certifying a
79 bogus key with the KDC's private key. However, all bogus
80 certificates can be invalidated by revoking and changing the
81 KDC's public key. Legitimate users have to re-certify their public
82 keys with the new KDC key, but the users's keys themselves do not
83 need to be changed. Keys for application servers are conventional
84 symmetric keys and must be changed.
86 Note: If a user stores his private key, in an encrypted form, on the
87 KDC, then he does have to change the key pair, since the private key
88 is encrypted using a symmetric key derived from a password (as
89 described below), and is therefore vulnerable to dictionary attack.
90 Assuming good password policy, however, legitimate users may be
91 allowed to use the old password for a limited time, solely for the
92 purpose of changing the key pair. The realm administrator is then
93 not forced to re-key all users.
95 There are two important areas where public key cryptography will have
96 immediate use: in the initial authentication of users registered with
97 the KDC or using public key certificates from outside authorities,
98 and to establish inter-realm keys for cross-realm authentication.
99 This memo describes a method by which the first of these can be done.
100 The second case will be the topic for a separate proposal.
102 Some of the ideas on which this proposal is based arose during
103 discussions over several years between members of the SAAG, the
104 IETF-CAT working group, and the PSRG, regarding integration of
105 Kerberos and SPX. Some ideas are drawn from the DASS system, and
106 similar extensions have been discussed for use in DCE. These changes
107 are by no means endorsed by these groups. This is an attempt to
108 revive some of the goals of that group, and the proposal approaches
109 those goals primarily from the Kerberos perspective.
112 3. Initial authentication of users with public keys
114 This section describes the extensions to Version 5 of the Kerberos
115 protocol that will support the use of public key cryptography by
116 users in the initial request for a ticket granting ticket. This
117 proposal is based on the implementation already made available;
118 nevertheless, we solicit any comments on modifications or additions
119 to the protocol description below.
121 Roughly speaking, the following changes to RFC 1510 are proposed:
122 a. The KDC's response is encrypted using a random nonce key,
123 rather than the user's secret key.
124 b. This random key accompanies the response in a
125 preauthentication field, encrypted and signed using the
126 public key pairs of the user and the KDC.
127 Certificate and message formats are also defined in this section.
129 This proposal will allow users either to use keys registered directly
130 with the KDC, or to use keys already registered for use with X.509,
131 PEM, or PGP, to obtain Kerberos credentials. These credentials can
132 then be used, as before, with application servers supporting Kerberos.
133 Use of public key cryptography will not be a requirement for Kerberos,
134 but if one's organization runs a KDC supporting public key, then users
135 may choose to be registered with a public key pair, instead of the
138 The application request and response between Kerberos clients and
139 application servers will continue to be based on conventional
140 cryptography, or will be converted to use user-to-user
141 authentication. There are performance issues and other reasons
142 that servers may be better off using conventional cryptography.
143 For this proposal, we feel that 80 percent of the benefits of
144 integrating public key with Kerberos can be attained for 20 percent
145 of the effort, by addressing only initial authentication. This
146 proposal does not preclude separate extensions.
148 With these changes, users will be able to register public keys, only
149 in realms that support public key, and they will then only be able
150 to perform initial authentication from a client that supports public key,
151 although they will be able to use services registered in any realm.
152 Furthermore, users registered with conventional keys will be able
155 This proposal addresses three ways in which users may use public key
156 cryptography for initial authentication with Kerberos, with minimal
157 change to the existing protocol. Users may register keys directly
158 with the KDC, or they may present certificates by outside certification
159 authorities (or certifications by other users) attesting to the
160 association of the public key with the named user. In both cases,
161 the end result is that the user obtains a conventional ticket
162 granting ticket or conventional server ticket that may be used for
163 subsequent authentication, with such subsequent authentication using
164 only conventional cryptography.
166 Additionally, users may also register a digital signature key with
167 the KDC. We provide this option for the licensing benefits, as well
168 as a simpler variant of the initial authentication exchange. However,
169 this option relies on the client to generate random keys.
171 We first consider the case where the user's key is registered with
177 Before we proceed, we will lay some groundwork definitions for
178 encryption and signatures. We propose the following definitions
179 of signature and encryption modes (and their corresponding values
182 #define ENCTYPE_SIGN_MD5_RSA 0x0011
184 #define ENCTYPE_ENCRYPT_RSA_PRIV 0x0021
185 #define ENCTYPE_ENCRYPT_RSA_PUB 0x0022
187 allowing further modes to be defined accordingly.
189 In the exposition below, we will use the notation E (T, K) to denote
190 the encryption of data T, with key (or parameters) K.
192 If E is ENCTYPE_SIGN_MD5_RSA, then
194 E (T, K) = {T, RSAEncryptPrivate (MD5Hash (T), K)}
196 If E is ENCTYPE_ENCRYPT_RSA_PRIV, then
198 E (T, K) = RSAEncryptPrivate (T, K)
200 Correspondingly, if E is ENCTYPE_ENCRYPT_RSA_PUB, then
202 E (T, K) = RSAEncryptPublic (T, K)
205 3.2 Initial request for user registered with public key on KDC
207 In this scenario it is assumed that the user is registered with a
208 public key on the KDC. The user's private key may be held by the
209 user, or it may be stored on the KDC, encrypted so that it cannot be
212 3.2.1 User's private key is stored locally
214 If the user stores his private key locally, the initial request to
215 the KDC for a ticket granting ticket proceeds according to RFC 1510,
216 except that a preauthentication field containing a nonce signed by
217 the user's private key is included. The preauthentication field
218 may also include a list of the root certifiers trusted by the user.
220 PA-PK-AS-ROOT ::= SEQUENCE {
221 rootCert[0] SEQUENCE OF OCTET STRING,
222 signedAuth[1] SignedPKAuthenticator
225 SignedPKAuthenticator ::= SEQUENCE {
226 authent[0] PKAuthenticator,
227 authentSig[1] Signature
230 PKAuthenticator ::= SEQUENCE {
231 cksum[0] Checksum OPTIONAL,
233 ctime[2] KerberosTime,
236 kdcName[5] PrincipalName
239 Signature ::= SEQUENCE {
241 kvno[1] INTEGER OPTIONAL,
242 sigHash[2] OCTET STRING
245 Notationally, sigHash is then
247 sigType (authent, userPrivateKey)
249 where userPrivateKey is the user's private key (corresponding to the
250 public key held in the user's database record). Valid sigTypes are
251 thus far limited to the above-listed ENCTYPE_SIGN_MD5_RSA; we expect
252 that other types may be listed (and given on-the-wire values between
255 The format of each certificate depends on the particular
256 service used. (Alternatively, the KDC could send, with its reply,
257 a sequence of certifications (see below), but since the KDC is likely
258 to have more certifications than users have trusted root certifiers,
259 we have chosen the first method.) In the event that the client
260 believes it already possesses the current public key of the KDC,
261 a zero-length root-cert field is sent.
263 The fields in the signed authenticator are the same as those
264 in the Kerberos authenticator; in addition, we include a client-
265 generated nonce, and the name of the KDC. The structure is itself
266 signed using the user's private key corresponding to the public key
267 registered with the KDC.
269 Typically, preauthentication using a secret key would not be included,
270 but if included it may be ignored by the KDC. (We recommend that it
271 not be included: even if the KDC should ignore the preauthentication,
272 an attacker may not, and use an intercepted message to guess the
275 The response from the KDC would be identical to the response in RFC 1510,
276 except that instead of being encrypted in the secret key shared by the
277 client and the KDC, it is encrypted in a random key freshly generated
278 by the KDC (of type ENCTYPE_ENC_CBC_CRC). A preauthentication field
279 (specified below) accompanies the response, optionally containing a
280 certificate with the public key for the KDC (since we do not assume
281 that the client knows this public key), and a package containing the
282 secret key in which the rest of the response is encrypted, along with
283 the same nonce used in the rest of the response, in order to prevent
284 replays. This package is itself encrypted with the private key of the
285 KDC, then encrypted with the public key of the user.
287 PA-PK-AS-REP ::= SEQUENCE {
288 kdcCert[0] SEQUENCE OF Certificate,
289 encryptShell[1] EncryptedData, -- EncPaPkAsRepPartShell
290 -- encrypted by encReplyTmpKey
291 encryptKey[2] EncryptedData -- EncPaPkAsRepTmpKey
292 -- encrypted by userPubliKey
295 EncPaPkAsRepPartShell ::= SEQUENCE {
296 encReplyPart[0] EncPaPkAsRepPart,
297 encReplyPartSig[1] Signature -- encReplyPart
298 -- signed by kdcPrivateKey
301 EncPaPkAsRepPart ::= SEQUENCE {
302 encReplyKey[0] EncryptionKey,
306 EncPaPkAsRepTmpKey ::= SEQUENCE {
307 encReplyTmpKey[0] EncryptionKey
310 Notationally, assume that encryptPack is encrypted (or signed) with
311 algorithm Ak, and that encryptShell is encrypted with algorithm Au.
312 Then, encryptShell is
314 Au (Ak ({encReplyKey, nonce}, kdcPrivateKey), userPublicKey)
316 where kdcPrivateKey is the KDC's private key, and userPublicKey is the
319 The kdc-cert specification is lifted, with slight modifications,
320 from v3 of the X.509 certificate specification:
322 Certificate ::= SEQUENCE {
323 version[0] Version DEFAULT v1 (1),
324 serialNumber[1] CertificateSerialNumber,
325 signature[2] AlgorithmIdentifier,
326 issuer[3] PrincipalName,
327 validity[4] Validity,
328 subjectRealm[5] Realm,
329 subject[6] PrincipalName,
330 subjectPublicKeyInfo[7] SubjectPublicKeyInfo,
331 issuerUniqueID[8] IMPLICIT UniqueIdentifier OPTIONAL,
332 subjectUniqueID[9] IMPLICIT UniqueIdentifier OPTIONAL,
333 authentSig[10] Signature
336 The kdc-cert must have as its root certification one of the certifiers
337 sent to the KDC with the original request. If the KDC has no such
338 certification, then it will instead reply with a KRB_ERROR of type
339 KDC_ERROR_PREAUTH_FAILED. If a zero-length root-cert was sent by the
340 client as part of the PA-PK-AS-ROOT, then a correspondingly zero-length
341 kdc-cert may be absent, in which case the client uses its copy of the
344 Upon receipt of the response from the KDC, the client will verify the
345 public key for the KDC from PA-PK-AS-REP preauthentication data field,
346 The certificate must certify the key as belonging to a principal whose
347 name can be derived from the realm name. If the certificate checks
348 out, the client then decrypts the EncPaPkAsRepPart using the private
349 key of the user, and verifies the signature of the KDC. It then uses
350 the random key contained therein to decrypt the rest of the response,
351 and continues as per RFC 1510. Because there is direct trust between
352 the user and the KDC, the transited field of the ticket returned by
353 the KDC should remain empty. (Cf. Section 3.3.)
356 3.2.2. Private key held by KDC
358 Implementation of the changes in this section is OPTIONAL.
360 When the user's private key is not carried with the user, the user may
361 encrypt the private key using conventional cryptography, and register
362 the encrypted private key with the KDC. The MD5 hash of the DES key
363 used to encrypt the private key must also be registered with the KDC.
365 We provide this option with the warning that storing the private key
366 on the KDC carries the risk of exposure in case the KDC is compromised.
367 If a suffiently good password is chosen to encrypt the key, then this
368 password can be used for a limited time to change the private key.
369 If the user wishes to authenticate himself without storing the private
370 key on each local disk, then a safer, albeit possibly less practical,
371 alternative is to use a smart card to store the keys.
373 When the user's private key is stored on the KDC, the KDC record
374 will also indicate whether preauthentication is required before
375 returning the key (we recommend that it be required). If such
376 preauthentication is required, when the initial request is received,
377 the KDC will respond with a KRB_ERROR message, with msg-type set
378 to KDC_ERR_PREAUTH_REQUIRED, and e-data set to:
380 PA-PK-AS-INFO ::= SEQUENCE {
381 kdcCert[0] SEQUENCE OF Certificate
384 The kdc-cert field is identical to that in the PA-PK-AS-REP
385 preauthentication data field returned with the KDC response, and must
386 be validated as belonging to the KDC in the same manner.
388 Upon receipt of the KRB_ERROR message with a PA-PK-AS-INFO field, the
389 client will prompt the user for the password that was used to
390 encrypt the private key, derive the DES key from that password,
391 and calculate the MD5 hash H1 of the DES key. The client then sends
392 a request to the KDC, which includes a timestamp and a
393 client-generated random secret key that will be used by the KDC
394 to super-encrypt the encrypted private key before it is returned
395 to the client. This information is sent to the KDC in a subsequent
396 AS_REQ message in a preauthentication data field:
398 PA-PK-AS-REQ ::= SEQUENCE {
399 encHashShell[0] EncryptedData -- EncPaPkAsReqShell
402 EncPaPkAsReqShell ::= SEQUENCE {
403 encHashPart[0] EncryptedData -- EncPaPkAsReqPart
406 EncPaPkAsReqPart ::= SEQUENCE {
407 encHashKey[0] EncryptionKey,
411 The EncPaPkAsReqPart is first encrypted with a DES key K1, derived
412 by string_to_key from the hash H1 (with null salt), then encrypted
413 again with the KDC's public key from the certificate in the
414 PA-PK-AS-INFO field of the error response.
416 Notationally, if encryption algorithm A is used for DES encryption,
417 and Ak is used for the public key encryption, then enc-shell is
419 Ak (A ({encHashKey, nonce}, K1), kdcPublicKey)
421 Upon receipt of the authentication request with the PA-PK-AS-REQ, the
422 KDC verifies the hash of the user's DES encryption key by attempting
423 to decrypt the EncPaPkAsReqPart of the PA-PK-AS-REQ. If decryption
424 is successful, the KDC generates the AS response as defined in
425 RFC 1510, but additionally includes a preauthentication field of type
426 PA-PK-USER-KEY. (This response will also be included in response to
427 the initial request without preauthentication if preauthentication is
428 not required for the user and the user's encrypted private key is
431 PA-PK-USER-KEY ::= SEQUENCE {
432 encUserKeyPart[0] EncryptedData -- EncPaPkUserKeyPart
435 EncPaPkUserKeyPart ::= SEQUENCE {
436 encUserKey[0] OCTET STRING,
440 Notationally, if encryption algorithm A is used, then enc-key-part is
442 A ({encUserKey, nonce}, enc-hash-key)
444 (where A could be null encryption).
446 This message contains the encrypted private key that has been
447 registered with the KDC by the user, as encrypted by the user,
448 optionally super-encrypted with the enc-hash-key from the PA-PK-AS-REQ
449 message if preauthentication using that method was provided (otherwise,
450 the EncryptedData should denote null encryption). Note that since
451 H1 is a one-way hash, it is not possible for one to decrypt the
452 message if one possesses H1 but not the DES key that H1 is derived
453 from. Because there is direct trust between the user and the
454 KDC, the transited field of the ticket returned by the KDC should
455 remain empty. (Cf. Section 3.3.)
458 3.3. Clients with a public key certified by an outside authority
460 Implementation of the changes in this section is OPTIONAL.
462 In the case where the client is not registered with the current KDC,
463 the client is responsible for obtaining the private key on its own.
464 The client will request initial tickets from the KDC using the TGS
465 exchange, but instead of performing pre-authentication using a
466 Kerberos ticket granting ticket, or with the PA-PK-AS-REQ that is used
467 when the public key is known to the KDC, the client performs
468 preauthentication using the preauthentication data field of type
471 PA-PK-AS-EXT-CERT ::= SEQUENCE {
472 userCert[0] SEQUENCE OF OCTET STRING,
473 signedAuth[1] SignedPKAuthenticator
476 where the user-cert specification depends on the type of certificate
477 that the user possesses. In cases where the service has separate
478 key pairs for digital signature and for encryption, we recommend
479 that the signature keys be used for the purposes of sending the
480 preauthentication (and deciphering the response).
482 The authenticator is the one used from the exchange in section 3.2.1,
483 except that it is signed using the private key corresponding to
484 the public key in the user-cert.
486 The KDC will verify the preauthentication authenticator, and check the
487 certification path against its own policy of legitimate certifiers.
488 This may be based on a certification hierarchy, or simply a list of
489 recognized certifiers in a system like PGP.
491 If all checks out, the KDC will issue Kerberos credentials, as in 3.2,
492 but with the names of all the certifiers in the certification path
493 added to the transited field of the ticket, with a principal name
494 taken from the certificate (this might be a long path for X.509, or a
495 string like "John Q. Public <jqpublic@company.com>" if the certificate
496 was a PGP certificate. The realm will identify the kind of
497 certificate and the final certifier as follows:
499 cert_type/final_certifier
501 as in PGP/<endorser@company.com>.
504 3.4. Digital Signature
506 Implementation of the changes in this section is OPTIONAL.
508 We offer this option with the warning that it requires the client
509 process to generate a random DES key; this generation may not
510 be able to guarantee the same level of randomness as the KDC.
512 If a user registered a digital signature key pair with the KDC,
513 a separate exchange may be used. The client sends a KRB_AS_REQ as
514 described in section 3.2.2. If the user's database record
515 indicates that a digital signature key is to be used, then the
516 KDC sends back a KRB_ERROR as in section 3.2.2.
518 It is assumed here that the signature key is stored on local disk.
519 The client generates a random key of enctype ENCTYPE_DES_CBC_CRC,
520 signs it using the signature key (otherwise the signature is
521 performed as described in section 3.2.1), then encrypts the whole with
522 the public key of the KDC. This is returned with a separate KRB_AS_REQ
523 in a preauthentication of type
525 PA-PK-AS-SIGNED ::= SEQUENCE {
526 signedKey[0] EncryptedData -- PaPkAsSignedData
529 PaPkAsSignedData ::= SEQUENCE {
530 signedKeyPart[0] SignedKeyPart,
531 signedKeyAuth[1] PKAuthenticator
534 SignedKeyPart ::= SEQUENCE {
535 encSignedKey[0] EncryptionKey,
539 where the nonce is the one from the request. Upon receipt of the
540 request, the KDC decrypts, then verifies the random key. It then
541 replies as per RFC 1510, except that instead of being encrypted
542 with the password-derived DES key, the reply is encrypted using
543 the randomKey sent by the client. Since the client already knows
544 this key, there is no need to accompany the reply with an extra
545 preauthentication field. Because there is direct trust between
546 the user and the KDC, the transited field of the ticket returned
547 by the KDC should remain empty. (Cf. Section 3.3.)
550 4. Preauthentication Data Types
552 We propose that the following preauthentication types be allocated
553 for the preauthentication data packages described in this draft:
555 #define KRB5_PADATA_ROOT_CERT 17 /* PA-PK-AS-ROOT */
556 #define KRB5_PADATA_PUBLIC_REP 18 /* PA-PK-AS-REP */
557 #define KRB5_PADATA_PUBLIC_REQ 19 /* PA-PK-AS-REQ */
558 #define KRB5_PADATA_PRIVATE_REP 20 /* PA-PK-USER-KEY */
559 #define KRB5_PADATA_PUBLIC_EXT 21 /* PA-PK-AS-EXT-CERT */
560 #define KRB5_PADATA_PUBLIC_SIGN 22 /* PA-PK-AS-SIGNED */
563 5. Encryption Information
565 For the public key cryptography used in direct registration, we used
566 (in our implementation) the RSAREF library supplied with the PGP 2.6.2
567 release. Encryption and decryption functions were implemented directly
568 on top of the primitives made available therein, rather than the
569 fully sealing operations in the API.
572 6. Compatibility with One-Time Passcodes
574 We solicit discussion on how the use of public key cryptography for initial
575 authentication will interact with the proposed use of one time passwords
576 discussed in Internet Draft <draft-ietf-cat-kerberos-passwords-00.txt>.
579 7. Strength of Encryption and Signature Mechanisms
581 In light of recent findings on the strengths of MD5 and various DES
582 modes, we solicit discussion on which modes to incorporate into the
588 This Internet-Draft expires on December 7, 1996.
591 9. Authors' Addresses
594 USC/Information Sciences Institute
595 4676 Admiralty Way Suite 1001
596 Marina del Rey, CA 90292-6695
602 USC/Information Sciences Institute
603 4676 Admiralty Way Suite 1001
604 Marina del Rey, CA 90292-6695
610 Digital Equipment Corporation
611 550 King Street, LKG2-2/Z7
615 EMail: wray@tuxedo.enet.dec.com