idnits 2.17.1 draft-ietf-tls-rfc4366-bis-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC5246]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 604 has weird spacing: '...ensions reque...' -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 25, 2009) is 5297 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '20' on line 386 ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 2560 (Obsoleted by RFC 6960) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 2246 (Obsoleted by RFC 4346) -- Obsolete informational reference (is this intentional?): RFC 3268 (Obsoleted by RFC 5246) -- Obsolete informational reference (is this intentional?): RFC 4346 (Obsoleted by RFC 5246) -- Obsolete informational reference (is this intentional?): RFC 4366 (Obsoleted by RFC 5246, RFC 6066) Summary: 6 errors (**), 0 flaws (~~), 3 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 TLS Working Group Donald Eastlake 3rd 2 INTERNET-DRAFT Stellar Switches 3 Obsoletes: RFC 4366 4 Intended status: Proposed Standard 5 Expires: April 24, 2010 October 25, 2009 7 Transport Layer Security (TLS) Extensions: Extension Definitions 8 10 Status of This Document 12 This Internet-Draft is submitted to IETF in full conformance with the 13 provisions of BCP 78 and BCP 79. This document may contain material 14 from IETF Documents or IETF Contributions published or made publicly 15 available before November 10, 2008. The person(s) controlling the 16 copyright in some of this material may not have granted the IETF 17 Trust the right to allow modifications of such material outside the 18 IETF Standards Process. Without obtaining an adequate license from 19 the person(s) controlling the copyright in such materials, this 20 document may not be modified outside the IETF Standards Process, and 21 derivative works of it may not be created outside the IETF Standards 22 Process, except to format it for publication as an RFC or to 23 translate it into languages other than English. 25 Distribution of this document is unlimited. Comments should be sent 26 to the TLS working group mailing list . 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/1id-abstracts.html 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html 44 Abstract 46 This document provides specifications for existing TLS extensions. It 47 is a companion document for the TLS 1.2 specification [RFC5246]. The 48 extensions specified are server_name, max_fragment_length, 49 client_certificate_url, trusted_ca_keys, truncated_hmac, and 50 status_request. 52 Acknowledgements 54 This draft is based on material from RFC 4366 for which the authors 55 were S. Blake-Wilson, M. Nystron, D. Hopwood, J. Mikkelsen, and T. 56 Wright. 58 Table of Contents 60 Status of This Document....................................1 61 Abstract...................................................1 62 Acknowledgements...........................................2 64 1. Introduction............................................3 65 1.1 Specific Extensions Covered............................3 66 1.2 Conventions Used in This Document......................4 68 2. Extensions to the Handshake Protocol....................5 69 3. Server Name Indication..................................6 70 4. Maximum Fragment Length Negotiation.....................8 71 5. Client Certificate URLs................................10 72 6. Trusted CA Indication..................................13 73 7. Truncated HMAC.........................................15 74 8. Certificate Status Request.............................16 75 9. Error Alerts...........................................18 77 10. IANA Considerations...................................19 78 11. Security Considerations...............................19 79 11.1 Security Considerations for server_name..............19 80 11.2 Security Considerations for max_fragment_length......19 81 11.3 Security Considerations for client_certificate_url...20 82 11.4 Security Considerations for trusted_ca_keys..........21 83 11.5 Security Considerations for truncated_hmac...........21 84 11.6 Security Considerations for status_request...........21 86 12. Normative References..................................23 87 13. Informative References................................23 89 Annex A: pkipath MIME Type Registration...................25 90 Annex B: Changes from RFC 4366............................27 92 Author's Address..........................................28 93 Copyright and IPR Provisions..............................29 95 1. Introduction 97 The TLS (Transport Layer Security) Protocol Version 1.2 is specified 98 in [RFC5246]. That specification includes the framework for 99 extensions to TLS, considerations in designing such extensions (see 100 Section 7.4.1.4 of [RFC5246]), and IANA Considerations for the 101 allocation of new extension code points; however, it does not specify 102 any particular extensions other than Signature Algorithms (see 103 Section 7.4.1.4.1 of [RFC5246]). 105 This document provides the specifications for existing TLS 106 extensions. It is, for the most part, the adaptation and editing of 107 material from [RFC4366], which covered TLS extensions for TLS 1.0 108 [RFC2246] and TLS 1.1 [RFC4346]. 110 1.1 Specific Extensions Covered 112 The extensions described here focus on extending the functionality 113 provided by the TLS protocol message formats. Other issues, such as 114 the addition of new cipher suites, are deferred. 116 The extension types defined in this document are: 118 enum { 119 server_name(0), max_fragment_length(1), 120 client_certificate_url(2), trusted_ca_keys(3), 121 truncated_hmac(4), status_request(5), (65535) 122 } ExtensionType; 124 Specifically, the extensions described in this document: 126 - Allow TLS clients to provide to the TLS server the name of the 127 server they are contacting. This functionality is desirable in 128 order to facilitate secure connections to servers that host 129 multiple 'virtual' servers at a single underlying network address. 131 - Allow TLS clients and servers to negotiate the maximum fragment 132 length to be sent. This functionality is desirable as a result of 133 memory constraints among some clients, and bandwidth constraints 134 among some access networks. 136 - Allow TLS clients and servers to negotiate the use of client 137 certificate URLs. This functionality is desirable in order to 138 conserve memory on constrained clients. 140 - Allow TLS clients to indicate to TLS servers which CA root keys 141 they possess. This functionality is desirable in order to prevent 142 multiple handshake failures involving TLS clients that are only 143 able to store a small number of CA root keys due to memory 144 limitations. 146 - Allow TLS clients and servers to negotiate the use of truncated 147 MACs. This functionality is desirable in order to conserve 148 bandwidth in constrained access networks. 150 - Allow TLS clients and servers to negotiate that the server sends 151 the client certificate status information (e.g., an Online 152 Certificate Status Protocol (OCSP) [RFC2560] response) during a 153 TLS handshake. This functionality is desirable in order to avoid 154 sending a Certificate Revocation List (CRL) over a constrained 155 access network and therefore save bandwidth. 157 TLS clients and servers may use the extensions described in this 158 document. The extensions are designed to be backwards compatible, 159 meaning that TLS clients that support the extensions can talk to TLS 160 servers that do not support the extensions, and vice versa. 162 Note that any messages associated with these extensions that are sent 163 during the TLS handshake MUST be included in the hash calculations 164 involved in "Finished" messages. 166 Note also that all the extensions defined in this section are 167 relevant only when a session is initiated. When a client includes 168 one or more of the defined extension types in an extended client 169 hello while requesting session resumption: 171 - If the resumption request is denied, the use of the extensions 172 is negotiated as normal. 174 - If, on the other hand, the older session is resumed, then the 175 server MUST ignore the extensions and send a server hello 176 containing none of the extension types. In this case, the 177 functionality of these extensions negotiated during the 178 original session initiation is applied to the resumed session. 180 1.2 Conventions Used in This Document 182 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 183 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 184 document are to be interpreted as described in [RFC2119]. 186 2. Extensions to the Handshake Protocol 188 This document specifies the use of two new handshake messages, 189 "CertificateURL" and "CertificateStatus". These messages are 190 described in Section 5 and Section 8, respectively. The new 191 handshake message structure therefore becomes: 193 enum { 194 hello_request(0), client_hello(1), server_hello(2), 195 certificate(11), server_key_exchange (12), 196 certificate_request(13), server_hello_done(14), 197 certificate_verify(15), client_key_exchange(16), 198 finished(20), certificate_url(21), certificate_status(22), 199 (255) 200 } HandshakeType; 202 struct { 203 HandshakeType msg_type; /* handshake type */ 204 uint24 length; /* bytes in message */ 205 select (HandshakeType) { 206 case hello_request: HelloRequest; 207 case client_hello: ClientHello; 208 case server_hello: ServerHello; 209 case certificate: Certificate; 210 case server_key_exchange: ServerKeyExchange; 211 case certificate_request: CertificateRequest; 212 case server_hello_done: ServerHelloDone; 213 case certificate_verify: CertificateVerify; 214 case client_key_exchange: ClientKeyExchange; 215 case finished: Finished; 216 case certificate_url: CertificateURL; 217 case certificate_status: CertificateStatus; 218 } body; 219 } Handshake; 221 3. Server Name Indication 223 TLS does not provide a mechanism for a client to tell a server the 224 name of the server it is contacting. It may be desirable for clients 225 to provide this information to facilitate secure connections to 226 servers that host multiple 'virtual' servers at a single underlying 227 network address. 229 In order to provide any of the server names, clients MAY include an 230 extension of type "server_name" in the (extended) client hello. The 231 "extension_data" field of this extension SHALL contain 232 "ServerNameList" where: 234 struct { 235 NameType name_type; 236 select (name_type) { 237 case host_name: HostName; 238 } name; 239 } ServerName; 241 enum { 242 host_name(0), (255) 243 } NameType; 245 opaque HostName<1..2^16-1>; 247 struct { 248 ServerName server_name_list<1..2^16-1> 249 } ServerNameList; 251 If the server understood the client hello extension but does not 252 recognize any of the server names, it SHOULD send an 253 unrecognized_name(112) alert (which MAY be fatal). 255 Currently, the only server names supported are DNS hostnames; 256 however, this does not imply any dependency of TLS on DNS, and other 257 name types may be added in the future (by an RFC that updates this 258 document). However, for backward compatibility, all future NameTypes 259 MUST begin with a 16-bit length field. TLS MAY treat provided server 260 names as opaque data and pass the names and types to the application. 262 "HostName" contains the fully qualified DNS hostname of the server, 263 as understood by the client. The hostname is represented as a byte 264 string using ASCII encoding without a trailing dot. 266 Literal IPv4 and IPv6 addresses are not permitted in "HostName". 268 It is RECOMMENDED that clients include an extension of type 269 "server_name" in the client hello whenever they locate a server by a 270 supported name type. 272 A server that receives a client hello containing the "server_name" 273 extension MAY use the information contained in the extension to guide 274 its selection of an appropriate certificate to return to the client, 275 and/or other aspects of security policy. In this event, the server 276 SHALL include an extension of type "server_name" in the (extended) 277 server hello. The "extension_data" field of this extension SHALL be 278 empty. 280 If an application negotiates a server name using an application 281 protocol and then upgrades to TLS, and if a server_name extension is 282 sent, then the extension SHOULD contain the same name that was 283 negotiated in the application protocol. If the server_name is 284 established in the TLS session handshake, the client SHOULD NOT 285 attempt to request a different server name at the application layer. 287 4. Maximum Fragment Length Negotiation 289 Without this extension, TLS specifies a fixed maximum plaintext 290 fragment length of 2^14 bytes. It may be desirable for constrained 291 clients to negotiate a smaller maximum fragment length due to memory 292 limitations or bandwidth limitations. 294 In order to negotiate smaller maximum fragment lengths, clients MAY 295 include an extension of type "max_fragment_length" in the (extended) 296 client hello. The "extension_data" field of this extension SHALL 297 contain: 299 enum{ 300 2^9(1), 2^10(2), 2^11(3), 2^12(4), (255) 301 } MaxFragmentLength; 303 whose value is the desired maximum fragment length. The allowed 304 values for this field are: 2^9, 2^10, 2^11, and 2^12. 306 Servers that receive an extended client hello containing a 307 "max_fragment_length" extension MAY accept the requested maximum 308 fragment length by including an extension of type 309 "max_fragment_length" in the (extended) server hello. The 310 "extension_data" field of this extension SHALL contain a 311 "MaxFragmentLength" whose value is the same as the requested maximum 312 fragment length. 314 If a server receives a maximum fragment length negotiation request 315 for a value other than the allowed values, it MUST abort the 316 handshake with an "illegal_parameter" alert. Similarly, if a client 317 receives a maximum fragment length negotiation response that differs 318 from the length it requested, it MUST also abort the handshake with 319 an "illegal_parameter" alert. 321 Once a maximum fragment length other than 2^14 has been successfully 322 negotiated, the client and server MUST immediately begin fragmenting 323 messages (including handshake messages), to ensure that no fragment 324 larger than the negotiated length is sent. Note that TLS already 325 requires clients and servers to support fragmentation of handshake 326 messages. 328 The negotiated length applies for the duration of the session 329 including session resumptions. 331 The negotiated length limits the input that the record layer may 332 process without fragmentation (that is, the maximum value of 333 TLSPlaintext.length; see [RFC5246], Section 6.2.1). Note that the 334 output of the record layer may be larger. For example, if the 335 negotiated length is 2^9=512, then for currently defined cipher 336 suites (those defined in [RFC5246], [RFC2712], and [RFC3268]), and 337 when null compression is used, the record layer output can be at most 338 805 bytes: 5 bytes of headers, 512 bytes of application data, 256 339 bytes of padding, and 32 bytes of MAC. This means that in this event 340 a TLS record layer peer receiving a TLS record layer message larger 341 than 805 bytes MUST discard the message and send a "record_overflow" 342 alert, without decrypting the message. When this extension is used 343 with DTLS implementations SHOULD NOT generate record_overflow alerts 344 unless the packet passes message authentication. 346 5. Client Certificate URLs 348 Without this extension, TLS specifies that when client authentication 349 is performed, client certificates are sent by clients to servers 350 during the TLS handshake. It may be desirable for constrained clients 351 to send certificate URLs in place of certificates, so that they do 352 not need to store their certificates and can therefore save memory. 354 In order to negotiate sending certificate URLs to a server, clients 355 MAY include an extension of type "client_certificate_url" in the 356 (extended) client hello. The "extension_data" field of this extension 357 SHALL be empty. 359 (Note that it is necessary to negotiate use of client certificate 360 URLs in order to avoid "breaking" existing TLS servers.) 362 Servers that receive an extended client hello containing a 363 "client_certificate_url" extension MAY indicate that they are willing 364 to accept certificate URLs by including an extension of type 365 "client_certificate_url" in the (extended) server hello. The 366 "extension_data" field of this extension SHALL be empty. 368 After negotiation of the use of client certificate URLs has been 369 successfully completed (by exchanging hellos including 370 "client_certificate_url" extensions), clients MAY send a 371 "CertificateURL" message in place of a "Certificate" message as 372 follows (see also Section 2): 374 enum { 375 individual_certs(0), pkipath(1), (255) 376 } CertChainType; 378 struct { 379 CertChainType type; 380 URLAndHash url_and_hash_list<1..2^16-1>; 381 } CertificateURL; 383 struct { 384 opaque url<1..2^16-1>; 385 unint8 padding; 386 opaque SHA1Hash[20]; 387 } URLAndHash; 389 Here "url_and_hash_list" contains a sequence of URLs and hashes. 390 Each "url" MUST be an absolute URI reference according to [RFC3986] 391 that can be immediately used to fetch the certificate(s). 393 When X.509 certificates are used, there are two possibilities: 395 - If CertificateURL.type is "individual_certs", each URL refers to a 396 single DER-encoded X.509v3 certificate, with the URL for the client's 397 certificate first. 399 - If CertificateURL.type is "pkipath", the list contains a single 400 URL referring to a DER-encoded certificate chain, using the type 401 PkiPath described in Annex A. 403 When any other certificate format is used, the specification that 404 describes use of that format in TLS should define the encoding format 405 of certificates or certificate chains, and any constraint on their 406 ordering. 408 The "padding" byte MUST be 0x01. It is present to make the structure 409 backwards compatible. 411 The hash corresponding to each URL is the SHA-1 hash of the 412 certificate or certificate chain (in the case of X.509 certificates, 413 the DER-encoded certificate or the DER-encoded PkiPath). 415 Note that when a list of URLs for X.509 certificates is used, the 416 ordering of URLs is the same as that used in the TLS Certificate 417 message (see [RFC5246], Section 7.4.2), but opposite to the order in 418 which certificates are encoded in PkiPath. In either case, the self- 419 signed root certificate MAY be omitted from the chain, under the 420 assumption that the server must already possess it in order to 421 validate it. 423 Servers receiving "CertificateURL" SHALL attempt to retrieve the 424 client's certificate chain from the URLs and then process the 425 certificate chain as usual. A cached copy of the content of any URL 426 in the chain MAY be used, provided that the SHA-1 hash matches the 427 hash of the cached copy. 429 Servers that support this extension MUST support the 'http' URI 430 scheme for certificate URLs, and MAY support other schemes. Use of 431 other schemes than 'http', 'https', or 'ftp' may create unexpected 432 problems. 434 If the protocol used is HTTP, then the HTTP server can be configured 435 to use the Cache-Control and Expires directives described in 436 [RFC2616] to specify whether and for how long certificates or 437 certificate chains should be cached. 439 The TLS server is not required to follow HTTP redirects when 440 retrieving the certificates or certificate chain. The URLs used in 441 this extension SHOULD therefore be chosen not to depend on such 442 redirects. 444 If the protocol used to retrieve certificates or certificate chains 445 returns a MIME-formatted response (as HTTP does), then the following 446 MIME Content-Types SHALL be used: when a single X.509v3 certificate 447 is returned, the Content-Type is "application/pkix-cert" [RFC2585], 448 and when a chain of X.509v3 certificates is returned, the Content- 449 Type is "application/pkix-pkipath" Annex A. 451 The server MUST check that the SHA-1 hash of the contents of the 452 object retrieved from that URL (after decoding any MIME Content- 453 Transfer-Encoding) matches the given hash. If any retrieved object 454 does not have the correct SHA-1 hash, the server MUST abort the 455 handshake with a bad_certificate_hash_value(114) alert. This alert is 456 always fatal. 458 Clients may choose to send either "Certificate" or "CertificateURL" 459 after successfully negotiating the option to send certificate URLs. 460 The option to send a certificate is included to provide flexibility 461 to clients possessing multiple certificates. 463 If a server encounters an unreasonable delay in obtaining 464 certificates in a given CertificateURL, it SHOULD time out and signal 465 a certificate_unobtainable(111) error alert. This alert MAY be fatal; 466 for example, if client authentication is required by the server for 467 the handshake to continue. 469 6. Trusted CA Indication 471 Constrained clients that, due to memory limitations, possess only a 472 small number of CA root keys may wish to indicate to servers which 473 root keys they possess, in order to avoid repeated handshake 474 failures. 476 In order to indicate which CA root keys they possess, clients MAY 477 include an extension of type "trusted_ca_keys" in the (extended) 478 client hello. The "extension_data" field of this extension SHALL 479 contain "TrustedAuthorities" where: 481 struct { 482 TrustedAuthority trusted_authorities_list<0..2^16-1>; 483 } TrustedAuthorities; 485 struct { 486 IdentifierType identifier_type; 487 select (identifier_type) { 488 case pre_agreed: struct {}; 489 case key_sha1_hash: SHA1Hash; 490 case x509_name: DistinguishedName; 491 case cert_sha1_hash: SHA1Hash; 492 } identifier; 493 } TrustedAuthority; 495 enum { 496 pre_agreed(0), key_sha1_hash(1), x509_name(2), 497 cert_sha1_hash(3), (255) 498 } IdentifierType; 500 opaque DistinguishedName<1..2^16-1>; 502 Here "TrustedAuthorities" provides a list of CA root key identifiers 503 that the client possesses. Each CA root key is identified via either: 505 - "pre_agreed": no CA root key identity supplied. 507 - "key_sha1_hash": contains the SHA-1 hash of the CA root key. For 508 Digital Signature Algorithm (DSA) and Elliptic Curve Digital 509 Signature Algorithm (ECDSA) keys, this is the hash of the 510 "subjectPublicKey" value. For RSA keys, the hash is of the big- 511 endian byte string representation of the modulus without any 512 initial 0-valued bytes. (This copies the key hash formats deployed 513 in other environments.) 515 - "x509_name": contains the DER-encoded X.509 DistinguishedName of 516 the CA. 518 - "cert_sha1_hash": contains the SHA-1 hash of a DER-encoded 519 Certificate containing the CA root key. 521 Note that clients may include none, some, or all of the CA root keys 522 they possess in this extension. 524 Note also that it is possible that a key hash or a Distinguished Name 525 alone may not uniquely identify a certificate issuer (for example, if 526 a particular CA has multiple key pairs). However, here we assume this 527 is the case following the use of Distinguished Names to identify 528 certificate issuers in TLS. 530 The option to include no CA root keys is included to allow the client 531 to indicate possession of some pre-defined set of CA root keys. 533 Servers that receive a client hello containing the "trusted_ca_keys" 534 extension MAY use the information contained in the extension to guide 535 their selection of an appropriate certificate chain to return to the 536 client. In this event, the server SHALL include an extension of type 537 "trusted_ca_keys" in the (extended) server hello. The 538 "extension_data" field of this extension SHALL be empty. 540 7. Truncated HMAC 542 Currently defined TLS cipher suites use the MAC construction HMAC 543 [RFC2104] to authenticate record layer communications. In TLS, the 544 entire output of the hash function is used as the MAC tag. However, 545 it may be desirable in constrained environments to save bandwidth by 546 truncating the output of the hash function to 80 bits when forming 547 MAC tags. 549 In order to negotiate the use of 80-bit truncated HMAC, clients MAY 550 include an extension of type "truncated_hmac" in the extended client 551 hello. The "extension_data" field of this extension SHALL be empty. 553 Servers that receive an extended hello containing a "truncated_hmac" 554 extension MAY agree to use a truncated HMAC by including an extension 555 of type "truncated_hmac", with empty "extension_data", in the 556 extended server hello. 558 Note that if new cipher suites are added that do not use HMAC, and 559 the session negotiates one of these cipher suites, this extension 560 will have no effect. It is strongly recommended that any new cipher 561 suites using other MACs consider the MAC size an integral part of the 562 cipher suite definition, taking into account both security and 563 bandwidth considerations. 565 If HMAC truncation has been successfully negotiated during a TLS 566 handshake, and the negotiated cipher suite uses HMAC, both the client 567 and the server pass this fact to the TLS record layer along with the 568 other negotiated security parameters. Subsequently during the 569 session, clients and servers MUST use truncated HMACs, calculated as 570 specified in [RFC2104]. That is, SecurityParameters.mac_length is 10 571 bytes, and only the first 10 bytes of the HMAC output are transmitted 572 and checked. Note that this extension does not affect the calculation 573 of the pseudo-random function (PRF) as part of handshaking or key 574 derivation. 576 The negotiated HMAC truncation size applies for the duration of the 577 session including session resumptions. 579 8. Certificate Status Request 581 Constrained clients may wish to use a certificate-status protocol 582 such as OCSP [RFC2560] to check the validity of server certificates, 583 in order to avoid transmission of CRLs and therefore save bandwidth 584 on constrained networks. This extension allows for such information 585 to be sent in the TLS handshake, saving roundtrips and resources. 587 In order to indicate their desire to receive certificate status 588 information, clients MAY include an extension of type 589 "status_request" in the (extended) client hello. The "extension_data" 590 field of this extension SHALL contain "CertificateStatusRequest" 591 where: 593 struct { 594 CertificateStatusType status_type; 595 select (status_type) { 596 case ocsp: OCSPStatusRequest; 597 } request; 598 } CertificateStatusRequest; 600 enum { ocsp(1), (255) } CertificateStatusType; 602 struct { 603 ResponderID responder_id_list<0..2^16-1>; 604 Extensions request_extensions; 605 } OCSPStatusRequest; 607 opaque ResponderID<1..2^16-1>; 608 opaque Extensions<0..2^16-1>; 610 In the OCSPStatusRequest, the "ResponderIDs" provides a list of OCSP 611 responders that the client trusts. A zero-length "responder_id_list" 612 sequence has the special meaning that the responders are implicitly 613 known to the server, e.g., by prior arrangement. "Extensions" is a 614 DER encoding of OCSP request extensions. 616 Both "ResponderID" and "Extensions" are DER-encoded ASN.1 types as 617 defined in [RFC2560]. "Extensions" is imported from [RFC5280]. A 618 zero-length "request_extensions" value means that there are no 619 extensions (as opposed to a zero-length ASN.1 SEQUENCE, which is not 620 valid for the "Extensions" type). 622 In the case of the "id-pkix-ocsp-nonce" OCSP extension, [RFC2560] is 623 unclear about its encoding; for clarification, the nonce MUST be a 624 DER-encoded OCTET STRING, which is encapsulated as another OCTET 625 STRING (note that implementations based on an existing OCSP client 626 will need to be checked for conformance to this requirement). 628 Servers that receive a client hello containing the "status_request" 629 extension MAY return a suitable certificate status response to the 630 client along with their certificate. If OCSP is requested, they 631 SHOULD use the information contained in the extension when selecting 632 an OCSP responder and SHOULD include request_extensions in the OCSP 633 request. 635 Servers return a certificate response along with their certificate by 636 sending a "CertificateStatus" message immediately after the 637 "Certificate" message (and before any "ServerKeyExchange" or 638 "CertificateRequest" messages). If a server returns a 639 "CertificateStatus" message, then the server MUST have included an 640 extension of type "status_request" with empty "extension_data" in the 641 extended server hello. The "CertificateStatus" message is conveyed 642 using the handshake message type "certificate_status" as follows (see 643 also Section 2): 645 struct { 646 CertificateStatusType status_type; 647 select (status_type) { 648 case ocsp: OCSPResponse; 649 } response; 650 } CertificateStatus; 652 opaque OCSPResponse<1..2^24-1>; 654 An "ocsp_response" contains a complete, DER-encoded OCSP response 655 (using the ASN.1 type OCSPResponse defined in [RFC2560]). Only one 656 OCSP response may be sent. 658 Note that a server MAY also choose not to send a "CertificateStatus" 659 message, even if has received a "status_request" extension in the 660 client hello message and has sent a "status_request" extension in the 661 server hello message. 663 Note in addition that a server MUST NOT send the "CertificateStatus" 664 message unless it received a "status_request" extension in the client 665 hello message and sent a "status_request" extension in the server 666 hello message. 668 Clients requesting an OCSP response and receiving an OCSP response in 669 a "CertificateStatus" message MUST check the OCSP response and abort 670 the handshake if the response is not satisfactory with 671 bad_certificate_status_response(113) alert. This alert is always 672 fatal. 674 9. Error Alerts 676 Four new error alerts are defined for use with the TLS extensions 677 defined in this document. To avoid "breaking" existing clients and 678 servers, these alerts MUST NOT be sent unless the sending party has 679 received an extended hello message from the party they are 680 communicating with. These error alerts are conveyed using the 681 following syntax. The new alerts are the last four, as indicated by 682 the comments on the same line as the error alert number. 684 enum { 685 close_notify(0), 686 unexpected_message(10), 687 bad_record_mac(20), 688 decryption_failed(21), 689 record_overflow(22), 690 decompression_failure(30), 691 handshake_failure(40), 692 /* 41 is not defined, for historical reasons */ 693 bad_certificate(42), 694 unsupported_certificate(43), 695 certificate_revoked(44), 696 certificate_expired(45), 697 certificate_unknown(46), 698 illegal_parameter(47), 699 unknown_ca(48), 700 access_denied(49), 701 decode_error(50), 702 decrypt_error(51), 703 export_restriction(60), 704 protocol_version(70), 705 insufficient_security(71), 706 internal_error(80), 707 user_canceled(90), 708 no_renegotiation(100), 709 unsupported_extension(110), 710 certificate_unobtainable(111), /* new */ 711 unrecognized_name(112), /* new */ 712 bad_certificate_status_response(113), /* new */ 713 bad_certificate_hash_value(114), /* new */ 714 (255) 715 } AlertDescription; 717 "certificate_unobtainable" is described in Section 5. 718 "unrecognized_name" is described in Section 3. 719 "bad_certificate_status_response" is described in Section 8. 720 "bad_certificate_hash_value" is described in Section 5. 722 10. IANA Considerations 724 IANA Considerations for TLS Extensions and the creation of a Registry 725 therefore are covered in Section 12 of [RFC5246] except for the 726 registration of MIME type application/pkix-pkipath. This MIME type 727 has already been registered but is reproduced in Annex A for 728 convenience. 730 The IANA TLS extensions registry entries that reference [RFC4366] 731 should be updated to reference this document on its publication as an 732 RFC. 734 11. Security Considerations 736 General Security Considerations for TLS Extensions are covered in 737 [RFC5246]. Security Considerations for particular extensions 738 specified in this document are given below. 740 In general, implementers should continue to monitor the state of the 741 art and address any weaknesses identified. 743 11.1 Security Considerations for server_name 745 If a single server hosts several domains, then clearly it is 746 necessary for the owners of each domain to ensure that this satisfies 747 their security needs. Apart from this, server_name does not appear to 748 introduce significant security issues. 750 Since it is possible for a client to present a different server_name 751 in the application protocol, application server implementations that 752 rely upon these names being the same MUST check to make sure the 753 client did not present a different name in the application protocol. 755 Implementations MUST ensure that a buffer overflow does not occur, 756 whatever the values of the length fields in server_name. 758 11.2 Security Considerations for max_fragment_length 760 The maximum fragment length takes effect immediately, including for 761 handshake messages. However, that does not introduce any security 762 complications that are not already present in TLS, since TLS requires 763 implementations to be able to handle fragmented handshake messages. 765 Note that as described in Section 4, once a non-null cipher suite has 766 been activated, the effective maximum fragment length depends on the 767 cipher suite and compression method, as well as on the negotiated 768 max_fragment_length. This must be taken into account when sizing 769 buffers, and checking for buffer overflow. 771 11.3 Security Considerations for client_certificate_url 773 Support for client_certificate_url involves the server's acting as a 774 client in another URI scheme dependent protocol. The server 775 therefore becomes subject to many of the same security concerns that 776 clients of the URI scheme are subject to, with the added concern that 777 the client can attempt to prompt the server to connect to some 778 (possibly weird-looking) URL. 780 In general, this issue means that an attacker might use the server to 781 indirectly attack another host that is vulnerable to some security 782 flaw. It also introduces the possibility of denial of service attacks 783 in which an attacker makes many connections to the server, each of 784 which results in the server's attempting a connection to the target 785 of the attack. 787 Note that the server may be behind a firewall or otherwise able to 788 access hosts that would not be directly accessible from the public 789 Internet. This could exacerbate the potential security and denial of 790 service problems described above, as well as allow the existence of 791 internal hosts to be confirmed when they would otherwise be hidden. 793 The detailed security concerns involved will depend on the URI 794 schemes supported by the server. In the case of HTTP, the concerns 795 are similar to those that apply to a publicly accessible HTTP proxy 796 server. In the case of HTTPS, loops and deadlocks may be created, and 797 this should be addressed. In the case of FTP, attacks arise that are 798 similar to FTP bounce attacks. 800 As a result of this issue, it is RECOMMENDED that the 801 client_certificate_url extension should have to be specifically 802 enabled by a server administrator, rather than be enabled by default. 803 It is also RECOMMENDED that URI schemes be enabled by the 804 administrator individually, and only a minimal set of schemes be 805 enabled. Unusual protocols that offer limited security or whose 806 security is not well understood SHOULD be avoided. 808 As discussed in [RFC3986], URLs that specify ports other than the 809 default may cause problems, as may very long URLs (which are more 810 likely to be useful in exploiting buffer overflow bugs). 812 Also note that HTTP caching proxies are common on the Internet, and 813 some proxies do not check for the latest version of an object 814 correctly. If a request using HTTP (or another caching protocol) goes 815 through a misconfigured or otherwise broken proxy, the proxy may 816 return an out-of-date response. 818 11.4 Security Considerations for trusted_ca_keys 820 It is possible that which CA root keys a client possesses could be 821 regarded as confidential information. As a result, the CA root key 822 indication extension should be used with care. 824 The use of the SHA-1 certificate hash alternative ensures that each 825 certificate is specified unambiguously. As for the previous 826 extension, it was not believed necessary to use both MD5 and SHA-1 827 hashes. 829 11.5 Security Considerations for truncated_hmac 831 It is possible that truncated MACs are weaker than "un-truncated" 832 MACs. However, no significant weaknesses are currently known or 833 expected to exist for HMAC with MD5 or SHA-1, truncated to 80 bits. 835 Note that the output length of a MAC need not be as long as the 836 length of a symmetric cipher key, since forging of MAC values cannot 837 be done off-line: in TLS, a single failed MAC guess will cause the 838 immediate termination of the TLS session. 840 Since the MAC algorithm only takes effect after all handshake 841 messages that affect extension parameters have been authenticated by 842 the hashes in the Finished messages, it is not possible for an active 843 attacker to force negotiation of the truncated HMAC extension where 844 it would not otherwise be used (to the extent that the handshake 845 authentication is secure). Therefore, in the event that any security 846 problem were found with truncated HMAC in the future, if either the 847 client or the server for a given session were updated to take the 848 problem into account, it would be able to veto use of this extension. 850 11.6 Security Considerations for status_request 852 If a client requests an OCSP response, it must take into account that 853 an attacker's server using a compromised key could (and probably 854 would) pretend not to support the extension. In this case, a client 855 that requires OCSP validation of certificates SHOULD either contact 856 the OCSP server directly or abort the handshake. 858 Use of the OCSP nonce request extension (id-pkix-ocsp-nonce) may 859 improve security against attacks that attempt to replay OCSP 860 responses; see Section 4.4.1 of [RFC2560] for further details. 862 12. Normative References 864 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 865 Hashing for Message Authentication", RFC 2104, February 1997. 867 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 868 Requirement Levels", BCP 14, RFC 2119, March 1997. 870 [RFC2560] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. 871 Adams, "X.509 Internet Public Key Infrastructure Online Certificate 872 Status Protocol - OCSP", RFC 2560, June 1999. 874 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 875 Infrastructure Operational Protocols: FTP and HTTP", RFC 2585, May 876 1999. 878 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, 879 L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- 880 HTTP/1.1", RFC 2616, June 1999. 882 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 883 Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 884 2005. 886 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 887 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 889 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 890 Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure 891 Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, 892 May 2008 894 13. Informative References 896 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 897 RFC 2246, January 1999. 899 [RFC2712] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher 900 Suites to Transport Layer Security (TLS)", RFC 2712, October 1999. 902 [RFC3268] Chown, P., "Advanced Encryption Standard (AES) Ciphersuites 903 for Transport Layer Security (TLS)", RFC 3268, June 2002. 905 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 906 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 908 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 909 and T. Wright, "Transport Layer Security (TLS) Extensions", RFC 4366, 910 April 2006. 912 [X509-4th] ITU-T Recommendation X.509 (2000) | ISO/IEC 9594-8:2001, 913 "Information Systems - Open Systems Interconnection - The Directory: 914 Public key and attribute certificate frameworks." 916 [X509-4th-TC1] ITU-T Recommendation X.509(2000) Corrigendum 1(2001) | 917 ISO/IEC 9594-8:2001/Cor.1:2002, Technical Corrigendum 1 to ISO/IEC 918 9594:8:2001. 920 Annex A: pkipath MIME Type Registration 922 The MIME type application/pkix-pkipath has been registered. A copy 923 of its template is included here for convenience: 925 MIME media type name: application 926 MIME subtype name: pkix-pkipath 927 Required parameters: none 929 Optional parameters: version (default value is "1") 931 Encoding considerations: 932 This MIME type is a DER encoding of the ASN.1 type PkiPath, 933 defined as follows: 934 PkiPath ::= SEQUENCE OF Certificate 935 PkiPath is used to represent a certification path. Within the 936 sequence, the order of certificates is such that the subject of 937 the first certificate is the issuer of the second certificate, 938 etc. 939 This is identical to the definition published in [X509-4th-TC1]; 940 note that it is different from that in [X509-4th]. 942 All Certificates MUST conform to [RFC5280]. (This should be 943 interpreted as a requirement to encode only PKIX-conformant 944 certificates using this type. It does not necessarily require 945 that all certificates that are not strictly PKIX-conformant must 946 be rejected by relying parties, although the security consequences 947 of accepting any such certificates should be considered 948 carefully.) 950 DER (as opposed to BER) encoding MUST be used. If this type is 951 sent over a 7-bit transport, base64 encoding SHOULD be used. 953 Security considerations: 954 The security considerations of [X509-4th] and [RFC5280] (or any 955 updates to them) apply, as well as those of any protocol that uses 956 this type (e.g., TLS). 958 Note that this type only specifies a certificate chain that can be 959 assessed for validity according to the relying party's existing 960 configuration of trusted CAs; it is not intended to be used to 961 specify any change to that configuration. 963 Interoperability considerations: 964 No specific interoperability problems are known with this type, 965 but for recommendations relating to X.509 certificates in general, 966 see [RFC5280]. 968 Published specification: [RFC4366], and [RFC5280]. 970 Applications which use this media type: TLS. It may also be used by 971 other protocols, or for general interchange of PKIX certificate 972 chains. 974 Additional information: 975 Magic number(s): DER-encoded ASN.1 can be easily recognized. 976 Further parsing is required to distinguish it from other ASN.1 977 types. 978 File extension(s): .pkipath 979 Macintosh File Type Code(s): not specified 981 Person & email address to contact for further information: 982 Magnus Nystrom 984 Intended usage: COMMON 986 Change controller: IESG 988 Annex B: Changes from RFC 4366 990 The significant changes between RFC 4366 and this document are 991 described below. 993 RFC 4366 described both general extension mechanisms (for the TLS 994 handshake and client and server hellos) as well as specific 995 extensions. RFC 4366 was associated with RFC 4346, TLS 1.1. The 996 client and server Hello extension mechanisms have been moved into RFC 997 5246, TLS 1.2, so this document, which is associated with RFC 5246, 998 includes only the handshake extension mechanisms and the specific 999 extensions from RFC 4366. RFC 5246 also specifies the unknown 1000 extension error and new extension specification considerations so 1001 that material has been removed from this document. 1003 The Server Name extension now specifies only ASCII representation, 1004 eliminating UTF-8. 1006 The Client Certificate URLs extension has been changed to make the 1007 presence of a hash mandatory. 1009 For the case of DTLS, the requirement to report an overflow of the 1010 negotiated maximum fragment length is made conditional on passing 1011 authentication. 1013 The material was also re-organized in minor ways. For example, 1014 information as to which errors are fatal is moved from the one "Error 1015 Alerts" section to the individual extension specifications. 1017 Author's Address 1019 Donald Eastlake 3rd 1020 Stellar Switches, Inc. 1021 155 Beaver Street 1022 Milford, MA 01757 USA 1024 Tel: +1-508-634-2066 1025 Email: d3e3e3@gmail.com 1027 Copyright and IPR Provisions 1029 Copyright (c) 2009 IETF Trust and the persons identified as the 1030 document authors. All rights reserved. 1032 This document is subject to BCP 78 and the IETF Trust's Legal 1033 Provisions Relating to IETF Documents in effect on the date of 1034 publication of this document (http://trustee.ietf.org/license-info). 1035 Please review these documents carefully, as they describe your rights 1036 and restrictions with respect to this document. 1038 The definitive version of an IETF Document is that published by, or 1039 under the auspices of, the IETF. Versions of IETF Documents that are 1040 published by third parties, including those that are translated into 1041 other languages, should not be considered to be definitive versions 1042 of IETF Documents. The definitive version of these Legal Provisions 1043 is that published by, or under the auspices of, the IETF. Versions of 1044 these Legal Provisions that are published by third parties, including 1045 those that are translated into other languages, should not be 1046 considered to be definitive versions of these Legal Provisions. For 1047 the avoidance of doubt, each Contributor to the IETF Standards 1048 Process licenses each Contribution that he or she makes as part of 1049 the IETF Standards Process to the IETF Trust pursuant to the 1050 provisions of RFC 5378. No language to the contrary, or terms, 1051 conditions or rights that differ from or are inconsistent with the 1052 rights and licenses granted under RFC 5378, shall have any effect and 1053 shall be null and void, whether published or posted by such 1054 Contributor, or included with or in such Contribution.