idnits 2.17.1 draft-ietf-tls-rfc4366-bis-12.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 643 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 (September 20, 2010) is 4929 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 424 ** 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) Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 4 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: March 19, 2011 September 20, 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 RFC 5246, "The Transport Layer Security 14 (TLS) Protocol Version 1.2". The extensions specified are 15 server_name, max_fragment_length, client_certificate_url, 16 trusted_ca_keys, truncated_hmac, and 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 49 The list of Internet-Draft Shadow Directories can be accessed at 50 http://www.ietf.org/shadow.html 52 Acknowledgements 54 This draft is based on material from RFC 4366 for which the authors 55 were S. Blake-Wilson, M. Nystron, D. Hopwood, J. Mikkelsen, and T. 56 Wright. Other contributors include Joseph Salowey, and Alexey 57 Melnikov, Peter Saint-Andre, and Adrian Farrel. 59 Table of Contents 61 1. Introduction............................................3 62 1.1 Specific Extensions Covered............................3 63 1.2 Conventions Used in This Document......................5 65 2. Extensions to the Handshake Protocol....................6 66 3. Server Name Indication..................................7 67 4. Maximum Fragment Length Negotiation.....................9 68 5. Client Certificate URLs................................11 69 6. Trusted CA Indication..................................14 70 7. Truncated HMAC.........................................16 71 8. Certificate Status Request.............................17 72 9. Error Alerts...........................................19 74 10. IANA Considerations...................................20 75 10.1 pkipath MIME Type Registration.......................20 77 11. Security Considerations...............................22 78 11.1 Security Considerations for server_name..............22 79 11.2 Security Considerations for max_fragment_length......22 80 11.3 Security Considerations for client_certificate_url...22 81 11.4 Security Considerations for trusted_ca_keys..........24 82 11.5 Security Considerations for truncated_hmac...........24 83 11.6 Security Considerations for status_request...........24 85 12. Normative References..................................25 86 13. Informative References................................25 88 Annex A: Changes from RFC 4366............................27 90 1. Introduction 92 The TLS (Transport Layer Security) Protocol Version 1.2 is specified 93 in [RFC5246]. That specification includes the framework for 94 extensions to TLS, considerations in designing such extensions (see 95 Section 7.4.1.4 of [RFC5246]), and IANA Considerations for the 96 allocation of new extension code points; however, it does not specify 97 any particular extensions other than Signature Algorithms (see 98 Section 7.4.1.4.1 of [RFC5246]). 100 This document provides the specifications for existing TLS 101 extensions. It is, for the most part, the adaptation and editing of 102 material from RFC 4366, which covered TLS extensions for TLS 1.0 (RFC 103 2246) and TLS 1.1 (RFC 4346). 105 1.1 Specific Extensions Covered 107 The extensions described here focus on extending the functionality 108 provided by the TLS protocol message formats. Other issues, such as 109 the addition of new cipher suites, are deferred. 111 The extension types defined in this document are: 113 enum { 114 server_name(0), max_fragment_length(1), 115 client_certificate_url(2), trusted_ca_keys(3), 116 truncated_hmac(4), status_request(5), (65535) 117 } ExtensionType; 119 Specifically, the extensions described in this document: 121 - Allow TLS clients to provide to the TLS server the name of the 122 server they are contacting. This functionality is desirable in 123 order to facilitate secure connections to servers that host 124 multiple 'virtual' servers at a single underlying network address. 126 - Allow TLS clients and servers to negotiate the maximum fragment 127 length to be sent. This functionality is desirable as a result of 128 memory constraints among some clients, and bandwidth constraints 129 among some access networks. 131 - Allow TLS clients and servers to negotiate the use of client 132 certificate URLs. This functionality is desirable in order to 133 conserve memory on constrained clients. 135 - Allow TLS clients to indicate to TLS servers which CA root keys 136 they possess. This functionality is desirable in order to prevent 137 multiple handshake failures involving TLS clients that are only 138 able to store a small number of CA root keys due to memory 139 limitations. 141 - Allow TLS clients and servers to negotiate the use of truncated 142 MACs. This functionality is desirable in order to conserve 143 bandwidth in constrained access networks. 145 - Allow TLS clients and servers to negotiate that the server sends 146 the client certificate status information (e.g., an Online 147 Certificate Status Protocol (OCSP) [RFC2560] response) during a 148 TLS handshake. This functionality is desirable in order to avoid 149 sending a Certificate Revocation List (CRL) over a constrained 150 access network and therefore save bandwidth. 152 TLS clients and servers may use the extensions described in this 153 document. The extensions are designed to be backwards compatible, 154 meaning that TLS clients that support the extensions can talk to TLS 155 servers that do not support the extensions, and vice versa. 157 Note that any messages associated with these extensions that are sent 158 during the TLS handshake MUST be included in the hash calculations 159 involved in "Finished" messages. 161 Note also that all the extensions defined in this document are 162 relevant only when a session is initiated. A client that requests 163 session resumption does not in general know whether the server will 164 accept this request, and therefore it SHOULD send the same extensions 165 as it would send if it were not attempting resumption. When a client 166 includes one or more of the defined extension types in an extended 167 client hello while requesting session resumption: 169 - The server name indication extension MAY be used by the server 170 when deciding whether or not to resume a session as described 171 in section 3. 173 - If the resumption request is denied, the use of the extensions 174 is negotiated as normal. 176 - If, on the other hand, the older session is resumed, then the 177 server MUST ignore the extensions and send a server hello 178 containing none of the extension types. In this case, the 179 functionality of these extensions negotiated during the 180 original session initiation is applied to the resumed session. 182 1.2 Conventions Used in This Document 184 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 185 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 186 "OPTIONAL" in this document are to be interpreted as described in 187 [RFC2119]. 189 2. Extensions to the Handshake Protocol 191 This document specifies the use of two new handshake messages, 192 "CertificateURL" and "CertificateStatus". These messages are 193 described in Section 5 and Section 8, respectively. The new 194 handshake message structure therefore becomes: 196 enum { 197 hello_request(0), client_hello(1), server_hello(2), 198 certificate(11), server_key_exchange (12), 199 certificate_request(13), server_hello_done(14), 200 certificate_verify(15), client_key_exchange(16), 201 finished(20), certificate_url(21), certificate_status(22), 202 (255) 203 } HandshakeType; 205 struct { 206 HandshakeType msg_type; /* handshake type */ 207 uint24 length; /* bytes in message */ 208 select (HandshakeType) { 209 case hello_request: HelloRequest; 210 case client_hello: ClientHello; 211 case server_hello: ServerHello; 212 case certificate: Certificate; 213 case server_key_exchange: ServerKeyExchange; 214 case certificate_request: CertificateRequest; 215 case server_hello_done: ServerHelloDone; 216 case certificate_verify: CertificateVerify; 217 case client_key_exchange: ClientKeyExchange; 218 case finished: Finished; 219 case certificate_url: CertificateURL; 220 case certificate_status: CertificateStatus; 221 } body; 222 } Handshake; 224 3. Server Name Indication 226 TLS does not provide a mechanism for a client to tell a server the 227 name of the server it is contacting. It may be desirable for clients 228 to provide this information to facilitate secure connections to 229 servers that host multiple 'virtual' servers at a single underlying 230 network address. 232 In order to provide any of the server names, clients MAY include an 233 extension of type "server_name" in the (extended) client hello. The 234 "extension_data" field of this extension SHALL contain 235 "ServerNameList" where: 237 struct { 238 NameType name_type; 239 select (name_type) { 240 case host_name: HostName; 241 } name; 242 } ServerName; 244 enum { 245 host_name(0), (255) 246 } NameType; 248 opaque HostName<1..2^16-1>; 250 struct { 251 ServerName server_name_list<1..2^16-1> 252 } ServerNameList; 254 The ServerNameList MUST NOT contain more than one name of the same 255 name_type. If the server understood the ClientHello extension but 256 does not recognize the server name, the server SHOULD take one of two 257 actions: either abort the handshake by sending a fatal-level 258 unrecognized_name(112) alert, or continue the handshake. It is NOT 259 RECOMMENDED to send a warning-level unrecognized_name(112) alert, 260 because the client's behavior in response to warning-level alerts is 261 unpredictable. If there is a mismatch between the server name used by 262 the client application and the server name of the credential chosen 263 by the server, this mismatch will become apparent when the client 264 application performs the server endpoint identification, at which 265 point the client application will have to decide whether to proceed 266 with the communication. TLS implementations are encouraged to make 267 information available to application callers about warning-level 268 alerts that were received or sent during a TLS handshake. Such 269 information can be useful for diagnostic purposes.. 271 Note: Earlier versions of this specification permitted multiple 272 names of the same name_type. In practice, current client 273 implementations only send one name, and the client cannot 274 necessarily find out which name the server selected. Multiple 275 names of the same name_type are therefore now prohibited. 277 Currently, the only server names supported are DNS hostnames; 278 however, this does not imply any dependency of TLS on DNS, and other 279 name types may be added in the future (by an RFC that updates this 280 document). The data structure associated with the host_name NameType 281 is a variable-length vector that begins with a 16-bit length. For 282 backward compatibility, all future data structures associated with 283 new NameTypes MUST begin with a 16-bit length field. TLS MAY treat 284 provided server names as opaque data and pass the names and types to 285 the application. 287 "HostName" contains the fully qualified DNS hostname of the server, 288 as understood by the client. The hostname is represented as a byte 289 string using ASCII encoding without a trailing dot. This allows the 290 support of internationalized domain names through the use of A-labels 291 defined in [RFC5890]. 293 Literal IPv4 and IPv6 addresses are not permitted in "HostName". 295 It is RECOMMENDED that clients include an extension of type 296 "server_name" in the client hello whenever they locate a server by a 297 supported name type. 299 A server that receives a client hello containing the "server_name" 300 extension MAY use the information contained in the extension to guide 301 its selection of an appropriate certificate to return to the client, 302 and/or other aspects of security policy. In this event, the server 303 SHALL include an extension of type "server_name" in the (extended) 304 server hello. The "extension_data" field of this extension SHALL be 305 empty. 307 When the server is deciding whether or not to accept a request to 308 resume a session, the contents of a server_name extension MAY be used 309 in the lookup of the session in the session cache. The client SHOULD 310 include the same server_name extension in session resumption request 311 as it did in the full handshake that established the session. A 312 server that implements this extension MUST NOT accept the request to 313 resume the session if the server_name extension contains a different 314 name. Instead, it proceeds with a full handshake to establish a new 315 session. When resuming a session, the server MUST NOT include a 316 server_name extension in the server hello. 318 If an application negotiates a server name using an application 319 protocol and then upgrades to TLS, and if a server_name extension is 320 sent, then the extension SHOULD contain the same name that was 321 negotiated in the application protocol. If the server_name is 322 established in the TLS session handshake, the client SHOULD NOT 323 attempt to request a different server name at the application layer. 325 4. Maximum Fragment Length Negotiation 327 Without this extension, TLS specifies a fixed maximum plaintext 328 fragment length of 2^14 bytes. It may be desirable for constrained 329 clients to negotiate a smaller maximum fragment length due to memory 330 limitations or bandwidth limitations. 332 In order to negotiate smaller maximum fragment lengths, clients MAY 333 include an extension of type "max_fragment_length" in the (extended) 334 client hello. The "extension_data" field of this extension SHALL 335 contain: 337 enum{ 338 2^9(1), 2^10(2), 2^11(3), 2^12(4), (255) 339 } MaxFragmentLength; 341 whose value is the desired maximum fragment length. The allowed 342 values for this field are: 2^9, 2^10, 2^11, and 2^12. 344 Servers that receive an extended client hello containing a 345 "max_fragment_length" extension MAY accept the requested maximum 346 fragment length by including an extension of type 347 "max_fragment_length" in the (extended) server hello. The 348 "extension_data" field of this extension SHALL contain a 349 "MaxFragmentLength" whose value is the same as the requested maximum 350 fragment length. 352 If a server receives a maximum fragment length negotiation request 353 for a value other than the allowed values, it MUST abort the 354 handshake with an "illegal_parameter" alert. Similarly, if a client 355 receives a maximum fragment length negotiation response that differs 356 from the length it requested, it MUST also abort the handshake with 357 an "illegal_parameter" alert. 359 Once a maximum fragment length other than 2^14 has been successfully 360 negotiated, the client and server MUST immediately begin fragmenting 361 messages (including handshake messages), to ensure that no fragment 362 larger than the negotiated length is sent. Note that TLS already 363 requires clients and servers to support fragmentation of handshake 364 messages. 366 The negotiated length applies for the duration of the session 367 including session resumptions. 369 The negotiated length limits the input that the record layer may 370 process without fragmentation (that is, the maximum value of 371 TLSPlaintext.length; see [RFC5246], Section 6.2.1). Note that the 372 output of the record layer may be larger. For example, if the 373 negotiated length is 2^9=512, then for currently defined cipher 374 suites (those defined in [RFC5246] and [RFC2712]), and when null 375 compression is used, the record layer output can be at most 805 376 bytes: 5 bytes of headers, 512 bytes of application data, 256 bytes 377 of padding, and 32 bytes of MAC. This means that in this event a TLS 378 record layer peer receiving a TLS record layer message larger than 379 805 bytes MUST discard the message and send a "record_overflow" 380 alert, without decrypting the message. When this extension is used 381 with DTLS implementations SHOULD NOT generate record_overflow alerts 382 unless the packet passes message authentication. 384 5. Client Certificate URLs 386 Without this extension, TLS specifies that when client authentication 387 is performed, client certificates are sent by clients to servers 388 during the TLS handshake. It may be desirable for constrained clients 389 to send certificate URLs in place of certificates, so that they do 390 not need to store their certificates and can therefore save memory. 392 In order to negotiate sending certificate URLs to a server, clients 393 MAY include an extension of type "client_certificate_url" in the 394 (extended) client hello. The "extension_data" field of this extension 395 SHALL be empty. 397 (Note that it is necessary to negotiate use of client certificate 398 URLs in order to avoid "breaking" existing TLS servers.) 400 Servers that receive an extended client hello containing a 401 "client_certificate_url" extension MAY indicate that they are willing 402 to accept certificate URLs by including an extension of type 403 "client_certificate_url" in the (extended) server hello. The 404 "extension_data" field of this extension SHALL be empty. 406 After negotiation of the use of client certificate URLs has been 407 successfully completed (by exchanging hellos including 408 "client_certificate_url" extensions), clients MAY send a 409 "CertificateURL" message in place of a "Certificate" message as 410 follows (see also Section 2): 412 enum { 413 individual_certs(0), pkipath(1), (255) 414 } CertChainType; 416 struct { 417 CertChainType type; 418 URLAndHash url_and_hash_list<1..2^16-1>; 419 } CertificateURL; 421 struct { 422 opaque url<1..2^16-1>; 423 unint8 padding; 424 opaque SHA1Hash[20]; 425 } URLAndHash; 427 Here "url_and_hash_list" contains a sequence of URLs and hashes. 428 Each "url" MUST be an absolute URI reference according to [RFC3986] 429 that can be immediately used to fetch the certificate(s). 431 When X.509 certificates are used, there are two possibilities: 433 - If CertificateURL.type is "individual_certs", each URL refers to a 434 single DER-encoded X.509v3 certificate, with the URL for the client's 435 certificate first. 437 - If CertificateURL.type is "pkipath", the list contains a single 438 URL referring to a DER-encoded certificate chain, using the type 439 PkiPath described in Section 10.1. 441 When any other certificate format is used, the specification that 442 describes use of that format in TLS should define the encoding format 443 of certificates or certificate chains, and any constraint on their 444 ordering. 446 The "padding" byte MUST be 0x01. It is present to make the structure 447 backwards compatible. 449 The hash corresponding to each URL is the SHA-1 hash of the 450 certificate or certificate chain (in the case of X.509 certificates, 451 the DER-encoded certificate or the DER-encoded PkiPath). 453 Note that when a list of URLs for X.509 certificates is used, the 454 ordering of URLs is the same as that used in the TLS Certificate 455 message (see [RFC5246], Section 7.4.2), but opposite to the order in 456 which certificates are encoded in PkiPath. In either case, the self- 457 signed root certificate MAY be omitted from the chain, under the 458 assumption that the server must already possess it in order to 459 validate it. 461 Servers receiving "CertificateURL" SHALL attempt to retrieve the 462 client's certificate chain from the URLs and then process the 463 certificate chain as usual. A cached copy of the content of any URL 464 in the chain MAY be used, provided that the SHA-1 hash matches the 465 hash of the cached copy. 467 Servers that support this extension MUST support the 'http' URI 468 scheme for certificate URLs, and MAY support other schemes. Use of 469 other schemes than 'http', 'https', or 'ftp' may create unexpected 470 problems. 472 If the protocol used is HTTP, then the HTTP server can be configured 473 to use the Cache-Control and Expires directives described in 474 [RFC2616] to specify whether and for how long certificates or 475 certificate chains should be cached. 477 The TLS server MUST NOT follow HTTP redirects when retrieving the 478 certificates or certificate chain. The URLs used in this extension 479 MUST NOT be chosen to depend on such redirects. 481 If the protocol used to retrieve certificates or certificate chains 482 returns a MIME-formatted response (as HTTP does), then the following 483 MIME Content-Types SHALL be used: when a single X.509v3 certificate 484 is returned, the Content-Type is "application/pkix-cert" [RFC2585], 485 and when a chain of X.509v3 certificates is returned, the Content- 486 Type is "application/pkix-pkipath" Section 10.1. 488 The server MUST check that the SHA-1 hash of the contents of the 489 object retrieved from that URL (after decoding any MIME Content- 490 Transfer-Encoding) matches the given hash. If any retrieved object 491 does not have the correct SHA-1 hash, the server MUST abort the 492 handshake with a bad_certificate_hash_value(114) alert. This alert is 493 always fatal. 495 Clients may choose to send either "Certificate" or "CertificateURL" 496 after successfully negotiating the option to send certificate URLs. 497 The option to send a certificate is included to provide flexibility 498 to clients possessing multiple certificates. 500 If a server is unable to obtain certificates in a given 501 CertificateURL, it MUST send a fatal certificate_unobtainable(111) 502 alert if it requires the certificates to complete the handshake. If 503 the server does not require the certificates then the server 504 continues the handshake. The server MAY send a warning level alert in 505 this case. Clients receiving such an alert SHOULD log the alert and 506 continue with the handshake if possible 508 6. Trusted CA Indication 510 Constrained clients that, due to memory limitations, possess only a 511 small number of CA root keys may wish to indicate to servers which 512 root keys they possess, in order to avoid repeated handshake 513 failures. 515 In order to indicate which CA root keys they possess, clients MAY 516 include an extension of type "trusted_ca_keys" in the (extended) 517 client hello. The "extension_data" field of this extension SHALL 518 contain "TrustedAuthorities" where: 520 struct { 521 TrustedAuthority trusted_authorities_list<0..2^16-1>; 522 } TrustedAuthorities; 524 struct { 525 IdentifierType identifier_type; 526 select (identifier_type) { 527 case pre_agreed: struct {}; 528 case key_sha1_hash: SHA1Hash; 529 case x509_name: DistinguishedName; 530 case cert_sha1_hash: SHA1Hash; 531 } identifier; 532 } TrustedAuthority; 534 enum { 535 pre_agreed(0), key_sha1_hash(1), x509_name(2), 536 cert_sha1_hash(3), (255) 537 } IdentifierType; 539 opaque DistinguishedName<1..2^16-1>; 541 Here "TrustedAuthorities" provides a list of CA root key identifiers 542 that the client possesses. Each CA root key is identified via either: 544 - "pre_agreed": no CA root key identity supplied. 546 - "key_sha1_hash": contains the SHA-1 hash of the CA root key. For 547 Digital Signature Algorithm (DSA) and Elliptic Curve Digital 548 Signature Algorithm (ECDSA) keys, this is the hash of the 549 "subjectPublicKey" value. For RSA keys, the hash is of the big- 550 endian byte string representation of the modulus without any 551 initial 0-valued bytes. (This copies the key hash formats deployed 552 in other environments.) 554 - "x509_name": contains the DER-encoded X.509 DistinguishedName of 555 the CA. 557 - "cert_sha1_hash": contains the SHA-1 hash of a DER-encoded 558 Certificate containing the CA root key. 560 Note that clients may include none, some, or all of the CA root keys 561 they possess in this extension. 563 Note also that it is possible that a key hash or a Distinguished Name 564 alone may not uniquely identify a certificate issuer (for example, if 565 a particular CA has multiple key pairs). However, here we assume this 566 is the case following the use of Distinguished Names to identify 567 certificate issuers in TLS. 569 The option to include no CA root keys is included to allow the client 570 to indicate possession of some pre-defined set of CA root keys. 572 Servers that receive a client hello containing the "trusted_ca_keys" 573 extension MAY use the information contained in the extension to guide 574 their selection of an appropriate certificate chain to return to the 575 client. In this event, the server SHALL include an extension of type 576 "trusted_ca_keys" in the (extended) server hello. The 577 "extension_data" field of this extension SHALL be empty. 579 7. Truncated HMAC 581 Currently defined TLS cipher suites use the MAC construction HMAC 582 [RFC2104] to authenticate record layer communications. In TLS, the 583 entire output of the hash function is used as the MAC tag. However, 584 it may be desirable in constrained environments to save bandwidth by 585 truncating the output of the hash function to 80 bits when forming 586 MAC tags. 588 In order to negotiate the use of 80-bit truncated HMAC, clients MAY 589 include an extension of type "truncated_hmac" in the extended client 590 hello. The "extension_data" field of this extension SHALL be empty. 592 Servers that receive an extended hello containing a "truncated_hmac" 593 extension MAY agree to use a truncated HMAC by including an extension 594 of type "truncated_hmac", with empty "extension_data", in the 595 extended server hello. 597 Note that if new cipher suites are added that do not use HMAC, and 598 the session negotiates one of these cipher suites, this extension 599 will have no effect. It is strongly recommended that any new cipher 600 suites using other MACs consider the MAC size an integral part of the 601 cipher suite definition, taking into account both security and 602 bandwidth considerations. 604 If HMAC truncation has been successfully negotiated during a TLS 605 handshake, and the negotiated cipher suite uses HMAC, both the client 606 and the server pass this fact to the TLS record layer along with the 607 other negotiated security parameters. Subsequently during the 608 session, clients and servers MUST use truncated HMACs, calculated as 609 specified in [RFC2104]. That is, SecurityParameters.mac_length is 10 610 bytes, and only the first 10 bytes of the HMAC output are transmitted 611 and checked. Note that this extension does not affect the calculation 612 of the pseudo-random function (PRF) as part of handshaking or key 613 derivation. 615 The negotiated HMAC truncation size applies for the duration of the 616 session including session resumptions. 618 8. Certificate Status Request 620 Constrained clients may wish to use a certificate-status protocol 621 such as OCSP [RFC2560] to check the validity of server certificates, 622 in order to avoid transmission of CRLs and therefore save bandwidth 623 on constrained networks. This extension allows for such information 624 to be sent in the TLS handshake, saving roundtrips and resources. 626 In order to indicate their desire to receive certificate status 627 information, clients MAY include an extension of type 628 "status_request" in the (extended) client hello. The "extension_data" 629 field of this extension SHALL contain "CertificateStatusRequest" 630 where: 632 struct { 633 CertificateStatusType status_type; 634 select (status_type) { 635 case ocsp: OCSPStatusRequest; 636 } request; 637 } CertificateStatusRequest; 639 enum { ocsp(1), (255) } CertificateStatusType; 641 struct { 642 ResponderID responder_id_list<0..2^16-1>; 643 Extensions request_extensions; 644 } OCSPStatusRequest; 646 opaque ResponderID<1..2^16-1>; 647 opaque Extensions<0..2^16-1>; 649 In the OCSPStatusRequest, the "ResponderIDs" provides a list of OCSP 650 responders that the client trusts. A zero-length "responder_id_list" 651 sequence has the special meaning that the responders are implicitly 652 known to the server, e.g., by prior arrangement. "Extensions" is a 653 DER encoding of OCSP request extensions. 655 Both "ResponderID" and "Extensions" are DER-encoded ASN.1 types as 656 defined in [RFC2560]. "Extensions" is imported from [RFC5280]. A 657 zero-length "request_extensions" value means that there are no 658 extensions (as opposed to a zero-length ASN.1 SEQUENCE, which is not 659 valid for the "Extensions" type). 661 In the case of the "id-pkix-ocsp-nonce" OCSP extension, [RFC2560] is 662 unclear about its encoding; for clarification, the nonce MUST be a 663 DER-encoded OCTET STRING, which is encapsulated as another OCTET 664 STRING (note that implementations based on an existing OCSP client 665 will need to be checked for conformance to this requirement). 667 Servers that receive a client hello containing the "status_request" 668 extension MAY return a suitable certificate status response to the 669 client along with their certificate. If OCSP is requested, they 670 SHOULD use the information contained in the extension when selecting 671 an OCSP responder and SHOULD include request_extensions in the OCSP 672 request. 674 Servers return a certificate response along with their certificate by 675 sending a "CertificateStatus" message immediately after the 676 "Certificate" message (and before any "ServerKeyExchange" or 677 "CertificateRequest" messages). If a server returns a 678 "CertificateStatus" message, then the server MUST have included an 679 extension of type "status_request" with empty "extension_data" in the 680 extended server hello. The "CertificateStatus" message is conveyed 681 using the handshake message type "certificate_status" as follows (see 682 also Section 2): 684 struct { 685 CertificateStatusType status_type; 686 select (status_type) { 687 case ocsp: OCSPResponse; 688 } response; 689 } CertificateStatus; 691 opaque OCSPResponse<1..2^24-1>; 693 An "ocsp_response" contains a complete, DER-encoded OCSP response 694 (using the ASN.1 type OCSPResponse defined in [RFC2560]). Only one 695 OCSP response may be sent. 697 Note that a server MAY also choose not to send a "CertificateStatus" 698 message, even if has received a "status_request" extension in the 699 client hello message and has sent a "status_request" extension in the 700 server hello message. 702 Note in addition that a server MUST NOT send the "CertificateStatus" 703 message unless it received a "status_request" extension in the client 704 hello message and sent a "status_request" extension in the server 705 hello message. 707 Clients requesting an OCSP response and receiving an OCSP response in 708 a "CertificateStatus" message MUST check the OCSP response and abort 709 the handshake if the response is not satisfactory with 710 bad_certificate_status_response(113) alert. This alert is always 711 fatal. 713 9. Error Alerts 715 Four new error alerts are defined for use with the TLS extensions 716 defined in this document. To avoid "breaking" existing clients and 717 servers, these alerts MUST NOT be sent unless the sending party has 718 received an extended hello message from the party they are 719 communicating with. These error alerts are conveyed using the 720 following syntax. The new alerts are the last four, as indicated by 721 the comments on the same line as the error alert number. 723 enum { 724 close_notify(0), 725 unexpected_message(10), 726 bad_record_mac(20), 727 decryption_failed(21), 728 record_overflow(22), 729 decompression_failure(30), 730 handshake_failure(40), 731 /* 41 is not defined, for historical reasons */ 732 bad_certificate(42), 733 unsupported_certificate(43), 734 certificate_revoked(44), 735 certificate_expired(45), 736 certificate_unknown(46), 737 illegal_parameter(47), 738 unknown_ca(48), 739 access_denied(49), 740 decode_error(50), 741 decrypt_error(51), 742 export_restriction(60), 743 protocol_version(70), 744 insufficient_security(71), 745 internal_error(80), 746 user_canceled(90), 747 no_renegotiation(100), 748 unsupported_extension(110), 749 certificate_unobtainable(111), /* new */ 750 unrecognized_name(112), /* new */ 751 bad_certificate_status_response(113), /* new */ 752 bad_certificate_hash_value(114), /* new */ 753 (255) 754 } AlertDescription; 756 "certificate_unobtainable" is described in Section 5. 757 "unrecognized_name" is described in Section 3. 758 "bad_certificate_status_response" is described in Section 8. 759 "bad_certificate_hash_value" is described in Section 5. 761 10. IANA Considerations 763 IANA Considerations for TLS Extensions and the creation of a Registry 764 therefore are covered in Section 12 of [RFC5246] except for the 765 registration of MIME type application/pkix-pkipath which appears 766 below. 768 The IANA TLS extensions and MIME type application/pkix-pkipath 769 registry entries that reference RFC 4366 should be updated to 770 reference this document on its publication as an RFC. 772 10.1 pkipath MIME Type Registration 774 MIME media type name: application 775 MIME subtype name: pkix-pkipath 776 Required parameters: none 778 Optional parameters: version (default value is "1") 780 Encoding considerations: 781 Binary; this MIME type is a DER encoding of the ASN.1 type 782 PkiPath, defined as follows: 783 PkiPath ::= SEQUENCE OF Certificate 784 PkiPath is used to represent a certification path. Within the 785 sequence, the order of certificates is such that the subject of 786 the first certificate is the issuer of the second certificate, 787 etc. 788 This is identical to the definition published in [X509-4th-TC1]; 789 note that it is different from that in [X509-4th]. 791 All Certificates MUST conform to [RFC5280]. (This should be 792 interpreted as a requirement to encode only PKIX-conformant 793 certificates using this type. It does not necessarily require 794 that all certificates that are not strictly PKIX-conformant must 795 be rejected by relying parties, although the security consequences 796 of accepting any such certificates should be considered 797 carefully.) 799 DER (as opposed to BER) encoding MUST be used. If this type is 800 sent over a 7-bit transport, base64 encoding SHOULD be used. 802 Security considerations: 803 The security considerations of [X509-4th] and [RFC5280] (or any 804 updates to them) apply, as well as those of any protocol that uses 805 this type (e.g., TLS). 807 Note that this type only specifies a certificate chain that can be 808 assessed for validity according to the relying party's existing 809 configuration of trusted CAs; it is not intended to be used to 810 specify any change to that configuration. 812 Interoperability considerations: 813 No specific interoperability problems are known with this type, 814 but for recommendations relating to X.509 certificates in general, 815 see [RFC5280]. 817 Published specification: This document and [RFC5280]. 819 Applications which use this media type: TLS. It may also be used by 820 other protocols, or for general interchange of PKIX certificate 821 chains. 823 Additional information: 824 Magic number(s): DER-encoded ASN.1 can be easily recognized. 825 Further parsing is required to distinguish it from other ASN.1 826 types. 827 File extension(s): .pkipath 828 Macintosh File Type Code(s): not specified 830 Person & email address to contact for further information: 831 Magnus Nystrom 833 Intended usage: COMMON 835 Change controller: IESG 837 11. Security Considerations 839 General Security Considerations for TLS Extensions are covered in 840 [RFC5246]. Security Considerations for particular extensions 841 specified in this document are given below. 843 In general, implementers should continue to monitor the state of the 844 art and address any weaknesses identified. 846 11.1 Security Considerations for server_name 848 If a single server hosts several domains, then clearly it is 849 necessary for the owners of each domain to ensure that this satisfies 850 their security needs. Apart from this, server_name does not appear to 851 introduce significant security issues. 853 Since it is possible for a client to present a different server_name 854 in the application protocol, application server implementations that 855 rely upon these names being the same MUST check to make sure the 856 client did not present a different name in the application protocol. 858 Implementations MUST ensure that a buffer overflow does not occur, 859 whatever the values of the length fields in server_name. 861 11.2 Security Considerations for max_fragment_length 863 The maximum fragment length takes effect immediately, including for 864 handshake messages. However, that does not introduce any security 865 complications that are not already present in TLS, since TLS requires 866 implementations to be able to handle fragmented handshake messages. 868 Note that as described in Section 4, once a non-null cipher suite has 869 been activated, the effective maximum fragment length depends on the 870 cipher suite and compression method, as well as on the negotiated 871 max_fragment_length. This must be taken into account when sizing 872 buffers, and checking for buffer overflow. 874 11.3 Security Considerations for client_certificate_url 876 Support for client_certificate_url involves the server's acting as a 877 client in another URI scheme dependent protocol. The server 878 therefore becomes subject to many of the same security concerns that 879 clients of the URI scheme are subject to, with the added concern that 880 the client can attempt to prompt the server to connect to some 881 (possibly weird-looking) URL. 883 In general, this issue means that an attacker might use the server to 884 indirectly attack another host that is vulnerable to some security 885 flaw. It also introduces the possibility of denial of service attacks 886 in which an attacker makes many connections to the server, each of 887 which results in the server's attempting a connection to the target 888 of the attack. 890 Note that the server may be behind a firewall or otherwise able to 891 access hosts that would not be directly accessible from the public 892 Internet. This could exacerbate the potential security and denial of 893 service problems described above, as well as allow the existence of 894 internal hosts to be confirmed when they would otherwise be hidden. 896 The detailed security concerns involved will depend on the URI 897 schemes supported by the server. In the case of HTTP, the concerns 898 are similar to those that apply to a publicly accessible HTTP proxy 899 server. In the case of HTTPS, loops and deadlocks may be created, and 900 this should be addressed. In the case of FTP, attacks arise that are 901 similar to FTP bounce attacks. 903 As a result of this issue, it is RECOMMENDED that the 904 client_certificate_url extension should have to be specifically 905 enabled by a server administrator, rather than be enabled by default. 906 It is also RECOMMENDED that URI schemes be enabled by the 907 administrator individually, and only a minimal set of schemes be 908 enabled. Unusual protocols that offer limited security or whose 909 security is not well understood SHOULD be avoided. 911 As discussed in [RFC3986], URLs that specify ports other than the 912 default may cause problems, as may very long URLs (which are more 913 likely to be useful in exploiting buffer overflow bugs). 915 This extension continues to use SHA-1 (as in RFC 4366) and does not 916 provide algorithm agility. The property required of SHA-1 in this 917 case is second pre-image resistance, not collision resistance. 918 Furthermore, even if second pre-image attacks against SHA-1 are found 919 in the future, an attack against client_certificate_url would require 920 a second pre-image that is accepted as a valid certificate by the 921 server, and contains the same public key. 923 Also note that HTTP caching proxies are common on the Internet, and 924 some proxies do not check for the latest version of an object 925 correctly. If a request using HTTP (or another caching protocol) goes 926 through a misconfigured or otherwise broken proxy, the proxy may 927 return an out-of-date response. 929 11.4 Security Considerations for trusted_ca_keys 931 It is possible that which CA root keys a client possesses could be 932 regarded as confidential information. As a result, the CA root key 933 indication extension should be used with care. 935 The use of the SHA-1 certificate hash alternative ensures that each 936 certificate is specified unambiguously. This context does not require 937 a cryptographic hash function, so the use of SHA-1 is considered 938 acceptable, and no algorithm agility is provided. 940 11.5 Security Considerations for truncated_hmac 942 It is possible that truncated MACs are weaker than "un-truncated" 943 MACs. However, no significant weaknesses are currently known or 944 expected to exist for HMAC with MD5 or SHA-1, truncated to 80 bits. 946 Note that the output length of a MAC need not be as long as the 947 length of a symmetric cipher key, since forging of MAC values cannot 948 be done off-line: in TLS, a single failed MAC guess will cause the 949 immediate termination of the TLS session. 951 Since the MAC algorithm only takes effect after all handshake 952 messages that affect extension parameters have been authenticated by 953 the hashes in the Finished messages, it is not possible for an active 954 attacker to force negotiation of the truncated HMAC extension where 955 it would not otherwise be used (to the extent that the handshake 956 authentication is secure). Therefore, in the event that any security 957 problem were found with truncated HMAC in the future, if either the 958 client or the server for a given session were updated to take the 959 problem into account, it would be able to veto use of this extension. 961 11.6 Security Considerations for status_request 963 If a client requests an OCSP response, it must take into account that 964 an attacker's server using a compromised key could (and probably 965 would) pretend not to support the extension. In this case, a client 966 that requires OCSP validation of certificates SHOULD either contact 967 the OCSP server directly or abort the handshake. 969 Use of the OCSP nonce request extension (id-pkix-ocsp-nonce) may 970 improve security against attacks that attempt to replay OCSP 971 responses; see Section 4.4.1 of [RFC2560] for further details. 973 12. Normative References 975 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 976 Hashing for Message Authentication", RFC 2104, February 1997. 978 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 979 Requirement Levels", BCP 14, RFC 2119, March 1997. 981 [RFC2560] Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. 982 Adams, "X.509 Internet Public Key Infrastructure Online 983 Certificate Status Protocol - OCSP", RFC 2560, June 1999. 985 [RFC2585] Housley, R. and P. Hoffman, "Internet X.509 Public Key 986 Infrastructure Operational Protocols: FTP and HTTP", RFC 2585, 987 May 1999. 989 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, 990 L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol 991 -- HTTP/1.1", RFC 2616, June 1999. 993 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 994 Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, 995 January 2005. 997 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 998 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1000 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1001 Housley, R., and W. Polk, "Internet X.509 Public Key 1002 Infrastructure Certificate and Certificate Revocation List 1003 (CRL) Profile", RFC 5280, May 2008 1005 [RFC5890] Klensin, J., "Internationalized Domain Names for 1006 Applications (IDNA): Definitions and Document Framework", RFC 1007 5890, August 2010. 1009 13. Informative References 1011 [RFC2712] Medvinsky, A. and M. Hur, "Addition of Kerberos Cipher 1012 Suites to Transport Layer Security (TLS)", RFC 2712, October 1013 1999. 1015 [X509-4th] ITU-T Recommendation X.509 (2000) | ISO/IEC 9594-8:2001, 1016 "Information Systems - Open Systems Interconnection - The 1017 Directory: Public key and attribute certificate frameworks." 1019 [X509-4th-TC1] ITU-T Recommendation X.509(2000) Corrigendum 1(2001) | 1020 ISO/IEC 9594-8:2001/Cor.1:2002, Technical Corrigendum 1 to 1021 ISO/IEC 9594:8:2001. 1023 Annex A: 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 TLS servers are now prohibited from following HTTP redirects when 1060 retrieving certificates. 1062 The material was also re-organized in minor ways. For example, 1063 information as to which errors are fatal is moved from the one "Error 1064 Alerts" section to the individual extension specifications. 1066 Author's Address 1068 Donald Eastlake 3rd 1069 Stellar Switches, Inc. 1070 155 Beaver Street 1071 Milford, MA 01757 USA 1073 Tel: +1-508-333-2270 1074 Email: d3e3e3@gmail.com 1076 Copyright and IPR Provisions 1078 Copyright (c) 2010 IETF Trust and the persons identified as the 1079 document authors. All rights reserved. 1081 This document is subject to BCP 78 and the IETF Trust's Legal 1082 Provisions Relating to IETF Documents 1083 (http://trustee.ietf.org/license-info) in effect on the date of 1084 publication of this document. Please review these documents 1085 carefully, as they describe your rights and restrictions with respect 1086 to this document. Code Components extracted from this document must 1087 include Simplified BSD License text as described in Section 4.e of 1088 the Trust Legal Provisions and are provided without warranty as 1089 described in the BSD License. The definitive version of an IETF 1090 Document is that published by, or under the auspices of, the IETF. 1091 Versions of IETF Documents that are published by third parties, 1092 including those that are translated into other languages, should not 1093 be considered to be definitive versions of IETF Documents. The 1094 definitive version of these Legal Provisions is that published by, or 1095 under the auspices of, the IETF. Versions of these Legal Provisions 1096 that are published by third parties, including those that are 1097 translated into other languages, should not be considered to be 1098 definitive versions of these Legal Provisions. For the avoidance of 1099 doubt, each Contributor to the IETF Standards Process licenses each 1100 Contribution that he or she makes as part of the IETF Standards 1101 Process to the IETF Trust pursuant to the provisions of RFC 5378. No 1102 language to the contrary, or terms, conditions or rights that differ 1103 from or are inconsistent with the rights and licenses granted under 1104 RFC 5378, shall have any effect and shall be null and void, whether 1105 published or posted by such Contributor, or included with or in such 1106 Contribution.