Rename context handle lifetime to endtime
[heimdal.git] / doc / standardisation / draft-ietf-cat-kerberos-pk-init-18.txt
blobf3c795f282b074d9f64d34328e5fa9a0a7092d09
1 INTERNET-DRAFT                                                Brian Tung
2 draft-ietf-cat-kerberos-pk-init-18.txt                   Clifford Neuman
3 Updates: RFC 1510bis                                             USC/ISI
4 expires August 20, 2004                                      Matthew Hur
5                                                            Ari Medvinsky
6                                                    Microsoft Corporation
7                                                          Sasha Medvinsky
8                                                           Motorola, Inc.
9                                                                John Wray
10                                                    Iris Associates, Inc.
11                                                         Jonathan Trostle
13     Public Key Cryptography for Initial Authentication in Kerberos
15 0.  Status Of This Memo
17 This document is an Internet-Draft and is in full conformance with
18 all provision of Section 10 of RFC 2026.  Internet-Drafts are
19 working documents of the Internet Engineering Task Force (IETF), its
20 areas, and its working groups.  Note that other groups may also
21 distribute working documents as Internet-Drafts.
23 Internet-Drafts are draft documents valid for a maximum of six
24 months and may be updated, replaced, or obsoleted by other documents
25 at any time.  It is inappropriate to use Internet-Drafts as
26 reference material or to cite them other than as "work in progress."
28 The list of current Internet-Drafts can be accessed at
29 http://www.ietf.org/ietf/1id-abstracts.txt
31 The list of Internet-Draft Shadow Directories can be accessed at
32 http://www.ietf.org/shadow.html
34 The distribution of this memo is unlimited.  It is filed as
35 draft-ietf-cat-kerberos-pk-init-18.txt and expires August 20, 2004.
36 Please send comments to the authors.
39 1.  Abstract
41 This draft describes protocol extensions (hereafter called PKINIT)
42 to the Kerberos protocol specification (RFC 1510bis [1]).  These
43 extensions provide a method for integrating public key cryptography
44 into the initial authentication exchange, by passing cryptographic
45 certificates and associated authenticators in preauthentication data
46 fields.
49 2.  Introduction
51 A client typically authenticates itself to a service in Kerberos
52 using three distinct though related exchanges.  First, the client
53 requests a ticket-granting ticket (TGT) from the Kerberos
54 authentication server (AS).  Then, it uses the TGT to request a
55 service ticket from the Kerberos ticket-granting server (TGS).
56 Usually, the AS and TGS are integrated in a single device known as
57 a Kerberos Key Distribution Center, or KDC.  (In this draft, we will
58 refer to both the AS and the TGS as the KDC.) Finally, the client
59 uses the service ticket to authenticate itself to the service.
61 The advantage afforded by the TGT is that the user need only
62 explicitly request a ticket and expose his credentials once.  The
63 TGT and its associated session key can then be used for any
64 subsequent requests.  One implication of this is that all further
65 authentication is independent of the method by which the initial
66 authentication was performed.  Consequently, initial authentication
67 provides a convenient place to integrate public-key cryptography
68 into Kerberos authentication.
70 As defined, Kerberos authentication exchanges use symmetric-key
71 cryptography, in part for performance.  (Symmetric-key cryptography
72 is typically 10-100 times faster than public-key cryptography,
73 depending on the public-key operations. [cite])  One cost of using
74 symmetric-key cryptography is that the keys must be shared, so that
75 before a user can authentication himself, he must already be
76 registered with the KDC.
78 Conversely, public-key cryptography--in conjunction with an
79 established certification infrastructure--permits authentication
80 without prior registration.  Adding it to Kerberos allows the
81 widespread use of Kerberized applications by users without requiring
82 them to register first--a requirement that has no inherent security
83 benefit.
85 As noted above, a convenient and efficient place to introduce
86 public-key cryptography into Kerberos is in the initial
87 authentication exchange.  This document describes the methods and
88 data formats for integrating public-key cryptography into Kerberos
89 initial authentication.  Another document (PKCROSS) describes a
90 similar protocol for Kerberos cross-realm authentication.
93 3.  Extensions
95 This section describes extensions to RFC 1510bis for supporting the
96 use of public-key cryptography in the initial request for a ticket
97 granting ticket (TGT).
99 Briefly, the following changes to RFC 1510bis are proposed:
101     1.  If public-key authentication is indicated, the client sends
102         the user's public-key data and an authenticator in a
103         preauthentication field accompanying the usual request.
104         This authenticator is signed by the user's private
105         signature key.
107     2.  The KDC verifies the client's request against its own
108         policy and certification authorities.
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 randomly generated key, signed using the KDC's
114             signature key and encrypted using the user'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 key data required by the client to obtain the encryption
121         key is returned in a preauthentication field accompanying
122         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.
129 Implementation of all specified formats and uses in these sections
130 is REQUIRED for compliance with PKINIT.
133 3.1.  Definitions
136 3.1.1.  Required Algorithms
138 At minimum, PKINIT must be able to use the following algorithms:
140     Reply key (or DH-derived key): AES256-CTS-HMAC-SHA1-96 etype
141       (as required by clarifications).
142     Signature algorithm: SHA-1 digest and RSA.
143     Reply key delivery method: ephemeral-ephemeral Diffie-Hellman
144       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
155     PA-PK-OCSP-REQ                           TBD
156     PA-PK-OCSP-REP                           TBD
158 PKINIT also makes use of the following new authorization data type:
160     AD-INITIAL-VERIFIED-CAS                  TBD
162 PKINIT introduces the following new error types:
164     KDC_ERR_CLIENT_NOT_TRUSTED                62
165     KDC_ERR_KDC_NOT_TRUSTED                   63
166     KDC_ERR_INVALID_SIG                       64
167     KDC_ERR_KEY_TOO_WEAK                      65
168     KDC_ERR_CERTIFICATE_MISMATCH              66
169     KDC_ERR_CANT_VERIFY_CERTIFICATE           70
170     KDC_ERR_INVALID_CERTIFICATE               71
171     KDC_ERR_REVOKED_CERTIFICATE               72
172     KDC_ERR_REVOCATION_STATUS_UNKNOWN         73
173     KDC_ERR_CLIENT_NAME_MISMATCH              75
175 PKINIT uses the following typed data types for errors:
177     TD-DH-PARAMETERS                         102
178     TD-TRUSTED-CERTIFIERS                    104
179     TD-CERTIFICATE-INDEX                     105
181 PKINIT defines the following encryption types, for use in the AS-REQ
182 message (to indicate acceptance of the corresponding encryption OIDs
183 in PKINIT):
185     dsaWithSHA1-CmsOID                         9
186     md5WithRSAEncryption-CmsOID               10
187     sha1WithRSAEncryption-CmsOID              11
188     rc2CBC-EnvOID                             12
189     rsaEncryption-EnvOID   (PKCS1 v1.5)       13
190     rsaES-OAEP-ENV-OID     (PKCS1 v2.0)       14
191     des-ede3-cbc-Env-OID                      15
193 The above encryption types are used (in PKINIT) only within CMS [8]
194 structures within the PKINIT preauthentication fields.  Their use
195 within Kerberos EncryptedData structures is unspecified.
198 3.1.3.  Algorithm Identifiers
200 PKINIT does not define, but does make use of, the following
201 algorithm identifiers.
203 PKINIT uses the following algorithm identifier for Diffie-Hellman
204 key agreement [11]:
206     dhpublicnumber
208 PKINIT uses the following signature algorithm identifiers [8, 12]:
210     sha-1WithRSAEncryption (RSA with SHA1)
211     md5WithRSAEncryption   (RSA with MD5)
212     id-dsa-with-sha1       (DSA with SHA1)
214 PKINIT uses the following encryption algorithm identifiers [12] for
215 encrypting the temporary key with a public key:
217     rsaEncryption          (PKCS1 v1.5)
218     id-RSAES-OAEP          (PKCS1 v2.0)
220 These OIDs are not to be confused with the encryption types listed
221 above.
223 PKINIT uses the following algorithm identifiers [8] for encrypting
224 the reply key with the temporary key:
226     des-ede3-cbc           (three-key 3DES, CBC mode)
227     rc2-cbc                (RC2, CBC mode)
229 Again, these OIDs are not to be confused with the encryption types
230 listed above.
233 3.2.  PKINIT Preauthentication Syntax and Use
235 In this section, we describe the syntax and use of the various
236 preauthentication fields employed to implement PKINIT.
239 3.2.1.  Client Request
241 The initial authentication request (AS-REQ) is sent as per RFC
242 1510bis, except that a preauthentication field containing data
243 signed by the user's private signature key accompanies the request,
244 as follows:
246     PA-PK-AS-REQ ::= SEQUENCE {
247                                     -- PAType TBD
248         signedAuthPack          [0] ContentInfo,
249                                     -- Defined in CMS.
250                                     -- Type is SignedData.
251                                     -- Content is AuthPack
252                                     -- (defined below).
253         trustedCertifiers       [1] SEQUENCE OF TrustedCAs OPTIONAL,
254                                     -- A list of CAs, trusted by
255                                     -- the client, used to certify
256                                     -- KDCs.
257         kdcCert                 [2] IssuerAndSerialNumber OPTIONAL,
258                                     -- Defined in CMS.
259                                     -- Identifies a particular KDC
260                                     -- certificate, if the client
261                                     -- already has it.
262         encryptionCert          [3] IssuerAndSerialNumber OPTIONAL,
263                                     -- May identify the user's
264                                     -- Diffie-Hellman certificate,
265                                     -- or an RSA encryption key
266                                     -- certificate.
267         ...
268     }
270     TrustedCAs ::= CHOICE {
271         caName                  [0] Name,
272                                     -- Fully qualified X.500 name
273                                     -- as defined in X.509 [11].
274         issuerAndSerial         [1] IssuerAndSerialNumber,
275                                     -- Identifies a specific CA
276                                     -- certificate, if the client
277                                     -- only trusts one.
278         ...
279     }
281     AuthPack ::= SEQUENCE {
282         pkAuthenticator         [0] PKAuthenticator,
283         clientPublicValue       [1] SubjectPublicKeyInfo OPTIONAL
284                                     -- Defined in X.509,
285                                     -- reproduced below.
286                                     -- Present only if the client
287                                     -- is using ephemeral-ephemeral
288                                     -- Diffie-Hellman.
289     }
291     PKAuthenticator ::= SEQUENCE {
292         cusec                   [0] INTEGER,
293         ctime                   [1] KerberosTime,
294                                     -- cusec and ctime are used as
295                                     -- in RFC 1510bis, for replay
296                                     -- prevention.
297         nonce                   [2] INTEGER,
298                                     -- Binds reply to request,
299                                     -- except is zero when client
300                                     -- will accept cached
301                                     -- Diffie-Hellman parameters
302                                     -- from KDC and MUST NOT be
303                                     -- zero otherwise.
304                                     -- MUST be < 2^32.
305         paChecksum              [3] Checksum,
306                                     -- Defined in [15].
307                                     -- Performed over KDC-REQ-BODY,
308                                     -- must be unkeyed.
309         ...
310     }
312     IMPORTS
313         -- from X.509
314         SubjectPublicKeyInfo, AlgorithmIdentifier, DomainParameters,
315           ValidationParms
316             FROM PKIX1Explicit88 { iso (1) identified-organization (3)
317               dod (6) internet (1) security (5) mechanisms (5)
318               pkix (7) id-mod (0) id-pkix1-explicit-88 (1) }
320 The ContentInfo in the signedAuthPack is filled out as follows:
322     1.  The eContent field contains data of type AuthPack.  It MUST
323         contain the pkAuthenticator, and MAY also contain the
324         user's Diffie-Hellman public value (clientPublicValue).
326     2.  The eContentType field MUST contain the OID value for
327         pkauthdata: { iso (1) org (3) dod (6) internet (1)
328         security (5) kerberosv5 (2) pkinit (3) pkauthdata (1)}
330     3.  The signerInfos field MUST contain the signature of the
331         AuthPack.
333     4.  The certificates field MUST contain at least a signature
334         verification certificate chain that the KDC can use to
335         verify the signature on the AuthPack.  Additionally, the
336         client may also insert an encryption certificate chain, if
337         (for example) the client is not using ephemeral-ephemeral
338         Diffie-Hellman.
340     5.  If a Diffie-Hellman key is being used, the parameters SHOULD
341         be chosen from the First or Second defined Oakley Groups.
342         (See RFC 2409 [c].)
344     6.  The KDC may wish to use cached Diffie-Hellman parameters.
345         To indicate acceptance of caching, the client sends zero in
346         the nonce field of the pkAuthenticator.  Zero is not a valid
347         value for this field under any other circumstances.  Since
348         zero is used to indicate acceptance of cached parameters,
349         message binding in this case is performed instead using the
350         nonce in the main request.
353 3.2.2.  Validation of Client Request
355 Upon receiving the client's request, the KDC validates it.  This
356 section describes the steps that the KDC MUST (unless otherwise
357 noted) take in validating the request.
359 The KDC must look for a user certificate in the signedAuthPack.
360 If it cannot find one signed by a CA it trusts, it sends back an
361 error of type KDC_ERR_CANT_VERIFY_CERTIFICATE.  The accompanying
362 e-data for this error is a SEQUENCE OF TypedData:
364     TypedData ::= SEQUENCE {
365                                     -- As defined in RFC 1510bis.
366         data-type               [0] INTEGER,
367         data-value              [1] OCTET STRING
368     }
370 For this error, the data-type is TD-TRUSTED-CERTIFIERS, and the
371 data-value is an OCTET STRING containing the DER encoding of
373     TrustedCertifiers ::= SEQUENCE OF Name
375 If, while verifying the certificate chain, the KDC determines that
376 the signature on one of the certificates in the signedAuthPack is
377 invalid, it returns an error of type KDC_ERR_INVALID_CERTIFICATE.
378 The accompanying e-data for this error is a SEQUENCE OF TypedData,
379 whose data-type is TD-CERTIFICATE-INDEX, and whose data-value is an
380 OCTET STRING containing the DER encoding of the index into the
381 CertificateSet field, ordered as sent by the client:
383     CertificateIndex ::= INTEGER
384                                     -- 0 = first certificate (in
385                                     --     order of encoding),
386                                     -- 1 = second certificate, etc.
388 If more than one signature is invalid, the KDC sends one TypedData
389 per invalid signature.
391 The KDC MAY also check whether any of the certificates in the user's
392 chain have been revoked.  If any of them have been revoked, the KDC
393 returns an error of type KDC_ERR_REVOKED_CERTIFICATE; if the KDC
394 attempts to determine the revocation status but is unable to do so,
395 it SHOULD return an error of type KDC_ERR_REVOCATION_STATUS_UNKNOWN.
396 The certificate or certificates affected are identified exactly as
397 for an error of type KDC_ERR_INVALID_CERTIFICATE (see above).
399 If the certificate chain is successfully validated, but the user's
400 certificate is not authorized to the client's principal name in the
401 AS-REQ (when present), the KDC MUST return an error of type
402 KDC_ERR_CLIENT_NAME_MISMATCH.  There is no accompanying e-data for
403 this error.
405 Even if the chain is validated, and the names in the certificate and
406 the request match, the KDC may decide not to trust the client.  For
407 example, the certificate may include (or not include) an Enhanced
408 Key Usage (EKU) OID in the extensions field.  As a matter of local
409 policy, the KDC may decide to reject requests on the basis of the
410 absence or presence of specific EKU OIDs.  In this case, the KDC
411 returns an error of type KDC_ERR_CLIENT_NOT_TRUSTED.  For the
412 benefit of implementors, we define a PKINIT EKU OID as follows:
413 { iso (1) org (3) dod (6) internet (1) security (5) kerberosv5 (2)
414 pkinit (3) pkekuoid (4) }.
416 If the certificate chain and usage check out, but the client's
417 signature on the signedAuthPack fails to verify, the KDC returns an
418 error of type KDC_ERR_INVALID_SIG.  There is no accompanying e-data
419 for this error.
421 The KDC must check the timestamp to ensure that the request is not
422 a replay, and that the time skew falls within acceptable limits.
423 The recommendations for ordinary (that is, non-PKINIT) skew times
424 apply here.  If the check fails, the KDC returns an error of type
425 KRB_AP_ERR_REPEAT or KRB_AP_ERR_SKEW, respectively.
427 Finally, if the clientPublicValue is filled in, indicating that the
428 client wishes to use ephemeral-ephemeral Diffie-Hellman, the KDC
429 checks to see if the parameters satisfy its policy.  If they do not,
430 it returns an error of type KDC_ERR_KEY_TOO_WEAK.  The accompanying
431 e-data is a SEQUENCE OF TypedData, whose data-type is
432 TD-DH-PARAMETERS, and whose data-value is an OCTET STRING containing
433 the DER encoding of a DomainParameters (see above), including
434 appropriate Diffie-Hellman parameters with which to retry the
435 request.
437 In order to establish authenticity of the reply, the KDC will sign
438 some key data (either the random key used to encrypt the reply in
439 the case of a KDCDHKeyInfo, or the Diffie-Hellman parameters used to
440 generate the reply-encrypting key in the case of a ReplyKeyPack).
441 The signature certificate to be used is to be selected as follows:
443     1.  If the client included a kdcCert field in the PA-PK-AS-REQ,
444         use the referred-to certificate, if the KDC has it.  If it
445         does not, the KDC returns an error of type
446         KDC_ERR_CERTIFICATE_MISMATCH.
447        
448     2.  Otherwise, if the client did not include a kdcCert field,
449         but did include a trustedCertifiers field, and the KDC
450         possesses a certificate issued by one of the listed
451         certifiers, use that certificate.  if it does not possess
452         one, it returns an error of type KDC_ERR_KDC_NOT_TRUSTED.
454     3.  Otherwise, if the client included neither a kdcCert field
455         nor a trustedCertifiers field, and the KDC has only one
456         signature certificate, use that certificate.  If it has
457         more than one certificate, it returns an error of type
458         KDC_ERR_CERTIFICATE_MISMATCH.
461 3.2.3.  KDC Reply
463 Assuming that the client's request has been properly validated, the
464 KDC proceeds as per RFC 1510bis, except as follows.
466 The user's name as represented in the AS-REP must be derived from
467 the certificate provided in the client's request.  If the KDC has
468 its own mapping from the name in the certificate to a Kerberos name,
469 it uses that Kerberos name.
471 Otherwise, if the certificate contains a SubjectAltName extension
472 with a KerberosName in the otherName field, it uses that name.
474     AnotherName ::= SEQUENCE {
475                                     -- Defined in [11].
476         type-id                     OBJECT IDENTIFIER,
477         value                   [0] EXPLICIT ANY DEFINED BY type-id
478     }
480     KerberosName ::= SEQUENCE {
481         realm                   [0] Realm,
482         principalName           [1] PrincipalName
483     }
485 with OID
487     krb5 OBJECT IDENTIFIER ::= { iso (1) org (3) dod (6) internet (1)
488                                  security (5) kerberosv5 (2) }
490     krb5PrincipalName OBJECT IDENTIFIER ::= { krb5 2 }
492 In this case, the realm in the ticket is that of the local realm (or
493 some other realm name chosen by that realm).  Otherwise, the KDC
494 returns an error of type KDC_ERR_CLIENT_NAME_MISMATCH.
496 In addition, the KDC MUST set the initial flag in the issued TGT
497 *and* add an authorization data of type AD-INITIAL-VERIFIED-CAS to
498 the TGT.  The value is an OCTET STRING containing the DER encoding
499 of InitialVerifiedCAs:
501     InitialVerifiedCAs ::= SEQUENCE OF SEQUENCE {
502         ca                      [0] Name,
503         ocspValidated           [1] BOOLEAN,
504         ...
505     }
507 The KDC MAY wrap any AD-INITIAL-VERIFIED-CAS data in AD-IF-RELEVANT
508 containers if the list of CAs satisfies the KDC's realm's policy.
509 (This corresponds to the TRANSITED-POLICY-CHECKED ticket flag.)
510 Furthermore, any TGS must copy such authorization data from tickets
511 used in a PA-TGS-REQ of the TGS-REQ to the resulting ticket,
512 including the AD-IF-RELEVANT container, if present.
514 AP servers that understand this authorization data type SHOULD apply
515 local policy to determine whether a given ticket bearing such a type
516 (not contained within an AD-IF-RELEVANT container) is acceptable.
517 (This corresponds to the AP server checking the transited field when
518 the TRANSITED-POLICY-CHECKED flag has not been set.)  If such a data
519 type *is* contained within an AD-IF-RELEVANT container, AP servers
520 still MAY apply local policy to determine whether the authorization
521 data is acceptable.
523 The AS-REP is otherwise unchanged from RFC 1510bis.  The KDC then
524 encrypts the reply as usual, but not with the user's long-term key.
525 Instead, it encrypts it with either a random encryption key, or a
526 key derived from a Diffie-Hellman exchange.  Which is the case is
527 indicated by the contents of the PA-PK-AS-REP (note tags):
529     PA-PK-AS-REP ::= CHOICE {
530                                     -- PAType YY (TBD)
531         dhSignedData            [0] ContentInfo,
532                                     -- Type is SignedData.
533                                     -- Content is KDCDHKeyInfo
534                                     -- (defined below).
535         encKeyPack              [1] ContentInfo,
536                                     -- Type is EnvelopedData.
537                                     -- Content is ReplyKeyPack
538                                     -- (defined below).
539         ...
540     }
542 Note that PA-PK-AS-REP is a CHOICE: either a dhSignedData, or an
543 encKeyPack, but not both.  The former contains data of type
544 KDCDHKeyInfo, and is used only when the reply is encrypted using a
545 Diffie-Hellman derived key:
547     KDCDHKeyInfo ::= SEQUENCE {
548         subjectPublicKey        [0] BIT STRING,
549                                     -- Equals public exponent
550                                     -- (g^a mod p).
551                                     -- INTEGER encoded as payload
552                                     -- of BIT STRING.
553         nonce                   [1] INTEGER,
554                                     -- Binds reply to request.
555                                     -- Exception: A value of zero
556                                     -- indicates that the KDC is
557                                     -- using cached values.
558         dhKeyExpiration         [2] KerberosTime OPTIONAL,
559                                     -- Expiration time for KDC's
560                                     -- cached values.
561         ...
562     }
564 The fields of the ContentInfo for dhSignedData are to be filled in
565 as follows:
567     1.  The eContent field contains data of type KDCDHKeyInfo.
569     2.  The eContentType field contains the OID value for
570         pkdhkeydata: { iso (1) org (3) dod (6) internet (1)
571         security (5) kerberosv5 (2) pkinit (3) pkdhkeydata (2) }
573     3.  The signerInfos field contains a single signerInfo, which is
574         the signature of the KDCDHKeyInfo.
576     4.  The certificates field contains a signature verification
577         certificate chain that the client may use to verify the
578         KDC's signature over the KDCDHKeyInfo.)  It may only be left
579         empty if the client did not include a trustedCertifiers
580         field in the PA-PK-AS-REQ, indicating that it has the KDC's
581         certificate.
583     5.  If the client and KDC agree to use cached parameters, the
584         KDC SHOULD return a zero in the nonce field and include the
585         expiration time of the cached values in the dhKeyExpiration
586         field.  If this time is exceeded, the client SHOULD NOT use
587         the reply.  If the time is absent, the client SHOULD NOT use
588         the reply and MAY resubmit a request with a non-zero nonce,
589         thus indicating non-acceptance of the cached parameters.
591 The key is derived as follows: Both the KDC and the client calculate
592 the value g^(ab) mod p, where a and b are the client's and KDC's
593 private exponents, respectively.  They both take the first k bits of
594 this secret value as a key generation seed, where the parameter k
595 (the size of the seed) is dependent on the selected key type, as
596 specified in the Kerberos crypto draft [15].  The seed is then
597 converted into a protocol key by applying to it a random-to-key
598 function, which is also dependent on key type.
600 The protocol key is used to derive the integrity key Ki and the
601 encryption key Ke according to [15].  Ke and Ki are used to generate
602 the encrypted part of the AS-REP.
604     1.  For example, if the encryption type is DES with MD4, k = 64
605         bits and the random-to-key function consists of replacing
606         some of the bits with parity bits, according to FIPS PUB 74
607         [cite].  In this case, the key derivation function for Ke is
608         the identity function, and Ki is not needed because the
609         checksum in the EncryptedData is not keyed.
611     2.  If the encryption type is three-key 3DES with HMAC-SHA1,
612         k = 168 bits and the random-to-key function is
613         DES3random-to-key as defined in [15].  This function inserts
614         parity bits to create a 192-bit 3DES protocol key that is
615         compliant with FIPS PUB 74 [cite].  Ke and Ki are derived
616         from this protocol key according to [15] with the key usage
617         number set to 3 (AS-REP encrypted part).
619 If the KDC and client are not using Diffie-Hellman, the KDC encrypts
620 the reply with an encryption key, packed in the encKeyPack, which
621 contains data of type ReplyKeyPack:
623     ReplyKeyPack ::= SEQUENCE {
624         replyKey                [0] EncryptionKey,
625                                     -- Defined in RFC 1510bis.
626                                     -- Used to encrypt main reply.
627                                     -- MUST be at least as large
628                                     -- as session key.
629         nonce                   [1] INTEGER,
630                                     -- Binds reply to request.
631                                     -- MUST be < 2^32.
632         ...
633     }
635 The fields of the ContentInfo for encKeyPack MUST be filled in as
636 follows:
638     1.  The innermost data is of type SignedData.  The eContent for
639         this data is of type ReplyKeyPack.
641     2.  The eContentType for this data contains the OID value for
642         pkrkeydata: { iso (1) org (3) dod (6) internet (1)
643         security (5) kerberosv5 (2) pkinit (3) pkrkeydata (3) }
645     3.  The signerInfos field contains a single signerInfo, which is
646         the signature of the ReplyKeyPack.
648     4.  The certificates field contains a signature verification
649         certificate chain, which the client may use to verify the
650         KDC's signature over the ReplyKeyPack.)  It may only be left
651         empty if the client did not include a trustedCertifiers
652         field in the PA-PK-AS-REQ, indicating that it has the KDC's
653         certificate.
655     5.  The outer data is of type EnvelopedData.  The
656         encryptedContent for this data is the SignedData described
657         in items 1 through 4, above.
659     6.  The encryptedContentType for this data contains the OID
660         value for id-signedData: { iso (1) member-body (2) us (840)
661         rsadsi (113549) pkcs (1) pkcs7 (7) signedData (2) }
663     7.  The recipientInfos field is a SET which MUST contain exactly
664         one member of type KeyTransRecipientInfo.  The encryptedKey
665         for this member contains the temporary key which is
666         encrypted using the client's public key.
668     8.  Neither the unprotectedAttrs field nor the originatorInfo
669         field is required for PKINIT.
672 3.2.4.  Validation of KDC Reply
674 Upon receipt of the KDC's reply, the client proceeds as follows.  If
675 the PA-PK-AS-REP contains a dhSignedData, the client obtains and
676 verifies the Diffie-Hellman parameters, and obtains the shared key
677 as described above.  Otherwise, the message contains an encKeyPack,
678 and the client decrypts and verifies the temporary encryption key.
679 In either case, the client then decrypts the main reply with the
680 resulting key, and then proceeds as described in RFC 1510bis.
683 3.2.5.  Support for OCSP
685 OCSP (Online Certificate Status Protocol) [cite] allows the use of
686 on-line requests for a client or server to determine the validity of
687 each other's certificates.  It is particularly useful for clients
688 authenticating each other across a constrained network.  These
689 clients will not have to download the entire CRL to check for the
690 validity of the KDC's certificate.
692 In these cases, the KDC generally has better connectivity to the
693 OCSP server, and it therefore processes the OCSP request and
694 response and sends the results to the client.  The changes proposed
695 in this section allow a client to request an OCSP response from the
696 KDC when using PKINIT.  This is similar to the way that OCSP is
697 handled in [cite].
699 OCSP support is provided in PKINIT through the use of additional
700 preauthentication data.  The following new preauthentication types
701 are defined:
703     PA-PK-OCSP-REQ ::= SEQUENCE {
704                                     -- PAType TBD
705         responderIDList         [0] SEQUENCE of ResponderID OPTIONAL,
706                                     -- ResponderID is a DER-encoded
707                                     -- ASN.1 type defined in [cite]
708         requestExtensions       [1] Extensions OPTIONAL
709                                     -- Extensions is a DER-encoded
710                                     -- ASN.1 type defined in [cite]
711     }
713     PA-PK-OCSP-REP ::= SEQUENCE of OCSPResponse
714                                     -- OCSPResponse is a DER-encoded
715                                     -- ASN.1 type defined in [cite]
717 A KDC that receives a PA-PK-OCSP-REQ MAY send a PA-PK-OCSP-REP.
718 KDCs MUST NOT send a PA-PK-OCSP-REP if they do not first receive a
719 PA-PK-OCSP-REQ from the client.  The KDC may either send a cached
720 OCSP response or send an on-line request to the OCSP server.
722 When using OCSP, the response is signed by the OCSP server, which is
723 trusted by the client.  Depending on local policy, further
724 verification of the validity of the OCSP server may need to be done.
727 4.  Security Considerations
729 PKINIT raises certain security considerations beyond those that can
730 be regulated strictly in protocol definitions.  We will address them
731 in this section.
733 PKINIT extends the cross-realm model to the public-key
734 infrastructure.  Anyone using PKINIT must be aware of how the
735 certification infrastructure they are linking to works.
737 Also, as in standard Kerberos, PKINIT presents the possibility of
738 interactions between cryptosystems of varying strengths, and this
739 now includes public-key cryptosystems.  Many systems, for example,
740 allow the use of 512-bit public keys.  Using such keys to wrap data
741 encrypted under strong conventional cryptosystems, such as 3DES, may
742 be inappropriate.
744 PKINIT calls for randomly generated keys for conventional
745 cryptosystems.  Many such systems contain systematically "weak"
746 keys.  For recommendations regarding these weak keys, see RFC
747 1510bis.
749 PKINIT allows the use of a zero nonce in the PKAuthenticator when
750 cached Diffie-Hellman parameters are used.  In this case, message
751 binding is performed using the nonce in the main request in the same
752 way as it is done for ordinary (that is, non-PKINIT) AS-REQs.  The
753 nonce field in the KDC request body is signed through the checksum
754 in the PKAuthenticator, and it therefore cryptographically binds the
755 AS-REQ with the AS-REP.  If cached parameters are also used on the
756 client side, the generated session key will be the same, and a
757 compromised session key could lead to the compromise of future
758 cached exchanges.  It is desirable to limit the use of cached
759 parameters to just the KDC, in order to eliminate this exposure.
761 Care should be taken in how certificates are chosen for the purposes
762 of authentication using PKINIT.  Some local policies may require
763 that key escrow be applied for certain certificate types.  People
764 deploying PKINIT should be aware of the implications of using
765 certificates that have escrowed keys for the purposes of
766 authentication.
768 PKINIT does not provide for a "return routability" test to prevent
769 attackers from mounting a denial-of-service attack on the KDC by
770 causing it to perform unnecessary and expensive public-key
771 operations.  Strictly speaking, this is also true of standard
772 Kerberos, although the potential cost is not as great, because
773 standard Kerberos does not make use of public-key cryptography.
774 It might be possible to address this using a preauthentication field
775 as part of the proposed Kerberos preauthenticatino framework.
778 5.  Acknowledgements
780 Some of the ideas on which this proposal is based arose during
781 discussions over several years between members of the SAAG, the IETF
782 CAT working group, and the PSRG, regarding integration of Kerberos
783 and SPX.  Some ideas have also been drawn from the DASS system.
784 These changes are by no means endorsed by these groups.  This is an
785 attempt to revive some of the goals of those groups, and this
786 proposal approaches those goals primarily from the Kerberos
787 perspective.  Lastly, comments from groups working on similar ideas
788 in DCE have been invaluable.
791 6.  Expiration Date
793 This draft expires August 20, 2004.
796 7.  Bibliography
798 [1] J. Kohl, C. Neuman.  The Kerberos Network Authentication Service
799 (V5).  Request for Comments 1510.
801 [2] B.C. Neuman, Theodore Ts'o. Kerberos: An Authentication Service
802 for Computer Networks, IEEE Communications, 32(9):33-38.  September
803 1994.
805 [3] M. Sirbu, J. Chuang.  Distributed Authentication in Kerberos
806 Using Public Key Cryptography.  Symposium On Network and Distributed
807 System Security, 1997.
809 [4] B. Cox, J.D. Tygar, M. Sirbu.  NetBill Security and Transaction
810 Protocol.  In Proceedings of the USENIX Workshop on Electronic
811 Commerce, July 1995.
813 [5] T. Dierks, C. Allen.  The TLS Protocol, Version 1.0.  Request
814 for Comments 2246, January 1999.
816 [6] B.C. Neuman, Proxy-Based Authorization and Accounting for
817 Distributed Systems.  In Proceedings of the 13th International
818 Conference on Distributed Computing Systems, May 1993.
820 [7] ITU-T (formerly CCITT) Information technology - Open Systems
821 Interconnection - The Directory: Authentication Framework
822 Recommendation X.509 ISO/IEC 9594-8
824 [8] R. Housley. Cryptographic Message Syntax.
825 draft-ietf-smime-cms-13.txt, April 1999, approved for publication as
826 RFC.
828 [9] PKCS #7: Cryptographic Message Syntax Standard. An RSA
829 Laboratories Technical Note Version 1.5. Revised November 1, 1993
831 [10] R. Rivest, MIT Laboratory for Computer Science and RSA Data
832 Security, Inc. A Description of the RC2(r) Encryption Algorithm.
833 March 1998.  Request for Comments 2268.
835 [11] R. Housley, W. Ford, W. Polk, D. Solo. Internet X.509 Public
836 Key Infrastructure, Certificate and CRL Profile, April 2002.
837 Request for Comments 3280.
839 [12] B. Kaliski, J. Staddon. PKCS #1: RSA Cryptography
840 Specifications, October 1998.  Request for Comments 2437.
842 [13] ITU-T (formerly CCITT) Information Processing Systems - Open
843 Systems Interconnection - Specification of Abstract Syntax Notation
844 One (ASN.1) Rec. X.680 ISO/IEC 8824-1.
846 [14] PKCS #3: Diffie-Hellman Key-Agreement Standard, An RSA
847 Laboratories Technical Note, Version 1.4, Revised November 1, 1993.
849 [15] K. Raeburn.  Encryption and Checksum Specifications for
850 Kerberos 5, October 2003. draft-ietf-krb-wg-crypto-06.txt.
852 [16] S. Blake-Wilson, M. Nystrom, D. Hopwood, J. Mikkelsen, and
853 T. Wright. Transport Layer Security (TLS) Extensions, June 2003.
854 Request for Comments 3546.
856 [17] M. Myers, R. Ankney, A. Malpani, S. Galperin, and C. Adams.
857 Internet X.509 Public Key Infrastructure: Online Certificate Status
858 Protocol - OCSP, June 1999.  Request for Comments 2560.
861 8.  Authors
863 Brian Tung
864 Clifford Neuman
865 USC Information Sciences Institute
866 4676 Admiralty Way Suite 1001
867 Marina del Rey CA 90292-6695
868 Phone: +1 310 822 1511
869 E-mail: {brian,bcn}@isi.edu
871 Matthew Hur
872 Ari Medvinsky
873 Microsoft Corporation
874 One Microsoft Way
875 Redmond WA 98052
876 Phone: +1 425 707 3336
877 E-mail: matthur@microsoft.com, arimed@windows.microsoft.com
879 Sasha Medvinsky
880 Motorola, Inc.
881 6450 Sequence Drive
882 San Diego, CA 92121
883 +1 858 404 2367
884 E-mail: smedvinsky@motorola.com
886 John Wray
887 Iris Associates, Inc.
888 5 Technology Park Dr.
889 Westford, MA 01886
890 E-mail: John_Wray@iris.com
892 Jonathan Trostle
893 E-mail: jtrostle@world.std.com