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