idnits 2.17.1 draft-ietf-tls-rfc4366-bis-07.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 606 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 14, 2010) is 5096 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 388 ** 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 (~~), 2 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 13, 2010 May 14, 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......................5 63 2. Extensions to the Handshake Protocol....................6 64 3. Server Name Indication..................................7 65 4. Maximum Fragment Length Negotiation.....................9 66 5. Client Certificate URLs................................11 67 6. Trusted CA Indication..................................14 68 7. Truncated HMAC.........................................16 69 8. Certificate Status Request.............................17 70 9. Error Alerts...........................................19 71 10. IANA Considerations...................................20 73 11. Security Considerations...............................20 74 11.1 Security Considerations for server_name..............20 75 11.2 Security Considerations for max_fragment_length......20 76 11.3 Security Considerations for client_certificate_url...21 77 11.4 Security Considerations for trusted_ca_keys..........22 78 11.5 Security Considerations for truncated_hmac...........22 79 11.6 Security Considerations for status_request...........23 81 12. Normative References..................................24 82 13. Informative References................................24 84 Annex A: pkipath MIME Type Registration...................26 85 Annex B: Changes from RFC 4366............................28 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. When a client includes 160 one or more of the defined extension types in an extended client 161 hello while requesting session resumption: 163 - If the resumption request is denied, the use of the extensions 164 is negotiated as normal. 166 - If, on the other hand, the older session is resumed, then the 167 server MUST ignore the extensions and send a server hello 168 containing none of the extension types. In this case, the 169 functionality of these extensions negotiated during the 170 original session initiation is applied to the resumed session. 172 1.2 Conventions Used in This Document 174 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 175 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 176 document are to be interpreted as described in [RFC2119]. 178 2. Extensions to the Handshake Protocol 180 This document specifies the use of two new handshake messages, 181 "CertificateURL" and "CertificateStatus". These messages are 182 described in Section 5 and Section 8, respectively. The new 183 handshake message structure therefore becomes: 185 enum { 186 hello_request(0), client_hello(1), server_hello(2), 187 certificate(11), server_key_exchange (12), 188 certificate_request(13), server_hello_done(14), 189 certificate_verify(15), client_key_exchange(16), 190 finished(20), certificate_url(21), certificate_status(22), 191 (255) 192 } HandshakeType; 194 struct { 195 HandshakeType msg_type; /* handshake type */ 196 uint24 length; /* bytes in message */ 197 select (HandshakeType) { 198 case hello_request: HelloRequest; 199 case client_hello: ClientHello; 200 case server_hello: ServerHello; 201 case certificate: Certificate; 202 case server_key_exchange: ServerKeyExchange; 203 case certificate_request: CertificateRequest; 204 case server_hello_done: ServerHelloDone; 205 case certificate_verify: CertificateVerify; 206 case client_key_exchange: ClientKeyExchange; 207 case finished: Finished; 208 case certificate_url: CertificateURL; 209 case certificate_status: CertificateStatus; 210 } body; 211 } Handshake; 213 3. Server Name Indication 215 TLS does not provide a mechanism for a client to tell a server the 216 name of the server it is contacting. It may be desirable for clients 217 to provide this information to facilitate secure connections to 218 servers that host multiple 'virtual' servers at a single underlying 219 network address. 221 In order to provide any of the server names, clients MAY include an 222 extension of type "server_name" in the (extended) client hello. The 223 "extension_data" field of this extension SHALL contain 224 "ServerNameList" where: 226 struct { 227 NameType name_type; 228 select (name_type) { 229 case host_name: HostName; 230 } name; 231 } ServerName; 233 enum { 234 host_name(0), (255) 235 } NameType; 237 opaque HostName<1..2^16-1>; 239 struct { 240 ServerName server_name_list<1..2^16-1> 241 } ServerNameList; 243 The ServerNameList MUST NOT contain more than one name of the same 244 name_type. If the server understood the client hello extension but 245 does not recognize any of the server names, it SHOULD send an 246 unrecognized_name(112) alert (which MAY be fatal). 248 Note: Earlier versions of this specification permitted multiple 249 names of the same name_type. In practice, current client 250 implementations only send one name, and the client cannot 251 necessarily find out which name the server selected. Multiple 252 names of the same name_type are therefore now prohibited. 254 Currently, the only server names supported are DNS hostnames; 255 however, this does not imply any dependency of TLS on DNS, and other 256 name types may be added in the future (by an RFC that updates this 257 document). However, for backward compatibility, all future NameTypes 258 MUST begin with a 16-bit length field. TLS MAY treat provided server 259 names as opaque data and pass the names and types to the application. 261 "HostName" contains the fully qualified DNS hostname of the server, 262 as understood by the client. The hostname is represented as a byte 263 string using ASCII encoding without a trailing dot. 265 Literal IPv4 and IPv6 addresses are not permitted in "HostName". 267 It is RECOMMENDED that clients include an extension of type 268 "server_name" in the client hello whenever they locate a server by a 269 supported name type. 271 A server that receives a client hello containing the "server_name" 272 extension MAY use the information contained in the extension to guide 273 its selection of an appropriate certificate to return to the client, 274 and/or other aspects of security policy. In this event, the server 275 SHALL include an extension of type "server_name" in the (extended) 276 server hello. The "extension_data" field of this extension SHALL be 277 empty. 279 When the server resumes a session, the server_name extension is 280 ignored. 282 If an application negotiates a server name using an application 283 protocol and then upgrades to TLS, and if a server_name extension is 284 sent, then the extension SHOULD contain the same name that was 285 negotiated in the application protocol. If the server_name is 286 established in the TLS session handshake, the client SHOULD NOT 287 attempt to request a different server name at the application layer. 289 4. Maximum Fragment Length Negotiation 291 Without this extension, TLS specifies a fixed maximum plaintext 292 fragment length of 2^14 bytes. It may be desirable for constrained 293 clients to negotiate a smaller maximum fragment length due to memory 294 limitations or bandwidth limitations. 296 In order to negotiate smaller maximum fragment lengths, clients MAY 297 include an extension of type "max_fragment_length" in the (extended) 298 client hello. The "extension_data" field of this extension SHALL 299 contain: 301 enum{ 302 2^9(1), 2^10(2), 2^11(3), 2^12(4), (255) 303 } MaxFragmentLength; 305 whose value is the desired maximum fragment length. The allowed 306 values for this field are: 2^9, 2^10, 2^11, and 2^12. 308 Servers that receive an extended client hello containing a 309 "max_fragment_length" extension MAY accept the requested maximum 310 fragment length by including an extension of type 311 "max_fragment_length" in the (extended) server hello. The 312 "extension_data" field of this extension SHALL contain a 313 "MaxFragmentLength" whose value is the same as the requested maximum 314 fragment length. 316 If a server receives a maximum fragment length negotiation request 317 for a value other than the allowed values, it MUST abort the 318 handshake with an "illegal_parameter" alert. Similarly, if a client 319 receives a maximum fragment length negotiation response that differs 320 from the length it requested, it MUST also abort the handshake with 321 an "illegal_parameter" alert. 323 Once a maximum fragment length other than 2^14 has been successfully 324 negotiated, the client and server MUST immediately begin fragmenting 325 messages (including handshake messages), to ensure that no fragment 326 larger than the negotiated length is sent. Note that TLS already 327 requires clients and servers to support fragmentation of handshake 328 messages. 330 The negotiated length applies for the duration of the session 331 including session resumptions. 333 The negotiated length limits the input that the record layer may 334 process without fragmentation (that is, the maximum value of 335 TLSPlaintext.length; see [RFC5246], Section 6.2.1). Note that the 336 output of the record layer may be larger. For example, if the 337 negotiated length is 2^9=512, then for currently defined cipher 338 suites (those defined in [RFC5246] and [RFC2712]), and when null 339 compression is used, the record layer output can be at most 805 340 bytes: 5 bytes of headers, 512 bytes of application data, 256 bytes 341 of padding, and 32 bytes of MAC. This means that in this event a TLS 342 record layer peer receiving a TLS record layer message larger than 343 805 bytes MUST discard the message and send a "record_overflow" 344 alert, without decrypting the message. When this extension is used 345 with DTLS implementations SHOULD NOT generate record_overflow alerts 346 unless the packet passes message authentication. 348 5. Client Certificate URLs 350 Without this extension, TLS specifies that when client authentication 351 is performed, client certificates are sent by clients to servers 352 during the TLS handshake. It may be desirable for constrained clients 353 to send certificate URLs in place of certificates, so that they do 354 not need to store their certificates and can therefore save memory. 356 In order to negotiate sending certificate URLs to a server, clients 357 MAY include an extension of type "client_certificate_url" in the 358 (extended) client hello. The "extension_data" field of this extension 359 SHALL be empty. 361 (Note that it is necessary to negotiate use of client certificate 362 URLs in order to avoid "breaking" existing TLS servers.) 364 Servers that receive an extended client hello containing a 365 "client_certificate_url" extension MAY indicate that they are willing 366 to accept certificate URLs by including an extension of type 367 "client_certificate_url" in the (extended) server hello. The 368 "extension_data" field of this extension SHALL be empty. 370 After negotiation of the use of client certificate URLs has been 371 successfully completed (by exchanging hellos including 372 "client_certificate_url" extensions), clients MAY send a 373 "CertificateURL" message in place of a "Certificate" message as 374 follows (see also Section 2): 376 enum { 377 individual_certs(0), pkipath(1), (255) 378 } CertChainType; 380 struct { 381 CertChainType type; 382 URLAndHash url_and_hash_list<1..2^16-1>; 383 } CertificateURL; 385 struct { 386 opaque url<1..2^16-1>; 387 unint8 padding; 388 opaque SHA1Hash[20]; 389 } URLAndHash; 391 Here "url_and_hash_list" contains a sequence of URLs and hashes. 392 Each "url" MUST be an absolute URI reference according to [RFC3986] 393 that can be immediately used to fetch the certificate(s). 395 When X.509 certificates are used, there are two possibilities: 397 - If CertificateURL.type is "individual_certs", each URL refers to a 398 single DER-encoded X.509v3 certificate, with the URL for the client's 399 certificate first. 401 - If CertificateURL.type is "pkipath", the list contains a single 402 URL referring to a DER-encoded certificate chain, using the type 403 PkiPath described in Annex A. 405 When any other certificate format is used, the specification that 406 describes use of that format in TLS should define the encoding format 407 of certificates or certificate chains, and any constraint on their 408 ordering. 410 The "padding" byte MUST be 0x01. It is present to make the structure 411 backwards compatible. 413 The hash corresponding to each URL is the SHA-1 hash of the 414 certificate or certificate chain (in the case of X.509 certificates, 415 the DER-encoded certificate or the DER-encoded PkiPath). 417 Note that when a list of URLs for X.509 certificates is used, the 418 ordering of URLs is the same as that used in the TLS Certificate 419 message (see [RFC5246], Section 7.4.2), but opposite to the order in 420 which certificates are encoded in PkiPath. In either case, the self- 421 signed root certificate MAY be omitted from the chain, under the 422 assumption that the server must already possess it in order to 423 validate it. 425 Servers receiving "CertificateURL" SHALL attempt to retrieve the 426 client's certificate chain from the URLs and then process the 427 certificate chain as usual. A cached copy of the content of any URL 428 in the chain MAY be used, provided that the SHA-1 hash matches the 429 hash of the cached copy. 431 Servers that support this extension MUST support the 'http' URI 432 scheme for certificate URLs, and MAY support other schemes. Use of 433 other schemes than 'http', 'https', or 'ftp' may create unexpected 434 problems. 436 If the protocol used is HTTP, then the HTTP server can be configured 437 to use the Cache-Control and Expires directives described in 438 [RFC2616] to specify whether and for how long certificates or 439 certificate chains should be cached. 441 The TLS server is not required to follow HTTP redirects when 442 retrieving the certificates or certificate chain. The URLs used in 443 this extension SHOULD therefore be chosen not to depend on such 444 redirects. 446 If the protocol used to retrieve certificates or certificate chains 447 returns a MIME-formatted response (as HTTP does), then the following 448 MIME Content-Types SHALL be used: when a single X.509v3 certificate 449 is returned, the Content-Type is "application/pkix-cert" [RFC2585], 450 and when a chain of X.509v3 certificates is returned, the Content- 451 Type is "application/pkix-pkipath" Annex A. 453 The server MUST check that the SHA-1 hash of the contents of the 454 object retrieved from that URL (after decoding any MIME Content- 455 Transfer-Encoding) matches the given hash. If any retrieved object 456 does not have the correct SHA-1 hash, the server MUST abort the 457 handshake with a bad_certificate_hash_value(114) alert. This alert is 458 always fatal. 460 Clients may choose to send either "Certificate" or "CertificateURL" 461 after successfully negotiating the option to send certificate URLs. 462 The option to send a certificate is included to provide flexibility 463 to clients possessing multiple certificates. 465 If a server encounters an unreasonable delay in obtaining 466 certificates in a given CertificateURL, it SHOULD time out and signal 467 a certificate_unobtainable(111) error alert. This alert MAY be fatal; 468 for example, if client authentication is required by the server for 469 the handshake to continue. 471 6. Trusted CA Indication 473 Constrained clients that, due to memory limitations, possess only a 474 small number of CA root keys may wish to indicate to servers which 475 root keys they possess, in order to avoid repeated handshake 476 failures. 478 In order to indicate which CA root keys they possess, clients MAY 479 include an extension of type "trusted_ca_keys" in the (extended) 480 client hello. The "extension_data" field of this extension SHALL 481 contain "TrustedAuthorities" where: 483 struct { 484 TrustedAuthority trusted_authorities_list<0..2^16-1>; 485 } TrustedAuthorities; 487 struct { 488 IdentifierType identifier_type; 489 select (identifier_type) { 490 case pre_agreed: struct {}; 491 case key_sha1_hash: SHA1Hash; 492 case x509_name: DistinguishedName; 493 case cert_sha1_hash: SHA1Hash; 494 } identifier; 495 } TrustedAuthority; 497 enum { 498 pre_agreed(0), key_sha1_hash(1), x509_name(2), 499 cert_sha1_hash(3), (255) 500 } IdentifierType; 502 opaque DistinguishedName<1..2^16-1>; 504 Here "TrustedAuthorities" provides a list of CA root key identifiers 505 that the client possesses. Each CA root key is identified via either: 507 - "pre_agreed": no CA root key identity supplied. 509 - "key_sha1_hash": contains the SHA-1 hash of the CA root key. For 510 Digital Signature Algorithm (DSA) and Elliptic Curve Digital 511 Signature Algorithm (ECDSA) keys, this is the hash of the 512 "subjectPublicKey" value. For RSA keys, the hash is of the big- 513 endian byte string representation of the modulus without any 514 initial 0-valued bytes. (This copies the key hash formats deployed 515 in other environments.) 517 - "x509_name": contains the DER-encoded X.509 DistinguishedName of 518 the CA. 520 - "cert_sha1_hash": contains the SHA-1 hash of a DER-encoded 521 Certificate containing the CA root key. 523 Note that clients may include none, some, or all of the CA root keys 524 they possess in this extension. 526 Note also that it is possible that a key hash or a Distinguished Name 527 alone may not uniquely identify a certificate issuer (for example, if 528 a particular CA has multiple key pairs). However, here we assume this 529 is the case following the use of Distinguished Names to identify 530 certificate issuers in TLS. 532 The option to include no CA root keys is included to allow the client 533 to indicate possession of some pre-defined set of CA root keys. 535 Servers that receive a client hello containing the "trusted_ca_keys" 536 extension MAY use the information contained in the extension to guide 537 their selection of an appropriate certificate chain to return to the 538 client. In this event, the server SHALL include an extension of type 539 "trusted_ca_keys" in the (extended) server hello. The 540 "extension_data" field of this extension SHALL be empty. 542 7. Truncated HMAC 544 Currently defined TLS cipher suites use the MAC construction HMAC 545 [RFC2104] to authenticate record layer communications. In TLS, the 546 entire output of the hash function is used as the MAC tag. However, 547 it may be desirable in constrained environments to save bandwidth by 548 truncating the output of the hash function to 80 bits when forming 549 MAC tags. 551 In order to negotiate the use of 80-bit truncated HMAC, clients MAY 552 include an extension of type "truncated_hmac" in the extended client 553 hello. The "extension_data" field of this extension SHALL be empty. 555 Servers that receive an extended hello containing a "truncated_hmac" 556 extension MAY agree to use a truncated HMAC by including an extension 557 of type "truncated_hmac", with empty "extension_data", in the 558 extended server hello. 560 Note that if new cipher suites are added that do not use HMAC, and 561 the session negotiates one of these cipher suites, this extension 562 will have no effect. It is strongly recommended that any new cipher 563 suites using other MACs consider the MAC size an integral part of the 564 cipher suite definition, taking into account both security and 565 bandwidth considerations. 567 If HMAC truncation has been successfully negotiated during a TLS 568 handshake, and the negotiated cipher suite uses HMAC, both the client 569 and the server pass this fact to the TLS record layer along with the 570 other negotiated security parameters. Subsequently during the 571 session, clients and servers MUST use truncated HMACs, calculated as 572 specified in [RFC2104]. That is, SecurityParameters.mac_length is 10 573 bytes, and only the first 10 bytes of the HMAC output are transmitted 574 and checked. Note that this extension does not affect the calculation 575 of the pseudo-random function (PRF) as part of handshaking or key 576 derivation. 578 The negotiated HMAC truncation size applies for the duration of the 579 session including session resumptions. 581 8. Certificate Status Request 583 Constrained clients may wish to use a certificate-status protocol 584 such as OCSP [RFC2560] to check the validity of server certificates, 585 in order to avoid transmission of CRLs and therefore save bandwidth 586 on constrained networks. This extension allows for such information 587 to be sent in the TLS handshake, saving roundtrips and resources. 589 In order to indicate their desire to receive certificate status 590 information, clients MAY include an extension of type 591 "status_request" in the (extended) client hello. The "extension_data" 592 field of this extension SHALL contain "CertificateStatusRequest" 593 where: 595 struct { 596 CertificateStatusType status_type; 597 select (status_type) { 598 case ocsp: OCSPStatusRequest; 599 } request; 600 } CertificateStatusRequest; 602 enum { ocsp(1), (255) } CertificateStatusType; 604 struct { 605 ResponderID responder_id_list<0..2^16-1>; 606 Extensions request_extensions; 607 } OCSPStatusRequest; 609 opaque ResponderID<1..2^16-1>; 610 opaque Extensions<0..2^16-1>; 612 In the OCSPStatusRequest, the "ResponderIDs" provides a list of OCSP 613 responders that the client trusts. A zero-length "responder_id_list" 614 sequence has the special meaning that the responders are implicitly 615 known to the server, e.g., by prior arrangement. "Extensions" is a 616 DER encoding of OCSP request extensions. 618 Both "ResponderID" and "Extensions" are DER-encoded ASN.1 types as 619 defined in [RFC2560]. "Extensions" is imported from [RFC5280]. A 620 zero-length "request_extensions" value means that there are no 621 extensions (as opposed to a zero-length ASN.1 SEQUENCE, which is not 622 valid for the "Extensions" type). 624 In the case of the "id-pkix-ocsp-nonce" OCSP extension, [RFC2560] is 625 unclear about its encoding; for clarification, the nonce MUST be a 626 DER-encoded OCTET STRING, which is encapsulated as another OCTET 627 STRING (note that implementations based on an existing OCSP client 628 will need to be checked for conformance to this requirement). 630 Servers that receive a client hello containing the "status_request" 631 extension MAY return a suitable certificate status response to the 632 client along with their certificate. If OCSP is requested, they 633 SHOULD use the information contained in the extension when selecting 634 an OCSP responder and SHOULD include request_extensions in the OCSP 635 request. 637 Servers return a certificate response along with their certificate by 638 sending a "CertificateStatus" message immediately after the 639 "Certificate" message (and before any "ServerKeyExchange" or 640 "CertificateRequest" messages). If a server returns a 641 "CertificateStatus" message, then the server MUST have included an 642 extension of type "status_request" with empty "extension_data" in the 643 extended server hello. The "CertificateStatus" message is conveyed 644 using the handshake message type "certificate_status" as follows (see 645 also Section 2): 647 struct { 648 CertificateStatusType status_type; 649 select (status_type) { 650 case ocsp: OCSPResponse; 651 } response; 652 } CertificateStatus; 654 opaque OCSPResponse<1..2^24-1>; 656 An "ocsp_response" contains a complete, DER-encoded OCSP response 657 (using the ASN.1 type OCSPResponse defined in [RFC2560]). Only one 658 OCSP response may be sent. 660 Note that a server MAY also choose not to send a "CertificateStatus" 661 message, even if has received a "status_request" extension in the 662 client hello message and has sent a "status_request" extension in the 663 server hello message. 665 Note in addition that a server MUST NOT send the "CertificateStatus" 666 message unless it received a "status_request" extension in the client 667 hello message and sent a "status_request" extension in the server 668 hello message. 670 Clients requesting an OCSP response and receiving an OCSP response in 671 a "CertificateStatus" message MUST check the OCSP response and abort 672 the handshake if the response is not satisfactory with 673 bad_certificate_status_response(113) alert. This alert is always 674 fatal. 676 9. Error Alerts 678 Four new error alerts are defined for use with the TLS extensions 679 defined in this document. To avoid "breaking" existing clients and 680 servers, these alerts MUST NOT be sent unless the sending party has 681 received an extended hello message from the party they are 682 communicating with. These error alerts are conveyed using the 683 following syntax. The new alerts are the last four, as indicated by 684 the comments on the same line as the error alert number. 686 enum { 687 close_notify(0), 688 unexpected_message(10), 689 bad_record_mac(20), 690 decryption_failed(21), 691 record_overflow(22), 692 decompression_failure(30), 693 handshake_failure(40), 694 /* 41 is not defined, for historical reasons */ 695 bad_certificate(42), 696 unsupported_certificate(43), 697 certificate_revoked(44), 698 certificate_expired(45), 699 certificate_unknown(46), 700 illegal_parameter(47), 701 unknown_ca(48), 702 access_denied(49), 703 decode_error(50), 704 decrypt_error(51), 705 export_restriction(60), 706 protocol_version(70), 707 insufficient_security(71), 708 internal_error(80), 709 user_canceled(90), 710 no_renegotiation(100), 711 unsupported_extension(110), 712 certificate_unobtainable(111), /* new */ 713 unrecognized_name(112), /* new */ 714 bad_certificate_status_response(113), /* new */ 715 bad_certificate_hash_value(114), /* new */ 716 (255) 717 } AlertDescription; 719 "certificate_unobtainable" is described in Section 5. 720 "unrecognized_name" is described in Section 3. 721 "bad_certificate_status_response" is described in Section 8. 722 "bad_certificate_hash_value" is described in Section 5. 724 10. IANA Considerations 726 IANA Considerations for TLS Extensions and the creation of a Registry 727 therefore are covered in Section 12 of [RFC5246] except for the 728 registration of MIME type application/pkix-pkipath. This MIME type 729 has already been registered but is reproduced in Annex A for 730 convenience. 732 The IANA TLS extensions registry entries that reference [RFC4366] 733 should be updated to reference this document on its publication as an 734 RFC. 736 11. Security Considerations 738 General Security Considerations for TLS Extensions are covered in 739 [RFC5246]. Security Considerations for particular extensions 740 specified in this document are given below. 742 In general, implementers should continue to monitor the state of the 743 art and address any weaknesses identified. 745 11.1 Security Considerations for server_name 747 If a single server hosts several domains, then clearly it is 748 necessary for the owners of each domain to ensure that this satisfies 749 their security needs. Apart from this, server_name does not appear to 750 introduce significant security issues. 752 Since it is possible for a client to present a different server_name 753 in the application protocol, application server implementations that 754 rely upon these names being the same MUST check to make sure the 755 client did not present a different name in the application protocol. 757 Implementations MUST ensure that a buffer overflow does not occur, 758 whatever the values of the length fields in server_name. 760 11.2 Security Considerations for max_fragment_length 762 The maximum fragment length takes effect immediately, including for 763 handshake messages. However, that does not introduce any security 764 complications that are not already present in TLS, since TLS requires 765 implementations to be able to handle fragmented handshake messages. 767 Note that as described in Section 4, once a non-null cipher suite has 768 been activated, the effective maximum fragment length depends on the 769 cipher suite and compression method, as well as on the negotiated 770 max_fragment_length. This must be taken into account when sizing 771 buffers, and checking for buffer overflow. 773 11.3 Security Considerations for client_certificate_url 775 Support for client_certificate_url involves the server's acting as a 776 client in another URI scheme dependent protocol. The server 777 therefore becomes subject to many of the same security concerns that 778 clients of the URI scheme are subject to, with the added concern that 779 the client can attempt to prompt the server to connect to some 780 (possibly weird-looking) URL. 782 In general, this issue means that an attacker might use the server to 783 indirectly attack another host that is vulnerable to some security 784 flaw. It also introduces the possibility of denial of service attacks 785 in which an attacker makes many connections to the server, each of 786 which results in the server's attempting a connection to the target 787 of the attack. 789 Note that the server may be behind a firewall or otherwise able to 790 access hosts that would not be directly accessible from the public 791 Internet. This could exacerbate the potential security and denial of 792 service problems described above, as well as allow the existence of 793 internal hosts to be confirmed when they would otherwise be hidden. 795 The detailed security concerns involved will depend on the URI 796 schemes supported by the server. In the case of HTTP, the concerns 797 are similar to those that apply to a publicly accessible HTTP proxy 798 server. In the case of HTTPS, loops and deadlocks may be created, and 799 this should be addressed. In the case of FTP, attacks arise that are 800 similar to FTP bounce attacks. 802 As a result of this issue, it is RECOMMENDED that the 803 client_certificate_url extension should have to be specifically 804 enabled by a server administrator, rather than be enabled by default. 805 It is also RECOMMENDED that URI schemes be enabled by the 806 administrator individually, and only a minimal set of schemes be 807 enabled. Unusual protocols that offer limited security or whose 808 security is not well understood SHOULD be avoided. 810 As discussed in [RFC3986], URLs that specify ports other than the 811 default may cause problems, as may very long URLs (which are more 812 likely to be useful in exploiting buffer overflow bugs). 814 This extension continues to use SHA-1 (as in RFC 4366) and does not 815 provide algorithm agility. The property required of SHA-1 in this 816 case is second pre-image resistance, not collision resistance. 817 Furthermore, even if second pre-image attacks against SHA-1 are found 818 in the future, an attack against client_certificate_url would require 819 a second pre-image that is accepted as a valid certificate by the 820 server, and contains the same public key. 822 Also note that HTTP caching proxies are common on the Internet, and 823 some proxies do not check for the latest version of an object 824 correctly. If a request using HTTP (or another caching protocol) goes 825 through a misconfigured or otherwise broken proxy, the proxy may 826 return an out-of-date response. 828 11.4 Security Considerations for trusted_ca_keys 830 It is possible that which CA root keys a client possesses could be 831 regarded as confidential information. As a result, the CA root key 832 indication extension should be used with care. 834 The use of the SHA-1 certificate hash alternative ensures that each 835 certificate is specified unambiguously. This context does not require 836 a cryptographic hash function, so the use of SHA-1 is considered 837 acceptable, and no algorithm agility is provided. 839 11.5 Security Considerations for truncated_hmac 841 It is possible that truncated MACs are weaker than "un-truncated" 842 MACs. However, no significant weaknesses are currently known or 843 expected to exist for HMAC with MD5 or SHA-1, truncated to 80 bits. 845 Note that the output length of a MAC need not be as long as the 846 length of a symmetric cipher key, since forging of MAC values cannot 847 be done off-line: in TLS, a single failed MAC guess will cause the 848 immediate termination of the TLS session. 850 Since the MAC algorithm only takes effect after all handshake 851 messages that affect extension parameters have been authenticated by 852 the hashes in the Finished messages, it is not possible for an active 853 attacker to force negotiation of the truncated HMAC extension where 854 it would not otherwise be used (to the extent that the handshake 855 authentication is secure). Therefore, in the event that any security 856 problem were found with truncated HMAC in the future, if either the 857 client or the server for a given session were updated to take the 858 problem into account, it would be able to veto use of this extension. 860 11.6 Security Considerations for status_request 862 If a client requests an OCSP response, it must take into account that 863 an attacker's server using a compromised key could (and probably 864 would) pretend not to support the extension. In this case, a client 865 that requires OCSP validation of certificates SHOULD either contact 866 the OCSP server directly or abort the handshake. 868 Use of the OCSP nonce request extension (id-pkix-ocsp-nonce) may 869 improve security against attacks that attempt to replay OCSP 870 responses; see Section 4.4.1 of [RFC2560] for further details. 872 12. Normative References 874 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 875 Hashing for Message Authentication", RFC 2104, February 1997. 877 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 878 Requirement Levels", BCP 14, RFC 2119, March 1997. 880 [RFC2560] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. 881 Adams, "X.509 Internet Public Key Infrastructure Online Certificate 882 Status Protocol - OCSP", RFC 2560, June 1999. 884 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 885 Infrastructure Operational Protocols: FTP and HTTP", RFC 2585, May 886 1999. 888 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, 889 L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- 890 HTTP/1.1", RFC 2616, June 1999. 892 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 893 Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 894 2005. 896 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 897 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 899 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 900 Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure 901 Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, 902 May 2008 904 13. Informative References 906 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 907 RFC 2246, January 1999. 909 [RFC2712] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher 910 Suites to Transport Layer Security (TLS)", RFC 2712, October 1999. 912 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 913 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 915 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 916 and T. Wright, "Transport Layer Security (TLS) Extensions", RFC 4366, 917 April 2006. 919 [X509-4th] ITU-T Recommendation X.509 (2000) | ISO/IEC 9594-8:2001, 920 "Information Systems - Open Systems Interconnection - The Directory: 921 Public key and attribute certificate frameworks." 923 [X509-4th-TC1] ITU-T Recommendation X.509(2000) Corrigendum 1(2001) | 924 ISO/IEC 9594-8:2001/Cor.1:2002, Technical Corrigendum 1 to ISO/IEC 925 9594:8:2001. 927 Annex A: pkipath MIME Type Registration 929 The MIME type application/pkix-pkipath has been registered. A copy 930 of its template is included here for convenience: 932 MIME media type name: application 933 MIME subtype name: pkix-pkipath 934 Required parameters: none 936 Optional parameters: version (default value is "1") 938 Encoding considerations: 939 This MIME type is a DER encoding of the ASN.1 type PkiPath, 940 defined as follows: 941 PkiPath ::= SEQUENCE OF Certificate 942 PkiPath is used to represent a certification path. Within the 943 sequence, the order of certificates is such that the subject of 944 the first certificate is the issuer of the second certificate, 945 etc. 946 This is identical to the definition published in [X509-4th-TC1]; 947 note that it is different from that in [X509-4th]. 949 All Certificates MUST conform to [RFC5280]. (This should be 950 interpreted as a requirement to encode only PKIX-conformant 951 certificates using this type. It does not necessarily require 952 that all certificates that are not strictly PKIX-conformant must 953 be rejected by relying parties, although the security consequences 954 of accepting any such certificates should be considered 955 carefully.) 957 DER (as opposed to BER) encoding MUST be used. If this type is 958 sent over a 7-bit transport, base64 encoding SHOULD be used. 960 Security considerations: 961 The security considerations of [X509-4th] and [RFC5280] (or any 962 updates to them) apply, as well as those of any protocol that uses 963 this type (e.g., TLS). 965 Note that this type only specifies a certificate chain that can be 966 assessed for validity according to the relying party's existing 967 configuration of trusted CAs; it is not intended to be used to 968 specify any change to that configuration. 970 Interoperability considerations: 971 No specific interoperability problems are known with this type, 972 but for recommendations relating to X.509 certificates in general, 973 see [RFC5280]. 975 Published specification: [RFC4366], and [RFC5280]. 977 Applications which use this media type: TLS. It may also be used by 978 other protocols, or for general interchange of PKIX certificate 979 chains. 981 Additional information: 982 Magic number(s): DER-encoded ASN.1 can be easily recognized. 983 Further parsing is required to distinguish it from other ASN.1 984 types. 985 File extension(s): .pkipath 986 Macintosh File Type Code(s): not specified 988 Person & email address to contact for further information: 989 Magnus Nystrom 991 Intended usage: COMMON 993 Change controller: IESG 995 Annex B: Changes from RFC 4366 997 The significant changes between RFC 4366 and this document are 998 described below. 1000 RFC 4366 described both general extension mechanisms (for the TLS 1001 handshake and client and server hellos) as well as specific 1002 extensions. RFC 4366 was associated with RFC 4346, TLS 1.1. The 1003 client and server Hello extension mechanisms have been moved into RFC 1004 5246, TLS 1.2, so this document, which is associated with RFC 5246, 1005 includes only the handshake extension mechanisms and the specific 1006 extensions from RFC 4366. RFC 5246 also specifies the unknown 1007 extension error and new extension specification considerations so 1008 that material has been removed from this document. 1010 The Server Name extension now specifies only ASCII representation, 1011 eliminating UTF-8. It is provided that the ServerNameList can contain 1012 more only one name of any particular name_type. 1014 The Client Certificate URLs extension has been changed to make the 1015 presence of a hash mandatory. 1017 For the case of DTLS, the requirement to report an overflow of the 1018 negotiated maximum fragment length is made conditional on passing 1019 authentication. 1021 The material was also re-organized in minor ways. For example, 1022 information as to which errors are fatal is moved from the one "Error 1023 Alerts" section to the individual extension specifications. 1025 Author's Address 1027 Donald Eastlake 3rd 1028 Stellar Switches, Inc. 1029 155 Beaver Street 1030 Milford, MA 01757 USA 1032 Tel: +1-508-634-2066 1033 Email: d3e3e3@gmail.com 1035 Copyright and IPR Provisions 1037 Copyright (c) 2010 IETF Trust and the persons identified as the 1038 document authors. All rights reserved. 1040 This document is subject to BCP 78 and the IETF Trust's Legal 1041 Provisions Relating to IETF Documents 1042 (http://trustee.ietf.org/license-info) in effect on the date of 1043 publication of this document. Please review these documents 1044 carefully, as they describe your rights and restrictions with respect 1045 to this document. Code Components extracted from this document must 1046 include Simplified BSD License text as described in Section 4.e of 1047 the Trust Legal Provisions and are provided without warranty as 1048 described in the BSD License. The definitive version of an IETF 1049 Document is that published by, or under the auspices of, the IETF. 1050 Versions of IETF Documents that are published by third parties, 1051 including those that are translated into other languages, should not 1052 be considered to be definitive versions of IETF Documents. The 1053 definitive version of these Legal Provisions is that published by, or 1054 under the auspices of, the IETF. Versions of these Legal Provisions 1055 that are published by third parties, including those that are 1056 translated into other languages, should not be considered to be 1057 definitive versions of these Legal Provisions. For the avoidance of 1058 doubt, each Contributor to the IETF Standards Process licenses each 1059 Contribution that he or she makes as part of the IETF Standards 1060 Process to the IETF Trust pursuant to the provisions of RFC 5378. No 1061 language to the contrary, or terms, conditions or rights that differ 1062 from or are inconsistent with the rights and licenses granted under 1063 RFC 5378, shall have any effect and shall be null and void, whether 1064 published or posted by such Contributor, or included with or in such 1065 Contribution.