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