Fix some typos.
[heimdal.git] / doc / standardisation / draft-ietf-cat-kerberos-pk-init-20.txt
blob0504450b83c59b384bf150c92d969dcec3bfd06a
1 INTERNET-DRAFT                                                Brian Tung
2 draft-ietf-cat-kerberos-pk-init-20.txt                   Clifford Neuman
3 Updates: CLARIFICATIONS                                          USC/ISI
4 expires January 25, 2005                                     Matthew Hur
5                                                            Ari Medvinsky
6                                                    Microsoft Corporation
7                                                          Sasha Medvinsky
8                                                           Motorola, Inc.
9                                                                John Wray
10                                                    Iris Associates, Inc.
11                                                         Jonathan Trostle
14     Public Key Cryptography for Initial Authentication in Kerberos
17 0.  Status Of This Memo
19 This document is an Internet-Draft and is in full conformance with
20 all provision of Section 10 of RFC 2026.  Internet-Drafts are
21 working documents of the Internet Engineering Task Force (IETF), its
22 areas, and its working groups.  Note that other groups may also
23 distribute working documents as Internet-Drafts.
25 Internet-Drafts are draft documents valid for a maximum of six
26 months and may be updated, replaced, or obsoleted by other documents
27 at any time.  It is inappropriate to use Internet-Drafts as
28 reference material or to cite them other than as "work in progress."
30 The list of current Internet-Drafts can be accessed at
31 http://www.ietf.org/ietf/1id-abstracts.txt
33 The list of Internet-Draft Shadow Directories can be accessed at
34 http://www.ietf.org/shadow.html
36 The distribution of this memo is unlimited.  It is filed as
37 draft-ietf-cat-kerberos-pk-init-20.txt and expires January 25, 2005.
38 Please send comments to the authors.
41 1.  Abstract
43 This document describes protocol extensions (hereafter called
44 PKINIT) to the Kerberos protocol specification ([1], hereafter
45 called CLARIFICATIONS).  These extensions provide a method for
46 integrating public key cryptography into the initial authentication
47 exchange, by passing digital certificates and associated
48 authenticators in preauthentication data fields.
51 2.  Introduction
53 A client typically authenticates itself to a service in Kerberos
54 using three distinct though related exchanges.  First, the client
55 requests a ticket-granting ticket (TGT) from the Kerberos
56 authentication server (AS).  Then, it uses the TGT to request a
57 service ticket from the Kerberos ticket-granting server (TGS).
58 Usually, the AS and TGS are integrated in a single device known as
59 a Kerberos Key Distribution Center, or KDC.  (In this document, we
60 will refer to both the AS and the TGS as the KDC.)  Finally, the
61 client uses the service ticket to authenticate itself to the
62 service.
64 The advantage afforded by the TGT is that the client need explicitly
65 request a ticket and expose his credentials only once.  The TGT and
66 its associated session key can then be used for any subsequent
67 requests.  One result of this is that all further authentication is
68 independent of the method by which the initial authentication was
69 performed.  Consequently, initial authentication provides a
70 convenient place to integrate public-key cryptography into Kerberos
71 authentication.
73 As defined, Kerberos authentication exchanges use symmetric-key
74 cryptography, in part for performance.  One cost of using
75 symmetric-key cryptography is that the keys must be shared, so that
76 before a client can authenticate itself, he must already be
77 registered with the KDC.
79 Conversely, public-key cryptography (in conjunction with an
80 established Public Key Infrastructure) permits authentication
81 without prior registration with a KDC.  Adding it to Kerberos allows
82 the widespread use of Kerberized applications by clients without
83 requiring them to register first with a KDC--a requirement that has
84 no inherent security benefit.
86 As noted above, a convenient and efficient place to introduce
87 public-key cryptography into Kerberos is in the initial
88 authentication exchange.  This document describes the methods and
89 data formats for integrating public-key cryptography into Kerberos
90 initial authentication.
93 3.  Extensions
95 This section describes extensions to CLARIFICATIONS for supporting
96 the use of public-key cryptography in the initial request for a
97 ticket.
99 Briefly, this document defines the following extensions to
100 CLARIFICATIONS:
102     1.  The client indicates the use of public-key authentication by
103         including a special preauthenticator in the initial request.
104         This preauthenticator contains the client's public-key data
105         and a signature.
107     2.  The KDC tests the client's request against its policy and
108         trusted Certification Authorities (CAs).
110     3.  If the request passes the verification tests, the KDC
111         replies as usual, but the reply is encrypted using either:
113         a.  a symmetric encryption key, signed using the KDC's
114             signature key and encrypted using the client's encryption
115             key; or
117         b.  a key generated through a Diffie-Hellman exchange with
118             the client, signed using the KDC's signature key.
120         Any keying material required by the client to obtain the
121         Encryption key is returned in a preauthentication field
122         accompanying the usual reply.
124     4.  The client obtains the encryption key, decrypts the reply,
125         and then proceeds as usual.
127 Section 3.1 of this document defines the necessary message formats.
128 Section 3.2 describes their syntax and use in greater detail.
131 3.1.  Definitions
134 3.1.1.  Required Algorithms
136 All PKINIT implementations MUST support the following algorithms:
138     - Reply key (or DH-derived key): AES256-CTS-HMAC-SHA1-96 etype.
140     - Signature algorithm: SHA-1 digest and RSA.
142     - Reply key delivery method: ephemeral-ephemeral Diffie-Hellman
143       with a non-zero nonce.
145     - Unkeyed checksum type for the paChecksum member of
146       PKAuthenticator: SHA1 (unkeyed).
149 3.1.2.  Defined Message and Encryption Types
151 PKINIT makes use of the following new preauthentication types:
153     PA-PK-AS-REQ                             TBD
154     PA-PK-AS-REP                             TBD
156 PKINIT also makes use of the following new authorization data type:
158     AD-INITIAL-VERIFIED-CAS                  TBD
160 PKINIT introduces the following new error codes:
162     KDC_ERR_CLIENT_NOT_TRUSTED                62
163     KDC_ERR_KDC_NOT_TRUSTED                   63
164     KDC_ERR_INVALID_SIG                       64
165     KDC_ERR_KEY_SIZE                          65
166     KDC_ERR_CERTIFICATE_MISMATCH              66
167     KDC_ERR_CANT_VERIFY_CERTIFICATE           70
168     KDC_ERR_INVALID_CERTIFICATE               71
169     KDC_ERR_REVOKED_CERTIFICATE               72
170     KDC_ERR_REVOCATION_STATUS_UNKNOWN         73
171     KDC_ERR_CLIENT_NAME_MISMATCH              75
173 PKINIT uses the following typed data types for errors:
175     TD-DH-PARAMETERS                         TBD
176     TD-TRUSTED-CERTIFIERS                    104
177     TD-CERTIFICATE-INDEX                     105
179 PKINIT defines the following encryption types, for use in the AS-REQ
180 message (to indicate acceptance of the corresponding encryption OIDs
181 in PKINIT):
183     dsaWithSHA1-CmsOID                         9
184     md5WithRSAEncryption-CmsOID               10
185     sha1WithRSAEncryption-CmsOID              11
186     rc2CBC-EnvOID                             12
187     rsaEncryption-EnvOID   (PKCS1 v1.5)       13
188     rsaES-OAEP-EnvOID      (PKCS1 v2.0)       14
189     des-ede3-cbc-EnvOID                       15
191 The above encryption types are used by the client only within the
192 KDC-REQ-BODY to indicate which CMS [2] algorithms it supports.  Their
193 use within Kerberos EncryptedData structures is not specified by this
194 document.
196 The ASN.1 module for all structures defined in this document (plus
197 IMPORT statements for all imported structures) are given in Appendix
198 A.  All structures MUST be encoded using Distinguished Encoding
199 Rules (DER).
202 3.1.3.  Algorithm Identifiers
204 PKINIT does not define, but does make use of, the following
205 algorithm identifiers.
207 PKINIT uses the following algorithm identifier for Diffie-Hellman
208 key agreement [9]:
210     dhpublicnumber
212 PKINIT uses the following signature algorithm identifiers [8, 12]:
214     sha-1WithRSAEncryption (RSA with SHA1)
215     md5WithRSAEncryption   (RSA with MD5)
216     id-dsa-with-sha1       (DSA with SHA1)
218 PKINIT uses the following encryption algorithm identifiers [5] for
219 encrypting the temporary key with a public key:
221     rsaEncryption          (PKCS1 v1.5)
222     id-RSAES-OAEP          (PKCS1 v2.0)
224 PKINIT uses the following algorithm identifiers [2] for encrypting
225 the reply key with the temporary key:
227     des-ede3-cbc           (three-key 3DES, CBC mode)
228     rc2-cbc                (RC2, CBC mode)
230 Kerberos data structures require the use of integer etypes, while CMS
231 objects use OIDs. Therefore, each cryptographic algorithm supported
232 by PKINIT is identified both by a CMS OID and by an equivalent
233 Kerberos etype (defined in section 3.1.2).
236 3.2.  PKINIT Preauthentication Syntax and Use
238 This section defines the syntax and use of the various
239 preauthentication fields employed by PKINIT.
242 3.2.1.  Client Request
244 The initial authentication request (AS-REQ) is sent as per RFC
245 1510bis; in addition, a preauthentication field contains data signed
246 by the client's private signature key, as follows:
248     PA-PK-AS-REQ ::= SEQUENCE {
249         signedAuthPack          [0] ContentInfo,
250                                     -- Defined in CMS [2].
251                                     -- Type is SignedData.
252                                     -- Content is AuthPack
253                                     -- (defined below).
254         trustedCertifiers       [1] SEQUENCE OF TrustedCA OPTIONAL,
255                                     -- A list of CAs, trusted by
256                                     -- the client, used to certify
257                                     -- KDCs.
258         kdcCert                 [2] IssuerAndSerialNumber OPTIONAL,
259                                     -- Defined in CMS [2].
260                                     -- Identifies a particular KDC
261                                     -- certificate, if the client
262                                     -- already has it.
263         ...
264     }
266     TrustedCA ::= CHOICE {
267         caName                  [0] Name,
268                                     -- Fully qualified X.500 name
269                                     -- as defined in RFC 3280 [4].
270         issuerAndSerial         [2] IssuerAndSerialNumber,
271                                     -- Identifies a specific CA
272                                     -- certificate.
273         ...
274     }
276     AuthPack ::= SEQUENCE {
277         pkAuthenticator         [0] PKAuthenticator,
278         clientPublicValue       [1] SubjectPublicKeyInfo OPTIONAL,
279                                     -- Defined in RFC 3280 [4].
280                                     -- Present only if the client
281                                     -- is using ephemeral-ephemeral
282                                     -- Diffie-Hellman.
283         supportedCMSTypes       [2] SEQUENCE OF AlgorithmIdentifier
284                                     OPTIONAL,
285                                     -- List of CMS encryption types
286                                     -- supported by client in order
287                                     -- of (decreasing) preference.
288         ...
289     }
291     PKAuthenticator ::= SEQUENCE {
292         cusec                   [0] INTEGER,
293         ctime                   [1] KerberosTime,
294                                     -- cusec and ctime are used as
295                                     -- in CLARIFICATIONS, for replay
296                                     -- prevention.
297         nonce                   [2] INTEGER (0..4294967295),
298                                     -- Binds reply to request,
299                                     -- MUST be zero when client
300                                     -- will accept cached
301                                     -- Diffie-Hellman parameters
302                                     -- from KDC. MUST NOT be
303                                     -- zero otherwise.
304         paChecksum              [3] Checksum,
305                                     -- Defined in CLARIFICATIONS.
306                                     -- Performed over KDC-REQ-BODY,
307                                     -- MUST be unkeyed.
308         ...
309     }
311 The ContentInfo in the signedAuthPack is filled out as follows:
313     1.  The eContent field contains data of type AuthPack.  It MUST
314         contain the pkAuthenticator, and MAY also contain the
315         client's Diffie-Hellman public value (clientPublicValue).
317     2.  The eContentType field MUST contain the OID value for
318         id-pkauthdata: { iso(1) org(3) dod(6) internet(1)
319         security(5) kerberosv5(2) pkinit(3) pkauthdata(1)}
321     3.  The signerInfos field MUST contain the signature over the
322         AuthPack.
324     4.  The certificates field MUST contain at least a signature
325         verification certificate chain that the KDC can use to
326         verify the signature over the AuthPack.  Additionally, the
327         client MAY insert an encryption certificate chain, if
328         (for example) the client is not using ephemeral-ephemeral
329         Diffie-Hellman.
331     5.  If a Diffie-Hellman key is being used, the parameters SHOULD
332         be chosen from the First or Second defined Oakley Groups.
333         (See RFC 2409 [10].)
335     6.  The KDC may wish to use cached Diffie-Hellman parameters.
336         To indicate acceptance of caching, the client sends zero in
337         the nonce field of the pkAuthenticator.  Zero is not a valid
338         value for this field under any other circumstances.  Since
339         zero is used to indicate acceptance of cached parameters,
340         message binding in this case is performed using only the
341         nonce in the main request.
344 3.2.2.  Validation of Client Request
346 Upon receiving the client's request, the KDC validates it.  This
347 section describes the steps that the KDC MUST (unless otherwise
348 noted) take in validating the request.
350 The KDC must look for a client certificate in the signedAuthPack.
351 If it cannot find one signed by a CA it trusts, it sends back an
352 error of type KDC_ERR_CANT_VERIFY_CERTIFICATE.  The accompanying
353 e-data for this error is a SEQUENCE OF TYPED-DATA (as defined in RFC
354 1510bis).  For this error, the data-type is TD-TRUSTED-CERTIFIERS,
355 and the data-value is an OCTET STRING containing the DER encoding of
357     TrustedCertifiers ::= SEQUENCE OF Name
359 If, while verifying the certificate chain, the KDC determines that
360 the signature on one of the certificates in the signedAuthPack is
361 invalid, it returns an error of type KDC_ERR_INVALID_CERTIFICATE.
362 The accompanying e-data for this error is a SEQUENCE OF TYPED-DATA,
363 whose data-type is TD-CERTIFICATE-INDEX, and whose data-value is an
364 OCTET STRING containing the DER encoding of the index into the
365 CertificateSet field, ordered as sent by the client:
367     CertificateIndex ::= IssuerAndSerialNumber
368                                     -- IssuerAndSerialNumber of
369                                     -- certificate with invalid signature
371 If more than one certificate signature is invalid, the KDC MAY send
372 one TYPED-DATA per invalid signature.
374 The KDC MAY also check whether any certificates in the client's
375 chain have been revoked.  If any of them have been revoked, the KDC
376 MUST return an error of type KDC_ERR_REVOKED_CERTIFICATE; if the KDC
377 attempts to determine the revocation status but is unable to do so,
378 it SHOULD return an error of type KDC_ERR_REVOCATION_STATUS_UNKNOWN.
379 The certificate or certificates affected are identified exactly as
380 for an error of type KDC_ERR_INVALID_CERTIFICATE (see above).
382 In addition to validating the certificate chain, the KDC MUST also
383 check that the certificate properly maps to the client's principal name
384 as specified in the AS-REQ as follows:
386     1.  If the KDC has its own mapping from the name in the
387         certificate to a Kerberos name, it uses that Kerberos
388         name.
390     2.  Otherwise, if the certificate contains a SubjectAltName
391         extension with a Kerberos name in the otherName field,
392         it uses that name. The otherName field (of type AnotherName)
393         in the SubjectAltName extension MUST contain the following:
395         The type-id is:
397         krb5PrincipalName OBJECT IDENTIFIER ::= { iso (1) org (3) dod (6)
398         internet (1) security (5) kerberosv5 (2) 2 }
400         The value is:
402         KRB5PrincipalName ::= SEQUENCE {
403             realm                   [0] Realm,
404             principalName           [1] PrincipalName
405         }
407 If the KDC does not have its own mapping and there is no Kerberos
408 name present in the certificate, or if the name in the request does
409 not match the name in the certificate (including the realm name), or
410 if there is no name in the request, the KDC MUST return error code
411 KDC_ERR_CLIENT_NAME_MISMATCH.  There is no accompanying e-data
412 for this error.
414 Even if the chain is validated, and the names in the certificate and
415 the request match, the KDC may decide not to trust the client.  For
416 example, the certificate may include an Enxtended Key Usage (EKU) OID
417 in the extensions field.  As a matter of local policy, the KDC may
418 decide to reject requests on the basis of the absence or presence of
419 specific EKU OIDs.  In this case, the KDC MUST return error code
420 KDC_ERR_CLIENT_NOT_TRUSTED. The PKINIT EKU OID is defined as:
422     { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
423       pkinit(3) pkekuoid(4) }
425 If the client's signature on the signedAuthPack fails to verify, the KDC
426 MUST return error KDC_ERR_INVALID_SIG.  There is no accompanying
427 e-data for this error.
429 The KDC MUST check the timestamp to ensure that the request is not
430 a replay, and that the time skew falls within acceptable limits.
431 The recommendations clock skew times in CLARIFICATIONS apply here.
432 If the check fails, the KDC MUSTreturn error code KRB_AP_ERR_REPEAT
433 or KRB_AP_ERR_SKEW, respectively.
435 If the clientPublicValue is filled in, indicating that the client
436 wishes to use ephemeral-ephemeral Diffie-Hellman, the KDC checks to
437 see if the parameters satisfy its policy.  If they do not, it MUST
438 return error code KDC_ERR_KEY_SIZE.  The accompanying e-data is a
439 SEQUENCE OF TYPED-DATA, whose data-type is TD-DH-PARAMETERS, and
440 whose data-value is an OCTET STRING containing the DER encoding of a
441 DomainParameters (see [3]), including appropriate Diffie-Hellman
442 parameters with which to retry the request.
444 The KDC MUST return error code KDC_ERR_CERTIFICATE_MISMATCH if the
445 client included a kdcCert field in the PA-PK-AS-REQ and the KDC does
446 not have the corresponding certificate.
448 The KDC MUST return error code KDC_ERR_KDC_NOT_TRUSTED if the client
449 did not include a kdcCert field, but did include a trustedCertifiers
450 field, and the KDC does not possesses a certificate issued by one of
451 the listed certifiers.
453 If there is a supportedCMSTypes field in the AuthPack, the KDC must
454 check to see if it supports any of the listed types.  If it supports
455 more than one of the types, the KDC SHOULD use the one listed first.
456 If it does not support any of them, it MUST return an error of type
457 KRB5KDC_ERR_ETYPE_NOSUPP.
460 3.2.3.  KDC Reply
462 Assuming that the client's request has been properly validated, the
463 KDC proceeds as per CLARIFICATIONS, except as follows.
465 The KDC MUST set the initial flag and include an authorization data
466 of type AD-INITIAL-VERIFIED-CAS in the issued ticket.  The value is
467 an OCTET STRING containing the DER encoding of InitialVerifiedCAs:
469     InitialVerifiedCAs ::= SEQUENCE OF SEQUENCE {
470         ca                      [0] Name,
471         Validated               [1] BOOLEAN,
472         ...
473     }
475 The KDC MAY wrap any AD-INITIAL-VERIFIED-CAS data in AD-IF-RELEVANT
476 containers if the list of CAs satisfies the KDC's realm's policy.
477 (This corresponds to the TRANSITED-POLICY-CHECKED ticket flag.)
478 Furthermore, any TGS must copy such authorization data from tickets
479 used in a PA-TGS-REQ of the TGS-REQ to the resulting ticket,
480 including the AD-IF-RELEVANT container, if present.
482 Application servers that understand this authorization data type
483 SHOULD apply local policy to determine whether a given ticket
484 bearing such a type *not* contained within an AD-IF-RELEVANT
485 container is acceptable.  (This corresponds to the AP server
486 checking the transited field when the TRANSITED-POLICY-CHECKED flag
487 has not been set.)  If such a data type is contained within an
488 AD-IF-RELEVANT container, AP servers MAY apply local policy to
489 determine whether the authorization data is acceptable.
491 The AS-REP is otherwise unchanged from CLARIFICATIONS.  The KDC
492 encrypts the reply as usual, but not with the client's long-term
493 key.  Instead, it encrypts it with either a generated encryption
494 key, or a key derived from a Diffie-Hellman exchange. The contents
495 of the PA-PK-AS-REP indicate the type of encryption key that was
496 used:
498     PA-PK-AS-REP ::= CHOICE {
499         dhSignedData            [0] ContentInfo,
500                                     -- Type is SignedData.
501                                     -- Content is KDCDHKeyInfo
502                                     -- (defined below).
503         encKeyPack              [1] ContentInfo,
504                                     -- Type is EnvelopedData.
505                                     -- Content is SignedData over
506                                     -- ReplyKeyPack (defined below).
507         ...
508     }
510     KDCDHKeyInfo ::= SEQUENCE {
511         subjectPublicKey        [0] BIT STRING,
512                                     -- Equals public exponent
513                                     -- (g^a mod p).
514                                     -- INTEGER encoded as payload
515                                     -- of BIT STRING.
516         nonce                   [1] INTEGER,
517                                     -- Binds reply to request.
518                                     -- Exception: A value of zero
519                                     -- indicates that the KDC is
520                                     -- using cached values.
521         dhKeyExpiration         [2] KerberosTime OPTIONAL,
522                                     -- Expiration time for KDC's
523                                     -- cached values.
524         ...
525     }
527 The fields of the ContentInfo for dhSignedData are to be filled in
528 as follows:
530     1.  The eContent field contains data of type KDCDHKeyInfo.
532     2.  The eContentType field contains the OID value for
533         id-pkdhkeydata: { iso(1) org(3) dod(6) internet(1)
534         security(5) kerberosv5(2) pkinit(3) pkdhkeydata(2) }
536     3.  The signerInfos field contains a single signerInfo, which is
537         the signature of the KDCDHKeyInfo.
539     4.  The certificates field contains a signature verification
540         certificate chain that the client will use to verify the
541         KDC's signature over the KDCDHKeyInfo.  This field may only
542         be left empty if the client did include a kdcCert field in
543         the PA-PK-AS-REQ, indicating that it has the KDC's
544         certificate.
546     5.  If the client and KDC agree to use cached parameters, the
547         KDC MUST return a zero in the nonce field and include the
548         expiration time of the cached values in the dhKeyExpiration
549         field.  If this time is exceeded, the client MUST NOT use
550         the reply.  If the time is absent, the client MUST NOT use
551         the reply and MAY resubmit a request with a non-zero nonce,
552         thus indicating non-acceptance of the cached parameters.
554 The key is derived as follows: Both the KDC and the client calculate
555 the value g^(ab) mod p, where a and b are the client's and KDC's
556 private exponents, respectively.  They both take the first k bits of
557 this secret value as a key generation seed, where the parameter k
558 (the size of the seed) is dependent on the selected key type, as
559 specified in [6].  The seed is then converted into a protocol key by
560 applying to it a random-to-key function, which is also dependent on
561 key type.
563 If the KDC and client are not using Diffie-Hellman, the KDC encrypts
564 the reply with an encryption key, packed in the encKeyPack, which
565 contains data of type ReplyKeyPack:
567     ReplyKeyPack ::= SEQUENCE {
568         replyKey                [0] EncryptionKey,
569                                     -- Defined in CLARIFICATIONS.
570                                     -- Used to encrypt main reply.
571                                     -- MUST be at least as strong
572                                     -- as session key.  (Using the
573                                     -- same enctype and a strong
574                                     -- prng should suffice, if no
575                                     -- stronger encryption system
576                                     -- is available.)
577         nonce                   [1] INTEGER (0..4294967295),
578                                     -- Binds reply to request.
579         ...
580     }
582 The fields of the ContentInfo for encKeyPack MUST be filled in as
583 follows:
585     1.  The content is of type SignedData.  The eContent for
586         the SignedData is of type ReplyKeyPack.
588     2.  The eContentType for the SignedData contains the OID value
589         for id-pkrkeydata: { iso(1) org(3) dod(6) internet(1)
590         security(5) kerberosv5(2) pkinit(3) pkrkeydata(3) }
592     3.  The signerInfos field contains a single signerInfo, which is
593         the signature of the ReplyKeyPack.
595     4.  The certificates field contains a signature verification
596         certificate chain that the client will use to verify the
597         KDC's signature over the ReplyKeyPack.  This field may only
598         be left empty if the client included a kdcCert field in the
599         PA-PK-AS-REQ, indicating that it has the KDC's certificate.
601     5.  The contentType for the EnvelopedData contains the OID value
602         for id-signedData: { iso (1) member-body (2) us (840) rsadsi
603         (113549) pkcs (1) pkcs7 (7) signedData (2) }
605     6.  The recipientInfos field is a SET which MUST contain exactly
606         one member of type KeyTransRecipientInfo.  The encryptedKey
607         for this member contains the temporary key which is
608         encrypted using the client's public key.
610     7.  The unprotectedAttrs or originatorInfo fields MAY be
611         present.
614 3.2.4.  Validation of KDC Reply
616 Upon receipt of the KDC's reply, the client proceeds as follows.  If
617 the PA-PK-AS-REP contains a dhSignedData, the client obtains and
618 verifies the Diffie-Hellman parameters, and obtains the shared key
619 as described above.  Otherwise, the message contains an encKeyPack,
620 and the client decrypts and verifies the temporary encryption key.
622 In either case, the client MUST check to see if the included
623 certificate contains a subjectAltName extension of type dNSName or
624 iPAddress (if the KDC is specified by IP address instead of name).
625 If it does, it MUST check to see if that extension matches the KDC
626 it believes it is communicating with, with matching rules specified
627 in RFC 2459.  Exception: If the client has some external information
628 as to the identity of the KDC, this check MAY be omitted.
630 The client also MUST check that the KDC's certificate contains an
631 extendedKeyUsage OID of id-pkkdcekuoid:
633     { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2)
634       pkinit(3) pkkdcekuoid(5) }
636 If all applicable checks are satisfied, the client then decrypts the
637 main reply with the resulting key, and then proceeds as described in
638 CLARIFICATIONS.
641 4.  Security Considerations
643 PKINIT raises certain security considerations beyond those that can
644 be regulated strictly in protocol definitions.  We will address them
645 in this section.
647 PKINIT extends the cross-realm model to the public-key
648 infrastructure.  Users of PKINIT must understand security policies
649 and procedures appropriate to the use of Public Key Infrastructures.
651 Standard Kerberos allows the possibility of interactions between
652 cryptosystems of varying strengths; this document adds interactions
653 with public-key cryptosystems to Kerberos.  Some administrative
654 policies may allow the use of relatively weak public keys.  Using
655 such keys to wrap data encrypted under stronger conventional
656 cryptosystems may be inappropriate.
658 PKINIT requires keys for symmetric cryptosystems to be generated.
659 Some such systems contain "weak" keys.  For recommendations regarding
660 these weak keys, see CLARIFICATIONS.
662 PKINIT allows the use of a zero nonce in the PKAuthenticator when
663 cached Diffie-Hellman keys are used.  In this case, message binding
664 is performed using the nonce in the main request in the same way as
665 it is done for ordinary AS-REQs (without the PKINIT
666 pre-authenticator).  The nonce field in the KDC request body is
667 signed through the checksum in the PKAuthenticator, which
668 cryptographically binds the PKINIT pre-authenticator to the main
669 body of the AS Request and also provides message integrity for the
670 full AS Request.
672 However, when a PKINIT pre-authenticator in the AS-REP has a
673 zero-nonce, and an attacker has somehow recorded this
674 pre-authenticator and discovered the corresponding Diffie-Hellman
675 private key (e.g., with a brute-force attack), the attacker will be
676 able to fabricate his own AS-REP messages that impersonate the KDC
677 with this same pre-authenticator.  This compromised pre-authenticator
678 will remain valid as long as its expiration time has not been reached
679 and it is therefore important for clients to check this expiration
680 time and for the expiration time to be reasonably short, which
681 depends on the size of the Diffie-Hellman group.
683 If a client also caches its Diffie-Hellman keys, then the session key
684 could remain the same during multiple AS-REQ/AS-REP exchanges and an
685 attacker which compromised the session key could fabricate his own
686 AS-REP messages with a pre-recorded pre-authenticator until the
687 client starts using a new Diffie-Hellman key pair and while the KDC
688 pre-authenticator has not yet expired.  It is therefore not
689 recommended for KDC clients to also cache their Diffie-Hellman keys.
691 Care should be taken in how certificates are chosen for the purposes
692 of authentication using PKINIT.  Some local policies may require
693 that key escrow be used for certain certificate types.  Deployers of
694 PKINIT should be aware of the implications of using certificates that
695 have escrowed keys for the purposes of authentication.
697 PKINIT does not provide for a "return routability" test to prevent
698 attackers from mounting a denial-of-service attack on the KDC by
699 causing it to perform unnecessary and expensive public-key
700 operations.  Strictly speaking, this is also true of standard
701 Kerberos, although the potential cost is not as great, because
702 standard Kerberos does not make use of public-key cryptography.
704 The syntax for the AD-INITIAL-VERIFIED-CAS authorization data does
705 permit empty SEQUENCEs to be encoded.  Such empty sequences may only
706 be used if the KDC itself vouches for the user's certificate.  [This
707 seems to reflect the consensus of the Kerberos working group.]
710 5.  Acknowledgements
712 Some of the ideas on which this document is based arose during
713 discussions over several years between members of the SAAG, the IETF
714 CAT working group, and the PSRG, regarding integration of Kerberos
715 and SPX.  Some ideas have also been drawn from the DASS system.
716 These changes are by no means endorsed by these groups.  This is an
717 attempt to revive some of the goals of those groups, and this
718 document approaches those goals primarily from the Kerberos
719 perspective.  Lastly, comments from groups working on similar ideas
720 in DCE have been invaluable.
723 6.  Expiration Date
725 This draft expires January 25, 2004.
728 7.  Bibliography
730 [1]  RFC-Editor: To be replaced by RFC number for
731 draft-ietf-krb-wg-kerberos-clarifications.
733 [2] R. Housley. Cryptographic Message Syntax., April 1999.
734 Request For Comments 2630.
736 [3] W. Polk, R. Housley, and L. Bassham. Algorithms and Identifiers
737 for the Internet X.509 Public Key Infrastructure Certificate and
738 Certificate Revocation List (CRL) Profile, April 2002. Request For
739 Comments 3279.
741 [4] R. Housley, W. Polk, W. Ford, D. Solo. Internet X.509 Public
742 Key Infrastructure Certificate and Certificate Revocation List
743 (CRL) Profile, April 2002. Request for Comments 3280.
745 [5] B. Kaliski, J. Staddon. PKCS #1: RSA Cryptography
746 Specifications, October 1998.  Request for Comments 2437.
748 [6] RFC-Editor: To be replaced by RFC number for
749 draft-ietf-krb-wg-crypto.
751 [7] S. Blake-Wilson, M. Nystrom, D. Hopwood, J. Mikkelsen, and
752 T. Wright. Transport Layer Security (TLS) Extensions, June 2003.
753 Request for Comments 3546.
755 [8] M. Myers, R. Ankney, A. Malpani, S. Galperin, and C. Adams.
756 Internet X.509 Public Key Infrastructure: Online Certificate Status
757 Protocol - OCSP, June 1999.  Request for Comments 2560.
759 [9] NIST, Guidelines for Implementing and Using the NBS Encryption
760 Standard, April 1981.  FIPS PUB 74.
762 [10] D. Harkins and D. Carrel.  The Internet Key Exchange (IKE),
763 November 1998.  Request for Comments 2409.
766 8.  Authors
768 Brian Tung
769 Clifford Neuman
770 USC Information Sciences Institute
771 4676 Admiralty Way Suite 1001
772 Marina del Rey CA 90292-6695
773 Phone: +1 310 822 1511
774 E-mail: {brian,bcn}@isi.edu
776 Matthew Hur
777 Ari Medvinsky
778 Microsoft Corporation
779 One Microsoft Way
780 Redmond WA 98052
781 Phone: +1 425 707 3336
782 E-mail: matthur@microsoft.com, arimed@windows.microsoft.com
784 Sasha Medvinsky
785 Motorola, Inc.
786 6450 Sequence Drive
787 San Diego, CA 92121
788 +1 858 404 2367
789 E-mail: smedvinsky@motorola.com
791 John Wray
792 Iris Associates, Inc.
793 5 Technology Park Dr.
794 Westford, MA 01886
795 E-mail: John_Wray@iris.com
797 Jonathan Trostle
798 E-mail: jtrostle@world.std.com
801 Appendix A.  PKINIT ASN.1 Module
803 KerberosV5-PK-INIT-SPEC {
804            iso(1) identified-organization(3) dod(6) internet(1)
805            security(5) kerberosV5(2) modules(4) pkinit(TBD)
806 } DEFINITIONS EXPLICIT TAGS ::= BEGIN
808     IMPORTS
809         SubjectPublicKeyInfo, AlgorithmIdentifier, Name
810             FROM PKIX1Explicit88 { iso (1) identified-organization (3)
811               dod (6) internet (1) security (5) mechanisms (5)
812               pkix (7) id-mod (0) id-pkix1-explicit (18) }
814         ContentInfo, IssuerAndSerialNumber
815             FROM CryptographicMessageSyntax { iso(1) member-body(2)
816               us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
817               modules(0) cms(1) }
819         KerberosTime, Checksum, TYPED-DATA, PrincipalName, Realm, EncryptionKey
820             FROM KerberosV5Spec2 { iso(1) identified-organization(3)
821               dod(6) internet(1) security(5) kerberosV5(2) modules(4)
822               krb5spec2(2) } ;
824     id-pkinit  OBJECT IDENTIFIER ::=
825       { iso (1) org (3) dod (6) internet (1) security (5)
826         kerberosv5 (2) pkinit (3) }
828     id-pkdhkeydata  OBJECT IDENTIFIER  ::= { id-pkinit 1 }
829     id-pkdhkeydata  OBJECT IDENTIFIER  ::= { id-pkinit 2 }
830     id-pkrkeydata  OBJECT IDENTIFIER  ::= { id-pkinit 3 }
831     id-pkekuoid  OBJECT IDENTIFIER  ::= { id-pkinit 4 }
832     id-pkkdcekuoid  OBJECT IDENTIFIER  ::= { id-pkinit 5 }
834     pa-pk-as-req INTEGER ::=                 TBD
835     pa-pk-as-rep INTEGER ::=                 TBD
836     pa-pk-ocsp-req INTEGER ::=               TBD
837     pa-pk-ocsp-rep INTEGER ::=               TBD
839     ad-initial-verified-cas INTEGER ::=      TBD
841     td-dh-parameters INTEGER ::=             TBD
842     td-trusted-certifiers INTEGER ::=        104
843     td-certificate-index INTEGER ::=         105
845     PA-PK-AS-REQ ::= SEQUENCE {
846         signedAuthPack          [0] ContentInfo,
847         trustedCertifiers       [1] SEQUENCE OF TrustedCA OPTIONAL,
848         kdcCert                 [2] IssuerAndSerialNumber OPTIONAL,
849         ...
850     }
852     TrustedCA ::= CHOICE {
853         caName                  [0] Name,
854         issuerAndSerial         [2] IssuerAndSerialNumber,
855         ...
856     }
858     AuthPack ::= SEQUENCE {
859         pkAuthenticator         [0] PKAuthenticator,
860         clientPublicValue       [1] SubjectPublicKeyInfo OPTIONAL,
861         supportedCMSTypes       [2] SEQUENCE OF AlgorithmIdentifier
862                                     OPTIONAL,
863         ...
864     }
866     PKAuthenticator ::= SEQUENCE {
867         cusec                   [0] INTEGER,
868         ctime                   [1] KerberosTime,
869         nonce                   [2] INTEGER (0..4294967295),
870         paChecksum              [3] Checksum,
871         ...
872     }
874     TrustedCertifiers ::= SEQUENCE OF Name
876     CertificateIndex ::= IssuerAndSerialNumber
878     KRB5PrincipalName ::= SEQUENCE {
879         realm                   [0] Realm,
880         principalName           [1] PrincipalName
881     }
883     InitialVerifiedCAs ::= SEQUENCE OF SEQUENCE {
884         ca                      [0] Name,
885         validated               [1] BOOLEAN,
886         ...
887     }
889     PA-PK-AS-REP ::= CHOICE {
890         dhSignedData            [0] ContentInfo,
891         encKeyPack              [1] ContentInfo,
892         ...
893     }
895     KDCDHKeyInfo ::= SEQUENCE {
896         subjectPublicKey        [0] BIT STRING,
897         nonce                   [1] INTEGER,
898         dhKeyExpiration         [2] KerberosTime OPTIONAL,
899         ...
900     }
902     ReplyKeyPack ::= SEQUENCE {
903         replyKey                [0] EncryptionKey,
904         nonce                   [1] INTEGER (0..4294967295),
905         ...
906     }