idnits 2.17.00 (12 Aug 2021) /tmp/idnits52021/draft-ietf-tls-tlsflags-09.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 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 (7 March 2022) is 68 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) == Unused Reference: 'RFC5746' is defined on line 342, but no explicit reference was found in the text == Outdated reference: draft-ietf-tls-tls13-cert-with-extern-psk has been published as RFC 8773 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 7 March 2022 5 Expires: 8 September 2022 7 A Flags Extension for TLS 1.3 8 draft-ietf-tls-tlsflags-09 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 8 September 2022. 37 Copyright Notice 39 Copyright (c) 2022 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 (https://trustee.ietf.org/ 44 license-info) in effect on the date of publication of this document. 45 Please review these documents carefully, as they describe your rights 46 and restrictions with respect to this document. Code Components 47 extracted from this document must include Revised BSD License text as 48 described in Section 4.e of the Trust Legal Provisions and are 49 provided without warranty as described in the Revised BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 1.1. Requirements and Other Notation . . . . . . . . . . . . . 3 55 2. The tls_flags Extension . . . . . . . . . . . . . . . . . . . 3 56 3. Rules for The Flags Extension . . . . . . . . . . . . . . . . 4 57 3.1. Interaction with the 0-RTT Handshake . . . . . . . . . . 5 58 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 59 5. Security Considerations . . . . . . . . . . . . . . . . . . . 6 60 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 61 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 62 7.1. Normative References . . . . . . . . . . . . . . . . . . 7 63 7.2. Informative References . . . . . . . . . . . . . . . . . 7 64 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 8 65 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9 67 1. Introduction 69 Since the publication of TLS 1.3 ([RFC8446]) there have been several 70 proposals for extensions to this protocol, where the presence of the 71 content-free extension in both the ClientHello and either the 72 ServerHello or EncryptedExtensions indicates nothing except either 73 support for the optional feature or an intent to use the optional 74 feature. Examples: 76 * An extension that allows the server to tell the client that cross- 77 SNI resumption is allowed: [I-D.sy-tls-resumption-group]. 79 * An extension that is used to negotiate support for authentication 80 using both certificates and external PSKs: 81 [I-D.ietf-tls-tls13-cert-with-extern-psk]. 83 * The post_handshake_auth extension from the TLS 1.3 base document 84 indicates that the client is willing to perform post-handshake 85 authentication. 87 This document proposes a single extension called tls_flags that can 88 enumerate such flag extensions and allowing both client and server to 89 indicate support for optional features in a concise way. 91 None of the current proposed extensions allow for indication of 92 support in ServerHello (SH), EncryptedExtensions (EE), Certificate 93 (CT), or HelloRetryRequest (HRR) without first being indicated in 94 ClientHello (CH). Similarly, none of the current proposed extensions 95 allow for an indication of support in the client-side Certificate 96 (CT) message without first being indicated in the server's 97 CertificateRequest (CR) message. This restriction is enforced by the 98 rules in Section 3. 100 1.1. Requirements and Other Notation 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 104 document are to be interpreted as described in BCP 14 [RFC2119] 105 [RFC8174] when, and only when, they appear in all capitals, as shown 106 here. 108 The term "flag extension" is used to denote an extension where the 109 extension_data field is always zero-length in a particular context, 110 and the presence of the extension denotes either support for some 111 feature or the intent to use that feature. 113 The term "flag-type feature" denotes an options TLS 1.3 feature the 114 support for which is negotiated using a flag extension, whether that 115 flag extension is its own extension or a value in the extension 116 defined in this document. 118 2. The tls_flags Extension 120 This document defines the following extension code point: 122 enum { 123 ... 124 tls_flags(TBD), 125 (65535) 126 } ExtensionType; 128 This document also defines the data for this extension as a variable- 129 length bit string, allowing for the encoding of up to 2040 features. 131 struct { 132 opaque flags<1..255>; 133 } FlagExtensions; 135 The FlagExtensions field contains 8 flags in each octet. The length 136 of the extension is the minimal length that allows it to encode all 137 of the present flags. Within each octet, the bits are packed such 138 that the first bit is the least significant bit and the eighth bit is 139 the most significant. Using zero-based indexing, the first octet 140 holds flags 0-7, the second octet holds bits 8-15 and so on. For 141 example, if we want to encode only flag number zero, the 142 FlagExtension field will be 1 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 Any TLS implementation that intends to propose or indicate support 171 for a flag extension SHALL send this extension with the relevant bits 172 set. It MUST NOT send this extension empty -- with a length of zero. 174 This specification does not require every flag extension to be 175 acknowledged. Acknowledging a flag extension is typically needed to 176 inform the peer proposing the extension that the other side 177 understands and supports the extension, but some extensions do not 178 require this acknowledgement. 180 A flag proposed by the client in ClientHello (CH) that requires 181 acknowledgement SHOULD be acknowledged in either ServerHello (SH), in 182 EncryptedExtensions (EE), in Certificate (CT), or in 183 HelloRetryRequest (HRR) as the corresponding flag document specifies. 184 Similarly, a flag proposed by the server in the CertificateRequest 185 (CR) message that requires acknowledgement SHOULD be acknowledged in 186 the client's Certificate (CT) message. A flag proposed by the server 187 in the NewSessionTicket (NST) message is never acknowledged as there 188 is not client-side response message. 190 Multiple flags can be proposed or acknowledged in the same extension. 192 In all of the above cases, a flag MUST NOT be acknowledged in SH, EE, 193 CT, or HRR without first having been proposed in CH or CR. 194 Unsolicited flags may appear only in CH, CR, and NST. And endpoint 195 that receives an unsolicited flag in another message (HRR, SH, EE, or 196 CT) MUST generate a fatal illegal_parameter alert. 198 A client that supports this extension and at least one flag extension 199 SHALL send this extension with the flags field having bits set only 200 for those extensions that it intends to set. It MUST NOT send this 201 extension with a length of zero. 203 An implementation that receives an invalid tls_flags extension MUST 204 terminate the TLS handshake with a fatal illegal_parameter alert. 206 3.1. Interaction with the 0-RTT Handshake 208 The 0-RTT handshake, defined in section 2.3 of [RFC8446], has a 209 ClientHello message, a ServerHello message, and an 210 EncryptedExtensions message. Those can include the tls_flags 211 extension just as they can in a regular handshake. 213 Future flag extensions MUST define their interaction with 0-RTT, just 214 as other extensions are required to. 216 4. IANA Considerations 218 IANA is requested to assign a new value from the TLS ExtensionType 219 Values registry: 221 * The Extension Name should be tls_flags 223 * The TLS 1.3 value should be CH,SH,HRR,EE,CR,CT,NST 225 * The DTLS-Only value should be N 227 * The Recommended value should be Y 228 * The Reference should be this document 230 IANA is also requested to create a new registry under the TLS 231 namespace with name "TLS Flags" and the following fields: 233 * Value, which is a number between 0 and 2039. All potential values 234 are available for assignment. 236 * Flag Name, which is a string 238 * Message, which like the "TLS 1.3" field in the ExtensionType 239 registry contains the abbreviations of the messages that may 240 contain the flag: CH, SH, EE, etc. 242 * Recommended, which is a Y/N value determined in the document 243 defining the optional feature. 245 * Reference, which is a link to the document defining this flag. 247 The policy for this shall be "Specification Required" as described in 248 Section 4.6 of [RFC8126] with the exception of flags numbered from 249 0-15, which follow the "Standards Action" policy (Section 4.9 of 250 [RFC8126]). Designated expert(s) are advised to follow the advice in 251 Section 17 of [RFC8447] when reviewing registration requests. 253 The initial contents of the registry shall be one entry, as follows: 255 * Value shall be 8 257 * Flag Name shall be resumption_across_names 259 * Message shall be NST 261 * Recommended shall be set to no (N) 263 * The reference shall the the RFC-to-be 264 [I-D.ietf-tls-cross-sni-resumption]. 266 5. Security Considerations 268 The extension described in this document provides a more concise way 269 to express data that could otherwise be expressed in individual 270 extensions. It does not send in the clear any information that would 271 otherwise be sent encrypted, nor vice versa. For this reason this 272 extension is neutral as far as security is concerned. 274 Extension authors should be aware that acknowledging flags in a 275 tls_flags extension of the ServerHello and HelloRetryRequest messages 276 expose this response to passive observers. Unless there is a special 277 reason to place the response in the ServerHello, most flags should go 278 in other (encrypted) messages. 280 6. Acknowledgements 282 The idea for writing this was expressed at the mic during the TLS 283 session at IETF 104 by Eric Rescorla. 285 The current bitwise formatting was suggested on the mailing list by 286 Nikos Mavrogiannopoulos. 288 Improvement to the encoding were suggested by Ilari Liusvaara, who 289 also asked for a better explanation of the semantics of missing 290 extensions. 292 Useful comments received from Martin Thomson, including the 293 suggestion to eliminate the option to have the server send 294 unsolicited flag types and the rules for where unsolicited flags can 295 appear. 297 7. References 299 7.1. Normative References 301 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 302 Requirement Levels", BCP 14, RFC 2119, 303 DOI 10.17487/RFC2119, March 1997, 304 . 306 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 307 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 308 May 2017, . 310 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 311 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 312 . 314 [RFC8447] Salowey, J. and S. Turner, "IANA Registry Updates for TLS 315 and DTLS", RFC 8447, DOI 10.17487/RFC8447, August 2018, 316 . 318 7.2. Informative References 320 [I-D.ietf-tls-cross-sni-resumption] 321 Vasiliev, V., "Transport Layer Security (TLS) Resumption 322 across Server Names", Work in Progress, Internet-Draft, 323 draft-ietf-tls-cross-sni-resumption-02, 5 December 2021, 324 . 327 [I-D.ietf-tls-tls13-cert-with-extern-psk] 328 Housley, R., "TLS 1.3 Extension for Certificate-Based 329 Authentication with an External Pre-Shared Key", Work in 330 Progress, Internet-Draft, draft-ietf-tls-tls13-cert-with- 331 extern-psk-07, 23 December 2019, 332 . 335 [I-D.sy-tls-resumption-group] 336 Sy, E., "TLS Resumption across Server Name Indications for 337 TLS 1.3", Work in Progress, Internet-Draft, draft-sy-tls- 338 resumption-group-00, 1 March 2019, 339 . 342 [RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, 343 "Transport Layer Security (TLS) Renegotiation Indication 344 Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010, 345 . 347 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 348 Writing an IANA Considerations Section in RFCs", BCP 26, 349 RFC 8126, DOI 10.17487/RFC8126, June 2017, 350 . 352 Appendix A. Change Log 354 RFC EDITOR: PLEASE REMOVE THIS SECTION AS IT IS ONLY MEANT TO AID THE 355 WORKING GROUP IN TRACKING CHANGES TO THIS DOCUMENT. 357 draft-ietf-tls-tlsflags-02 set the maximum number of flags to 2048, 358 and added guidance for the IANA experts. 360 draft-ietf-tls-tlsflags-01 allows server-only flags and allows the 361 client to send an empty extension. Also modified the packing order 362 of the bits. 364 draft-ietf-tls-tlsflags-00 had the same text as draft-nir-tls- 365 tlsflags-02, and was re-submitted as a working group document 366 following the adoption call. 368 Version -02 replaced the fixed 64-bit string with an unlimited 369 bitstring, where only the necessary octets are encoded. 371 Version -01 replaced the enumeration of 8-bit values with a 64-bit 372 bitstring. 374 Version -00 was a quickly-thrown-together draft with the list of 375 supported features encoded as an array of 8-bit values. 377 Author's Address 379 Yoav Nir 380 Dell Technologies 381 9 Andrei Sakharov St 382 Haifa 3190500 383 Israel 384 Email: ynir.ietf@gmail.com