RFC 7685

A Transport Layer Security (TLS) ClientHello Padding Extension

πŸ“… published October 2015, from ietf

RFC 7685: A Transport Layer Security (TLS) ClientHello Padding Extension πŸŽ€

Okay bestie, let's talk about RFC 7685 πŸ’… It's from October 2015 and it's on the Standards Track (so it's an official Internet standard, not just a suggestion πŸ‘‘). Adam Langley wrote it while he was at Google Inc. It updates [RFC5246] (that's TLS 1.2) and it obsoletes nothing. The ISSN is 2070-1721 if you want to look it up 🧚


Abstract ✨

This memo describes a Transport Layer Security (TLS) extension that can be used to pad ClientHello messages to a desired size. Basically, it's a way to make a ClientHello bigger on purpose 🫢

Status of This Memo 🌸

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). If you want more info on Internet Standards, check out Section 2 of RFC 5741 πŸ“š

Info about the current status of this document, any errata, and how to give feedback on it can be found at http://www.rfc-editor.org/info/rfc7685 πŸ”—

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) as they stand on the date this document was published. Please read these carefully, because they explain your rights and restrictions with respect to this document. Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License πŸ¦‹

Table of Contents πŸ—‚οΈ

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
2.  Requirements Notation . . . . . . . . . . . . . . . . . . . .   2
3.  Padding Extension . . . . . . . . . . . . . . . . . . . . . .   2
4.  Example Usage . . . . . . . . . . . . . . . . . . . . . . . .   3
5.  Security Considerations . . . . . . . . . . . . . . . . . . .   3
6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
7.  Normative References  . . . . . . . . . . . . . . . . . . . .   4
Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   4
Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   4

1. Introduction 🌷

Okay so, successive TLS [RFC5246] versions have added support for more cipher suites, and over time more TLS extensions have been defined too πŸ“ That made the TLS ClientHello keep growing, and the extra size exposed some implementation bugs. At least one of those bugs can be eased by making the ClientHello even larger 😭 This is useful because fully fixing every affected implementation is hard to pull off.

This memo describes a TLS extension that can be used to pad a ClientHello to a desired size, so it avoids implementation bugs triggered by certain ClientHello sizes. Main character energy πŸ‘‘

2. Requirements Notation πŸ“

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119] 🫢

3. Padding Extension 🧚

A new extension type ("padding(21)") is defined and MAY be included by the client in its ClientHello message ✨

enum {
    padding(21), (65535)
} ExtensionType;

The "extension_data" for the extension consists of an arbitrary number of zero bytes. For example, the smallest "padding" extension is four bytes long and is encoded as 0x00 0x15 0x00 0x00. A ten-byte extension would include six bytes of "extension_data" and would be encoded as:

00 15 00 06 00 00 00 00 00 00
|---| |---| |---------------|
  |     |           |
  |     |           \- extension_data: 6 zero bytes
  |     |
  |     \------------- 16-bit, extension_data length
  |
  \------------------- extension_type for padding extension

The client MUST fill the padding extension completely with zero bytes, although the padding extension_data field may be empty. Bestie, this part is key πŸ™ˆ

The server MUST NOT echo the extension. So the server just doesn't copy it back 🚫

4. Example Usage πŸ’

Let's say a client wants to avoid sending a ClientHello with a TLSCiphertext.length between 256 and 511 bytes (inclusive). This case gets used as the example because at least one TLS implementation is known to hang the connection when a ClientHello record like that shows up πŸ’€

After building a ClientHello as normal, the client can add four bytes to the length (to account for the "msg_type" and "length" fields of the handshake protocol) and check whether the result lands in that range. If it does, a padding extension can be added to push the length to (at least) 512 bytes 🌈

Note that if the original ClientHello size was between 505 and 507 bytes, then, with the handshake protocol overhead, the record payload would be between 509 and 511 bytes long. Since an extension can't take up less than four bytes of space, the padding would have to push the ClientHello record payload past 512 bytes in these cases πŸ˜…

5. Security Considerations πŸ”

The contents of the padding extension could be used as a covert channel. To prevent this, the contents are required to be all zeros, although the length of the extension can still be used as a much smaller covert channel. So the zeros are locked down, but the length still leaks a tiny bit, and that's a real thing to keep in mind πŸ‘€

6. IANA Considerations 🏷️

IANA has permanently registered value 21 (padding) in the "ExtensionType Values" registry πŸŽ€

7. Normative References πŸ“š

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, http://www.rfc-editor.org/info/rfc2119.

[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, http://www.rfc-editor.org/info/rfc5246.

Acknowledgements 🫢

The author gratefully acknowledges the contributions of Wan-Teh Chang and the suggestions of Eric Rescorla. Thank you to them, they're iconic 🌸

Author's Address πŸ’Œ

Adam Langley Google Inc

Email: agl@google.com

πŸ“¦ where this page comes from