idnits 2.17.1 draft-ietf-cat-kerberos-pk-init-13.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 1063 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 20 instances of too long lines in the document, the longest one being 4 characters in excess of 72. ** The abstract seems to contain references ([1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 204: '... encoding MUST be the reverse o...' RFC 2119 keyword, line 217: '... principal name MUST be set to KRB_NT...' RFC 2119 keyword, line 222: '... the name-string MUST be set as follow...' RFC 2119 keyword, line 227: '... realm MUST be set to the certifica...' RFC 2119 keyword, line 241: '...ees), the following MUST be satisfied....' (30 more instances...) == The 'Updates: ' line in the draft header should list only the _numbers_ of the RFCs which will be updated by this document (if approved); it should not include the word 'RFC' in the list. -- The draft header indicates that this document updates RFC1510, but the abstract doesn't seem to directly say this. It does mention RFC1510 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- (Using the creation date from RFC1510, updated by this document, for RFC5378 checks: 1993-09-01) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? '1' on line 927 looks like a reference -- Missing reference section? '2' on line 930 looks like a reference -- Missing reference section? '5' on line 941 looks like a reference -- Missing reference section? '6' on line 945 looks like a reference -- Missing reference section? '7' on line 949 looks like a reference -- Missing reference section? '8' on line 953 looks like a reference -- Missing reference section? '9' on line 956 looks like a reference -- Missing reference section? '14' on line 977 looks like a reference -- Missing reference section? '18' on line 992 looks like a reference -- Missing reference section? '0' on line 819 looks like a reference -- Missing reference section? '15' on line 981 looks like a reference -- Missing reference section? '11' on line 964 looks like a reference -- Missing reference section? '16' on line 985 looks like a reference -- Missing reference section? '3' on line 934 looks like a reference -- Missing reference section? '10' on line 960 looks like a reference -- Missing reference section? '20' on line 999 looks like a reference -- Missing reference section? '17' on line 988 looks like a reference -- Missing reference section? '4' on line 938 looks like a reference -- Missing reference section? '12' on line 968 looks like a reference -- Missing reference section? '13' on line 972 looks like a reference -- Missing reference section? '19' on line 995 looks like a reference Summary: 8 errors (**), 0 flaws (~~), 3 warnings (==), 24 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 INTERNET-DRAFT Brian Tung 2 draft-ietf-cat-kerberos-pk-init-13.txt Clifford Neuman 3 Updates: RFC 1510 USC/ISI 4 expires August 31, 2001 Matthew Hur 5 Cisco 6 Ari Medvinsky 7 Keen.com, Inc. 8 Sasha Medvinsky 9 Motorola 10 John Wray 11 Iris Associates, Inc. 12 Jonathan Trostle 13 Cisco 15 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 provisions of Section 10 of RFC 2026. Internet-Drafts are 21 working documents of the Internet Engineering Task Force (IETF), 22 its 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 27 documents at any time. It is inappropriate to use Internet-Drafts 28 as reference material or to cite them other than as "work in 29 progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 To learn the current status of any Internet-Draft, please check 38 the "1id-abstracts.txt" listing contained in the Internet-Drafts 39 Shadow Directories on ftp.ietf.org (US East Coast), 40 nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or 41 munnari.oz.au (Pacific Rim). 43 The distribution of this memo is unlimited. It is filed as 44 draft-ietf-cat-kerberos-pk-init-11.txt, and expires August 31, 45 2001. Please send comments to the authors. 47 1. Abstract 49 This document defines extensions (PKINIT) to the Kerberos protocol 50 specification (RFC 1510 [1]) to provide a method for using public 51 key cryptography during initial authentication. The methods 52 defined specify the ways in which preauthentication data fields and 53 error data fields in Kerberos messages are to be used to transport 54 public key data. 56 2. Introduction 58 The popularity of public key cryptography has produced a desire for 59 its support in Kerberos [2]. The advantages provided by public key 60 cryptography include simplified key management (from the Kerberos 61 perspective) and the ability to leverage existing and developing 62 public key certification infrastructures. 64 Public key cryptography can be integrated into Kerberos in a number 65 of ways. One is to associate a key pair with each realm, which can 66 then be used to facilitate cross-realm authentication; this is the 67 topic of another draft proposal. Another way is to allow users with 68 public key certificates to use them in initial authentication. This 69 is the concern of the current document. 71 PKINIT utilizes ephemeral-ephemeral Diffie-Hellman keys in 72 combination with DSA keys as the primary, required mechanism. Note 73 that PKINIT supports the use of separate signature and encryption 74 keys. 76 PKINIT enables access to Kerberos-secured services based on initial 77 authentication utilizing public key cryptography. PKINIT utilizes 78 standard public key signature and encryption data formats within the 79 standard Kerberos messages. The basic mechanism is as follows: The 80 user sends an AS-REQ message to the KDC as before, except that if that 81 user is to use public key cryptography in the initial authentication 82 step, his certificate and a signature accompany the initial request 83 in the preauthentication fields. Upon receipt of this request, the 84 KDC verifies the certificate and issues a ticket granting ticket 85 (TGT) as before, except that the encPart from the AS-REP message 86 carrying the TGT is now encrypted utilizing either a Diffie-Hellman 87 derived key or the user's public key. This message is authenticated 88 utilizing the public key signature of the KDC. 90 Note that PKINIT does not require the use of certificates. A KDC 91 may store the public key of a principal as part of that principal's 92 record. In this scenario, the KDC is the trusted party that vouches 93 for the principal (as in a standard, non-cross realm, Kerberos 94 environment). Thus, for any principal, the KDC may maintain a 95 symmetric key, a public key, or both. 97 The PKINIT specification may also be used as a building block for 98 other specifications. PKINIT may be utilized to establish 99 inter-realm keys for the purposes of issuing cross-realm service 100 tickets. It may also be used to issue anonymous Kerberos tickets 101 using the Diffie-Hellman option. Efforts are under way to draft 102 specifications for these two application protocols. 104 Additionally, the PKINIT specification may be used for direct peer 105 to peer authentication without contacting a central KDC. This 106 application of PKINIT is described in PKTAPP [5] and is based on 107 concepts introduced in [6, 7]. For direct client-to-server 108 authentication, the client uses PKINIT to authenticate to the end 109 server (instead of a central KDC), which then issues a ticket for 110 itself. This approach has an advantage over TLS [8] in that the 111 server does not need to save state (cache session keys). 112 Furthermore, an additional benefit is that Kerberos tickets can 113 facilitate delegation (see [9]). 115 3. Proposed Extensions 117 This section describes extensions to RFC 1510 for supporting the 118 use of public key cryptography in the initial request for a ticket 119 granting ticket (TGT). 121 In summary, the following change to RFC 1510 is proposed: 123 * Users may authenticate using either a public key pair or a 124 conventional (symmetric) key. If public key cryptography is 125 used, public key data is transported in preauthentication 126 data fields to help establish identity. The user presents 127 a public key certificate and obtains an ordinary TGT that may 128 be used for subsequent authentication, with such 129 authentication using only conventional cryptography. 131 Section 3.1 provides definitions to help specify message formats. 132 Section 3.2 describes the extensions for the initial authentication 133 method. 135 3.1. Definitions 137 The extensions involve new preauthentication fields; we introduce 138 the following preauthentication types: 140 PA-PK-AS-REQ 14 141 PA-PK-AS-REP 15 143 The extensions also involve new error types; we introduce the 144 following types: 146 KDC_ERR_CLIENT_NOT_TRUSTED 62 147 KDC_ERR_KDC_NOT_TRUSTED 63 148 KDC_ERR_INVALID_SIG 64 149 KDC_ERR_KEY_TOO_WEAK 65 150 KDC_ERR_CERTIFICATE_MISMATCH 66 151 KDC_ERR_CANT_VERIFY_CERTIFICATE 70 152 KDC_ERR_INVALID_CERTIFICATE 71 153 KDC_ERR_REVOKED_CERTIFICATE 72 154 KDC_ERR_REVOCATION_STATUS_UNKNOWN 73 155 KDC_ERR_REVOCATION_STATUS_UNAVAILABLE 74 156 KDC_ERR_CLIENT_NAME_MISMATCH 75 157 KDC_ERR_KDC_NAME_MISMATCH 76 159 We utilize the following typed data for errors: 161 TD-PKINIT-CMS-CERTIFICATES 101 162 TD-KRB-PRINCIPAL 102 163 TD-KRB-REALM 103 164 TD-TRUSTED-CERTIFIERS 104 165 TD-CERTIFICATE-INDEX 105 167 We utilize the following encryption types (which map directly to 168 OIDs): 170 dsaWithSHA1-CmsOID 9 171 md5WithRSAEncryption-CmsOID 10 172 sha1WithRSAEncryption-CmsOID 11 173 rc2CBC-EnvOID 12 174 rsaEncryption-EnvOID (PKCS#1 v1.5) 13 175 rsaES-OAEP-ENV-OID (PKCS#1 v2.0) 14 176 des-ede3-cbc-Env-OID 15 178 These mappings are provided so that a client may send the 179 appropriate enctypes in the AS-REQ message in order to indicate 180 support for the corresponding OIDs (for performing PKINIT). 182 In many cases, PKINIT requires the encoding of the X.500 name of a 183 certificate authority as a Realm. When such a name appears as 184 a realm it will be represented using the "Other" form of the realm 185 name as specified in the naming constraints section of RFC1510. 186 For a realm derived from an X.500 name, NAMETYPE will have the value 187 X500-RFC2253. The full realm name will appear as follows: 189 + ":" + 191 where nametype is "X500-RFC2253" and string is the result of doing 192 an RFC2253 encoding of the distinguished name, i.e. 194 "X500-RFC2253:" + RFC2253Encode(DistinguishedName) 196 where DistinguishedName is an X.500 name, and RFC2253Encode is a 197 function returing a readable UTF encoding of an X.500 name, as 198 defined by RFC 2253 [14] (part of LDAPv3 [18]). 200 To ensure that this encoding is unique, we add the following rule 201 to those specified by RFC 2253: 203 The order in which the attributes appear in the RFC 2253 204 encoding MUST be the reverse of the order in the ASN.1 205 encoding of the X.500 name that appears in the public key 206 certificate. The order of the relative distinguished names 207 (RDNs), as well as the order of the AttributeTypeAndValues 208 within each RDN, will be reversed. (This is despite the fact 209 that an RDN is defined as a SET of AttributeTypeAndValues, where 210 an order is normally not important.) 212 Similarly, in cases where the KDC does not provide a specific 213 policy-based mapping from the X.500 name or X.509 Version 3 214 SubjectAltName extension in the user's certificate to a Kerberos 215 principal name, PKINIT requires the direct encoding of the X.500 216 name as a PrincipalName. In this case, the name-type of the 217 principal name MUST be set to KRB_NT-X500-PRINCIPAL. This new 218 name type is defined in RFC 1510 as: 220 KRB_NT_X500_PRINCIPAL 6 222 For this type, the name-string MUST be set as follows: 224 RFC2253Encode(DistinguishedName) 226 as described above. When this name type is used, the principal's 227 realm MUST be set to the certificate authority's distinguished 228 name using the X500-RFC2253 realm name format described earlier in 229 this section. 231 RFC 1510 specifies the ASN.1 structure for PrincipalName as follows: 233 PrincipalName ::= SEQUENCE { 234 name-type[0] INTEGER, 235 name-string[1] SEQUENCE OF GeneralString 236 } 238 The following rules relate to the the matching of PrincipalNames 239 with regard to the PKI name constraints for CAs as laid out in RFC 240 2459 [15]. In order to be regarded as a match (for permitted and 241 excluded name trees), the following MUST be satisfied. 243 1. If the constraint is given as a user plus realm name, or 244 as a client principal name plus realm name (as specified in 245 RFC 1510), the realm name MUST be valid (see 2.a-d below) 246 and the match MUST be exact, byte for byte. 248 2. If the constraint is given only as a realm name, matching 249 depends on the type of the realm: 251 a. If the realm contains a colon (':') before any equal 252 sign ('='), it is treated as a realm of type Other, 253 and MUST match exactly, byte for byte. 255 b. Otherwise, if the realm name conforms to rules regarding 256 the format of DNS names, it is considered a realm name of 257 type Domain. The constraint may be given as a realm 258 name 'FOO.BAR', which matches any PrincipalName within 259 the realm 'FOO.BAR' but not those in subrealms such as 260 'CAR.FOO.BAR'. A constraint of the form '.FOO.BAR' 261 matches PrincipalNames in subrealms of the form 262 'CAR.FOO.BAR' but not the realm 'FOO.BAR' itself. 264 c. Otherwise, the realm name is invalid and does not match 265 under any conditions. 267 3.1.1. Encryption and Key Formats 269 In the exposition below, we use the terms public key and private 270 key generically. It should be understood that the term "public 271 key" may be used to refer to either a public encryption key or a 272 signature verification key, and that the term "private key" may be 273 used to refer to either a private decryption key or a signature 274 generation key. The fact that these are logically distinct does 275 not preclude the assignment of bitwise identical keys for RSA 276 keys. 278 In the case of Diffie-Hellman, the key is produced from the agreed 279 bit string as follows: 281 * Truncate the bit string to the appropriate length. 282 * Rectify parity in each byte (if necessary) to obtain the key. 284 For instance, in the case of a DES key, we take the first eight 285 bytes of the bit stream, and then adjust the least significant bit 286 of each byte to ensure that each byte has odd parity. 288 3.1.2. Algorithm Identifiers 290 PKINIT does not define, but does permit, the algorithm identifiers 291 listed below. 293 3.1.2.1. Signature Algorithm Identifiers 295 The following signature algorithm identifiers specified in [11] and 296 in [15] are used with PKINIT: 298 id-dsa-with-sha1 (DSA with SHA1) 299 md5WithRSAEncryption (RSA with MD5) 300 sha-1WithRSAEncryption (RSA with SHA1) 302 3.1.2.2 Diffie-Hellman Key Agreement Algorithm Identifier 304 The following algorithm identifier shall be used within the 305 SubjectPublicKeyInfo data structure: dhpublicnumber 307 This identifier and the associated algorithm parameters are 308 specified in RFC 2459 [15]. 310 3.1.2.3. Algorithm Identifiers for RSA Encryption 312 These algorithm identifiers are used inside the EnvelopedData data 313 structure, for encrypting the temporary key with a public key: 315 rsaEncryption (RSA encryption, PKCS#1 v1.5) 316 id-RSAES-OAEP (RSA encryption, PKCS#1 v2.0) 318 Both of the above RSA encryption schemes are specified in [16]. 319 Currently, only PKCS#1 v1.5 is specified by CMS [11], although the 320 CMS specification says that it will likely include PKCS#1 v2.0 in 321 the future. (PKCS#1 v2.0 addresses adaptive chosen ciphertext 322 vulnerability discovered in PKCS#1 v1.5.) 324 3.1.2.4. Algorithm Identifiers for Encryption with Secret Keys 326 These algorithm identifiers are used inside the EnvelopedData data 327 structure in the PKINIT Reply, for encrypting the reply key with the 328 temporary key: 329 des-ede3-cbc (3-key 3-DES, CBC mode) 330 rc2-cbc (RC2, CBC mode) 332 The full definition of the above algorithm identifiers and their 333 corresponding parameters (an IV for block chaining) is provided in 334 the CMS specification [11]. 336 3.2. Public Key Authentication 338 Implementation of the changes in this section is REQUIRED for 339 compliance with PKINIT. 341 3.2.1. Client Request 343 Public keys may be signed by some certification authority (CA), or 344 they may be maintained by the KDC in which case the KDC is the 345 trusted authority. Note that the latter mode does not require the 346 use of certificates. 348 The initial authentication request is sent as per RFC 1510, except 349 that a preauthentication field containing data signed by the user's 350 private key accompanies the request: 352 PA-PK-AS-REQ ::= SEQUENCE { 353 -- PA TYPE 14 354 signedAuthPack [0] SignedData 355 -- Defined in CMS [11]; 356 -- AuthPack (below) defines the 357 -- data that is signed. 358 trustedCertifiers [1] SEQUENCE OF TrustedCas OPTIONAL, 359 -- This is a list of CAs that the 360 -- client trusts and that certify 361 -- KDCs. 362 kdcCert [2] IssuerAndSerialNumber OPTIONAL 363 -- As defined in CMS [11]; 364 -- specifies a particular KDC 365 -- certificate if the client 366 -- already has it. 367 encryptionCert [3] IssuerAndSerialNumber OPTIONAL 368 -- For example, this may be the 369 -- client's Diffie-Hellman 370 -- certificate, or it may be the 371 -- client's RSA encryption 372 -- certificate. 373 } 375 TrustedCas ::= CHOICE { 376 principalName [0] KerberosName, 377 -- as defined below 378 caName [1] Name 379 -- fully qualified X.500 name 380 -- as defined by X.509 381 issuerAndSerial [2] IssuerAndSerialNumber 382 -- Since a CA may have a number of 383 -- certificates, only one of which 384 -- a client trusts 385 } 387 Usage of SignedData: 389 The SignedData data type is specified in the Cryptographic 390 Message Syntax, a product of the S/MIME working group of the 391 IETF. The following describes how to fill in the fields of 392 this data: 394 1. The encapContentInfo field MUST contain the PKAuthenticator 395 and, optionally, the client's Diffie Hellman public value. 397 a. The eContentType field MUST contain the OID value for 398 pkauthdata: iso (1) org (3) dod (6) internet (1) 399 security (5) kerberosv5 (2) pkinit (3) pkauthdata (1) 401 b. The eContent field is data of the type AuthPack (below). 403 2. The signerInfos field contains the signature of AuthPack. 405 3. The Certificates field, when non-empty, contains the client's 406 certificate chain. If present, the KDC uses the public key 407 from the client's certificate to verify the signature in the 408 request. Note that the client may pass different certificate 409 chains that are used for signing or for encrypting. Thus, 410 the KDC may utilize a different client certificate for 411 signature verification than the one it uses to encrypt the 412 reply to the client. For example, the client may place a 413 Diffie-Hellman certificate in this field in order to convey 414 its static Diffie Hellman certificate to the KDC to enable 415 static-ephemeral Diffie-Hellman mode for the reply; in this 416 case, the client does NOT place its public value in the 417 AuthPack (defined below). As another example, the client may 418 place an RSA encryption certificate in this field. However, 419 there MUST always be (at least) a signature certificate. 421 AuthPack ::= SEQUENCE { 422 pkAuthenticator [0] PKAuthenticator, 423 clientPublicValue [1] SubjectPublicKeyInfo OPTIONAL 424 -- if client is using Diffie-Hellman 425 -- (ephemeral-ephemeral only) 426 } 428 PKAuthenticator ::= SEQUENCE { 429 cusec [0] INTEGER, 430 -- for replay prevention as in RFC1510 431 ctime [1] KerberosTime, 432 -- for replay prevention as in RFC1510 433 nonce [2] INTEGER, 434 pachecksum [3] Checksum 435 -- Checksum over KDC-REQ-BODY 436 -- Defined by Kerberos spec 437 } 439 SubjectPublicKeyInfo ::= SEQUENCE { 440 algorithm AlgorithmIdentifier, 441 -- dhKeyAgreement 442 subjectPublicKey BIT STRING 443 -- for DH, equals 444 -- public exponent (INTEGER encoded 445 -- as payload of BIT STRING) 446 } -- as specified by the X.509 recommendation [10] 448 AlgorithmIdentifier ::= SEQUENCE { 449 algorithm OBJECT IDENTIFIER, 450 -- for dhKeyAgreement, this is 451 -- { iso (1) member-body (2) US (840) 452 -- rsadsi (113459) pkcs (1) 3 1 } 453 -- from PKCS #3 [20] 454 parameters ANY DEFINED by algorithm OPTIONAL 455 -- for dhKeyAgreement, this is 456 -- DHParameter 457 } -- as specified by the X.509 recommendation [10] 459 DHParameter ::= SEQUENCE { 460 prime INTEGER, 461 -- p 462 base INTEGER, 463 -- g 464 privateValueLength INTEGER OPTIONAL 465 -- l 466 } -- as defined in PKCS #3 [20] 468 If the client passes an issuer and serial number in the request, 469 the KDC is requested to use the referred-to certificate. If none 470 exists, then the KDC returns an error of type 471 KDC_ERR_CERTIFICATE_MISMATCH. It also returns this error if, on the 472 other hand, the client does not pass any trustedCertifiers, 473 believing that it has the KDC's certificate, but the KDC has more 474 than one certificate. The KDC should include information in the 475 KRB-ERROR message that indicates the KDC certificate(s) that a 476 client may utilize. This data is specified in the e-data, which 477 is defined in RFC 1510 revisions as a SEQUENCE of TypedData: 479 TypedData ::= SEQUENCE { 480 data-type [0] INTEGER, 481 data-value [1] OCTET STRING, 482 } -- per Kerberos RFC 1510 revisions 484 where: 485 data-type = TD-PKINIT-CMS-CERTIFICATES = 101 486 data-value = CertificateSet // as specified by CMS [11] 488 The PKAuthenticator carries information to foil replay attacks, to 489 bind the pre-authentication data to the KDC-REQ-BODY, and to bind the 490 request and response. The PKAuthenticator is signed with the client's 491 signature key. 493 3.2.2. KDC Response 495 Upon receipt of the AS_REQ with PA-PK-AS-REQ pre-authentication 496 type, the KDC attempts to verify the user's certificate chain 497 (userCert), if one is provided in the request. This is done by 498 verifying the certification path against the KDC's policy of 499 legitimate certifiers. 501 If the client's certificate chain contains no certificate signed by 502 a CA trusted by the KDC, then the KDC sends back an error message 503 of type KDC_ERR_CANT_VERIFY_CERTIFICATE. The accompanying e-data 504 is a SEQUENCE of one TypedData (with type TD-TRUSTED-CERTIFIERS=104) 505 whose data-value is an OCTET STRING which is the DER encoding of 507 TrustedCertifiers ::= SEQUENCE OF PrincipalName 508 -- X.500 name encoded as a principal name 509 -- see Section 3.1 511 If while verifying a certificate chain the KDC determines that the 512 signature on one of the certificates in the CertificateSet from 513 the signedAuthPack fails verification, then the KDC returns an 514 error of type KDC_ERR_INVALID_CERTIFICATE. The accompanying 515 e-data is a SEQUENCE of one TypedData (with type 516 TD-CERTIFICATE-INDEX=105) whose data-value is an OCTET STRING 517 which is the DER encoding of the index into the CertificateSet 518 ordered as sent by the client. 520 CertificateIndex ::= INTEGER 521 -- 0 = 1st certificate, 522 -- (in order of encoding) 523 -- 1 = 2nd certificate, etc 525 The KDC may also check whether any of the certificates in the 526 client's chain has been revoked. If one of the certificates has 527 been revoked, then the KDC returns an error of type 528 KDC_ERR_REVOKED_CERTIFICATE; if such a query reveals that 529 the certificate's revocation status is unknown or not 530 available, then if required by policy, the KDC returns the 531 appropriate error of type KDC_ERR_REVOCATION_STATUS_UNKNOWN or 532 KDC_ERR_REVOCATION_STATUS_UNAVAILABLE. In any of these three 533 cases, the affected certificate is identified by the accompanying 534 e-data, which contains a CertificateIndex as described for 535 KDC_ERR_INVALID_CERTIFICATE. 537 If the certificate chain can be verified, but the name of the 538 client in the certificate does not match the client's name in the 539 request, then the KDC returns an error of type 540 KDC_ERR_CLIENT_NAME_MISMATCH. There is no accompanying e-data 541 field in this case. 543 Finally, if the certificate chain is verified, but the KDC's name 544 or realm as given in the PKAuthenticator does not match the KDC's 545 actual principal name, then the KDC returns an error of type 546 KDC_ERR_KDC_NAME_MISMATCH. The accompanying e-data field is again 547 a SEQUENCE of one TypedData (with type TD-KRB-PRINCIPAL=102 or 548 TD-KRB-REALM=103 as appropriate) whose data-value is an OCTET 549 STRING whose data-value is the DER encoding of a PrincipalName or 550 Realm as defined in RFC 1510 revisions. 552 Even if all succeeds, the KDC may--for policy reasons--decide not 553 to trust the client. In this case, the KDC returns an error message 554 of type KDC_ERR_CLIENT_NOT_TRUSTED. One specific case of this is 555 the presence or absence of an Enhanced Key Usage (EKU) OID within 556 the certificate extensions. The rules regarding acceptability of 557 an EKU sequence (or the absence of any sequence) are a matter of 558 local policy. For the benefit of implementers, we define a PKINIT 559 EKU OID as the following: iso (1) org (3) dod (6) internet (1) 560 security (5) kerberosv5 (2) pkinit (3) pkekuoid (2). 562 If a trust relationship exists, the KDC then verifies the client's 563 signature on AuthPack. If that fails, the KDC returns an error 564 message of type KDC_ERR_INVALID_SIG. Otherwise, the KDC uses the 565 timestamp (ctime and cusec) in the PKAuthenticator to assure that 566 the request is not a replay. The KDC also verifies that its name 567 is specified in the PKAuthenticator. 569 If the clientPublicValue field is filled in, indicating that the 570 client wishes to use Diffie-Hellman key agreement, then the KDC 571 checks to see that the parameters satisfy its policy. If they do 572 not (e.g., the prime size is insufficient for the expected 573 encryption type), then the KDC sends back an error message of type 574 KDC_ERR_KEY_TOO_WEAK. Otherwise, it generates its own public and 575 private values for the response. 577 The KDC also checks that the timestamp in the PKAuthenticator is 578 within the allowable window and that the principal name and realm 579 are correct. If the local (server) time and the client time in the 580 authenticator differ by more than the allowable clock skew, then the 581 KDC returns an error message of type KRB_AP_ERR_SKEW as defined in 1510. 583 Assuming no errors, the KDC replies as per RFC 1510, except as 584 follows. The user's name in the ticket is determined by the 585 following decision algorithm: 587 1. If the KDC has a mapping from the name in the certificate 588 to a Kerberos name, then use that name. 589 Else 590 2. If the certificate contains the SubjectAltName extention 591 and the local KDC policy defines a mapping from the 592 SubjectAltName to a Kerberos name, then use that name. 593 Else 594 3. Use the name as represented in the certificate, mapping 595 as necessary (e.g., as per RFC 2253 for X.500 names). In 596 this case the realm in the ticket MUST be the name of the 597 certifier that issued the user's certificate. 599 Note that a principal name may be carried in the subjectAltName 600 field of a certificate. This name may be mapped to a principal 601 record in a security database based on local policy, for example 602 the subjectAltName may be kerberos/principal@realm format. In 603 this case the realm name is not that of the CA but that of the 604 local realm doing the mapping (or some realm name chosen by that 605 realm). 607 If a non-KDC X.509 certificate contains the principal name within 608 the subjectAltName version 3 extension, that name may utilize 609 KerberosName as defined below, or, in the case of an S/MIME 610 certificate [17], may utilize the email address. If the KDC 611 is presented with an S/MIME certificate, then the email address 612 within subjectAltName will be interpreted as a principal and realm 613 separated by the "@" sign, or as a name that needs to be mapped 614 according to local policy. If the resulting name does not correspond 615 to a registered principal name, then the principal name is formed as 616 defined in section 3.1. 618 The trustedCertifiers field contains a list of certification 619 authorities trusted by the client, in the case that the client does 620 not possess the KDC's public key certificate. If the KDC has no 621 certificate signed by any of the trustedCertifiers, then it returns 622 an error of type KDC_ERR_KDC_NOT_TRUSTED. 624 KDCs should try to (in order of preference): 625 1. Use the KDC certificate identified by the serialNumber included 626 in the client's request. 627 2. Use a certificate issued to the KDC by one of the client's 628 trustedCertifier(s); 629 If the KDC is unable to comply with any of these options, then the 630 KDC returns an error message of type KDC_ERR_KDC_NOT_TRUSTED to the 631 client. 633 The KDC encrypts the reply not with the user's long-term key, but 634 with the Diffie Hellman derived key or a random key generated 635 for this particular response which is carried in the padata field of 636 the TGS-REP message. 638 PA-PK-AS-REP ::= CHOICE { 639 -- PA TYPE 15 640 dhSignedData [0] SignedData, 641 -- Defined in CMS and used only with 642 -- Diffie-Hellman key exchange (if the 643 -- client public value was present in the 644 -- request). 645 -- This choice MUST be supported 646 -- by compliant implementations. 647 encKeyPack [1] EnvelopedData, 648 -- Defined in CMS 649 -- The temporary key is encrypted 650 -- using the client public key 651 -- key 652 -- SignedReplyKeyPack, encrypted 653 -- with the temporary key, is also 654 -- included. 655 } 657 Usage of SignedData: 659 When the Diffie-Hellman option is used, dhSignedData in 660 PA-PK-AS-REP provides authenticated Diffie-Hellman parameters 661 of the KDC. The reply key used to encrypt part of the KDC reply 662 message is derived from the Diffie-Hellman exchange: 664 1. Both the KDC and the client calculate a secret value 665 (g^ab mod p), where a is the client's private exponent and 666 b is the KDC's private exponent. 668 2. Both the KDC and the client take the first N bits of this 669 secret value and convert it into a reply key. N depends on 670 the reply key type. 672 a. For example, if the reply key is DES, N=64 bits, where 673 some of the bits are replaced with parity bits, according 674 to FIPS PUB 74. 676 b. As another example, if the reply key is (3-key) 3-DES, 677 N=192 bits, where some of the bits are replaced with 678 parity bits, according to FIPS PUB 74. 680 3. The encapContentInfo field MUST contain the KdcDHKeyInfo as 681 defined below. 683 a. The eContentType field MUST contain the OID value for 684 pkdhkeydata: iso (1) org (3) dod (6) internet (1) 685 security (5) kerberosv5 (2) pkinit (3) pkdhkeydata (2) 687 b. The eContent field is data of the type KdcDHKeyInfo 688 (below). 690 4. The certificates field MUST contain the certificates 691 necessary for the client to establish trust in the KDC's 692 certificate based on the list of trusted certifiers sent by 693 the client in the PA-PK-AS-REQ. This field may be empty if 694 the client did not send to the KDC a list of trusted 695 certifiers (the trustedCertifiers field was empty, meaning 696 that the client already possesses the KDC's certificate). 698 5. The signerInfos field is a SET that MUST contain at least 699 one member, since it contains the actual signature. 701 KdcDHKeyInfo ::= SEQUENCE { 702 -- used only when utilizing Diffie-Hellman 703 nonce [0] INTEGER, 704 -- binds responce to the request 705 subjectPublicKey [2] BIT STRING 706 -- Equals public exponent (g^a mod p) 707 -- INTEGER encoded as payload of 708 -- BIT STRING 709 } 711 Usage of EnvelopedData: 713 The EnvelopedData data type is specified in the Cryptographic 714 Message Syntax, a product of the S/MIME working group of the 715 IETF. It contains a temporary key encrypted with the PKINIT 716 client's public key. It also contains a signed and encrypted 717 reply key. 719 1. The originatorInfo field is not required, since that 720 information may be presented in the signedData structure 721 that is encrypted within the encryptedContentInfo field. 723 2. The optional unprotectedAttrs field is not required for 724 PKINIT. 726 3. The recipientInfos field is a SET which MUST contain exactly 727 one member of the KeyTransRecipientInfo type for encryption 728 with a public key. 730 a. The encryptedKey field (in KeyTransRecipientInfo) 731 contains the temporary key which is encrypted with the 732 PKINIT client's public key. 734 4. The encryptedContentInfo field contains the signed and 735 encrypted reply key. 737 a. The contentType field MUST contain the OID value for 738 id-signedData: iso (1) member-body (2) us (840) 739 rsadsi (113549) pkcs (1) pkcs7 (7) signedData (2) 741 b. The encryptedContent field is encrypted data of the CMS 742 type signedData as specified below. 744 i. The encapContentInfo field MUST contains the 745 ReplyKeyPack. 747 * The eContentType field MUST contain the OID value 748 for pkrkeydata: iso (1) org (3) dod (6) internet (1) 749 security (5) kerberosv5 (2) pkinit (3) pkrkeydata (3) 751 * The eContent field is data of the type ReplyKeyPack 752 (below). 754 ii. The certificates field MUST contain the certificates 755 necessary for the client to establish trust in the 756 KDC's certificate based on the list of trusted 757 certifiers sent by the client in the PA-PK-AS-REQ. 758 This field may be empty if the client did not send 759 to the KDC a list of trusted certifiers (the 760 trustedCertifiers field was empty, meaning that the 761 client already possesses the KDC's certificate). 763 iii. The signerInfos field is a SET that MUST contain at 764 least one member, since it contains the actual 765 signature. 767 ReplyKeyPack ::= SEQUENCE { 768 -- not used for Diffie-Hellman 769 replyKey [0] EncryptionKey, 770 -- from RFC 1510bis 771 -- used to encrypt main reply 772 -- ENCTYPE is at least as strong as 773 -- ENCTYPE of session key 774 nonce [1] INTEGER, 775 -- binds response to the request 776 -- must be same as the nonce 777 -- passed in the PKAuthenticator 778 } 780 3.2.2.1. Use of transited Field 782 Since each certifier in the certification path of a user's 783 certificate is equivalent to a separate Kerberos realm, the name 784 of each certifier in the certificate chain MUST be added to the 785 transited field of the ticket. The format of these realm names is 786 defined in Section 3.1 of this document. If applicable, the 787 transit-policy-checked flag should be set in the issued ticket. 789 3.2.2.2. Kerberos Names in Certificates 791 The KDC's certificate(s) MUST bind the public key(s) of the KDC to 792 a name derivable from the name of the realm for that KDC. X.509 793 certificates MUST contain the principal name of the KDC 794 (defined in section 8.2 of RFC 1510) as the SubjectAltName version 795 3 extension. Below is the definition of this version 3 extension, 796 as specified by the X.509 standard: 798 subjectAltName EXTENSION ::= { 799 SYNTAX GeneralNames 800 IDENTIFIED BY id-ce-subjectAltName 801 } 803 GeneralNames ::= SEQUENCE SIZE(1..MAX) OF GeneralName 805 GeneralName ::= CHOICE { 806 otherName [0] OtherName, 807 ... 808 } 810 OtherName ::= SEQUENCE { 811 type-id OBJECT IDENTIFIER, 812 value [0] EXPLICIT ANY DEFINED BY type-id 813 } 815 For the purpose of specifying a Kerberos principal name, the value 816 in OtherName MUST be a KerberosName as defined in RFC 1510: 818 KerberosName ::= SEQUENCE { 819 realm [0] Realm, 820 principalName [1] PrincipalName 821 } 823 This specific syntax is identified within subjectAltName by setting 824 the type-id in OtherName to krb5PrincipalName, where (from the 825 Kerberos specification) we have 827 krb5 OBJECT IDENTIFIER ::= { iso (1) 828 org (3) 829 dod (6) 830 internet (1) 831 security (5) 832 kerberosv5 (2) } 834 krb5PrincipalName OBJECT IDENTIFIER ::= { krb5 2 } 836 (This specification may also be used to specify a Kerberos name 837 within the user's certificate.) The KDC's certificate may be signed 838 directly by a CA, or there may be intermediaries if the server resides 839 within a large organization, or it may be unsigned if the client 840 indicates possession (and trust) of the KDC's certificate. 842 Note that the KDC's principal name has the instance equal to the 843 realm, and those fields should be appropriately set in the realm 844 and principalName fields of the KerberosName. This is the case 845 even when obtaining a cross-realm ticket using PKINIT. 847 3.2.3. Client Extraction of Reply 849 The client then extracts the random key used to encrypt the main 850 reply. This random key (in encPaReply) is encrypted with either the 851 client's public key or with a key derived from the DH values 852 exchanged between the client and the KDC. The client uses this 853 random key to decrypt the main reply, and subsequently proceeds as 854 described in RFC 1510. 856 3.2.4. Required Algorithms 858 Not all of the algorithms in the PKINIT protocol specification have 859 to be implemented in order to comply with the proposed standard. 860 Below is a list of the required algorithms: 862 * Diffie-Hellman public/private key pairs 863 * utilizing Diffie-Hellman ephemeral-ephemeral mode 864 * SHA1 digest and DSA for signatures 865 * SHA1 digest also for the Checksum in the PKAuthenticator 866 * 3-key triple DES keys derived from the Diffie-Hellman Exchange 867 * 3-key triple DES Temporary and Reply keys 869 4. Logistics and Policy 871 This section describes a way to define the policy on the use of 872 PKINIT for each principal and request. 874 The KDC is not required to contain a database record for users 875 who use public key authentication. However, if these users are 876 registered with the KDC, it is recommended that the database record 877 for these users be modified to an additional flag in the attributes 878 field to indicate that the user should authenticate using PKINIT. 879 If this flag is set and a request message does not contain the 880 PKINIT preauthentication field, then the KDC sends back as error of 881 type KDC_ERR_PREAUTH_REQUIRED indicating that a preauthentication 882 field of type PA-PK-AS-REQ must be included in the request. 884 5. Security Considerations 886 PKINIT raises a few security considerations, which we will address 887 in this section. 889 First of all, PKINIT introduces a new trust model, where KDCs do not 890 (necessarily) certify the identity of those for whom they issue 891 tickets. PKINIT does allow KDCs to act as their own CAs, in the 892 limited capacity of self-signing their certificates, but one of the 893 additional benefits is to align Kerberos authentication with a global 894 public key infrastructure. Anyone using PKINIT in this way must be 895 aware of how the certification infrastructure they are linking to 896 works. 898 Secondly, PKINIT also introduces the possibility of interactions 899 between different cryptosystems, which may be of widely varying 900 strengths. Many systems, for instance, allow the use of 512-bit 901 public keys. Using such keys to wrap data encrypted under strong 902 conventional cryptosystems, such as triple-DES, is inappropriate; 903 it adds a weak link to a strong one at extra cost. Implementors 904 and administrators should take care to avoid such wasteful and 905 deceptive interactions. 907 Lastly, PKINIT calls for randomly generated keys for conventional 908 cryptosystems. Many such systems contain systematically "weak" 909 keys. PKINIT implementations MUST avoid use of these keys, either 910 by discarding those keys when they are generated, or by fixing them 911 in some way (e.g., by XORing them with a given mask). These 912 precautions vary from system to system; it is not our intention to 913 give an explicit recipe for them here. 915 6. Transport Issues 917 Certificate chains can potentially grow quite large and span several 918 UDP packets; this in turn increases the probability that a Kerberos 919 message involving PKINIT extensions will be broken in transit. In 920 light of the possibility that the Kerberos specification will 921 require KDCs to accept requests using TCP as a transport mechanism, 922 we make the same recommendation with respect to the PKINIT 923 extensions as well. 925 7. Bibliography 927 [1] J. Kohl, C. Neuman. The Kerberos Network Authentication Service 928 (V5). Request for Comments 1510. 930 [2] B.C. Neuman, Theodore Ts'o. Kerberos: An Authentication Service 931 for Computer Networks, IEEE Communications, 32(9):33-38. September 932 1994. 934 [3] B. Tung, T. Ryutov, C. Neuman, G. Tsudik, B. Sommerfeld, 935 A. Medvinsky, M. Hur. Public Key Cryptography for Cross-Realm 936 Authentication in Kerberos. draft-ietf-cat-kerberos-pk-cross-04.txt 938 [4] A. Medvinsky, J. Cargille, M. Hur. Anonymous Credentials in 939 Kerberos. draft-ietf-cat-kerberos-anoncred-00.txt 941 [5] Ari Medvinsky, M. Hur, Alexander Medvinsky, B. Clifford Neuman. 942 Public Key Utilizing Tickets for Application Servers (PKTAPP). 943 draft-ietf-cat-pktapp-02.txt 945 [6] M. Sirbu, J. Chuang. Distributed Authentication in Kerberos 946 Using Public Key Cryptography. Symposium On Network and Distributed 947 System Security, 1997. 949 [7] B. Cox, J.D. Tygar, M. Sirbu. NetBill Security and Transaction 950 Protocol. In Proceedings of the USENIX Workshop on Electronic 951 Commerce, July 1995. 953 [8] T. Dierks, C. Allen. The TLS Protocol, Version 1.0 954 Request for Comments 2246, January 1999. 956 [9] B.C. Neuman, Proxy-Based Authorization and Accounting for 957 Distributed Systems. In Proceedings of the 13th International 958 Conference on Distributed Computing Systems, May 1993. 960 [10] ITU-T (formerly CCITT) Information technology - Open Systems 961 Interconnection - The Directory: Authentication Framework 962 Recommendation X.509 ISO/IEC 9594-8 964 [11] R. Housley. Cryptographic Message Syntax. 965 draft-ietf-smime-cms-13.txt, April 1999, approved for publication 966 as RFC. 968 [12] PKCS #7: Cryptographic Message Syntax Standard, 969 An RSA Laboratories Technical Note Version 1.5 970 Revised November 1, 1993 972 [13] R. Rivest, MIT Laboratory for Computer Science and RSA Data 973 Security, Inc. A Description of the RC2(r) Encryption Algorithm 974 March 1998. 975 Request for Comments 2268. 977 [14] M. Wahl, S. Kille, T. Howes. Lightweight Directory Access 978 Protocol (v3): UTF-8 String Representation of Distinguished Names. 979 Request for Comments 2253. 981 [15] R. Housley, W. Ford, W. Polk, D. Solo. Internet X.509 Public 982 Key Infrastructure, Certificate and CRL Profile, January 1999. 983 Request for Comments 2459. 985 [16] B. Kaliski, J. Staddon. PKCS #1: RSA Cryptography 986 Specifications, October 1998. Request for Comments 2437. 988 [17] S. Dusse, P. Hoffman, B. Ramsdell, J. Weinstein. S/MIME 989 Version 2 Certificate Handling, March 1998. Request for 990 Comments 2312. 992 [18] M. Wahl, T. Howes, S. Kille. Lightweight Directory Access 993 Protocol (v3), December 1997. Request for Comments 2251. 995 [19] ITU-T (formerly CCITT) Information Processing Systems - Open 996 Systems Interconnection - Specification of Abstract Syntax Notation 997 One (ASN.1) Rec. X.680 ISO/IEC 8824-1 999 [20] PKCS #3: Diffie-Hellman Key-Agreement Standard, An RSA 1000 Laboratories Technical Note, Version 1.4, Revised November 1, 1993. 1002 8. Acknowledgements 1004 Some of the ideas on which this proposal is based arose during 1005 discussions over several years between members of the SAAG, the IETF 1006 CAT working group, and the PSRG, regarding integration of Kerberos 1007 and SPX. Some ideas have also been drawn from the DASS system. 1008 These changes are by no means endorsed by these groups. This is an 1009 attempt to revive some of the goals of those groups, and this 1010 proposal approaches those goals primarily from the Kerberos 1011 perspective. Lastly, comments from groups working on similar ideas 1012 in DCE have been invaluable. 1014 9. Expiration Date 1016 This draft expires August 31, 2001. 1018 10. Authors 1020 Brian Tung 1021 Clifford Neuman 1022 USC Information Sciences Institute 1023 4676 Admiralty Way Suite 1001 1024 Marina del Rey CA 90292-6695 1025 Phone: +1 310 822 1511 1026 E-mail: {brian, bcn}@isi.edu 1028 Matthew Hur 1029 Cisco Systems 1030 500 108th Ave. NE, Suite 500 1031 Bellevue, WA 98004 1032 Phone: (408) 525-0034 1033 EMail: mhur@cisco.com 1035 Ari Medvinsky 1036 Keen.com, Inc. 1037 150 Independence Drive 1038 Menlo Park CA 94025 1039 Phone: +1 650 289 3134 1040 E-mail: ari@keen.com 1042 Sasha Medvinsky 1043 Motorola 1044 6450 Sequence Drive 1045 San Diego, CA 92121 1046 +1 858 404 2367 1047 E-mail: smedvinsky@gi.com 1049 John Wray 1050 Iris Associates, Inc. 1051 5 Technology Park Dr. 1052 Westford, MA 01886 1053 E-mail: John_Wray@iris.com 1055 Jonathan Trostle 1056 Cisco Systems 1057 170 W. Tasman Dr. 1058 San Jose, CA 95134 1059 E-mail: jtrostle@cisco.com