idnits 2.17.1 draft-ietf-tls-tlsflags-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (July 13, 2021) is 1017 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-02) exists of draft-ietf-tls-cross-sni-resumption-00 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS Y. Nir 3 Internet-Draft Dell Technologies 4 Intended status: Standards Track July 13, 2021 5 Expires: January 14, 2022 7 A Flags Extension for TLS 1.3 8 draft-ietf-tls-tlsflags-06 10 Abstract 12 A number of extensions are proposed in the TLS working group that 13 carry no interesting information except the 1-bit indication that a 14 certain optional feature is supported. Such extensions take 4 octets 15 each. This document defines a flags extension that can provide such 16 indications at an average marginal cost of 1 bit each. More 17 precisely, it provides as many flag extensions as needed at 4 + the 18 order of the last set bit divided by 8. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on January 14, 2022. 37 Copyright Notice 39 Copyright (c) 2021 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Requirements and Other Notation . . . . . . . . . . . . . 3 56 2. The tls_flags Extension . . . . . . . . . . . . . . . . . . . 3 57 3. Rules for The Flags Extension . . . . . . . . . . . . . . . . 4 58 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 59 4.1. Guidance for IANA Experts . . . . . . . . . . . . . . . . 6 60 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 61 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 62 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 63 7.1. Normative References . . . . . . . . . . . . . . . . . . 7 64 7.2. Informative References . . . . . . . . . . . . . . . . . 8 65 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 8 66 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 68 1. Introduction 70 Since the publication of TLS 1.3 ([RFC8446]) there have been several 71 proposals for extensions to this protocol, where the presence of the 72 content-free extension in both the ClientHello and either the 73 ServerHello or EncryptedExtensions indicates nothing except either 74 support for the optional feature or an intent to use the optional 75 feature. Examples: 77 o An extension that allows the server to tell the client that cross- 78 SNI resumption is allowed: [I-D.sy-tls-resumption-group]. 80 o An extension that is used to negotiate support for authentication 81 using both certificates and external PSKs: 82 [I-D.ietf-tls-tls13-cert-with-extern-psk]. 84 o The post_handshake_auth extension from the TLS 1.3 base document 85 indicates that the client is willing to perform post-handshake 86 authentication. 88 This document proposes a single extension called tls_flags that can 89 enumerate such flag extensions and allowing both client and server to 90 indicate support for optional features in a concise way. 92 None of the current proposed extensions allow for indication of 93 support in ServerHello (SH), EncryptedExtensions (EE), Certificate 94 (CT), or HelloRetryRequest (HRR) without first being indicated in 95 ClientHello (CH). Similarly, none of the current proposed extensions 96 allow for an indication of support in the client-side Certificate 97 (CT) message without first being indicated in the server's 98 CertificateRequest (CR) message. This restriction is enforced by the 99 rules in Section 3. 101 1.1. Requirements and Other Notation 103 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 104 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 105 document are to be interpreted as described in BCP 14 [RFC2119] 106 [RFC8174] when, and only when, they appear in all capitals, as shown 107 here. 109 The term "flag extension" is used to denote an extension where the 110 extension_data field is always zero-length in a particular context, 111 and the presence of the extension denotes either support for some 112 feature or the intent to use that feature. 114 The term "flag-type feature" denotes an options TLS 1.3 feature the 115 support for which is negotiated using a flag extension, whether that 116 flag extension is its own extension or a value in the extension 117 defined in this document. 119 2. The tls_flags Extension 121 This document defines the following extension code point: 123 enum { 124 ... 125 tls_flags(TBD), 126 (65535) 127 } ExtensionType; 129 This document also defines the data for this extension as a variable- 130 length bit string, allowing for the encoding of up to 2040 features. 132 struct { 133 opaque flags<0..255>; 134 } FlagExtensions; 136 The FlagExtensions field 8 flags with each octet, and its length is 137 the minimal length that allows it to encode all of the present flags. 138 Within each octet, the bits are packed such that the first bit is the 139 LSB and the seventh bit is the MSB. The first octet holds flags 0-7, 140 the second octet holds bits 8-15 and so on. For example, if we want 141 to encode only flag number zero, the FlagExtension field will be 1 142 octet long, that is encoded as follows: 144 00000001 146 If we want to encode flags 1 and 5, the field will still be 1 octet 147 long: 149 00100010 151 If we want to encode flags 3, 5, and 23, the field will have to be 3 152 octets long: 154 00101000 00000000 10000000 156 An implementation that receives an all-zero value for this extension 157 or a value that contains trailing zero bytes MUST generate a fatal 158 illegal_parameter alert. 160 Note that this document does not define any particular bits for this 161 string. That is left to the protocol documents such as the ones in 162 the examples from the previous section. Such documents will have to 163 define which bit to set to show support, and the order of the bits 164 within the bit string shall be enumerated in network order: bit zero 165 is the high-order bit of the first octet as the flags field is 166 transmitted. 168 3. Rules for The Flags Extension 170 A client that supports this extension and at least one flag extension 171 SHALL send this extension with the flags field having bits set only 172 for those extensions that it intends to set. It MUST NOT send this 173 extension with a length of zero. 175 A server that supports this extension and also supports at least one 176 of the flag-type features that use this extension and that were 177 declared by the ClientHello extension SHALL send this extension with 178 the intersection of the flags it supports with the flags declared by 179 the client. The intersection operation may be implemented as a 180 bitwise AND. The server may need to send multiple tls_flags 181 extensions, up to one in each of the four response messages that may 182 carry extensions: ServerHello (SH), EncryptedExtensions (EE), 183 Certificate (CT), and HelloRetryRequest (HRR). It is up to the 184 document for the specific feature to determine which of these should 185 be used to acknowledge support. 187 A server MUST NOT indicate support for any flag-type feature not 188 previously indicated by the client in the ClientHello in any response 189 message. It MUST NOT include this extension in any of the four 190 messages if it has no appropriate flag-type to indicate. This 191 extension MUST NOT be included empty. 193 A server MAY indicate support for flag-type features in a flags 194 extension of CertificateRequest (CR). Flag-type extensions that have 195 been indicated in CR (and only such extensions) MAY be also be 196 present in a flags extension of the Certificate (CT) message sent by 197 the client. However, a client MUST NOT indicate support for any 198 flag-type feature in a Certificate message that was not previously 199 indicated by the server in its CertificateRequest message. 201 A server MAY indicate support for flag-type features in a flags 202 extension of NewSessionTicket (NST). This message has no client-side 203 response. 205 In summary, unsolicited flags may appear only in ClientHello, 206 CertificateRequest, and NewSessionTicket. 208 4. IANA Considerations 210 IANA is requested to assign a new value from the TLS ExtensionType 211 Values registry: 213 o The Extension Name should be tls_flags 215 o The TLS 1.3 value should be CH,SH,EE 217 o The Recommended value should be Y 219 o The Reference should be this document 221 IANA is also requested to create a new registry under the TLS 222 namespace with name "TLS Flags" and the following fields: 224 o Value, which is a number between 0 and 2039. All potential values 225 are available for assignment. 227 o Flag Name, which is a string 229 o Message, which like the "TLS 1.3" field in the ExtensionType 230 registry contains the abbreviations of the messages that may 231 contain the flag: CH, SH, EE, etc. 233 o Recommended, which is a Y/N value determined in the document 234 defining the optional feature. 236 o Reference, which is a link to the document defining this flag. 238 The policy for this shall be "Specification Required" as described in 239 [RFC8126]. 241 The initial contents of the registry shall be one entry, as follows: 243 o Value shall be 0x8 245 o Flag Name shall be resumption_across_names 247 o Message shall be NST 249 o Recommended shall be set to no (N) 251 o The reference shall the the RFC-to-be 252 [I-D.ietf-tls-cross-sni-resumption]. 254 4.1. Guidance for IANA Experts 256 This extension allows up to 2040 flags. However, they are not all 257 the same, because the length of the extension is determined by the 258 highest set bit. 260 We would like to allocate the flags in such a way that the typical 261 extension is as short as possible. The scenario we want to guard 262 against is that in a few years some extension is defined that all 263 implementations need to support and that is assigned a high number 264 because all of the lower numbers have already been allocated. An 265 example of such an extension is the Renegotiation Indication 266 Extension defined in [RFC5746]. 268 For this reason, the IANA experts should allocate the flags as 269 follows: 271 o Flags 0-7 are reserved for documents coming out of the TLS working 272 group with a specific request to assign a low number. 274 o Flags 8-31 are for standards-track documents that the experts 275 believe will see wide adoption among either all users of TLS or a 276 significant group of TLS users. For example, an extension that 277 will be used by all web clients or all smart objects. 279 o Flags 32-63 are for other documents, including experimental, that 280 are likely to see significant adoption. 282 o Flags 64-79 are not to be allocated. They are for reserved for 283 private use. 285 o Flags 80-2039 can be used for temporary allocation in experiments, 286 for flags that are likely to see use only in very specific 287 environments, for national and corporate extensions, and as 288 overflow, in case one of the previous categories has been 289 exhausted. 291 5. Security Considerations 293 The extension described in this document provides a more concise way 294 to express data that could otherwise be expressed in individual 295 extensions. It does not send in the clear any information that would 296 otherwise be sent encrypted, nor vice versa. For this reason this 297 extension is neutral as far as security is concerned. 299 Extension authors should be aware that acknowledging flags in a 300 tls_flags extension of the ServerHello and HelloRetryRequest messages 301 expose this response to passive observers. Unless there is a special 302 reason to place the response in the ServerHello, most flags should go 303 in other (encrypted) messages. 305 6. Acknowledgements 307 The idea for writing this was expressed at the mic during the TLS 308 session at IETF 104 by Eric Rescorla. 310 The current bitwise formatting was suggested on the mailing list by 311 Nikos Mavrogiannopoulos. 313 Improvement to the encoding were suggested by Ilari Liusvaara, who 314 also asked for a better explanation of the semantics of missing 315 extensions. 317 Useful comments received from Martin Thomson, including the 318 suggestion to eliminate the option to have the server send 319 unsolicited flag types and the rules for where unsolicited flags can 320 appear. 322 7. References 324 7.1. Normative References 326 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 327 Requirement Levels", BCP 14, RFC 2119, 328 DOI 10.17487/RFC2119, March 1997, 329 . 331 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 332 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 333 May 2017, . 335 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 336 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 337 . 339 7.2. Informative References 341 [I-D.ietf-tls-cross-sni-resumption] 342 Vasiliev, V., "Transport Layer Security (TLS) Resumption 343 across Server Names", draft-ietf-tls-cross-sni- 344 resumption-00 (work in progress), December 2020. 346 [I-D.ietf-tls-tls13-cert-with-extern-psk] 347 Housley, R., "TLS 1.3 Extension for Certificate-Based 348 Authentication with an External Pre-Shared Key", draft- 349 ietf-tls-tls13-cert-with-extern-psk-07 (work in progress), 350 December 2019. 352 [I-D.sy-tls-resumption-group] 353 Sy, E., "TLS Resumption across Server Name Indications for 354 TLS 1.3", draft-sy-tls-resumption-group-00 (work in 355 progress), March 2019. 357 [RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, 358 "Transport Layer Security (TLS) Renegotiation Indication 359 Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010, 360 . 362 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 363 Writing an IANA Considerations Section in RFCs", BCP 26, 364 RFC 8126, DOI 10.17487/RFC8126, June 2017, 365 . 367 Appendix A. Change Log 369 RFC EDITOR: PLEASE REMOVE THIS SECTION AS IT IS ONLY MEANT TO AID THE 370 WORKING GROUP IN TRACKING CHANGES TO THIS DOCUMENT. 372 draft-ietf-tls-tlsflags-02 set the maximum number of flags to 2048, 373 and added guidance for the IANA experts. 375 draft-ietf-tls-tlsflags-01 allows server-only flags and allows the 376 client to send an empty extension. Also modified the packing order 377 of the bits. 379 draft-ietf-tls-tlsflags-00 had the same text as draft-nir-tls- 380 tlsflags-02, and was re-submitted as a working group document 381 following the adoption call. 383 Version -02 replaced the fixed 64-bit string with an unlimited 384 bitstring, where only the necessary octets are encoded. 386 Version -01 replaced the enumeration of 8-bit values with a 64-bit 387 bitstring. 389 Version -00 was a quickly-thrown-together draft with the list of 390 supported features encoded as an array of 8-bit values. 392 Author's Address 394 Yoav Nir 395 Dell Technologies 396 9 Andrei Sakharov St 397 Haifa 3190500 398 Israel 400 Email: ynir.ietf@gmail.com