idnits 2.17.1 draft-ietf-tls-rfc4366-bis-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (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. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 621 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 (May 30, 2010) is 5079 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 403 == Unused Reference: 'RFC2119' is defined on line 892, but no explicit reference was found in the text ** 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 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 (==), 7 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: 4366 4 Intended status: Proposed Standard 5 Expires: November 29, 2010 May 30, 2010 7 Transport Layer Security (TLS) Extensions: Extension Definitions 8 10 Abstract 12 This document provides specifications for existing TLS extensions. It 13 is a companion document for the TLS 1.2 specification [RFC5246]. The 14 extensions specified are server_name, max_fragment_length, 15 client_certificate_url, trusted_ca_keys, truncated_hmac, and 16 status_request. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. This document may contain material 22 from IETF Documents or IETF Contributions published or made publicly 23 available before November 10, 2008. The person(s) controlling the 24 copyright in some of this material may not have granted the IETF 25 Trust the right to allow modifications of such material outside the 26 IETF Standards Process. Without obtaining an adequate license from 27 the person(s) controlling the copyright in such materials, this 28 document may not be modified outside the IETF Standards Process, and 29 derivative works of it may not be created outside the IETF Standards 30 Process, except to format it for publication as an RFC or to 31 translate it into languages other than English. 33 Distribution of this document is unlimited. Comments should be sent 34 to the TLS working group mailing list . 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF), its areas, and its working groups. Note that 38 other groups may also distribute working documents as Internet- 39 Drafts. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 The list of current Internet-Drafts can be accessed at 47 http://www.ietf.org/1id-abstracts.html 48 The list of Internet-Draft Shadow Directories can be accessed at 49 http://www.ietf.org/shadow.html 51 Acknowledgements 53 This draft is based on material from RFC 4366 for which the authors 54 were S. Blake-Wilson, M. Nystron, D. Hopwood, J. Mikkelsen, and T. 55 Wright. 57 Table of Contents 59 1. Introduction............................................4 60 1.1 Specific Extensions Covered............................4 61 1.2 Conventions Used in This Document......................6 63 2. Extensions to the Handshake Protocol....................7 64 3. Server Name Indication..................................8 65 4. Maximum Fragment Length Negotiation....................10 66 5. Client Certificate URLs................................12 67 6. Trusted CA Indication..................................15 68 7. Truncated HMAC.........................................17 69 8. Certificate Status Request.............................18 70 9. Error Alerts...........................................20 72 10. IANA Considerations...................................21 73 11. Security Considerations...............................21 74 11.1 Security Considerations for server_name..............21 75 11.2 Security Considerations for max_fragment_length......21 76 11.3 Security Considerations for client_certificate_url...22 77 11.4 Security Considerations for trusted_ca_keys..........23 78 11.5 Security Considerations for truncated_hmac...........23 79 11.6 Security Considerations for status_request...........24 81 12. Normative References..................................25 82 13. Informative References................................25 84 Annex A: pkipath MIME Type Registration...................27 85 Annex B: Changes from RFC 4366............................29 87 1. Introduction 89 The TLS (Transport Layer Security) Protocol Version 1.2 is specified 90 in [RFC5246]. That specification includes the framework for 91 extensions to TLS, considerations in designing such extensions (see 92 Section 7.4.1.4 of [RFC5246]), and IANA Considerations for the 93 allocation of new extension code points; however, it does not specify 94 any particular extensions other than Signature Algorithms (see 95 Section 7.4.1.4.1 of [RFC5246]). 97 This document provides the specifications for existing TLS 98 extensions. It is, for the most part, the adaptation and editing of 99 material from [RFC4366], which covered TLS extensions for TLS 1.0 100 [RFC2246] and TLS 1.1 [RFC4346]. 102 1.1 Specific Extensions Covered 104 The extensions described here focus on extending the functionality 105 provided by the TLS protocol message formats. Other issues, such as 106 the addition of new cipher suites, are deferred. 108 The extension types defined in this document are: 110 enum { 111 server_name(0), max_fragment_length(1), 112 client_certificate_url(2), trusted_ca_keys(3), 113 truncated_hmac(4), status_request(5), (65535) 114 } ExtensionType; 116 Specifically, the extensions described in this document: 118 - Allow TLS clients to provide to the TLS server the name of the 119 server they are contacting. This functionality is desirable in 120 order to facilitate secure connections to servers that host 121 multiple 'virtual' servers at a single underlying network address. 123 - Allow TLS clients and servers to negotiate the maximum fragment 124 length to be sent. This functionality is desirable as a result of 125 memory constraints among some clients, and bandwidth constraints 126 among some access networks. 128 - Allow TLS clients and servers to negotiate the use of client 129 certificate URLs. This functionality is desirable in order to 130 conserve memory on constrained clients. 132 - Allow TLS clients to indicate to TLS servers which CA root keys 133 they possess. This functionality is desirable in order to prevent 134 multiple handshake failures involving TLS clients that are only 135 able to store a small number of CA root keys due to memory 136 limitations. 138 - Allow TLS clients and servers to negotiate the use of truncated 139 MACs. This functionality is desirable in order to conserve 140 bandwidth in constrained access networks. 142 - Allow TLS clients and servers to negotiate that the server sends 143 the client certificate status information (e.g., an Online 144 Certificate Status Protocol (OCSP) [RFC2560] response) during a 145 TLS handshake. This functionality is desirable in order to avoid 146 sending a Certificate Revocation List (CRL) over a constrained 147 access network and therefore save bandwidth. 149 TLS clients and servers may use the extensions described in this 150 document. The extensions are designed to be backwards compatible, 151 meaning that TLS clients that support the extensions can talk to TLS 152 servers that do not support the extensions, and vice versa. 154 Note that any messages associated with these extensions that are sent 155 during the TLS handshake MUST be included in the hash calculations 156 involved in "Finished" messages. 158 Note also that all the extensions defined in this section are 159 relevant only when a session is initiated. A client that requests 160 session resumption does not in general know whether the server will 161 accept this request, and therefore it SHOULD send the same extensions 162 as it would send if it were not attempting resumption. When a client 163 includes one or more of the defined extension types in an extended 164 client hello while requesting session resumption: 166 - The server name indication extension MAY be used by the server 167 when deciding whether or not to resume a session as described 168 in section 3. 170 - If the resumption request is denied, the use of the extensions 171 is negotiated as normal. 173 - If, on the other hand, the older session is resumed, then the 174 server MUST ignore the extensions and send a server hello 175 containing none of the extension types. In this case, the 176 functionality of these extensions negotiated during the 177 original session initiation is applied to the resumed session. 179 1.2 Conventions Used in This Document 181 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 182 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 183 document are to be interpreted as described in RFC 2119. 185 2. Extensions to the Handshake Protocol 187 This document specifies the use of two new handshake messages, 188 "CertificateURL" and "CertificateStatus". These messages are 189 described in Section 5 and Section 8, respectively. The new 190 handshake message structure therefore becomes: 192 enum { 193 hello_request(0), client_hello(1), server_hello(2), 194 certificate(11), server_key_exchange (12), 195 certificate_request(13), server_hello_done(14), 196 certificate_verify(15), client_key_exchange(16), 197 finished(20), certificate_url(21), certificate_status(22), 198 (255) 199 } HandshakeType; 201 struct { 202 HandshakeType msg_type; /* handshake type */ 203 uint24 length; /* bytes in message */ 204 select (HandshakeType) { 205 case hello_request: HelloRequest; 206 case client_hello: ClientHello; 207 case server_hello: ServerHello; 208 case certificate: Certificate; 209 case server_key_exchange: ServerKeyExchange; 210 case certificate_request: CertificateRequest; 211 case server_hello_done: ServerHelloDone; 212 case certificate_verify: CertificateVerify; 213 case client_key_exchange: ClientKeyExchange; 214 case finished: Finished; 215 case certificate_url: CertificateURL; 216 case certificate_status: CertificateStatus; 217 } body; 218 } Handshake; 220 3. Server Name Indication 222 TLS does not provide a mechanism for a client to tell a server the 223 name of the server it is contacting. It may be desirable for clients 224 to provide this information to facilitate secure connections to 225 servers that host multiple 'virtual' servers at a single underlying 226 network address. 228 In order to provide any of the server names, clients MAY include an 229 extension of type "server_name" in the (extended) client hello. The 230 "extension_data" field of this extension SHALL contain 231 "ServerNameList" where: 233 struct { 234 NameType name_type; 235 select (name_type) { 236 case host_name: HostName; 237 } name; 238 } ServerName; 240 enum { 241 host_name(0), (255) 242 } NameType; 244 opaque HostName<1..2^16-1>; 246 struct { 247 ServerName server_name_list<1..2^16-1> 248 } ServerNameList; 250 The ServerNameList MUST NOT contain more than one name of the same 251 name_type. If the server understood the client hello extension but 252 does not recognize any of the server names, it SHOULD send an 253 unrecognized_name(112) alert (which MAY be fatal). 255 Note: Earlier versions of this specification permitted multiple 256 names of the same name_type. In practice, current client 257 implementations only send one name, and the client cannot 258 necessarily find out which name the server selected. Multiple 259 names of the same name_type are therefore now prohibited. 261 Currently, the only server names supported are DNS hostnames; 262 however, this does not imply any dependency of TLS on DNS, and other 263 name types may be added in the future (by an RFC that updates this 264 document). However, for backward compatibility, all future NameTypes 265 MUST begin with a 16-bit length field. TLS MAY treat provided server 266 names as opaque data and pass the names and types to the application. 268 "HostName" contains the fully qualified DNS hostname of the server, 269 as understood by the client. The hostname is represented as a byte 270 string using ASCII encoding without a trailing dot. 272 Literal IPv4 and IPv6 addresses are not permitted in "HostName". 274 It is RECOMMENDED that clients include an extension of type 275 "server_name" in the client hello whenever they locate a server by a 276 supported name type. 278 A server that receives a client hello containing the "server_name" 279 extension MAY use the information contained in the extension to guide 280 its selection of an appropriate certificate to return to the client, 281 and/or other aspects of security policy. In this event, the server 282 SHALL include an extension of type "server_name" in the (extended) 283 server hello. The "extension_data" field of this extension SHALL be 284 empty. 286 When the server is deciding whether or not to accept a request to 287 resume a session, the contents of a server_name extension MAY be used 288 in the lookup of the session in the session cache. The client SHOULD 289 include the same server_name extension in session resumption request 290 as it did in the full handshake that established the session. A 291 server that implements this extension MUST NOT accept the request to 292 resume the session if the server_name extension contains a different 293 name. Instead, it proceeds with a full handshake to establish a new 294 session. When resuming a session, the server MUST NOT include a 295 server_name extension in the server hello. 297 If an application negotiates a server name using an application 298 protocol and then upgrades to TLS, and if a server_name extension is 299 sent, then the extension SHOULD contain the same name that was 300 negotiated in the application protocol. If the server_name is 301 established in the TLS session handshake, the client SHOULD NOT 302 attempt to request a different server name at the application layer. 304 4. Maximum Fragment Length Negotiation 306 Without this extension, TLS specifies a fixed maximum plaintext 307 fragment length of 2^14 bytes. It may be desirable for constrained 308 clients to negotiate a smaller maximum fragment length due to memory 309 limitations or bandwidth limitations. 311 In order to negotiate smaller maximum fragment lengths, clients MAY 312 include an extension of type "max_fragment_length" in the (extended) 313 client hello. The "extension_data" field of this extension SHALL 314 contain: 316 enum{ 317 2^9(1), 2^10(2), 2^11(3), 2^12(4), (255) 318 } MaxFragmentLength; 320 whose value is the desired maximum fragment length. The allowed 321 values for this field are: 2^9, 2^10, 2^11, and 2^12. 323 Servers that receive an extended client hello containing a 324 "max_fragment_length" extension MAY accept the requested maximum 325 fragment length by including an extension of type 326 "max_fragment_length" in the (extended) server hello. The 327 "extension_data" field of this extension SHALL contain a 328 "MaxFragmentLength" whose value is the same as the requested maximum 329 fragment length. 331 If a server receives a maximum fragment length negotiation request 332 for a value other than the allowed values, it MUST abort the 333 handshake with an "illegal_parameter" alert. Similarly, if a client 334 receives a maximum fragment length negotiation response that differs 335 from the length it requested, it MUST also abort the handshake with 336 an "illegal_parameter" alert. 338 Once a maximum fragment length other than 2^14 has been successfully 339 negotiated, the client and server MUST immediately begin fragmenting 340 messages (including handshake messages), to ensure that no fragment 341 larger than the negotiated length is sent. Note that TLS already 342 requires clients and servers to support fragmentation of handshake 343 messages. 345 The negotiated length applies for the duration of the session 346 including session resumptions. 348 The negotiated length limits the input that the record layer may 349 process without fragmentation (that is, the maximum value of 350 TLSPlaintext.length; see [RFC5246], Section 6.2.1). Note that the 351 output of the record layer may be larger. For example, if the 352 negotiated length is 2^9=512, then for currently defined cipher 353 suites (those defined in [RFC5246] and [RFC2712]), and when null 354 compression is used, the record layer output can be at most 805 355 bytes: 5 bytes of headers, 512 bytes of application data, 256 bytes 356 of padding, and 32 bytes of MAC. This means that in this event a TLS 357 record layer peer receiving a TLS record layer message larger than 358 805 bytes MUST discard the message and send a "record_overflow" 359 alert, without decrypting the message. When this extension is used 360 with DTLS implementations SHOULD NOT generate record_overflow alerts 361 unless the packet passes message authentication. 363 5. Client Certificate URLs 365 Without this extension, TLS specifies that when client authentication 366 is performed, client certificates are sent by clients to servers 367 during the TLS handshake. It may be desirable for constrained clients 368 to send certificate URLs in place of certificates, so that they do 369 not need to store their certificates and can therefore save memory. 371 In order to negotiate sending certificate URLs to a server, clients 372 MAY include an extension of type "client_certificate_url" in the 373 (extended) client hello. The "extension_data" field of this extension 374 SHALL be empty. 376 (Note that it is necessary to negotiate use of client certificate 377 URLs in order to avoid "breaking" existing TLS servers.) 379 Servers that receive an extended client hello containing a 380 "client_certificate_url" extension MAY indicate that they are willing 381 to accept certificate URLs by including an extension of type 382 "client_certificate_url" in the (extended) server hello. The 383 "extension_data" field of this extension SHALL be empty. 385 After negotiation of the use of client certificate URLs has been 386 successfully completed (by exchanging hellos including 387 "client_certificate_url" extensions), clients MAY send a 388 "CertificateURL" message in place of a "Certificate" message as 389 follows (see also Section 2): 391 enum { 392 individual_certs(0), pkipath(1), (255) 393 } CertChainType; 395 struct { 396 CertChainType type; 397 URLAndHash url_and_hash_list<1..2^16-1>; 398 } CertificateURL; 400 struct { 401 opaque url<1..2^16-1>; 402 unint8 padding; 403 opaque SHA1Hash[20]; 404 } URLAndHash; 406 Here "url_and_hash_list" contains a sequence of URLs and hashes. 407 Each "url" MUST be an absolute URI reference according to [RFC3986] 408 that can be immediately used to fetch the certificate(s). 410 When X.509 certificates are used, there are two possibilities: 412 - If CertificateURL.type is "individual_certs", each URL refers to a 413 single DER-encoded X.509v3 certificate, with the URL for the client's 414 certificate first. 416 - If CertificateURL.type is "pkipath", the list contains a single 417 URL referring to a DER-encoded certificate chain, using the type 418 PkiPath described in Annex A. 420 When any other certificate format is used, the specification that 421 describes use of that format in TLS should define the encoding format 422 of certificates or certificate chains, and any constraint on their 423 ordering. 425 The "padding" byte MUST be 0x01. It is present to make the structure 426 backwards compatible. 428 The hash corresponding to each URL is the SHA-1 hash of the 429 certificate or certificate chain (in the case of X.509 certificates, 430 the DER-encoded certificate or the DER-encoded PkiPath). 432 Note that when a list of URLs for X.509 certificates is used, the 433 ordering of URLs is the same as that used in the TLS Certificate 434 message (see [RFC5246], Section 7.4.2), but opposite to the order in 435 which certificates are encoded in PkiPath. In either case, the self- 436 signed root certificate MAY be omitted from the chain, under the 437 assumption that the server must already possess it in order to 438 validate it. 440 Servers receiving "CertificateURL" SHALL attempt to retrieve the 441 client's certificate chain from the URLs and then process the 442 certificate chain as usual. A cached copy of the content of any URL 443 in the chain MAY be used, provided that the SHA-1 hash matches the 444 hash of the cached copy. 446 Servers that support this extension MUST support the 'http' URI 447 scheme for certificate URLs, and MAY support other schemes. Use of 448 other schemes than 'http', 'https', or 'ftp' may create unexpected 449 problems. 451 If the protocol used is HTTP, then the HTTP server can be configured 452 to use the Cache-Control and Expires directives described in 453 [RFC2616] to specify whether and for how long certificates or 454 certificate chains should be cached. 456 The TLS server is not required to follow HTTP redirects when 457 retrieving the certificates or certificate chain. The URLs used in 458 this extension SHOULD therefore be chosen not to depend on such 459 redirects. 461 If the protocol used to retrieve certificates or certificate chains 462 returns a MIME-formatted response (as HTTP does), then the following 463 MIME Content-Types SHALL be used: when a single X.509v3 certificate 464 is returned, the Content-Type is "application/pkix-cert" [RFC2585], 465 and when a chain of X.509v3 certificates is returned, the Content- 466 Type is "application/pkix-pkipath" Annex A. 468 The server MUST check that the SHA-1 hash of the contents of the 469 object retrieved from that URL (after decoding any MIME Content- 470 Transfer-Encoding) matches the given hash. If any retrieved object 471 does not have the correct SHA-1 hash, the server MUST abort the 472 handshake with a bad_certificate_hash_value(114) alert. This alert is 473 always fatal. 475 Clients may choose to send either "Certificate" or "CertificateURL" 476 after successfully negotiating the option to send certificate URLs. 477 The option to send a certificate is included to provide flexibility 478 to clients possessing multiple certificates. 480 If a server encounters an unreasonable delay in obtaining 481 certificates in a given CertificateURL, it SHOULD time out and signal 482 a certificate_unobtainable(111) error alert. This alert MAY be fatal; 483 for example, if client authentication is required by the server for 484 the handshake to continue. 486 6. Trusted CA Indication 488 Constrained clients that, due to memory limitations, possess only a 489 small number of CA root keys may wish to indicate to servers which 490 root keys they possess, in order to avoid repeated handshake 491 failures. 493 In order to indicate which CA root keys they possess, clients MAY 494 include an extension of type "trusted_ca_keys" in the (extended) 495 client hello. The "extension_data" field of this extension SHALL 496 contain "TrustedAuthorities" where: 498 struct { 499 TrustedAuthority trusted_authorities_list<0..2^16-1>; 500 } TrustedAuthorities; 502 struct { 503 IdentifierType identifier_type; 504 select (identifier_type) { 505 case pre_agreed: struct {}; 506 case key_sha1_hash: SHA1Hash; 507 case x509_name: DistinguishedName; 508 case cert_sha1_hash: SHA1Hash; 509 } identifier; 510 } TrustedAuthority; 512 enum { 513 pre_agreed(0), key_sha1_hash(1), x509_name(2), 514 cert_sha1_hash(3), (255) 515 } IdentifierType; 517 opaque DistinguishedName<1..2^16-1>; 519 Here "TrustedAuthorities" provides a list of CA root key identifiers 520 that the client possesses. Each CA root key is identified via either: 522 - "pre_agreed": no CA root key identity supplied. 524 - "key_sha1_hash": contains the SHA-1 hash of the CA root key. For 525 Digital Signature Algorithm (DSA) and Elliptic Curve Digital 526 Signature Algorithm (ECDSA) keys, this is the hash of the 527 "subjectPublicKey" value. For RSA keys, the hash is of the big- 528 endian byte string representation of the modulus without any 529 initial 0-valued bytes. (This copies the key hash formats deployed 530 in other environments.) 532 - "x509_name": contains the DER-encoded X.509 DistinguishedName of 533 the CA. 535 - "cert_sha1_hash": contains the SHA-1 hash of a DER-encoded 536 Certificate containing the CA root key. 538 Note that clients may include none, some, or all of the CA root keys 539 they possess in this extension. 541 Note also that it is possible that a key hash or a Distinguished Name 542 alone may not uniquely identify a certificate issuer (for example, if 543 a particular CA has multiple key pairs). However, here we assume this 544 is the case following the use of Distinguished Names to identify 545 certificate issuers in TLS. 547 The option to include no CA root keys is included to allow the client 548 to indicate possession of some pre-defined set of CA root keys. 550 Servers that receive a client hello containing the "trusted_ca_keys" 551 extension MAY use the information contained in the extension to guide 552 their selection of an appropriate certificate chain to return to the 553 client. In this event, the server SHALL include an extension of type 554 "trusted_ca_keys" in the (extended) server hello. The 555 "extension_data" field of this extension SHALL be empty. 557 7. Truncated HMAC 559 Currently defined TLS cipher suites use the MAC construction HMAC 560 [RFC2104] to authenticate record layer communications. In TLS, the 561 entire output of the hash function is used as the MAC tag. However, 562 it may be desirable in constrained environments to save bandwidth by 563 truncating the output of the hash function to 80 bits when forming 564 MAC tags. 566 In order to negotiate the use of 80-bit truncated HMAC, clients MAY 567 include an extension of type "truncated_hmac" in the extended client 568 hello. The "extension_data" field of this extension SHALL be empty. 570 Servers that receive an extended hello containing a "truncated_hmac" 571 extension MAY agree to use a truncated HMAC by including an extension 572 of type "truncated_hmac", with empty "extension_data", in the 573 extended server hello. 575 Note that if new cipher suites are added that do not use HMAC, and 576 the session negotiates one of these cipher suites, this extension 577 will have no effect. It is strongly recommended that any new cipher 578 suites using other MACs consider the MAC size an integral part of the 579 cipher suite definition, taking into account both security and 580 bandwidth considerations. 582 If HMAC truncation has been successfully negotiated during a TLS 583 handshake, and the negotiated cipher suite uses HMAC, both the client 584 and the server pass this fact to the TLS record layer along with the 585 other negotiated security parameters. Subsequently during the 586 session, clients and servers MUST use truncated HMACs, calculated as 587 specified in [RFC2104]. That is, SecurityParameters.mac_length is 10 588 bytes, and only the first 10 bytes of the HMAC output are transmitted 589 and checked. Note that this extension does not affect the calculation 590 of the pseudo-random function (PRF) as part of handshaking or key 591 derivation. 593 The negotiated HMAC truncation size applies for the duration of the 594 session including session resumptions. 596 8. Certificate Status Request 598 Constrained clients may wish to use a certificate-status protocol 599 such as OCSP [RFC2560] to check the validity of server certificates, 600 in order to avoid transmission of CRLs and therefore save bandwidth 601 on constrained networks. This extension allows for such information 602 to be sent in the TLS handshake, saving roundtrips and resources. 604 In order to indicate their desire to receive certificate status 605 information, clients MAY include an extension of type 606 "status_request" in the (extended) client hello. The "extension_data" 607 field of this extension SHALL contain "CertificateStatusRequest" 608 where: 610 struct { 611 CertificateStatusType status_type; 612 select (status_type) { 613 case ocsp: OCSPStatusRequest; 614 } request; 615 } CertificateStatusRequest; 617 enum { ocsp(1), (255) } CertificateStatusType; 619 struct { 620 ResponderID responder_id_list<0..2^16-1>; 621 Extensions request_extensions; 622 } OCSPStatusRequest; 624 opaque ResponderID<1..2^16-1>; 625 opaque Extensions<0..2^16-1>; 627 In the OCSPStatusRequest, the "ResponderIDs" provides a list of OCSP 628 responders that the client trusts. A zero-length "responder_id_list" 629 sequence has the special meaning that the responders are implicitly 630 known to the server, e.g., by prior arrangement. "Extensions" is a 631 DER encoding of OCSP request extensions. 633 Both "ResponderID" and "Extensions" are DER-encoded ASN.1 types as 634 defined in [RFC2560]. "Extensions" is imported from [RFC5280]. A 635 zero-length "request_extensions" value means that there are no 636 extensions (as opposed to a zero-length ASN.1 SEQUENCE, which is not 637 valid for the "Extensions" type). 639 In the case of the "id-pkix-ocsp-nonce" OCSP extension, [RFC2560] is 640 unclear about its encoding; for clarification, the nonce MUST be a 641 DER-encoded OCTET STRING, which is encapsulated as another OCTET 642 STRING (note that implementations based on an existing OCSP client 643 will need to be checked for conformance to this requirement). 645 Servers that receive a client hello containing the "status_request" 646 extension MAY return a suitable certificate status response to the 647 client along with their certificate. If OCSP is requested, they 648 SHOULD use the information contained in the extension when selecting 649 an OCSP responder and SHOULD include request_extensions in the OCSP 650 request. 652 Servers return a certificate response along with their certificate by 653 sending a "CertificateStatus" message immediately after the 654 "Certificate" message (and before any "ServerKeyExchange" or 655 "CertificateRequest" messages). If a server returns a 656 "CertificateStatus" message, then the server MUST have included an 657 extension of type "status_request" with empty "extension_data" in the 658 extended server hello. The "CertificateStatus" message is conveyed 659 using the handshake message type "certificate_status" as follows (see 660 also Section 2): 662 struct { 663 CertificateStatusType status_type; 664 select (status_type) { 665 case ocsp: OCSPResponse; 666 } response; 667 } CertificateStatus; 669 opaque OCSPResponse<1..2^24-1>; 671 An "ocsp_response" contains a complete, DER-encoded OCSP response 672 (using the ASN.1 type OCSPResponse defined in [RFC2560]). Only one 673 OCSP response may be sent. 675 Note that a server MAY also choose not to send a "CertificateStatus" 676 message, even if has received a "status_request" extension in the 677 client hello message and has sent a "status_request" extension in the 678 server hello message. 680 Note in addition that a server MUST NOT send the "CertificateStatus" 681 message unless it received a "status_request" extension in the client 682 hello message and sent a "status_request" extension in the server 683 hello message. 685 Clients requesting an OCSP response and receiving an OCSP response in 686 a "CertificateStatus" message MUST check the OCSP response and abort 687 the handshake if the response is not satisfactory with 688 bad_certificate_status_response(113) alert. This alert is always 689 fatal. 691 9. Error Alerts 693 Four new error alerts are defined for use with the TLS extensions 694 defined in this document. To avoid "breaking" existing clients and 695 servers, these alerts MUST NOT be sent unless the sending party has 696 received an extended hello message from the party they are 697 communicating with. These error alerts are conveyed using the 698 following syntax. The new alerts are the last four, as indicated by 699 the comments on the same line as the error alert number. 701 enum { 702 close_notify(0), 703 unexpected_message(10), 704 bad_record_mac(20), 705 decryption_failed(21), 706 record_overflow(22), 707 decompression_failure(30), 708 handshake_failure(40), 709 /* 41 is not defined, for historical reasons */ 710 bad_certificate(42), 711 unsupported_certificate(43), 712 certificate_revoked(44), 713 certificate_expired(45), 714 certificate_unknown(46), 715 illegal_parameter(47), 716 unknown_ca(48), 717 access_denied(49), 718 decode_error(50), 719 decrypt_error(51), 720 export_restriction(60), 721 protocol_version(70), 722 insufficient_security(71), 723 internal_error(80), 724 user_canceled(90), 725 no_renegotiation(100), 726 unsupported_extension(110), 727 certificate_unobtainable(111), /* new */ 728 unrecognized_name(112), /* new */ 729 bad_certificate_status_response(113), /* new */ 730 bad_certificate_hash_value(114), /* new */ 731 (255) 732 } AlertDescription; 734 "certificate_unobtainable" is described in Section 5. 735 "unrecognized_name" is described in Section 3. 736 "bad_certificate_status_response" is described in Section 8. 737 "bad_certificate_hash_value" is described in Section 5. 739 10. IANA Considerations 741 IANA Considerations for TLS Extensions and the creation of a Registry 742 therefore are covered in Section 12 of [RFC5246] except for the 743 registration of MIME type application/pkix-pkipath. This MIME type 744 has already been registered but is reproduced in Annex A for 745 convenience. 747 The IANA TLS extensions registry entries that reference [RFC4366] 748 should be updated to reference this document on its publication as an 749 RFC. 751 11. Security Considerations 753 General Security Considerations for TLS Extensions are covered in 754 [RFC5246]. Security Considerations for particular extensions 755 specified in this document are given below. 757 In general, implementers should continue to monitor the state of the 758 art and address any weaknesses identified. 760 11.1 Security Considerations for server_name 762 If a single server hosts several domains, then clearly it is 763 necessary for the owners of each domain to ensure that this satisfies 764 their security needs. Apart from this, server_name does not appear to 765 introduce significant security issues. 767 Since it is possible for a client to present a different server_name 768 in the application protocol, application server implementations that 769 rely upon these names being the same MUST check to make sure the 770 client did not present a different name in the application protocol. 772 Implementations MUST ensure that a buffer overflow does not occur, 773 whatever the values of the length fields in server_name. 775 11.2 Security Considerations for max_fragment_length 777 The maximum fragment length takes effect immediately, including for 778 handshake messages. However, that does not introduce any security 779 complications that are not already present in TLS, since TLS requires 780 implementations to be able to handle fragmented handshake messages. 782 Note that as described in Section 4, once a non-null cipher suite has 783 been activated, the effective maximum fragment length depends on the 784 cipher suite and compression method, as well as on the negotiated 785 max_fragment_length. This must be taken into account when sizing 786 buffers, and checking for buffer overflow. 788 11.3 Security Considerations for client_certificate_url 790 Support for client_certificate_url involves the server's acting as a 791 client in another URI scheme dependent protocol. The server 792 therefore becomes subject to many of the same security concerns that 793 clients of the URI scheme are subject to, with the added concern that 794 the client can attempt to prompt the server to connect to some 795 (possibly weird-looking) URL. 797 In general, this issue means that an attacker might use the server to 798 indirectly attack another host that is vulnerable to some security 799 flaw. It also introduces the possibility of denial of service attacks 800 in which an attacker makes many connections to the server, each of 801 which results in the server's attempting a connection to the target 802 of the attack. 804 Note that the server may be behind a firewall or otherwise able to 805 access hosts that would not be directly accessible from the public 806 Internet. This could exacerbate the potential security and denial of 807 service problems described above, as well as allow the existence of 808 internal hosts to be confirmed when they would otherwise be hidden. 810 The detailed security concerns involved will depend on the URI 811 schemes supported by the server. In the case of HTTP, the concerns 812 are similar to those that apply to a publicly accessible HTTP proxy 813 server. In the case of HTTPS, loops and deadlocks may be created, and 814 this should be addressed. In the case of FTP, attacks arise that are 815 similar to FTP bounce attacks. 817 As a result of this issue, it is RECOMMENDED that the 818 client_certificate_url extension should have to be specifically 819 enabled by a server administrator, rather than be enabled by default. 820 It is also RECOMMENDED that URI schemes be enabled by the 821 administrator individually, and only a minimal set of schemes be 822 enabled. Unusual protocols that offer limited security or whose 823 security is not well understood SHOULD be avoided. 825 As discussed in [RFC3986], URLs that specify ports other than the 826 default may cause problems, as may very long URLs (which are more 827 likely to be useful in exploiting buffer overflow bugs). 829 This extension continues to use SHA-1 (as in RFC 4366) and does not 830 provide algorithm agility. The property required of SHA-1 in this 831 case is second pre-image resistance, not collision resistance. 832 Furthermore, even if second pre-image attacks against SHA-1 are found 833 in the future, an attack against client_certificate_url would require 834 a second pre-image that is accepted as a valid certificate by the 835 server, and contains the same public key. 837 Also note that HTTP caching proxies are common on the Internet, and 838 some proxies do not check for the latest version of an object 839 correctly. If a request using HTTP (or another caching protocol) goes 840 through a misconfigured or otherwise broken proxy, the proxy may 841 return an out-of-date response. 843 11.4 Security Considerations for trusted_ca_keys 845 It is possible that which CA root keys a client possesses could be 846 regarded as confidential information. As a result, the CA root key 847 indication extension should be used with care. 849 The use of the SHA-1 certificate hash alternative ensures that each 850 certificate is specified unambiguously. This context does not require 851 a cryptographic hash function, so the use of SHA-1 is considered 852 acceptable, and no algorithm agility is provided. 854 11.5 Security Considerations for truncated_hmac 856 It is possible that truncated MACs are weaker than "un-truncated" 857 MACs. However, no significant weaknesses are currently known or 858 expected to exist for HMAC with MD5 or SHA-1, truncated to 80 bits. 860 Note that the output length of a MAC need not be as long as the 861 length of a symmetric cipher key, since forging of MAC values cannot 862 be done off-line: in TLS, a single failed MAC guess will cause the 863 immediate termination of the TLS session. 865 Since the MAC algorithm only takes effect after all handshake 866 messages that affect extension parameters have been authenticated by 867 the hashes in the Finished messages, it is not possible for an active 868 attacker to force negotiation of the truncated HMAC extension where 869 it would not otherwise be used (to the extent that the handshake 870 authentication is secure). Therefore, in the event that any security 871 problem were found with truncated HMAC in the future, if either the 872 client or the server for a given session were updated to take the 873 problem into account, it would be able to veto use of this extension. 875 11.6 Security Considerations for status_request 877 If a client requests an OCSP response, it must take into account that 878 an attacker's server using a compromised key could (and probably 879 would) pretend not to support the extension. In this case, a client 880 that requires OCSP validation of certificates SHOULD either contact 881 the OCSP server directly or abort the handshake. 883 Use of the OCSP nonce request extension (id-pkix-ocsp-nonce) may 884 improve security against attacks that attempt to replay OCSP 885 responses; see Section 4.4.1 of [RFC2560] for further details. 887 12. Normative References 889 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 890 Hashing for Message Authentication", RFC 2104, February 1997. 892 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 893 Requirement Levels", BCP 14, RFC 2119, March 1997. 895 [RFC2560] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. 896 Adams, "X.509 Internet Public Key Infrastructure Online Certificate 897 Status Protocol - OCSP", RFC 2560, June 1999. 899 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 900 Infrastructure Operational Protocols: FTP and HTTP", RFC 2585, May 901 1999. 903 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, 904 L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- 905 HTTP/1.1", RFC 2616, June 1999. 907 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 908 Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 909 2005. 911 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 912 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 914 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 915 Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure 916 Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, 917 May 2008 919 13. Informative References 921 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 922 RFC 2246, January 1999. 924 [RFC2712] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher 925 Suites to Transport Layer Security (TLS)", RFC 2712, October 1999. 927 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 928 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 930 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 931 and T. Wright, "Transport Layer Security (TLS) Extensions", RFC 4366, 932 April 2006. 934 [X509-4th] ITU-T Recommendation X.509 (2000) | ISO/IEC 9594-8:2001, 935 "Information Systems - Open Systems Interconnection - The Directory: 936 Public key and attribute certificate frameworks." 938 [X509-4th-TC1] ITU-T Recommendation X.509(2000) Corrigendum 1(2001) | 939 ISO/IEC 9594-8:2001/Cor.1:2002, Technical Corrigendum 1 to ISO/IEC 940 9594:8:2001. 942 Annex A: pkipath MIME Type Registration 944 The MIME type application/pkix-pkipath has been registered. A copy 945 of its template is included here for convenience: 947 MIME media type name: application 948 MIME subtype name: pkix-pkipath 949 Required parameters: none 951 Optional parameters: version (default value is "1") 953 Encoding considerations: 954 This MIME type is a DER encoding of the ASN.1 type PkiPath, 955 defined as follows: 956 PkiPath ::= SEQUENCE OF Certificate 957 PkiPath is used to represent a certification path. Within the 958 sequence, the order of certificates is such that the subject of 959 the first certificate is the issuer of the second certificate, 960 etc. 961 This is identical to the definition published in [X509-4th-TC1]; 962 note that it is different from that in [X509-4th]. 964 All Certificates MUST conform to [RFC5280]. (This should be 965 interpreted as a requirement to encode only PKIX-conformant 966 certificates using this type. It does not necessarily require 967 that all certificates that are not strictly PKIX-conformant must 968 be rejected by relying parties, although the security consequences 969 of accepting any such certificates should be considered 970 carefully.) 972 DER (as opposed to BER) encoding MUST be used. If this type is 973 sent over a 7-bit transport, base64 encoding SHOULD be used. 975 Security considerations: 976 The security considerations of [X509-4th] and [RFC5280] (or any 977 updates to them) apply, as well as those of any protocol that uses 978 this type (e.g., TLS). 980 Note that this type only specifies a certificate chain that can be 981 assessed for validity according to the relying party's existing 982 configuration of trusted CAs; it is not intended to be used to 983 specify any change to that configuration. 985 Interoperability considerations: 986 No specific interoperability problems are known with this type, 987 but for recommendations relating to X.509 certificates in general, 988 see [RFC5280]. 990 Published specification: [RFC4366], and [RFC5280]. 992 Applications which use this media type: TLS. It may also be used by 993 other protocols, or for general interchange of PKIX certificate 994 chains. 996 Additional information: 997 Magic number(s): DER-encoded ASN.1 can be easily recognized. 998 Further parsing is required to distinguish it from other ASN.1 999 types. 1000 File extension(s): .pkipath 1001 Macintosh File Type Code(s): not specified 1003 Person & email address to contact for further information: 1004 Magnus Nystrom 1006 Intended usage: COMMON 1008 Change controller: IESG 1010 Annex B: Changes from RFC 4366 1012 The significant changes between RFC 4366 and this document are 1013 described below. 1015 RFC 4366 described both general extension mechanisms (for the TLS 1016 handshake and client and server hellos) as well as specific 1017 extensions. RFC 4366 was associated with RFC 4346, TLS 1.1. The 1018 client and server Hello extension mechanisms have been moved into RFC 1019 5246, TLS 1.2, so this document, which is associated with RFC 5246, 1020 includes only the handshake extension mechanisms and the specific 1021 extensions from RFC 4366. RFC 5246 also specifies the unknown 1022 extension error and new extension specification considerations so 1023 that material has been removed from this document. 1025 The Server Name extension now specifies only ASCII representation, 1026 eliminating UTF-8. It is provided that the ServerNameList can contain 1027 more only one name of any particular name_type. Provision was added 1028 for the user using the server_name extension in deciding whether or 1029 not to resume a session. Furthermores, this extensions should be the 1030 same in a session resumption request as it was in the full handshake 1031 that established the session. Such a resumption request must not be 1032 accepted if the server_name extension is different but instead a full 1033 handshake must be done to possibly establish a new session. 1035 The Client Certificate URLs extension has been changed to make the 1036 presence of a hash mandatory. 1038 For the case of DTLS, the requirement to report an overflow of the 1039 negotiated maximum fragment length is made conditional on passing 1040 authentication. 1042 The material was also re-organized in minor ways. For example, 1043 information as to which errors are fatal is moved from the one "Error 1044 Alerts" section to the individual extension specifications. 1046 Author's Address 1048 Donald Eastlake 3rd 1049 Stellar Switches, Inc. 1050 155 Beaver Street 1051 Milford, MA 01757 USA 1053 Tel: +1-508-333-2270 1054 Email: d3e3e3@gmail.com 1056 Copyright and IPR Provisions 1058 Copyright (c) 2010 IETF Trust and the persons identified as the 1059 document authors. All rights reserved. 1061 This document is subject to BCP 78 and the IETF Trust's Legal 1062 Provisions Relating to IETF Documents 1063 (http://trustee.ietf.org/license-info) in effect on the date of 1064 publication of this document. Please review these documents 1065 carefully, as they describe your rights and restrictions with respect 1066 to this document. Code Components extracted from this document must 1067 include Simplified BSD License text as described in Section 4.e of 1068 the Trust Legal Provisions and are provided without warranty as 1069 described in the BSD License. The definitive version of an IETF 1070 Document is that published by, or under the auspices of, the IETF. 1071 Versions of IETF Documents that are published by third parties, 1072 including those that are translated into other languages, should not 1073 be considered to be definitive versions of IETF Documents. The 1074 definitive version of these Legal Provisions is that published by, or 1075 under the auspices of, the IETF. Versions of these Legal Provisions 1076 that are published by third parties, including those that are 1077 translated into other languages, should not be considered to be 1078 definitive versions of these Legal Provisions. For the avoidance of 1079 doubt, each Contributor to the IETF Standards Process licenses each 1080 Contribution that he or she makes as part of the IETF Standards 1081 Process to the IETF Trust pursuant to the provisions of RFC 5378. No 1082 language to the contrary, or terms, conditions or rights that differ 1083 from or are inconsistent with the rights and licenses granted under 1084 RFC 5378, shall have any effect and shall be null and void, whether 1085 published or posted by such Contributor, or included with or in such 1086 Contribution.